/* eslint-disable */
// Workation — trip-duration hub. Mirrors the three-day template's editorial vocabulary
// (cream/teal/tan, Playfair + DM Sans/Mono, numbered sections, hero masthead).

const { useState: useWKState } = React;

/* ---------- HERO ---------- */
const WKHero = () => (
  <section className="solo-hero">
    <div
      className="hero-bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1499951360447-b19be8fe80f5?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/trip-duration/">Trip Duration</a>
        <span className="sep">/</span>
        <span className="here">Workation</span>
      </div>

      <div className="solo-mast">
        <div className="lhs">
          <span className="layer-tag">WEEKS TO MONTHS · {WK_META.count} GUIDES · {WK_META.newThisSeason} NEW THIS SEASON</span>
          <h1>
            Working<em>from somewhere else.</em>
          </h1>
          <p className="lede">
            Combining work and travel for two weeks, two months, the rest of the year. <em>Wifi, time zones,</em> and the apartments with the desk you'd actually use. Twelve cities for the laptop traveler, eight ways to set up the desk, and the brief on what changes when the trip lasts longer than the vacation days you've saved.
          </p>
        </div>
        <div className="rhs">
          <div className="solo-meta-card">
            <div className="row">
              <span className="k">Guides on file</span>
              <span className="v"><em>{WK_META.count}</em></span>
            </div>
            <div className="row">
              <span className="k">New this season</span>
              <span className="v">{WK_META.newThisSeason}</span>
            </div>
            <div className="row">
              <span className="k">Form</span>
              <span className="v">14 days · 30 · 90 · 365</span>
            </div>
            <div className="row">
              <span className="k">Most-read age</span>
              <span className="v">{WK_META.topAge}</span>
            </div>
            <div className="row last">
              <span className="k">Updated</span>
              <span className="v">{WK_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 desks</a>
        <span className="dot">·</span>
        <a href="#bucket"><span className="n">IV</span>The matrix</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º 11 · WORKATION · WEEKS TO MONTHS</div>
    <div className="hero-credit">PHOTO — FIELD DESK Nº 211 · IRIS</div>
  </section>
);

/* ---------- I · TWELVE CITIES ---------- */
const WKPlaces = () => {
  const [region, setRegion] = useWKState("All");
  const regions = ["All", "Europe", "Asia", "Americas", "Africa"];
  const filtered = WK_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 the laptop traveler.</em></h2>
            <p>Picked because the wifi holds, the apartments have the desk you'd actually use, and the time zones don't punish your team. Each card opens a hand-built long-stay or workation plan, walked by the desk.</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> nights</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 {WK_PLACES.length}</span>
          <a href="/en/plan/trip-duration/">All trip-duration hubs <Icon name="arrow" size={12} /></a>
        </div>
      </div>
    </section>
  );
};

/* ---------- II · FIELD NOTES ---------- */
const WKField = () => (
  <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>The workation isn't a vacation with a laptop.</em></h2>
          <p>The opening pages of the Long-Stay Desk's house essay on the workation — what it is, what it isn't, and the one variable that decides whether the trip works or quietly fails on day eleven.</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,
      }}>
        "A workation is the trip you take when you've run out of vacation days but you haven't run out of wanting to leave. The mistake is treating it like a long vacation that you're going to do email through. It isn't. It's a job you've moved to a different apartment, and the trick is to admit that on day one — set up the desk before the bag is unpacked, find the supermarket before you find the bar, keep the morning identical to the morning at home. The city is the reward for closing the laptop, not the place you happen to be while you avoid it."
      </blockquote>
      <p style={{
        fontSize: 15,
        lineHeight: 1.7,
        color: "rgba(241,235,224,0.78)",
        maxWidth: 760,
        marginBottom: 18,
      }}>
        The single variable that decides whether a workation works is the desk. Not the city, not the visa, not the wifi, not the apartment's view from the photos — the actual surface you sit at for eight hours a day, lit by something other than a screen, with a chair that was chosen by a person who has sat in chairs for a living. Most apartments don't have one. The ones that do are usually the same ones with the fiber connection and the host who answers messages.
      </p>
      <p style={{
        fontSize: 15,
        lineHeight: 1.7,
        color: "rgba(241,235,224,0.78)",
        maxWidth: 760,
      }}>
        The second variable is the time zone, and it isn't optional. Stay within three hours of home and the trip is just a different room. Push it to five and the day flips on its head: you sleep through the morning to be alive for the 4 p.m. stand-up, and you see the city only on weekends, which is the version of the trip you were trying to escape. Eight hours off and you're a writer or you're miserable; there isn't a middle.
      </p>
      <p style={{
        marginTop: 32,
        fontFamily: "var(--mono)",
        fontSize: 11,
        letterSpacing: "0.18em",
        color: "var(--tan)",
        textTransform: "uppercase",
      }}>— Iris Mendoza, Long-Stay Desk · House essay Nº 11</p>
    </div>
  </section>
);

