/* Paisà — As últimas garrafas. Tokens de Design System/Paisà Wine Design System/tokens */

@font-face { font-family: 'Rawson'; font-weight: 200; font-display: swap; src: url('assets/fonts/Rawson-ExtraLight.otf') format('opentype'); }
@font-face { font-family: 'Rawson'; font-weight: 300; font-display: swap; src: url('assets/fonts/Rawson-Light.otf') format('opentype'); }
@font-face { font-family: 'Rawson'; font-weight: 400; font-display: swap; src: url('assets/fonts/Rawson-Regular.otf') format('opentype'); }
@font-face { font-family: 'Rawson'; font-weight: 600; font-display: swap; src: url('assets/fonts/Rawson-SemiBold.otf') format('opentype'); }

:root {
  --black: #101820;
  --ink: #16202a;
  --ink-70: #2b3844;
  --muted: #6b7681;
  --gray: #c1c3c4;
  --paper: #faf8f5;
  --line: #e4dfd8;
  --line-dark: rgba(250, 248, 245, 0.14);
  --gold: #efd188;
  --gold-25: #faf3e1;
  --font: 'Rawson', Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 96px);
  --section: clamp(88px, 12vw, 200px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --slow: 480ms;
  --radius: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, calc(0.38vw + 10.5px), 22px); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--black); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { max-width: 92rem; margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.dark { background: var(--black); color: var(--paper); }
.section { padding-block: var(--section); }

.eyebrow { margin: 0 0 1.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.dark .eyebrow { color: var(--gold); }
.display { margin: 0; font-weight: 200; font-size: clamp(3rem, 1.2rem + 7vw, 9rem); line-height: 0.95; letter-spacing: -0.035em; max-width: 12ch; }
h2 { margin: 0 0 1.5rem; font-weight: 300; font-size: clamp(2.1rem, 1.2rem + 3.4vw, 4.5rem); line-height: 1.03; letter-spacing: -0.025em; max-width: 20ch; }
h3 { font-weight: 300; letter-spacing: -0.02em; }
.lead { margin: 0; font-weight: 300; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem); line-height: 1.5; max-width: 40ch; }
.dark .lead { color: var(--gray); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.9em 1.8em; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font-weight: 600; font-size: 0.9375rem; line-height: 1; letter-spacing: 0.04em; text-decoration: none; cursor: pointer; transition: background var(--slow) var(--ease), color var(--slow) var(--ease), border-color var(--slow) var(--ease); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn--ghost { border-color: var(--line-dark); }
.btn--sm { min-height: 44px; padding: 0.75em 1.3em; font-size: 0.8125rem; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.link { min-height: 44px; padding: 0 0.25em; border: 0; background: none; color: var(--gray); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@media (hover: hover) {
  .btn--gold:not(:disabled):hover { background: var(--gold-25); border-color: var(--gold-25); }
  .btn--ghost:hover { background: var(--paper); border-color: var(--paper); color: var(--black); }
  .link:hover { color: var(--paper); }
}

/* Topbar */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(env(safe-area-inset-top) + 16px) max(var(--gutter), env(safe-area-inset-right)) 16px max(var(--gutter), env(safe-area-inset-left)); color: var(--paper); transition: background var(--slow) var(--ease); }
.topbar.is-solid { background: var(--black); }
.topbar img { height: 24px; width: auto; }

/* Hero */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: calc(env(safe-area-inset-top) + 112px); overflow: hidden; }
.hero__text { width: 100%; padding-bottom: clamp(24px, 4vw, 64px); }
.hero__text .lead { margin: 1.75rem 0 2.25rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media img { width: 100%; height: auto; -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); transform: scale(1.06); transition: transform 2.4s var(--ease); }
.is-loaded .hero__media img { transform: none; }

.strip { border-block: 1px solid var(--line-dark); }
.strip ul { list-style: none; margin-block: 0; padding-block: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 40px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.strip li { display: flex; align-items: center; gap: 12px; }
.strip li::before { content: ""; width: 5px; height: 5px; background: currentColor; transform: rotate(45deg); }
@media (max-width: 700px) { .strip ul { justify-content: flex-start; } }

/* História */
.story__grid { display: grid; gap: clamp(32px, 6vw, 120px); }
.story h2 { max-width: 14ch; }
.story__body p { margin: 0 0 1.25em; max-width: 60ch; color: var(--ink-70); font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem); }
.signature { margin-top: 2.5rem !important; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.signature strong { display: block; font-weight: 400; font-size: 1.5rem; color: var(--black); }
.signature span { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 900px) { .story__grid { grid-template-columns: 5fr 6fr; } }

/* Coleção */
.collection__head { display: grid; gap: 1rem; margin-bottom: clamp(40px, 6vw, 96px); }
.collection__head > p { margin: 0; max-width: 36ch; color: var(--gray); }
@media (min-width: 900px) { .collection__head { grid-template-columns: 1fr auto; align-items: end; } }

.wines { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2.5vw, 40px); }
@media (max-width: 767px) {
  .wines { grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .wines::-webkit-scrollbar { display: none; }
  .wine { scroll-snap-align: start; }
}
@media (min-width: 768px) { .wines { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: clamp(64px, 6vw, 120px); } }
@media (min-width: 1100px) { .wines { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.wine { --p: 0; position: relative; display: flex; flex-direction: column; padding-top: clamp(20px, 2vw, 32px); border-top: 1px solid var(--line-dark); }
.wine::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 1px; background: var(--accent); }
.wine__stage { position: relative; width: min(100%, calc(min(58svh, 36rem) * 0.475)); aspect-ratio: 760 / 1600; margin-inline: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wine__stage::before { content: ""; position: absolute; inset: 15% -25% 0; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 24%, transparent), transparent); opacity: calc(0.4 + var(--p) * 0.6); }
.wine__stage img, .wine__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.wine__nu { opacity: var(--p); transform: scale(calc(0.97 + var(--p) * 0.03)); }
.wine__label { opacity: calc(1 - var(--p)); transform: translateY(calc(var(--p) * -9%)) rotate(calc(var(--p) * -6deg)); filter: blur(calc(var(--p) * 8px)); transform-origin: 50% 0; }
.wine__art { background: var(--art) center / cover; -webkit-mask: url('assets/img/nu-espumante.webp') center / contain no-repeat; mask: url('assets/img/nu-espumante.webp') center / contain no-repeat; }
.wine.is-animating .wine__nu, .wine.is-animating .wine__label { transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }

.wine__control { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.range { flex: 1; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: grab; }
.range::-webkit-slider-runnable-track { height: 1px; background: var(--line-dark); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -11px; border: 0; border-radius: 50%; background: var(--accent); }
.range::-moz-range-track { height: 1px; background: var(--line-dark); }
.range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--accent); }

.wine__type { margin: 18px 0 6px; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); }
.wine h3 { margin: 0 0 14px; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.5rem); line-height: 1; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.price s { color: var(--muted); text-decoration-thickness: 1px; }
.price strong { font-weight: 400; font-size: 1.875rem; letter-spacing: -0.01em; }
.price small { font-size: 0.8125rem; color: var(--gray); }
.box { margin: 4px 0 20px; font-size: 0.875rem; color: var(--gray); }
.wine__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: auto; }
.wine [data-add] { border-color: var(--accent); }
@media (hover: hover) { .wine [data-add]:hover { background: var(--accent); color: var(--black); } }

