/* ============================================================
   Firenze — the itinerary as a scroll film
   One sticky stage; six scenes crossfade beneath the content.
   All artwork is inline SVG. No remote assets.
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: #0d0b16; }

body.film-body {
  margin: 0;
  background: #0d0b16;
  color: #f6ece0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ---------- fixed chrome ---------- */

.film-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(16px, 3vw, 40px);
  pointer-events: none;
}
.film-nav > * { pointer-events: auto; }
.film-nav::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 132px;
  background: linear-gradient(180deg, rgba(8,6,16,0.82) 0%, rgba(8,6,16,0.45) 46%, rgba(8,6,16,0) 100%);
  pointer-events: none;
  z-index: -1;
}
.film-logo {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(246, 236, 224, 0.95);
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.film-links { display: flex; gap: clamp(12px, 1.6vw, 24px); }
.film-links a {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 236, 224, 0.8);
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
  transition: color 200ms ease;
}
.film-links a:hover { color: #f0b968; }

/* vertical day rail */
.rail {
  position: fixed;
  right: clamp(14px, 2.2vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}
.rail a {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: rgba(246, 236, 224, 0.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rail .dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(246, 236, 224, 0.4);
  transition: all 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rail .label {
  opacity: 0;
  transform: translateX(6px);
  transition: all 380ms cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.rail a:hover .label { opacity: 0.8; transform: none; }
.rail a.is-active .dot { background: #f0b968; width: 10px; height: 10px; box-shadow: 0 0 0 4px rgba(240, 185, 104, 0.2); }
.rail a.is-active .label { opacity: 1; transform: none; color: #f0b968; }

/* ---------- the sticky stage ---------- */

.film { position: relative; }

.film-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  background: #0d0b16;
}

.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity;
}
.scene.is-lit { opacity: 1; }

.scene svg {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

/* layer roles inside every scene */
.sky {
  inset: 0;
  width: 100%; height: 100%;
  transform: translate3d(calc(var(--mx, 0) * -10px), calc(var(--p, 0) * -26px), 0) scale(1.06);
}
.mid {
  left: -6vw; right: -6vw; bottom: 0;
  width: 112%; height: auto;
  transform: translate3d(calc(var(--mx, 0) * -24px), calc(var(--p, 0) * -54px), 0);
}
.fore {
  left: 50%; bottom: -1vh;
  width: min(150vw, 2200px); height: auto;
  transform: translate3d(calc(-50% + var(--mx, 0) * 34px), calc(var(--p, 0) * 84px), 0) scale(1.02);
}

.grade {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(126% 82% at 50% 46%, rgba(0,0,0,0) 44%, rgba(8,6,16,0.5) 100%),
    linear-gradient(180deg, rgba(8,6,16,0.3) 0%, rgba(8,6,16,0.04) 34%, rgba(8,6,16,0.18) 70%, rgba(8,6,16,0.56) 100%);
}

/* ---------- the reel ---------- */

.film-reel {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
}

.chapter {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(96px, 14vh, 160px) clamp(18px, 5vw, 80px) clamp(72px, 12vh, 130px);
}
.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(97deg,
    rgba(9,7,18,0.92) 0%,
    rgba(9,7,18,0.8) 32%,
    rgba(9,7,18,0.34) 60%,
    rgba(9,7,18,0) 84%);
}
.chapter-open::before,
.chapter-end::before {
  background: radial-gradient(72% 58% at 50% 50%,
    rgba(9,7,18,0.74) 0%,
    rgba(9,7,18,0.34) 58%,
    rgba(9,7,18,0) 100%);
}

.chapter-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- opening ---------- */

.chapter-open { text-align: center; justify-content: center; }
.chapter-open .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #f0b968;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}
.film-title {
  margin: 14px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(58px, 13vw, 190px);
  font-weight: 600;
  line-height: 0.84;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-shadow: 0 20px 64px rgba(0,0,0,0.5);
}
.film-title .accent { color: #f0b968; }
.film-sub {
  margin: 22px auto 0;
  max-width: 520px;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 500;
  line-height: 1.4;
  color: rgba(246,236,224,0.94);
  text-shadow: 0 2px 22px rgba(0,0,0,0.6);
}
.film-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 26px; }
.film-pills span {
  display: inline-flex; align-items: center;
  min-height: 38px; padding: 0 20px;
  border-radius: 999px;
  background: rgba(246,236,224,0.95);
  color: #2b2320;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 14px 34px rgba(0,0,0,0.3);
}

/* ---------- day chapters ---------- */

.chapter-head { position: relative; margin-bottom: clamp(26px, 4vh, 44px); }

.day-num {
  position: absolute;
  top: 50%;
  left: clamp(-10px, -1vw, 0px);
  transform: translate3d(0, calc(-50% + var(--p, 0) * -46px), 0);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(150px, 26vw, 380px);
  font-weight: 600;
  line-height: 0.7;
  color: rgba(246, 236, 224, 0.07);
  pointer-events: none;
  z-index: -1;
  letter-spacing: -0.04em;
}

.day-date {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f0b968;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}
.day-title {
  margin: 12px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(34px, 5.6vw, 78px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-shadow: 0 16px 46px rgba(0,0,0,0.5);
}
.day-lede {
  margin: 16px 0 0;
  max-width: 540px;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 500;
  line-height: 1.4;
  color: rgba(246,236,224,0.88);
  text-shadow: 0 2px 22px rgba(0,0,0,0.6);
}

/* timeline */

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 720px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 10px; bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, rgba(240,185,104,0), rgba(240,185,104,0.5) 12%, rgba(240,185,104,0.5) 88%, rgba(240,185,104,0));
}

.tl {
  position: relative;
  padding: 0 0 clamp(16px, 2.4vh, 26px) 38px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.tl.is-in { opacity: 1; transform: none; }
.tl::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 11px; height: 11px;
  border-radius: 999px;
  background: #14111f;
  border: 2px solid rgba(240, 185, 104, 0.75);
}
.tl.booked::before { background: #f0b968; border-color: #f0b968; box-shadow: 0 0 0 5px rgba(240,185,104,0.16); }

.tl-time {
  display: inline-block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f0b968;
}
.tl h3 {
  margin: 3px 0 0;
  font-size: clamp(17px, 1.9vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f6ece0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.tl p {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(246,236,224,0.78);
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.tl p b { color: #f6ece0; font-weight: 600; }

/* map links — a gold hairline, never a blue underline */
.tl h3 a,
.tl p a,
.note a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(rgba(240, 185, 104, 0.42), rgba(240, 185, 104, 0.42));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  padding-bottom: 2px;
  transition: color 220ms ease, background-image 220ms ease;
}
.tl h3 a::after,
.tl p a::after,
.note a::after {
  content: "↗";
  margin-left: 4px;
  font-size: 0.62em;
  vertical-align: 0.42em;
  opacity: 0.5;
  font-weight: 500;
}
.tl h3 a:hover,
.tl p a:hover,
.note a:hover {
  color: #f0b968;
  background-image: linear-gradient(#f0b968, #f0b968);
}
.tl h3 a:hover::after,
.tl p a:hover::after,
.note a:hover::after { opacity: 1; }
.tl h3 a:focus-visible,
.tl p a:focus-visible,
.note a:focus-visible { outline: 2px solid #f0b968; outline-offset: 3px; border-radius: 2px; }

.seal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 9px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(240, 185, 104, 0.16);
  border: 1px solid rgba(240, 185, 104, 0.45);
  color: #f0b968;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
}
.seal.todo {
  background: rgba(246, 236, 224, 0.1);
  border-color: rgba(246, 236, 224, 0.32);
  color: rgba(246, 236, 224, 0.78);
}

.note {
  margin-top: 14px;
  padding: 11px 15px;
  max-width: 620px;
  border-left: 2px solid rgba(240,185,104,0.5);
  background: rgba(20, 17, 31, 0.5);
  backdrop-filter: blur(6px);
  border-radius: 0 10px 10px 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(246,236,224,0.85);
}

/* ---------- closing ---------- */

.chapter-end { text-align: center; justify-content: center; }
.chapter-end h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(34px, 6vw, 84px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-shadow: 0 16px 46px rgba(0,0,0,0.5);
}
.chapter-end p {
  margin: 18px auto 0;
  max-width: 480px;
  font-size: clamp(15px, 1.5vw, 18px);
  color: rgba(246,236,224,0.86);
  text-shadow: 0 2px 22px rgba(0,0,0,0.6);
}
.end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.end-actions a {
  display: inline-flex; align-items: center;
  min-height: 46px; padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: #f0b968; color: #23180c;
  box-shadow: 0 16px 38px rgba(0,0,0,0.34);
  transition: transform 260ms cubic-bezier(0.16,1,0.3,1);
}
.end-actions a.ghost {
  background: transparent;
  color: rgba(246,236,224,0.9);
  border: 1px solid rgba(246,236,224,0.42);
}
.end-actions a:hover { transform: translateY(-2px); }

.film-foot {
  margin-top: 44px;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(246,236,224,0.55);
}

/* ---------- scroll cue ---------- */

.cue {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 55;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(246,236,224,0.7);
  pointer-events: none;
  transition: opacity 500ms ease;
}
.cue .line {
  width: 1px; height: 30px;
  background: linear-gradient(180deg, rgba(246,236,224,0.8), rgba(246,236,224,0));
  animation: cueDrift 2.2s ease-in-out infinite;
}
@keyframes cueDrift {
  0%,100% { transform: scaleY(0.45); transform-origin: 50% 0; opacity: 0.35; }
  50%     { transform: scaleY(1);    transform-origin: 50% 0; opacity: 1; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .rail { display: none; }
  .fore { width: 230vw; }
  .day-num { font-size: clamp(120px, 34vw, 220px); opacity: 0.9; }
  .timeline { max-width: 100%; }
}

@media (max-width: 640px) {
  .chapter { padding: 92px 18px 80px; }
  .film-logo { font-size: 14px; }
  .film-links a { font-size: 10px; letter-spacing: 0.1em; }
  .tl { padding-left: 32px; }
  .note { font-size: 13px; }
  .sky { transform: translate3d(0, calc(var(--p, 0) * -18px), 0) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene, .scene svg, .tl, .day-num { transition: none !important; animation: none !important; }
  .tl { opacity: 1; transform: none; }
  .cue .line { animation: none; }
}

/* ---------- spritz stops (buchette del vino) ---------- */

.spritz {
  margin-top: 13px;
  padding: 12px 15px;
  max-width: 620px;
  border-left: 3px solid #f4671f;
  background: rgba(244, 103, 31, 0.13);
  backdrop-filter: blur(6px);
  border-radius: 0 12px 12px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(246, 236, 224, 0.9);
}
.spritz b { color: #ffb98a; font-weight: 600; }
.spritz .chip {
  display: inline-block;
  margin-right: 9px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f4671f;
  color: #2a1102;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: 1.5px;
}
.spritz a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(rgba(255,178,122,0.55), rgba(255,178,122,0.55));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  padding-bottom: 2px;
}
.spritz a::after { content: "↗"; margin-left: 4px; font-size: 0.62em; vertical-align: 0.42em; opacity: 0.6; }
.spritz a:hover { color: #ffb98a; background-image: linear-gradient(#ffb98a, #ffb98a); }