/* ---------- III · EIGHT DESKS ---------- */
const WKItins = () => (
  <section className="solo-itins" id="itins">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">III</div>
        <div className="titles">
          <h2>Eight ways<em>to set up the desk.</em></h2>
          <p>The practical guides — the rooms, the routers, the budgets, the visa lines that get you through. Each is a complete long-stay plan with prices that hold in 2026 and a pace tested for the form.</p>
        </div>
        <div className="right">All long-stay plans <Icon name="arrow" size={12} /></div>
      </div>

      <div className="itins-grid">
        {WK_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 · MATRIX ---------- */
const WKByStyle = () => (
  <section className="solo-length" id="bucket">
    <div className="container">
      <div className="solo-section-head">
        <div className="num">IV</div>
        <div className="titles">
          <h2>The workation<em>matrix.</em></h2>
          <p>Six shapes of long stay, ordered by length and intention. Pick the row that matches the trip you actually need to take, not the one your feed thinks you should.</p>
        </div>
        <div className="right">Long-stay decision tree <Icon name="arrow" size={12} /></div>
      </div>

      <div className="length-table">
        <div className="row head">
          <div>Trip shape</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>
        {WK_BY_STYLE.map(l => (
          <a href="/en/plan/trip-duration/" 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 WKReading = () => (
  <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 city plans, visa explainers, and long-stay budgets that the desk has actually walked. Read in order or skip to the trip you're already half-planning.</p>
        </div>
        <div className="right">All Long-Stay essays <Icon name="arrow" size={12} /></div>
      </div>

      <div className="reading-list">
        {WK_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 WKVoices = () => (
  <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 Long-Stay desk.<em>Three editors on the form.</em></h2>
          <p>Workations are the trip the desk has the most personal opinions about, because they've all done them — quietly, badly the first time, and well after that. Here's what they tell their friends.</p>
        </div>
        <div className="right">Desk masthead <Icon name="arrow" size={12} /></div>
      </div>

      <div className="voices-grid">
        {WK_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} long stays</span>
              <a href="/en/plan/trip-duration/">Read their lane <Icon name="arrow" size={12} /></a>
            </div>
          </article>
        ))}
      </div>
    </div>
  </section>
);

/* ---------- VII · THE BRIEF ---------- */
const WKPractical = () => (
  <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 across long stays in three continents, ordered by how much they decide whether the workation works.</p>
        </div>
        <div className="right">Full planning guide <Icon name="arrow" size={12} /></div>
      </div>

      <div className="practical-grid">
        {WK_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 WKFAQ = () => {
  const [open, setOpen] = useWKState(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 workation. If yours isn't here, the long-stay desk reads every email.</p>
              </div>
            </div>
            <a href="mailto:longstay@howto.travel" className="ask">Ask the desk →</a>
          </div>
          <div className="rhs">
            {WK_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 WKCTA = () => (
  <section className="solo-cta">
    <div
      className="bg"
      style={{ backgroundImage: `url(https://images.unsplash.com/photo-1555881400-74d7acaacd8b?w=2000&q=80)` }}
    ></div>
    <div className="inner">
      <div className="kicker">PICK THE DESK · MATCH THE TIME ZONE · STAY A MONTH</div>
      <h2>Plan a workation<em>that holds for the month.</em></h2>
      <p>Open a city, book the apartment with the desk, set the work hours, get on the plane. Two weeks at the floor, a month for the form, and the city as the reward for closing the laptop on time.</p>
      <div className="cta-actions">
        <a href="/en/plan/trip-types/workation/how-to-lisbon-workation" className="btn-p">Open Lisbon, the workation →</a>
        <a href="/en/plan/trip-duration/" className="btn-g">↑ Back to Trip Duration</a>
      </div>
    </div>
    <div className="coord">WORKATION · FORM Nº 11 · UPDATED 06.05.2026</div>
    <div className="coord right">FIELD DESK Nº 211</div>
  </section>
);

/* ---------- COMPOSE ---------- */
const WKApp = () => (
  <div data-screen-label="Workation">
    <WKHero />
    <WKPlaces />
    <WKField />
    <WKItins />
    <WKByStyle />
    <WKReading />
    <WKVoices />
    <WKPractical />
    <WKFAQ />
    <WKCTA />
    <Footer />
  </div>
);

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