/* =========================================================
   v3 — loaded last. New type (Forward Serif + IM Fell English),
   the second hero, the destination galleries (A / B), the painted
   travel map and the engagement strip in the finale.
   Colours come from the palette tokens in styles.css (:root --c-*).
   ========================================================= */

/* ---------- fonts (self-hosted, see fonts/) ---------- */
@font-face {
  font-family: "Forward Serif";
  src: url("../fonts/forward-serif/ForwardSerif_PERSONAL_USE_ONLY.otf") format("opentype");
  font-weight: 100 500; font-style: normal; font-display: swap;
  /* the personal-use build stamps a watermark on every digit, so numerals come from IM Fell English instead */
  unicode-range: U+0000-002F, U+003A-FFFF;
}
@font-face {
  font-family: "Forward Serif";
  src: url("../fonts/forward-serif/ForwardSerifBold_PERSONAL_USE_ONLY.otf") format("opentype");
  font-weight: 600 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-002F, U+003A-FFFF;
}
@font-face {
  font-family: "IM Fell English";
  src: url("../fonts/im-fell-english/IMFellEnglish-Regular.ttf") format("truetype");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("../fonts/im-fell-english/IMFellEnglish-Italic.ttf") format("truetype");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  --display: "Forward Serif", "IM Fell English", Georgia, serif;   /* headings */
  --serif: var(--display);
  --sans: "IM Fell English", Georgia, "Times New Roman", serif;     /* body */
  --type: var(--sans);                                               /* the letter & tips were typewriter; now body */
  --body: var(--sans);
}

body { font: 400 1.125rem/1.65 var(--sans); }
h1, h2, h3, h4 { font-variation-settings: normal; font-synthesis: none; letter-spacing: 0; }
/* Forward Serif has no italic: emphasis in headings is carried by colour instead */
h1 em, h2 em, h3 em, h4 em { font-style: normal; font-weight: inherit; }
.section-head h2, .last-mile > h3, .letter-title { font-weight: 400; }
.lede { font-family: var(--sans); font-style: italic; font-weight: 400; }
.letter { font: 400 1.12rem/1.8 var(--sans); }
.letter strong, strong { font-weight: 400; color: var(--accent-deep); }
.theme-dark strong, .theme-olive strong { color: inherit; }
.rp-tip { font-family: var(--sans); font-size: 1rem; }