.lightbox { max-width: min(94vw, 1400px); max-height: 94svh; padding: 0; border: 0; background: transparent; }
.lightbox::backdrop { background: rgba(16, 24, 32, 0.94); }
.lightbox[open] { animation: fade var(--slow) var(--ease); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 84svh; width: auto; margin-inline: auto; border-radius: 2px; }
.lightbox figcaption { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; color: var(--paper); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }
@keyframes fade { from { opacity: 0; } }

/* Preço de custo */
.cost__grid { display: grid; gap: clamp(40px, 6vw, 120px); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 2.5rem; }
.stat { margin: 0; }
.stat b { display: block; font-weight: 200; font-size: clamp(3rem, 2rem + 3vw, 5.5rem); line-height: 1; letter-spacing: -0.04em; }
.stat span { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cost__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cost__list li { display: grid; gap: 4px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cost__list strong { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; padding-top: 0.3em; }
.cost__list span { color: var(--ink-70); }
.note { margin: 2.5rem 0 0; max-width: 26ch; font-weight: 300; font-size: clamp(1.375rem, 1rem + 1vw, 2rem); line-height: 1.3; }
@media (min-width: 560px) { .cost__list li { grid-template-columns: 9rem 1fr; } }
@media (min-width: 900px) { .cost__grid { grid-template-columns: 1fr 1fr; } }

.craft { margin-top: var(--section); }
.craft__list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; column-gap: clamp(24px, 3vw, 56px); counter-reset: c; }
.craft__list li { counter-increment: c; padding: 24px 0; border-top: 1px solid var(--line); font-weight: 300; font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem); line-height: 1.4; }
.craft__list li::before { content: counter(c, decimal-leading-zero); display: block; margin-bottom: 10px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; color: var(--muted); }
.craft__list a { display: inline-block; margin-top: 8px; font-size: 0.9375rem; font-weight: 400; }
@media (min-width: 700px) { .craft__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .craft__list { grid-template-columns: repeat(3, 1fr); } }

