/* =========================================================
   SANTA — Drinks autorais + drink exclusivo
   Estrutura e comportamento seguem as seções "Negroni Twist" e
   "It was there, in 1919" de giacosafirenze.com, com o conteúdo e a identidade da Santa.
   "Role a página": css/scrollcue.css (o mesmo componente da home).
   Posições, curvas e quadros: js/autorais.js
   ========================================================= */

@font-face {
  font-family: "Spalla";
  src: url("../assets/fonts/SpallaTrial-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --red: #eb4945;
  --blue: #1737c3;
  --cream: #fdf2e1;
  --white: #fff;
  --gold-soft: #ffd979;
  --font-sans: "Montserrat", system-ui, sans-serif;
  --font-display: "Spalla", "Montserrat", serif;
  --pad: clamp(16px, 2.6vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--blue);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* palavras que acendem com a rolagem (0,1 → 1, como na referência) */
.w { display: inline-block; opacity: var(--wo, .1); transform: translateY(calc((1 - var(--wo, .1)) * .18em)); }

/* =========================================================
   1) DRINKS AUTORAIS
   ========================================================= */
/* palco preso por 2,6 telas (desktop): abertura só com o título grande, depois a aproximação
   dos drinks (a mesma da referência, mais longa) e um respiro antes do painel azul */
.aut { position: relative; height: 360svh; }
.aut__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.aut__end { position: absolute; left: 0; top: 224svh; }   /* destino do "Role a página" */

.aut__title {
  position: absolute; left: 50%; top: calc(var(--hb, 0px) + (100% - var(--hb, 0px)) / 2);
  translate: -50% calc(-50% + var(--tyo, 0px));
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-display);
  /* texto real: o tamanho da FONTE muda com a rolagem (--ts, via js), então o navegador
     redesenha as letras a cada quadro e elas ficam nítidas em qualquer tamanho
     (escalar com transform ampliaria um bitmap e borraria o título) */
  --fs: clamp(44px, 4vw, 64px);
  font-size: calc(var(--fs) * var(--ts, 1));
  line-height: .92;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}
.aut__title-a { font-weight: 300; color: transparent; -webkit-text-stroke: 1.2px var(--blue); paint-order: stroke fill; }
.aut__title-b { font-weight: 800; }

.aut__items { position: absolute; inset: 0; }
.orb {
  position: absolute; left: 0; top: 0;
  width: var(--iw, 400px);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  opacity: 0;
  will-change: transform, opacity;
}
.orb__img {
  position: relative;
  width: var(--S, 240px); height: var(--S, 240px);
  display: grid; place-items: center;
  transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) rotate(var(--fr, 0deg));
}
.orb__img img, .orb__spin {
  grid-area: 1 / 1;
  height: calc(var(--S, 240px) * var(--k, .9));
  width: auto;
}
.orb__spin { opacity: 0; }
.orb.has-spin .orb__spin { opacity: 1; }
.orb.has-spin img { opacity: 0; }
/* hierarquia: nome em destaque (Spalla, vermelho) → ingredientes discretos */
.orb__name {
  margin-top: 10px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(26px, 2.15vw, 34px);
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--red);
}
.orb__ing {
  display: flex; flex-wrap: wrap; justify-content: center;
  row-gap: 2px;
  max-width: 100%;
  margin-top: 7px;
  font-size: 13px; font-weight: 500; line-height: 1.6;
  letter-spacing: .01em;
  color: rgba(23, 55, 195, .72);
}
.orb__ing li { padding: 0 9px; white-space: nowrap; }

.orb__ing li + li { border-left: 1px solid rgba(23, 55, 195, .3); }

/* "Role a página" (mesmo componente da home), abaixo da composição */
.aut__cue {
  position: absolute; left: 50%; bottom: clamp(18px, 3.4svh, 34px); z-index: 3;
  translate: -50% 0;
  color: var(--blue);
  opacity: var(--cue, 1);
  visibility: var(--cue-v, visible);
}

/* =========================================================
   2) DRINK EXCLUSIVO — sequência de quadros
   ========================================================= */
