/* eslint-disable */
// Three Days — itinerary-length hub. Mirrors the solo template's editorial vocabulary
// (cream/teal/tan, Playfair + DM Sans/Mono, numbered sections, hero masthead).

const { useState: useTDState } = React;

/* ---------- HERO ---------- */
const TDHero = () => (
  <section className="solo-hero">
    <div
      className="hero-bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1467269204594-9661b134dd2b?w=2400&q=85)` }}
    ></div>
    <div className="hero-scrim"></div>
    <Nav />

    <div className="container">
      <div className="solo-crumbs">
        <a href="/">Home</a>
        <span className="sep">/</span>
        <a href="/en/plan/">Plan</a>
        <span className="sep">/</span>
        <a href="/en/plan/itineraries/">Itineraries</a>
        <span className="sep">/</span>
        <span className="here">Three Days</span>
      </div>

      <div className="solo-mast">
        <div className="lhs">
          <span className="layer-tag">SEVENTY-TWO HOURS · 28 GUIDES · {TD_META.newThisSeason} NEW THIS SEASON</span>
          <h1>
            Three<em>Days.</em>
          </h1>
          <p className="lede">
            The most useful trip length we publish. <em>One city, one neighborhood,</em> one good meal a day. Long enough to arrive properly. Short enough to leave before you wear out your welcome. Twelve cities worth a 72-hour study, eight itineraries by character, and the brief on what changes when the trip is short.
          </p>
        </div>
        <div className="rhs">
          <div className="solo-meta-card">
            <div className="row">
              <span className="k">Guides on file</span>
              <span className="v"><em>{TD_META.count}</em></span>
            </div>
            <div className="row">
              <span className="k">New this season</span>
              <span className="v">{TD_META.newThisSeason}</span>
            </div>
            <div className="row">
              <span className="k">Trip length</span>
              <span className="v">3 days · 2 nights</span>
            </div>
            <div className="row">
              <span className="k">Most-read age</span>
              <span className="v">{TD_META.topAge}</span>
            </div>
            <div className="row last">
              <span className="k">Updated</span>
              <span className="v">{TD_META.updated}</span>
            </div>
          </div>
        </div>
      </div>

      <div className="solo-toc">
        <span className="lbl">In this issue</span>
        <a href="#places"><span className="n">I</span>Twelve cities</a>
        <span className="dot">·</span>
        <a href="#field"><span className="n">II</span>Field notes</a>
        <span className="dot">·</span>
        <a href="#itins"><span className="n">III</span>Eight itineraries</a>
        <span className="dot">·</span>
        <a href="#bucket"><span className="n">IV</span>By character</a>
        <span className="dot">·</span>
        <a href="#reading"><span className="n">V</span>Reading list</a>
        <span className="dot">·</span>
        <a href="#voices"><span className="n">VI</span>The desk</a>
        <span className="dot">·</span>
        <a href="#practical"><span className="n">VII</span>The brief</a>
        <span className="dot">·</span>
        <a href="#faq"><span className="n">VIII</span>FAQ</a>
      </div>
    </div>

    <div className="hero-coord">FORM Nº 03 · 72 HOURS · ONE CITY</div>
    <div className="hero-credit">PHOTO — FIELD DESK Nº 104 · IRIS</div>
  </section>
);