/* Formas de receber */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0 clamp(32px, 4vw, 64px); }
.tab[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--black); }
.panel { display: grid; gap: clamp(32px, 5vw, 96px); align-items: center; }
.panel:not([hidden]) { animation: fade var(--slow) var(--ease); }
.panel__img { position: relative; width: min(100%, calc(min(56svh, 34rem) * 0.475)); aspect-ratio: 760 / 1600; margin-inline: auto; }
.panel__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.panel h3 { margin: 0 0 1rem; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 3rem); line-height: 1.05; }
.panel p { margin: 0; max-width: 44ch; color: var(--gray); font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem); }
.private-tag { position: absolute; left: 30%; right: 30%; top: 56%; aspect-ratio: 0.9; display: grid; place-items: center; border: 1px dashed var(--gold); background: rgba(16, 24, 32, 0.6); color: var(--gold); font-size: clamp(0.5625rem, 0.4rem + 0.4vw, 0.8125rem); font-weight: 600; letter-spacing: 0.18em; line-height: 1.6; text-align: center; text-transform: uppercase; }
.formats__note { margin: clamp(40px, 5vw, 72px) 0 0; padding-top: 24px; border-top: 1px solid var(--line-dark); color: var(--gray); font-size: 0.9375rem; }
@media (min-width: 900px) { .panel { grid-template-columns: 5fr 7fr; } }