/* ---------- Faixas (visual de pizza-amici.nl adaptado à Santa) ---------- */
.ribbons {
  position: relative; z-index: 3;
  margin-top: var(--rib-pull, -12svh);          /* o JS calcula: as faixas começam logo abaixo dos drinks */
  margin-bottom: calc(-1 * (12svh + 5.2em));   /* a última faixa avança sobre o topo do painel azul */
  overflow-x: clip;
  padding: 3em 0 2em;
}
.ribbon-wrap { position: relative; translate: -5vw 0; }
.ribbon-wrap.is-top { z-index: 0; rotate: 2deg; }
.ribbon-wrap.is-center { z-index: 1; rotate: -1deg; }
.ribbon-wrap.is-bottom { z-index: 0; rotate: 2deg; }
.ribbon {
  position: relative;
  width: 110vw;
  display: flex; justify-content: center; align-items: center; gap: .55em;
  padding: .52em 4vw;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 3.35vw, 56px); line-height: 1;
  text-transform: uppercase; letter-spacing: -.01em;
  color: var(--blue); text-decoration: none;
  will-change: transform;
}
.ribbon.theme-blue { background: var(--blue); color: #fff; }
.ribbon.theme-red { background: var(--red); color: #fff; }
.ribbon.theme-cream { background: var(--cream); }
.ribbon-title { margin: 0; white-space: nowrap; }
.ribbon-arrow { flex: none; font-family: var(--font-sans); font-weight: 500; font-size: .62em; transition: translate .3s ease; }
a.ribbon:hover .ribbon-arrow, a.ribbon:focus-visible .ribbon-arrow { translate: .15em 0; }
a.ribbon.theme-cream:hover .ribbon-arrow, a.ribbon.theme-cream:focus-visible .ribbon-arrow { translate: 0 .12em; }
.ribbon-div {                                   /* os dois filetes perto das bordas */
  position: absolute; z-index: 1; left: 0;
  width: 110%; height: 2px;
  background: currentColor;                     /* mesma cor do texto da faixa */
  top: .12em;
}
.ribbon-div.is-bottom { top: auto; bottom: .12em; }

.pre {
  position: relative;
  height: 820svh;                 /* 7,2 telas de "pin": doses + pinça sem pressa */
  background: var(--blue);
  color: var(--cream);
  border-radius: clamp(28px, 3.5vw, 51px) clamp(28px, 3.5vw, 51px) 0 0;
  margin-top: 12svh;              /* respiro entre as faixas e o painel azul (a última faixa avança sobre ele) */
  --G: min(44vw, 80svh);          /* lado do quadro do copo (o copo ocupa ≈ 46% dele) */
}
.pre__stage {
  position: sticky; top: 0;
  height: 100svh;
  overflow: hidden;
}
.pre__glass {
  position: absolute; left: 50%; top: 53%;
  width: var(--G); aspect-ratio: 1;
  translate: -50% -50%;
}
.pre__canvas {                                   /* cena fotográfica: as bordas somem no azul da seção (as mãos entram de fora) */
  display: block; width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(closest-side at 50% 52%, #000 78%, transparent 100%);
          mask-image: radial-gradient(closest-side at 50% 52%, #000 78%, transparent 100%);
}

/* as colunas ocupam o espaço até a borda visível do copo (≈ 27% do quadro) */
.pre__hands {                                    /* mãos, etiqueta e grampinho: a seção inteira, sem máscara */
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}
.pre__col {
  position: absolute; top: 53%;
  width: calc(50vw - 7vw - var(--G) * .25 - 3vw);
  translate: 0 -50%;
}
.pre__col--left { left: 7vw; }
.pre__col { z-index: 2; }        /* textos acima do quadro do copo (a pinça passa por trás) */
.pre__col--right { right: 7vw; width: max-content; max-width: calc(50vw - 7vw - var(--G) * .25 - 3vw); }   /* encosta na mesma margem de 7vw da coluna da esquerda */

.pre__kicker {
  font-weight: 700; font-size: 12px; letter-spacing: .34em;
  color: var(--gold-soft);
}
.pre__title {
  margin-top: 18px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(48px, 5.4vw, 96px);
  line-height: .88;
  text-transform: uppercase;
  color: var(--cream);
}
.pre__title .w { display: block; }
.pre__title .w + .w { color: var(--gold-soft); }
.pre__text {
  margin-top: 26px; max-width: 360px;
  font-size: 16px; line-height: 1.65;
  color: rgba(253, 242, 225, .86);
  opacity: var(--to, 0);
  transform: translateY(calc((1 - var(--to, 0)) * 16px));
}
.pre__sub {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: .95;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: var(--so, 0);
  transform: translateY(calc((1 - var(--so, 0)) * 16px));
}
.pre__list { margin-top: 24px; display: grid; gap: 18px; }
.pre__list li {
  justify-self: start;
  padding-bottom: 7px;
  font-weight: 700; font-size: 14px; letter-spacing: .08em;
  text-transform: uppercase;
  opacity: var(--lo, 0);
  transform: translateY(calc((1 - var(--lo, 0)) * 16px));
  background: linear-gradient(currentColor, currentColor) left bottom / 18px 1.5px no-repeat;
}

/* =========================================================
   3) FECHAMENTO
   ========================================================= */
.close {
  position: relative;
  padding: clamp(90px, 12vw, 170px) var(--pad) clamp(90px, 11vw, 150px);
  text-align: center;
  background: var(--cream);
}
.close__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 6vw, 96px); line-height: .9; color: var(--red); }
.close__text { margin: 24px auto 0; max-width: 520px; font-size: 17px; line-height: 1.5; }
.close__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px; border-radius: 999px;
  font-weight: 700; font-size: 13px; letter-spacing: .06em; text-decoration: none; white-space: nowrap;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background .3s, color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn--red { background: var(--red); color: var(--white); }
.btn--outline { border: 1px solid rgba(23, 55, 195, .45); color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* =========================================================
   Celular (como a referência no celular)
   ========================================================= */
@media (max-width: 767px) {
  .aut { height: 900svh; }          /* 8 telas de "pin": abertura + um drink por vez sob o título */
  .aut__end { top: 248svh; }
  .aut__title { top: var(--ty, 31%); --fs: clamp(40px, 13vw, 58px); }
  .orb__name { font-size: clamp(30px, 9vw, 38px); margin-top: 10px; }
  .orb__ing { font-size: 13px; }
  .ribbon { display: block; text-align: center; font-size: clamp(22px, 6.6vw, 30px); line-height: 1; padding: .5em 8vw; }
  .ribbon-title { display: inline; white-space: normal; }
  .ribbon-arrow { margin-left: .3em; }

  .pre { height: 880svh; --G: min(118vw, 56svh); }
  .pre__glass { top: 56%; }
  .pre__col { position: absolute; left: 24px; right: 24px; width: auto; translate: none; text-align: center; }
  .pre__col--left { top: calc(var(--hb, 76px) + 2svh); }
  .pre__col--right { top: auto; bottom: 3svh; max-width: none; }
  .pre__kicker { font-size: 10px; }
  .pre__title { margin-top: 10px; font-size: clamp(40px, 12.5vw, 58px); }
  .pre__title .w { display: inline-block; }
  .pre__text { margin: 12px auto 0; font-size: 14px; line-height: 1.55; max-width: 320px; }
  .pre__sub { font-size: 24px; }
  .pre__list { justify-items: center; gap: 10px; margin-top: 12px; }
  .pre__list li { justify-self: center; padding-bottom: 5px; font-size: 12px; letter-spacing: .06em; background-position: center bottom; }
}

/* =========================================================
   Movimento reduzido: composição final, sem animação
   ========================================================= */
.is-static .w { --wo: 1; }
.is-static .pre__text { --to: 1; }
.is-static .pre__sub { --so: 1; }
.is-static .pre__list li { --lo: 1; }
.is-static .aut__cue { display: none; }
.is-static .orb { opacity: 1; }
.is-static .aut, .is-static .pre { height: auto; }
.is-static .aut__stage, .is-static .pre__stage { position: relative; height: 100svh; }
@media (max-width: 767px) {
  .is-static .aut__stage { height: auto; overflow: visible; padding: 120px 24px 60px; }
  .is-static .aut__title { position: relative; left: auto; top: auto; translate: none; }
  .is-static .aut__items { position: relative; display: grid; gap: 56px; margin-top: 48px; }
  .is-static .orb { position: relative; width: auto; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