/* ---------- I · TWELVE CITIES ---------- */
const TDPlaces = () => {
  const [region, setRegion] = useTDState("All");
  const regions = ["All", "Europe", "Asia", "Americas", "Africa"];
  const filtered = TD_PLACES.filter(p => region === "All" || p.region === region);

  return (
    <section className="solo-places" id="places">
      <div className="container">
        <div className="solo-section-head">
          <div className="num">I</div>
          <div className="titles">
            <h2>Twelve cities,<em>for three days.</em></h2>
            <p>Picked because the city actually rewards a 72-hour study — close enough to walk, dense enough to repay the visit, generous enough that you don't leave needing more time. Each card opens a hand-built day-by-day plan.</p>
          </div>
          <div className="filter-pills">
            {regions.map(r => (
              <button
                key={r}
                className={`f-pill ${region === r ? "on" : ""}`}
                onClick={() => setRegion(r)}
              >{r}</button>
            ))}
          </div>
        </div>

        <div className="places-grid">
          {filtered.map((p, i) => (
            <a key={p.id} href={p.href} className={`place-card ${i === 0 ? "feature" : ""}`}>
              <div className="img" style={{ backgroundImage: `url(${p.img})` }}></div>
              <div className="scrim"></div>
              <span className="rank">No. {String(p.rank).padStart(2, "0")}</span>
              {p.tag && <span className="tag">{p.tag}</span>}
              <div className="body">
                <div className="loc">
                  <span className="city">{p.city}</span>
                  <span className="country">{p.country}</span>
                </div>
                <p className="why">{p.why}</p>
                <div className="meta">
                  <span><em>{p.nights}</em> days</span>
                  <span className="sep">·</span>
                  <span>{p.budget}</span>
                  <span className="sep">·</span>
                  <span>{p.season}</span>
                </div>
                <div className="best-for">
                  {p.best.map(b => <span key={b}>{b}</span>)}
                </div>
                <div className="coord">{p.coord}</div>
              </div>
            </a>
          ))}
        </div>
        <div className="places-foot">
          <span className="ct">Showing {filtered.length} of {TD_PLACES.length}</span>
          <a href="/en/plan/itineraries/">All itineraries by length <Icon name="arrow" size={12} /></a>
        </div>
      </div>
    </section>
  );
};

/* ---------- II · FIELD NOTES (essay quote, dark band) ---------- */
const TDField = () => (
  <section className="solo-practical" id="field" style={{ paddingTop: 110, paddingBottom: 110 }}>
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">II</div>
        <div className="titles">
          <h2>Field notes.<em>Why three days is the form.</em></h2>
          <p>The opening pages of the Itineraries Desk's house essay on the 72-hour trip — what it is, what it isn't, and why it's the trip most readers actually take.</p>
        </div>
        <div className="right">Read the full essay <Icon name="arrow" size={12} /></div>
      </div>

      <blockquote style={{
        fontFamily: "var(--serif)",
        fontSize: "clamp(22px, 2.4vw, 30px)",
        lineHeight: 1.45,
        color: "var(--cream)",
        fontStyle: "italic",
        maxWidth: 920,
        borderLeft: "1px solid var(--tan)",
        padding: "8px 0 8px 32px",
        marginBottom: 28,
      }}>
        "The 3-day trip is not a small trip. It's a different trip. Two weeks lets you be wrong about a city and still come home knowing it; three days does not. The discipline of 72 hours forces a kind of editorial judgment most travel doesn't ask for — what's the one museum, the one walk, the one meal you'd defend? Pick those, in order, and the trip plans itself. Try to do everything, and you'll do nothing well."
      </blockquote>
      <p style={{
        fontSize: 15,
        lineHeight: 1.7,
        color: "rgba(241,235,224,0.78)",
        maxWidth: 760,
        marginBottom: 18,
      }}>
        The most common mistake is treating a three-day plan like a compressed one-week plan. It isn't. A one-week plan can absorb a slow morning, a missed train, a restaurant that disappoints. A three-day plan can't. So the math changes: one neighborhood, not three. One museum, not five. One booked dinner, the rest walk-ins. Land before noon on day one, leave the last morning empty.
      </p>
      <p style={{
        fontSize: 15,
        lineHeight: 1.7,
        color: "rgba(241,235,224,0.78)",
        maxWidth: 760,
      }}>
        What you protect, in those 72 hours, is the same thing every good itinerary protects: enough margin that the trip can surprise you. The plan isn't the trip. The plan is what makes room for the trip.
      </p>
      <p style={{
        marginTop: 32,
        fontFamily: "var(--mono)",
        fontSize: 11,
        letterSpacing: "0.18em",
        color: "var(--tan)",
        textTransform: "uppercase",
      }}>— Iris Mendoza, Itineraries Desk · House essay Nº 03</p>
    </div>
  </section>
);

