/* Forno Vagabondo: page layer. The engine CSS is untouched; this file themes
   tokens and styles page-local markup only. */

@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%;
  font-display: swap; src: url(assets/fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%;
  font-display: swap; src: url(assets/fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --sc-canvas:     #120c09;   /* oven soot */
  --sc-surface:    #1f1611;
  --sc-ink:        #fbf1e6;   /* flour */
  --sc-ink-soft:   #d6c2ae;   /* warm, tinted from the ink */
  --sc-accent:     #ff6a3d;   /* ember / tomato */
  --sc-accent-ink: #1a0b05;
  --sc-font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --sc-font-text:    "Geist", system-ui, sans-serif;
  --sc-shadow-color: 18 50% 3%;
  --ticket: #f6ecdc;
  --ticket-ink: #2a1a10;
}

/* Glide mode drives the scroll itself: no rubber-band, no native smoothing. */
html.is-glide { overscroll-behavior: none; scroll-behavior: auto; }
html.is-glide body { overscroll-behavior: none; }

/* ------------------------------------------------------------ world --- */
/* Per-leg framing. The pizza layer reads the same --pos to align itself. */
.sc-world__seg > :is(video, img) { object-position: var(--pos, 50%) 50%; }
/* The film legs are image sequences drawn by site.js (48 frames a second,
   neighbours blended), not seeked video. The poster holds until frame one. */
.seqcv { z-index: 1; opacity: 0; transition: opacity 240ms ease-out; }
.seqcv.is-on { opacity: 1; }

/* --------------------------------------------------------- the pizza --- */
.pz {
  position: fixed; inset: 0; z-index: 10; pointer-events: none;
  perspective: 1800px; perspective-origin: 50% 40%;
  overflow: clip;
}
.pz__pizza, .pz__item {
  position: absolute; left: 0; top: 0;
  max-width: none;
  opacity: 0; visibility: hidden;
  will-change: transform, opacity;
  transform-origin: 50% 50%;
}
.pz__pizza { width: 100px; aspect-ratio: 1200 / 1179; transform-style: preserve-3d; }
.pz__pizza img {
  width: 100%; height: 100%; max-width: none;
  /* the cast shadow sells "lifted off the board" */
  filter: drop-shadow(0 calc(var(--lift, 0) * 1px) calc(var(--lift, 0) * 1.6px) rgb(8 4 2 / 0.55));
}
.pz__item { width: 100px; height: auto; filter: drop-shadow(0 18px 26px rgb(8 4 2 / 0.5)); }

.embers {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 15; pointer-events: none;
}

/* ------------------------------------------------------------- chrome --- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-4);
  padding: clamp(0.9rem, 2.2vw, 1.6rem) var(--sc-gutter);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__mark {
  font-family: var(--sc-font-display); font-weight: 700; font-stretch: 85%;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.4rem); letter-spacing: -0.01em;
  color: var(--sc-ink); text-decoration: none;
  text-shadow: 0 1px 12px rgb(10 5 2 / 0.6);
}
.bar__cta, .ticket__cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.6rem 1.25rem; border-radius: var(--sc-r-pill);
  background: var(--sc-accent); color: var(--sc-accent-ink);
  font-weight: 600; font-size: var(--sc-t-sm); text-decoration: none; white-space: nowrap;
  box-shadow: var(--sc-e2);
  transition: transform 160ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .bar__cta:hover, .ticket__cta:hover { background: #ff8257; transform: translateY(-1px); }
}
.bar__cta:active, .ticket__cta:active { transform: scale(0.97); }

/* Route map: the pizza fills slice by slice. */
.route {
  position: fixed; left: var(--sc-gutter); bottom: clamp(1rem, 3vh, 2rem);
  z-index: var(--sc-z-chrome);
  display: flex; align-items: center; gap: var(--sc-3);
}
.route__pie { width: 52px; height: 52px; overflow: visible; filter: drop-shadow(0 3px 8px rgb(8 4 2 / 0.6)); }
.route__crust { fill: #2a1d15; stroke: #d9a271; stroke-width: 4; }
.route__slice { fill: #3a2a20; stroke: #2a1d15; stroke-width: 1.5; cursor: pointer; transition: fill 350ms ease-in-out; }
.route__slice.is-done { fill: var(--sc-accent); }
.route__slice.is-now { fill: #ffb08f; }
.route__now {
  font-family: var(--sc-font-display); font-weight: 600; font-size: var(--sc-t-sm);
  color: var(--sc-ink); text-shadow: 0 1px 10px rgb(10 5 2 / 0.8);
}
.route__list {
  list-style: none; margin: 0; padding: var(--sc-3);
  position: absolute; left: 0; bottom: calc(100% + 0.5rem);
  display: grid; gap: 2px; min-width: 11rem;
  background: color-mix(in oklab, var(--sc-surface) 92%, transparent);
  border-radius: var(--sc-r-md); box-shadow: var(--sc-e3), var(--sc-edge);
  /* opacity, not visibility: hidden links could never receive the Tab that opens the list */
  opacity: 0; pointer-events: none; transform: translateY(6px);
  transition: opacity 350ms ease-in-out, transform 350ms ease-in-out;
}
.route:hover .route__list, .route:focus-within .route__list {
  opacity: 1; pointer-events: auto; transform: none;
}
.route__list a {
  display: block; padding: 0.35rem 0.6rem; border-radius: var(--sc-r-sm);
  color: var(--sc-ink-soft); text-decoration: none; font-size: var(--sc-t-sm);
}
.route__list a[aria-current="true"] { color: var(--sc-ink); background: color-mix(in oklab, var(--sc-accent) 22%, transparent); }
@media (hover: hover) and (pointer: fine) { .route__list a:hover { color: var(--sc-ink); } }

/* --------------------------------------------------------------- copy --- */
.copy { position: absolute; z-index: 2; width: min(31rem, 36vw); }
.copy--l { left: var(--sc-gutter); top: 50%; translate: 0 -50%; }
.copy--r { right: var(--sc-gutter); top: 50%; translate: 0 -50%; text-align: right; }
.copy--r .lede { margin-left: auto; }
.copy--rise { right: var(--sc-gutter); bottom: clamp(5rem, 13vh, 8rem); width: min(30rem, 32vw); text-align: right; }
.copy--rise .lede { margin-left: auto; }
.copy--hero { left: var(--sc-gutter); top: clamp(5.5rem, 15vh, 9rem); width: min(32rem, 35vw); }
.copy--peak { left: 50%; top: clamp(4.5rem, 11vh, 7rem); translate: -50% 0; width: min(46rem, 80vw); text-align: center; }
.copy--finale { left: var(--sc-gutter); top: 50%; translate: 0 -50%; width: min(34rem, 42vw); }

.disp {
  font-family: var(--sc-font-display); margin: 0;
  line-height: 0.96; letter-spacing: -0.03em; text-wrap: balance;
  text-shadow: 0 2px 24px rgb(10 5 2 / 0.45);
}
.disp--hero { font-size: clamp(2.4rem, 1.2rem + 3.4vw, 4.4rem); font-weight: 750; font-stretch: 90%; }
.disp--lg   { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 4.4rem); font-weight: 720; font-stretch: 90%; }
.disp--md   { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3.2rem); font-weight: 680; }
/* The ingredient names are the loudest type on the page: playful, wide, big. */
.disp--ing  { font-size: clamp(3rem, 1.2rem + 6.4vw, 7rem); font-weight: 800; font-stretch: 100%; letter-spacing: -0.045em; color: var(--sc-accent); }
.lede {
  margin: var(--sc-4) 0 0; max-width: 34ch;
  font-size: var(--sc-t-lg); line-height: 1.5; letter-spacing: 0;
  color: var(--sc-ink); text-wrap: pretty;
  text-shadow: 0 1px 14px rgb(10 5 2 / 0.6);
}

/* Scrims: siblings of the copy, each shaped to where its copy sits. */
.scrim { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; }
.scrim--l { background: linear-gradient(90deg, rgb(18 12 9 / 0.92) 0%, rgb(18 12 9 / 0.72) 30%, rgb(18 12 9 / 0.3) 46%, transparent 60%); }
.scrim--r { background: linear-gradient(270deg, rgb(18 12 9 / 0.92) 0%, rgb(18 12 9 / 0.72) 30%, rgb(18 12 9 / 0.3) 46%, transparent 60%); }
.scrim--f { background: linear-gradient(90deg, rgb(18 12 9 / 0.95) 0%, rgb(18 12 9 / 0.86) 34%, rgb(18 12 9 / 0.45) 50%, transparent 66%); }
.scrim--b { background: linear-gradient(0deg, rgb(18 12 9 / 0.92) 0%, rgb(18 12 9 / 0.7) 26%, rgb(18 12 9 / 0.3) 44%, transparent 60%); }

/* --------------------------------------------------------- the ticket --- */
.ticket {
  margin-top: var(--sc-6); max-width: 22rem;
  padding: var(--sc-5) var(--sc-5) var(--sc-5);
  background: var(--ticket); color: var(--ticket-ink);
  border-radius: 4px 4px 2px 2px;
  rotate: -2.5deg;
  box-shadow: var(--sc-e3);
  /* torn bottom edge */
  -webkit-mask: radial-gradient(6px at 50% 100%, #0000 98%, #000) 50% / 14px 100%;
          mask: radial-gradient(6px at 50% 100%, #0000 98%, #000) 50% / 14px 100%;
  padding-bottom: calc(var(--sc-5) + 6px);
}
.ticket__head {
  margin: 0 0 var(--sc-3); font-family: var(--sc-font-display); font-weight: 750;
  font-size: var(--sc-t-lg); letter-spacing: -0.01em;
  border-bottom: 1px dashed rgb(42 26 16 / 0.35); padding-bottom: var(--sc-2);
}
.ticket__line {
  display: flex; justify-content: space-between; gap: var(--sc-4);
  margin: 0 0 var(--sc-1); font-size: var(--sc-t-sm); color: #5a4232;
}
.ticket__cta { margin-top: var(--sc-4); width: 100%; font-size: var(--sc-t-base); }

.foot {
  margin-top: var(--sc-7);
  display: flex; flex-wrap: wrap; gap: var(--sc-2) var(--sc-5);
  font-size: var(--sc-t-xs); color: var(--sc-ink-soft);
}
.foot a { color: var(--sc-ink-soft); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { color: var(--sc-ink); } }
.sp-heart { display: inline-block; color: var(--sc-accent); animation: sp-heart 1.6s ease-in-out infinite; }
@keyframes sp-heart { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------- mobile --- */
@media (max-width: 860px) {
  .copy, .copy--l, .copy--r, .copy--rise, .copy--hero, .copy--finale {
    left: var(--sc-gutter); right: var(--sc-gutter); width: auto;
    top: auto; bottom: clamp(5.5rem, 13vh, 7rem); translate: none; text-align: left;
  }
  .copy--r .lede, .copy--rise .lede { margin-left: 0; }
  .copy--peak { left: var(--sc-gutter); right: var(--sc-gutter); width: auto; translate: none; top: auto; bottom: clamp(5.5rem, 13vh, 7rem); text-align: left; }
  .copy--finale { bottom: clamp(4.5rem, 10vh, 6rem); }
  .scrim--f { background: linear-gradient(0deg, rgb(18 12 9 / 0.96) 0%, rgb(18 12 9 / 0.9) 58%, rgb(18 12 9 / 0.55) 74%, transparent 90%); }
  .ticket { padding: var(--sc-4); }
  .ticket__cta { margin-top: var(--sc-3); }
  .disp--hero { font-size: clamp(2.3rem, 1.6rem + 3.4vw, 3rem); }
  .disp--lg { font-size: clamp(2rem, 1.5rem + 2.6vw, 2.6rem); }
  .disp--ing { font-size: clamp(2.8rem, 2rem + 4vw, 3.6rem); }
  .lede { font-size: var(--sc-t-base); max-width: none; }
  .ticket { margin-top: var(--sc-5); max-width: none; rotate: -1.5deg; }
  .foot { margin-top: var(--sc-5); }
  .route { bottom: 0.9rem; }
  .route__pie { width: 40px; height: 40px; }
}

/* Short phones: the close has to fit under the bulbs. */
@media (max-width: 860px) {
  .scrim--b { background: linear-gradient(0deg, rgb(18 12 9 / 0.94) 0%, rgb(18 12 9 / 0.82) 30%, rgb(18 12 9 / 0.5) 50%, transparent 66%); }
}
@media (max-width: 860px) and (max-height: 720px) {
  .ticket__line { display: none; }
  .ticket__head { margin-bottom: 0; border-bottom: 0; }
  .copy--finale .lede { font-size: var(--sc-t-sm); }
  .scrim--f { background: linear-gradient(0deg, rgb(18 12 9 / 0.96) 0%, rgb(18 12 9 / 0.9) 70%, rgb(18 12 9 / 0.6) 86%, rgb(18 12 9 / 0.3) 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .sp-heart { animation: none; }
  .embers { display: none; }
}