/* Ocasiões */
.occasions__list { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.occasions__list li { display: grid; gap: 6px 40px; padding: clamp(20px, 2.5vw, 36px) 0; border-bottom: 1px solid var(--line); }
.occasions__list strong { font-weight: 300; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; }
.occasions__list span { color: var(--ink-70); max-width: 48ch; }
@media (min-width: 768px) { .occasions__list li { grid-template-columns: 1fr 1fr; align-items: center; } }

/* Pedido */
.order__grid { display: grid; gap: clamp(32px, 4vw, 72px); margin-top: clamp(40px, 5vw, 80px); }
@media (min-width: 1025px) { .order__grid { grid-template-columns: 7fr 5fr; align-items: start; } }
fieldset { min-width: 0; margin: 0 0 36px; padding: 0; border: 0; }
legend { margin-bottom: 14px; padding: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.choices { display: grid; gap: 10px; }
@media (min-width: 560px) { .choices--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 700px) { .choices--3 { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice span { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line-dark); border-radius: var(--radius); transition: border-color var(--slow) var(--ease), background var(--slow) var(--ease); }
.choice b { display: block; margin-bottom: 2px; font-weight: 600; }
.choice small { display: block; font-size: 0.8125rem; line-height: 1.4; color: var(--gray); }
.choice input:checked + span { border-color: var(--gold); background: rgba(239, 209, 136, 0.07); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
.row b { display: flex; align-items: center; gap: 0.6em; font-weight: 400; font-size: 1.125rem; }
.row b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.row small { display: block; padding-left: calc(8px + 0.6em); font-size: 0.8125rem; color: var(--gray); }
.stepper { display: flex; flex: none; align-items: center; border: 1px solid var(--line-dark); border-radius: 999px; }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--paper); font-weight: 300; font-size: 1.375rem; line-height: 1; cursor: pointer; }
.stepper input { width: 3.2ch; border: 0; background: none; color: var(--paper); font-size: 1.0625rem; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field { width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: transparent; color: var(--paper); font-size: 1.0625rem; }
.field::placeholder { color: var(--muted); }

.summary { position: sticky; top: 88px; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line-dark); border-radius: var(--radius); background: var(--ink); }
.summary__lines { list-style: none; margin: 0 0 20px; padding: 0; font-size: 0.9375rem; color: var(--gray); }
.summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--line-dark); }
.summary__total b { font-weight: 300; font-size: clamp(2rem, 1.5rem + 1.5vw, 3rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.summary__count { margin: 4px 0 16px; font-size: 0.875rem; color: var(--gray); }
.summary__status { min-height: 1.5em; margin: 0 0 16px; font-size: 0.875rem; color: var(--gold); }
.summary .btn { width: 100%; }
.summary__fine { margin: 16px 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }

/* Dúvidas */
.faq__grid { display: grid; gap: clamp(32px, 5vw, 96px); }
@media (min-width: 900px) { .faq__grid { grid-template-columns: 4fr 7fr; align-items: start; } }
.faq__more { color: var(--ink-70); }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding: 22px 0; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.375rem); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-3px) rotate(45deg); transition: transform var(--slow) var(--ease); }
details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
details p { margin: 0 0 24px; max-width: 62ch; color: var(--ink-70); }

/* Manifesto + CTA final */
.manifesto { text-align: center; }
.manifesto__kicker { margin: 0 0 1.5rem; color: var(--gray); font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem); font-weight: 300; }
.manifesto blockquote { margin: 0 auto; max-width: 20ch; font-weight: 200; font-size: clamp(2.25rem, 1.2rem + 4vw, 5.5rem); line-height: 1.05; letter-spacing: -0.03em; }
.manifesto img { width: clamp(140px, 14vw, 260px); height: auto; margin: 3rem auto 0; }
.final { margin-top: var(--section); padding-top: var(--section); border-top: 1px solid var(--line-dark); }
.final h2, .final .lead { margin-inline: auto; }
.final .lead { margin-bottom: 2.25rem; }
.final .hero__cta { justify-content: center; }

.footer { padding-block: 40px calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-dark); font-size: 0.8125rem; color: var(--gray); }
.footer p { margin: 0; }
.footer__row, .footer__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.footer__row img { height: 18px; width: auto; }
.footer__legal { margin-top: 20px; color: var(--muted); }
@media (max-width: 1024px) { .footer { padding-bottom: calc(104px + env(safe-area-inset-bottom)); } }

/* WhatsApp flutuante (mobile e tablet) */
.wa-float { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--black); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.wa-float.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
@media (min-width: 1025px) { .wa-float { display: none; } }

/* Reveal */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__media img { transform: none; }
}
