// Book page — hero + Chapter I (Flights) + Chapter II (Accommodation)

const BookHero = () => (
  <section className="book-hero">
    <div className="hero-bg" style={{ backgroundImage: `url(https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=2400&q=85)` }}></div>
    <div className="hero-scrim"></div>
    <div className="hero-coord">06°08'N · 102°42'E · ALTITUDE 38,000 FT</div>
    <div className="hero-credit">PHOTO — FIELD DESK Nº 091</div>
    <div className="container">
      <div className="book-crumbs">
        <a href="/">Home</a>
        <span className="sep">/</span>
        <span className="here">Book</span>
      </div>
      <div className="book-mast">
        <div className="lhs">
          <div className="kicker-row">
            <span className="layer-tag">THE BOOKING DESK · 5 CHAPTERS</span>
          </div>
          <h1>Book<em>like you've done this before.</em></h1>
          <p className="lede">
            Plans without bookings are wishes. This is where you turn the trip you imagined into receipts, confirmations, and a row of checkmarks. <em>Five chapters. Decisive answers.</em> No more open tabs.
          </p>
        </div>
        <div className="rhs">
          <div className="book-stats">
            <div className="stat"><div className="n">5 <em>chapters</em></div><div className="l">Booking lanes</div></div>
            <div className="stat"><div className="n">$487</div><div className="l">Avg saved per trip</div></div>
            <div className="stat"><div className="n">94%</div><div className="l">Refundable choices</div></div>
            <div className="stat"><div className="n"><em>9.4</em></div><div className="l">Reader confidence</div></div>
          </div>
        </div>
      </div>
      <div className="book-toc">
        <span className="toc-label">In this issue</span>
        <a href="#flights"><span className="num">I</span>Flights</a>
        <span className="sep">·</span>
        <a href="#accommodation"><span className="num">II</span>Accommodation</a>
        <span className="sep">·</span>
        <a href="#ground"><span className="num">III</span>Ground Transport</a>
        <span className="sep">·</span>
        <a href="#insurance"><span className="num">IV</span>Travel Insurance</a>
        <span className="sep">·</span>
        <a href="#timing"><span className="num">V</span>Timing Strategy</a>
        <span className="sep">·</span>
        <a href="#reading"><span className="num">VI</span>Reading & FAQ</a>
      </div>
    </div>
  </section>
);

const ChapterPanel = ({ lane, side = "left" }) => (
  <div className={`chapter-panel side-${side}`}>
    <div className="img" style={{ backgroundImage: `url(${lane.img})` }}></div>
    <div className="panel-body">
      <div className="chapter-tag">
        <span className="num">{lane.num}</span>
        <span className="label">{lane.chapter}</span>
      </div>
      <h2 className="serif">{lane.title}<em> — {lane.titleEm}</em></h2>
      <p className="dek">{lane.desc}</p>
      <div className="bullet-rows">
        {lane.bullets.map((b, i) => (
          <div key={i} className="bullet-row">
            <span className="bl">{b.l}</span>
            <span className="bv">{b.v}</span>
          </div>
        ))}
      </div>
      <div className="chapter-coord">{lane.coord}</div>
    </div>
  </div>
);

const BookFlights = () => {
  const lane = BOOK_LANES[0];
  return (
    <section className="book-flights" id="flights">
      <div className="container">
        <ChapterPanel lane={lane} side="left" />
        <div className="flights-aside">
          <div className="aside-head">
            <span className="lbl">FIELD NOTE · BOOKING WINDOWS</span>
            <h3 className="serif">The window <em>is real.</em></h3>
          </div>
          <p>
            Studies of millions of bookings keep landing on the same numbers. Domestic US: 6–8 weeks. International: 3–4 months. Peak Europe summer or Japan cherry blossom: 5–6 months. Inside the window, fares rest. Outside it, they punish you.
          </p>
          <div className="aside-grid">
            <div className="aside-cell">
              <div className="aside-num">T-90</div>
              <div className="aside-l">Open Google Flights alert</div>
            </div>
            <div className="aside-cell">
              <div className="aside-num">T-60</div>
              <div className="aside-l">Pull the trigger zone</div>
            </div>
            <div className="aside-cell">
              <div className="aside-num">T-21</div>
              <div className="aside-l">Last sane window</div>
            </div>
            <div className="aside-cell">
              <div className="aside-num">T-7</div>
              <div className="aside-l">You're paying tax now</div>
            </div>
          </div>
          <a href="/journal/find-cheap-flights" className="aside-cta">Read: How to Find Cheap Flights →</a>
        </div>
      </div>
    </section>
  );
};

const BookAccommodation = () => {
  const lane = BOOK_LANES[1];
  return (
    <section className="book-accommodation" id="accommodation">
      <div className="container">
        <div className="accom-grid">
          <div className="accom-aside">
            <div className="aside-head">
              <span className="lbl">FIELD NOTE · ROOMS</span>
              <h3 className="serif">Neighborhood <em>beats stars.</em></h3>
            </div>
            <p>
              A four-star hotel in the wrong block is a worse trip than a two-star pension on the right one. Spend an hour with a map and a coffee before you spend an hour with Booking.com.
            </p>
            <div className="rule-list">
              <div className="rule">
                <span className="rn">01</span>
                <div>
                  <strong>Refundable until refundable means something.</strong>
                  <span>If a refundable rate is within 10% of the nonrefundable, take it. The flexibility is worth more than the savings.</span>
                </div>
              </div>
              <div className="rule">
                <span className="rn">02</span>
                <div>
                  <strong>Book direct after the third night.</strong>
                  <span>OTA discounts evaporate at four-night stays. Direct sites match price and add loyalty + upgrades.</span>
                </div>
              </div>
              <div className="rule">
                <span className="rn">03</span>
                <div>
                  <strong>Read the cancellation deadline first.</strong>
                  <span>Not the photos, not the reviews — the cancellation column. That's the only line that matters when plans change.</span>
                </div>
              </div>
            </div>
            <a href="/journal/book-accommodation-tourist-trap" className="aside-cta">Read: How to Book a Hotel That Isn't a Tourist Trap →</a>
          </div>
          <ChapterPanel lane={lane} side="right" />
        </div>
      </div>
    </section>
  );
};

Object.assign(window, { BookHero, BookFlights, BookAccommodation });