/* ---------- III · ITINERARIES BY STYLE ---------- */
const TDItins = () => (
  <section className="solo-itins" id="itins">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">III</div>
        <div className="titles">
          <h2>Eight itineraries,<em>by character.</em></h2>
          <p>Same length, eight different trips. Budget, luxury, ski, business, beach, family, spiritual, adventure. Each is a complete day-by-day with a budget that holds in 2026 and a pace tested for 72 hours.</p>
        </div>
        <div className="right">All 28 three-day plans <Icon name="arrow" size={12} /></div>
      </div>

      <div className="itins-grid">
        {TD_ITINS.map(it => (
          <a key={it.ref} href={it.href} className="itin-card">
            <div className="pic" style={{ backgroundImage: `url(${it.img})` }}>
              <span className="ref-pill">{it.ref}</span>
              <span className="day-pill"><em>{it.days}</em><span className="d">days</span></span>
            </div>
            <div className="body">
              <h4>{it.title}<em> {it.em}</em></h4>
              <div className="tags">
                {it.tags.map(t => <span key={t}>{t}</span>)}
              </div>
              <div className="foot">
                <span className="by">By {it.author}</span>
                <span className="price">{it.price}</span>
              </div>
            </div>
          </a>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- IV · BY CHARACTER (table) ---------- */
const TDByStyle = () => (
  <section className="solo-length" id="bucket">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">IV</div>
        <div className="titles">
          <h2>The 72-hour<em>matrix.</em></h2>
          <p>Three days, six different shapes. Pick the row that matches the trip you want, not the trip you think you should want.</p>
        </div>
        <div className="right">Pace planner <Icon name="arrow" size={12} /></div>
      </div>

      <div className="length-table">
        <div className="row head">
          <div>Trip character</div>
          <div className="d">Days</div>
          <div className="ct">Guides</div>
          <div className="ex">Best examples</div>
          <div className="pr">Starting</div>
          <div></div>
        </div>
        {TD_BY_STYLE.map(l => (
          <a href="/en/plan/itineraries/" key={l.len} className="row">
            <div className="lbl">{l.len}</div>
            <div className="d"><em>{l.days}</em></div>
            <div className="ct">{l.count} guides</div>
            <div className="ex">{l.examples}</div>
            <div className="pr">{l.price}</div>
            <div className="go"><Icon name="arrow" size={14} /></div>
          </a>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- V · READING LIST ---------- */
const TDReading = () => (
  <section className="solo-reading" id="reading">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">V</div>
        <div className="titles">
          <h2>Eight reads,<em>by depth.</em></h2>
          <p>The pieces sitting one click below this page. The first is the house essay; the rest are full city plans, hand-built. Read in order or skip to the trip you're already half-planning.</p>
        </div>
        <div className="right">All Itineraries essays <Icon name="arrow" size={12} /></div>
      </div>

      <div className="reading-list">
        {TD_READING.map((r, i) => (
          <a key={i} href={r.href} className="r-row">
            <div className="n">{String(i + 1).padStart(2, "0")}</div>
            <div className="tag">{r.tag}</div>
            <div className="t">{r.title}<em>{r.em}</em></div>
            <div className="by">{r.author}</div>
            <div className="dur">{r.duration}</div>
            <div className="go"><Icon name="arrow" size={12} /></div>
          </a>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VI · DESK / VOICES ---------- */
const TDVoices = () => (
  <section className="solo-voices" id="voices">
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">VI</div>
        <div className="titles">
          <h2>The Itineraries desk.<em>Three editors on the form.</em></h2>
          <p>Three days is the trip the desk argues about most. These are the people writing it — what they go for, and what they keep coming back to.</p>
        </div>
        <div className="right">Desk masthead <Icon name="arrow" size={12} /></div>
      </div>

      <div className="voices-grid">
        {TD_VOICES.map(v => (
          <article key={v.name} className="voice">
            <div className="av" style={{ backgroundImage: `url(${v.av})` }}></div>
            <div className="who">
              <div className="name">{v.name}</div>
              <div className="role">{v.role}</div>
            </div>
            <p className="line">"{v.line}"</p>
            <div className="foot">
              <span className="trips">{v.trips} field trips</span>
              <a href="/en/plan/itineraries/">Read their lane <Icon name="arrow" size={12} /></a>
            </div>
          </article>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VII · THE BRIEF ---------- */
const TDPractical = () => (
  <section className="solo-practical" id="practical">
    <div className="container">
      <div className="solo-section-head dark">
        <div className="num">VII</div>
        <div className="titles">
          <h2>The brief.<em>Six tips, in order of importance.</em></h2>
          <p>The non-obvious things. Tested on the road, ordered by how much they matter to a 72-hour trip.</p>
        </div>
        <div className="right">Full planning guide <Icon name="arrow" size={12} /></div>
      </div>

      <div className="practical-grid">
        {TD_PRACTICAL.map((p, i) => (
          <div key={i} className="pr-card">
            <div className="num">{String(i + 1).padStart(2, "0")}</div>
            <div className="kind">{p.k}</div>
            <h4>{p.h}</h4>
            <p>{p.b}</p>
          </div>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VIII · FAQ ---------- */
const TDFAQ = () => {
  const [open, setOpen] = useTDState(0);
  return (
    <section className="solo-faq" id="faq">
      <div className="container">
        <div className="faq-shell">
          <div className="lhs">
            <div className="solo-section-head stacked">
              <div className="num">VIII</div>
              <div className="titles">
                <h2>The questions<em>readers send in.</em></h2>
                <p>Lightly edited reader letters about the 72-hour trip. If yours isn't here, the planning desk reads every email.</p>
              </div>
            </div>
            <a href="mailto:itineraries@howto.travel" className="ask">Ask the desk →</a>
          </div>
          <div className="rhs">
            {TD_FAQS.map((f, i) => (
              <div key={i} className={`f-item ${open === i ? "open" : ""}`} onClick={() => setOpen(open === i ? -1 : i)}>
                <div className="q">
                  <span className="qt">{f.q}</span>
                  <span className="tg">+</span>
                </div>
                <div className="a">{f.a}</div>
              </div>
            ))}
          </div>
        </div>
      </div>
    </section>
  );
};

/* ---------- CTA ---------- */
const TDCTA = () => (
  <section className="solo-cta">
    <div
      className="bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=2000&q=80)` }}
    ></div>
    <div className="inner">
      <div className="kicker">PICK ONE CITY · LAND BEFORE NOON · BOOK ONE DINNER</div>
      <h2>Plan a three-day trip<em>that actually fits.</em></h2>
      <p>Open a city, copy the day-by-day, read the brief, book the flight. Seventy-two hours, no second hotel, one good story to bring back.</p>
      <div className="cta-actions">
        <a href="/en/plan/itineraries/tokyo/tokyo-3-day-first-time-itinerary" className="btn-p">Open Tokyo, three days →</a>
        <a href="/en/plan/itineraries/" className="btn-g">↑ Back to Itineraries</a>
      </div>
    </div>
    <div className="coord">THREE DAYS · FORM Nº 03 · UPDATED 06.05.2026</div>
    <div className="coord right">FIELD DESK Nº 104</div>
  </section>
);

/* ---------- COMPOSE ---------- */
const TDApp = () => (
  <div data-screen-label="Three Days">
    <TDHero />
    <TDPlaces />
    <TDField />
    <TDItins />
    <TDByStyle />
    <TDReading />
    <TDVoices />
    <TDPractical />
    <TDFAQ />
    <TDCTA />
    <Footer />
  </div>
);

ReactDOM.createRoot(document.getElementById("root")).render(<TDApp />);