/* small uppercase labels: IM Fell is delicate, so a touch bigger with a little less tracking */
.eyebrow { font: 400 .84rem/1.4 var(--sans); letter-spacing: .16em; }
.btn { font: 400 .86rem/1 var(--sans); letter-spacing: .12em; }
.hero-meta { font: 400 .9rem/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.nav-links a { font-family: var(--sans); font-size: .88rem; letter-spacing: .12em; }
.letter-date { font-family: var(--sans); letter-spacing: .1em; }
.sf-soon { font-family: var(--sans); }
.sf-tag { font-family: var(--sans); font-size: .6rem; }

/* headings everywhere use Forward Serif */
.hero-title, .letter-names, .faq-list summary, .plx-card b, .stage-title, .evt h4, .nav-mono { font-family: var(--display); font-variation-settings: normal; }
.hero-title { font-weight: 400; letter-spacing: 0; color: var(--c-wine) !important; }
.hero .hero-amp { color: var(--c-rose); }
.hero .hero-eyebrow, .hero .hero-meta { color: var(--c-olive); }

/* itinerary: same faces */
.itinerary { --it-display: var(--display); --it-plum: var(--c-wine); --it-sage: var(--c-olive); --it-paper: var(--c-paper); }
.it-what h3 { font-style: normal; font-weight: 400; }
.it-what p { font-family: var(--sans); }
.it-cal .top, .it-what .when { font-family: var(--sans); }
.it-cal .bot { font-style: normal; }

/* itinerary: the little tear-off calendar reads weekday / date / month, top to bottom */
.it-cal .top { top: 13%; color: #FAF6EE; font: 400 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.it-cal b { top: 35%; font: 400 2.5rem/1 var(--sans); color: var(--c-wine); }
.it-cal .bot { top: 69%; font: 400 1.05rem/1 var(--display); color: var(--c-cocoa); }
.it-what .when { font-size: .74rem; letter-spacing: .16em; }
@media (max-width: 760px) {
  .it-cal .top { font-size: .64rem; letter-spacing: .1em; }
  .it-cal b { font-size: 2.05rem; }
  .it-cal .bot { font-size: .9rem; }
}

/* the old hero layers are gone from the markup; make sure nothing waits on them */
.hero-frame, .curtains { display: none !important; }
.hero.is-in .hero-media { animation: none; }   /* the painting stays still once the camera has pulled back */

/* ---------- hero: one screen tall, inside the berry-wine diamond border ---------- */
.hero, .env-reverse { --hb-in: clamp(8px, 1.3vw, 18px); --hb-w: clamp(16px, 2vw, 26px); --hb: calc(var(--hb-in) + var(--hb-w)); }
.hero { display: block; height: 100vh; height: 100svh; min-height: 520px; }
.hero-border { position: absolute; inset: var(--hb-in); z-index: 5; pointer-events: none;
  border: var(--hb-w) solid transparent; border-image: url("../images/hero/border-diamond-berry.webp") 56 round; }
.hero > .hero-content { position: absolute; z-index: 4; top: var(--hb); left: var(--hb); right: var(--hb);
  padding: clamp(26px, 6vh, 64px) var(--gutter) 0; }
.hero .hero-title { font-size: clamp(3.6rem, 7.6vw, 7.6rem); margin-bottom: .6rem; }
/* the painting sits at the foot of the frame; the names may overlap the peaks */
.hero > .hero-media { position: absolute; z-index: 1; margin: 0; top: auto; bottom: var(--hb); left: 50%; transform: translateX(-50%);
  height: 74%; aspect-ratio: 2048 / 1360; max-width: calc(100% - 2 * var(--hb)); overflow: hidden; }
.hero > .hero-media img, .env-reverse .hero-media img { width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; object-position: 50% 100%; mix-blend-mode: multiply; }
@media (min-width: 701px) {
  /* soften the painting's left and right edges into the paper */
  .hero > .hero-media, .env-reverse .hero-media { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%); }
}
@media (max-width: 700px) {
  .hero > .hero-content { padding-top: clamp(30px, 6vh, 56px); }
  .hero > .hero-media { left: var(--hb); right: var(--hb); transform: none; width: auto; max-width: none; aspect-ratio: auto; height: 52%; }
  .hero > .hero-media img, .env-reverse .hero-media img { object-position: 60% 100%; }   /* keep the two of us in view */
}
.env-reverse .hero-media { inset: auto; }
.env-reverse .hero-border { position: absolute; inset: var(--hb-in); border: var(--hb-w) solid transparent; border-image: url("../images/hero/border-diamond-berry.webp") 56 round; }

/* swallows crossing the sky: each flies left to right on a gentle bob, swapping wings-up / wings-down to flap */
.hero-birds { position: absolute; inset: var(--hb); z-index: 3; overflow: hidden; pointer-events: none; }
.hb { position: absolute; left: 0; top: var(--y); width: var(--s); animation: hbFly var(--d) linear var(--dl) infinite; }
.hb-1 { --y: 31%; --s: 52px; --d: 30s; --dl: -7s; --x: 9%; }
.hb-2 { --y: 39%; --s: 40px; --d: 38s; --dl: -24s; --x: 80%; }
.hb-3 { --y: 3%;  --s: 32px; --d: 46s; --dl: -36s; --x: 88%; }
.hb-bob { position: relative; display: block; animation: hbBob 3.4s ease-in-out infinite alternate; }
.hb-2 .hb-bob { animation-duration: 4.1s; animation-delay: -1.3s; }
.hb-3 .hb-bob { animation-duration: 3s; animation-delay: -2s; }
.hb img { display: block; width: 100%; height: auto; }
.hb img + img { position: absolute; inset: 0; }
.hb img:first-child { animation: hbFlapA 460ms linear infinite; }
.hb img + img { animation: hbFlapB 460ms linear infinite; }
.hb-2 img { animation-duration: 540ms !important; }
.hb-3 img { animation-duration: 400ms !important; }
@keyframes hbFly { from { transform: translateX(-90px); } to { transform: translateX(100vw); } }
@keyframes hbBob { from { transform: translateY(-9px) rotate(-4deg); } to { transform: translateY(10px) rotate(3deg); } }
@keyframes hbFlapA { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes hbFlapB { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }
@media (max-width: 700px) {
  /* on phones they cross the gap between the words and the peaks */
  .hb-1 { --y: 44%; --s: 34px; --d: 22s; }
  .hb-2 { --y: 48%; --s: 26px; --d: 28s; }
  .hb-3 { --y: 41%; --s: 22px; --d: 34s; }
}
@media (prefers-reduced-motion: reduce) {
  .hb { animation: none; left: var(--x); }
  .hb-bob, .hb img { animation: none !important; }
  .hb img + img { opacity: 0; }
}

/* ---------- destination: one mosaic of five ---------- */
.destination { padding-bottom: var(--section-y); }
.gal-a { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 16px); height: min(76vh, 640px); }
.gal-a li { min-height: 0; padding: clamp(6px, .7vw, 9px); background: var(--c-paper); }
.gal-a .ga-1 { grid-row: 1 / 3; }
.gal-a figure { margin: 0; height: 100%; overflow: hidden; }
.gal-a img { width: 100%; height: 100%; object-fit: cover; }
.ga-ph { display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center;
  border: 1.5px dashed rgba(74, 48, 40, .35); background: repeating-linear-gradient(135deg, #F8F1E6 0 14px, #F3EADA 14px 28px); }
.ga-ph span { font: 400 1.6rem/1 var(--display); color: var(--c-wine); }
.ga-ph small { font: 400 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c-cocoa); }
@media (max-width: 760px) {
  .gal-a { grid-template-columns: 1fr 1fr; grid-template-rows: none; height: auto; }
  .gal-a .ga-1 { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 4 / 3; }
  .gal-a li:not(.ga-1) { aspect-ratio: 1; }
}

/* ---------- travel: one card — route pills across the top, steps on the left, the map on the right ---------- */
.journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); grid-template-areas: "pick pick" "steps map";
  column-gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: clamp(24px, 4vw, 40px);
  padding: clamp(16px, 2.6vw, 32px); border-radius: 20px; background: var(--card); box-shadow: 0 1px 2px rgba(74,48,40,.06), 0 18px 40px -24px rgba(74,48,40,.35); }
.route-pick { grid-area: pick; display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 clamp(8px, 1.5vw, 16px); }
.rp-intro { flex: 0 0 100%; padding-inline: max(0px, calc((100% - 70ch) / 2)); margin: 0 0 4px; text-align: center; color: #6B524A; }
.route-pick .rp-opt { flex: 1 1 220px; }
.rp-intro b { font-weight: 400; color: var(--c-cocoa); }
.rp-opt { display: grid; align-content: start; gap: 4px; text-align: left; padding: 14px 18px 15px; border-radius: 12px;
  border: 1.5px solid rgba(74, 48, 40, .18); background: var(--c-paper); color: var(--c-cocoa); transition: border-color var(--dur-1), box-shadow var(--dur-1), background var(--dur-1); }
.rp-opt:hover { border-color: rgba(126, 42, 66, .6); }
.rp-opt[aria-checked="true"] { border-color: var(--c-wine); box-shadow: inset 0 0 0 1.5px var(--c-wine); background: #FFFCF6; }
.rp-tag { font: 400 .72rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c-olive); }
.rp-opt b { font: 400 1.3rem/1.15 var(--display); color: var(--c-wine); }
.rp-sum { font-size: .98rem; line-height: 1.35; color: #6B524A; }

.journey-map { grid-area: map; position: sticky; top: calc(var(--nav-h) + 16px); }
/* the map sits straight on the card: no frame of its own */
.journey .map-card { position: static; padding: 0; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none; }
.tmap { position: relative; margin: 0 auto; width: 100%; max-width: min(440px, calc((100vh - var(--nav-h) - 60px) * .8)); }
.tmap img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }   /* the painting's white paper melts into the card */
.tmap-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.journey-steps { grid-area: steps; list-style: none; margin: 0; padding: 6vh 0 24vh; }
.js-step { position: relative; display: flex; gap: 16px; align-items: flex-start; min-height: 15vh; padding-bottom: 18px;
  opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js-step.in { opacity: .4; transform: none; }
.js-step.is-past, .js-step.is-here { opacity: 1; }
.js-step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 46px; bottom: 4px; border-left: 2px dashed rgba(74, 48, 40, .28); }
.js-dot, .js-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.js-dot::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--c-cocoa); background: var(--card); transition: background var(--dur-2), border-color var(--dur-2); }
.is-here .js-dot::after, .is-past .js-dot::after { background: var(--c-wine); border-color: var(--c-wine); }
.js-dot.end::after { width: 22px; height: 22px; }
.js-ico { background: var(--c-paper); border: 1px solid rgba(74, 48, 40, .2); color: var(--c-olive); transition: background var(--dur-2), color var(--dur-2); }
.is-here .js-ico { background: var(--c-wine); border-color: var(--c-wine); color: var(--c-paper); }
.js-ico .icon { width: 22px; height: 22px; }
.js-place { font: 400 clamp(1.45rem, 2.4vw, 1.9rem)/1.15 var(--display); color: var(--c-cocoa); padding-top: 4px; }
.is-end .js-place { color: var(--c-wine); }
.js-place small { display: block; margin-top: 4px; font: 400 1rem/1.3 var(--sans); color: #6B524A; }
.js-text { padding-top: 7px; max-width: 42ch; font-size: 1.08rem; line-height: 1.5; }
.js-text b { font-weight: 400; color: var(--c-wine); }
.journey-foot { display: grid; justify-items: center; gap: 12px; text-align: center; margin-top: clamp(20px, 3vw, 32px); }
.journey-foot .rp-tip { max-width: 62ch; margin: 0; padding: 16px 20px; }
.map-note { margin: 0; font-family: var(--sans); }

/* the little plane / car / train riding along a leg as it draws */
.tm-mover { transition: opacity 600ms ease-out; }
.tm-mover circle { fill: #FFFCF6; stroke: var(--c-wine); stroke-width: 4; }
.tm-mover use { fill: var(--c-wine); color: var(--c-wine); }
.tm-mover.is-done { opacity: 0; }

/* the map: everything starts hidden and is drawn in as the matching step is reached */
.tm-labels text, .tm-routes text { font-family: var(--sans); fill: var(--c-cocoa); paint-order: stroke; stroke: var(--card); stroke-width: 10px; stroke-linejoin: round; transition: fill 400ms; }
.tm-labels text { font-size: 54px; }
.tm-labels .sub { font-size: 34px; letter-spacing: .08em; fill: #6B524A; }
.tm-labels .venue { font-family: var(--display); font-size: 64px; fill: var(--c-wine); }
.tm-labels text.on { fill: var(--c-wine); }
.tm-path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tm-quiet { stroke: rgba(74, 48, 40, .25); stroke-width: 4; stroke-dasharray: 2 14; }
.tm-drive .tm-path { stroke: var(--c-wine); stroke-width: 9; }
.tm-fly .tm-path { stroke: var(--c-olive); stroke-width: 6; stroke-dasharray: 3 16; }
.tm-draw { fill: none; stroke: #fff; stroke-width: 44; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 500ms ease-in; }
.tm-leg.on .tm-draw { stroke-dashoffset: 0; transition: stroke-dashoffset 1300ms cubic-bezier(.45, 0, .2, 1); }
text.tm-leg { opacity: 0; transition: opacity 400ms; }
text.tm-leg.on { opacity: 1; transition: opacity 500ms ease-out 700ms; }
.tm-time { font-size: 44px; fill: var(--c-wine) !important; }
.tm-time.quiet { font-size: 36px; fill: #6B524A !important; opacity: .85; }
.tm-from { font-size: 40px; font-style: italic; fill: var(--c-olive) !important; }
.tm-end { fill: none; stroke: var(--c-wine); stroke-width: 6; stroke-dasharray: 10 16; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.7); transition: opacity 500ms, transform 900ms var(--ease-out); }
.tm-end.on { opacity: .9; transform: none; }

@media (max-width: 760px) {
  .journey { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pick" "map" "steps"; padding: 14px 14px 4px; border-radius: 16px; }
  /* the map pins under the nav and the steps scroll up underneath it, all on the one card */
  .journey-map { top: var(--nav-h); z-index: 6; margin-inline: -14px; padding: 6px 14px 8px; background: var(--card);
    box-shadow: 0 10px 12px -10px rgba(74, 48, 40, .25); }
  .tmap { max-width: min(100%, 38vh * .8); max-width: min(100%, 38svh * .8); }
  .journey-steps { padding: 14px 0 12vh; }
  .js-step { min-height: 0; gap: 12px; padding-bottom: 20px; }
  .js-step:not(:last-child)::before { top: 44px; }
  .js-place { font-size: 1.4rem; }
  .js-text { font-size: 1rem; padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-draw { transition: none !important; }
  text.tm-leg, .tm-end { transition: none !important; }
  .js-step { opacity: 1 !important; transform: none !important; transition: none !important; }
  .tm-mover { display: none; }
}

/* ---------- finale: closing words + engagement strip ---------- */
.finale { display: block; place-items: normal; min-height: 0; padding: clamp(72px, 12vw, 140px) 0 clamp(56px, 8vw, 96px);
  background: var(--c-paper); color: var(--c-cocoa); border-top: 1px solid var(--line); }
.finale-content { padding: 0 var(--gutter) clamp(36px, 6vw, 64px); }
.finale-script, .finale .eyebrow { text-shadow: none; }
.finale-script { color: var(--c-wine); }
.finale .eyebrow { color: var(--c-olive); }
.eng-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.eng-head .eyebrow { margin: 0; font-size: .9rem; color: var(--c-cocoa); }
.eng-ctrl { display: flex; gap: 8px; }
.eng-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--c-cocoa); background: transparent; color: var(--c-cocoa); font: 400 1.2rem/1 var(--sans); }
.eng-btn:hover { background: var(--c-wine); border-color: var(--c-wine); color: var(--c-paper); }
.eng-track { list-style: none; margin: 0; display: flex; gap: clamp(12px, 1.8vw, 20px); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))) 18px; scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  scrollbar-width: thin; scrollbar-color: var(--c-rose) transparent; }
.eng-track:focus-visible { outline: 2px solid var(--c-wine); outline-offset: -2px; }
.eng-tile { flex: none; width: clamp(220px, 26vw, 300px); aspect-ratio: 4 / 5; scroll-snap-align: start; padding: 10px; background: #FFFCF6;
  box-shadow: 0 1px 2px rgba(74,48,40,.08), 0 10px 24px -14px rgba(74,48,40,.35); }
.eng-tile:nth-child(odd) { transform: rotate(-.8deg); }
.eng-tile:nth-child(even) { transform: rotate(.7deg); }
.eng-tile figure { margin: 0; width: 100%; height: 100%; overflow: hidden; }
.eng-tile img { width: 100%; height: 100%; object-fit: cover; }
.eng-tile.is-placeholder figure { display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center;
  border: 1.5px dashed rgba(74, 48, 40, .35); background: repeating-linear-gradient(135deg, #F8F1E6 0 14px, #F5ECDD 14px 28px); }
.eng-num { font: 400 2.6rem/1 var(--display); color: var(--c-rose); }
.eng-ph { font: 400 .82rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--c-cocoa); }
.eng-file { font: italic 400 .8rem/1.3 var(--sans); color: #6B524A; }
@media (max-width: 700px) { .eng-tile { width: 68vw; } .eng-btn { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .eng-track { scroll-behavior: auto; } }

/* ---------- warm paper grounds (the automatic remap left these a touch grey) ---------- */
.hero, .env-reverse { background: linear-gradient(180deg, var(--c-paper) 0%, #F9F2E2 55%, #F8EDD0 100%); }
.intro { background: radial-gradient(70% 55% at 50% 45%, #FFFCF6 0%, transparent 70%), #F5EDDB; }
.nav { background: rgba(250, 246, 238, .94); }
.env-back { background: #E9D9C6; }
.env-front { background: linear-gradient(180deg, #F5EADB, #EEDFCB); }
