/* ==========================================================================
   Base: reset, tipografia, moldura e utilitários
   Mobile first. Breakpoints: 600px, 900px, 1200px.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 8px;
  background: var(--vinho);
  color: var(--marrom);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--oliva);
  color: var(--vinho);
}

:focus-visible {
  outline: 3px solid var(--oliva);
  outline-offset: 3px;
}

.on-light :focus-visible,
.block--creme :focus-visible,
.block--branco :focus-visible,
.block--oliva :focus-visible,
.block--oliva-palida :focus-visible {
  outline-color: var(--bordo);
}

[id] {
  scroll-margin-top: 96px;
}

[hidden] {
  display: none !important;
}

body.menu-open {
  overflow: hidden;
}

a[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
}

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

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--oliva);
  color: var(--vinho);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* --------------------------------------------------------------------------
   Moldura: cada seção é um bloco arredondado sobre o vinho (padrão Loudly)
   -------------------------------------------------------------------------- */

.block {
  position: relative;
  margin-bottom: 8px;
  padding: 64px 20px;
  border-radius: 24px;
  isolation: isolate;
}

.block--creme { background: var(--creme); color: var(--marrom); }
.block--branco { background: var(--branco); color: var(--marrom); }
.block--oliva { background: var(--oliva); color: var(--vinho); }
.block--oliva-palida { background: var(--oliva-palida); color: var(--vinho); }
.block--bordo { background: var(--bordo); color: var(--creme); }
.block--vinho { background: var(--vinho); color: var(--creme); }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Tipografia
   -------------------------------------------------------------------------- */

.display,
.h1,
.h2,
.h3-display {
  font-family: var(--font-sans);
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  text-wrap: balance;
}

.h1 {
  font-size: 46px;
  line-height: 44px;
  letter-spacing: -0.5px;
}

.h2 {
  font-size: 38px;
  line-height: 38px;
  letter-spacing: -0.4px;
}

.h3-display {
  font-size: 26px;
  line-height: 28px;
}

/* Palavra de destaque: Instrument Serif itálico, uma por título */
.h1 em,
.h2 em,
.h3-display em,
.display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.08em;
  line-height: 0;
  padding-right: 2px;
}

.accent-bordo em,
.block--creme .h1 em,
.block--creme .h2 em,
.block--branco .h2 em,
.block--oliva-palida .h2 em,
.block--oliva .h2 em {
  color: var(--bordo);
}

.block--vinho .h2 em,
.block--bordo .h2 em,
.accent-oliva em {
  color: var(--oliva);
}

.lead {
  font-size: 18px;
  line-height: 30px;
}

.serif-sub {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 32px;
}

.small {
  font-size: 14px;
  line-height: 22px;
}

.muted { color: var(--marrom-suave); }

/* Rótulo / chip de seção (Loudly) com o espaçamento do rótulo da marca */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1.5px currentColor;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.chip svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}

.section-head--center {
  align-items: center;
  text-align: center;
}

.section-head p {
  max-width: 560px;
}

/* Botão de diagnóstico centralizado no fim de uma seção. */
.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.star {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
}

/* --------------------------------------------------------------------------
   Estados de animação (só quando o JS ativa .motion e o usuário aceita movimento)
   -------------------------------------------------------------------------- */

.motion [data-reveal],
.motion [data-reveal-stagger] > *,
.motion [data-hero] {
  opacity: 0;
}

/* O título do hero entra só com CSS: não espera o JS e não atrasa o LCP */
.motion .hero__title .line > span {
  animation: line-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.motion .hero__title .line:nth-child(2) > span { animation-delay: 0.07s; }
.motion .hero__title .line:nth-child(3) > span { animation-delay: 0.14s; }
.motion .hero__title .line:nth-child(4) > span { animation-delay: 0.21s; }

/* Chip, texto e botões do hero também entram via CSS (o parágrafo costuma ser o LCP no mobile) */
.motion .hero__copy [data-hero] {
  animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.motion .hero__copy .hero__lead { animation-delay: 0.2s; }
.motion .hero__copy .hero__actions { animation-delay: 0.3s; }
.motion .hero__copy .hero__note { animation-delay: 0.4s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes line-up {
  from { transform: translateY(110%); }
  to { transform: none; }
}

.h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 6px;
  margin-bottom: -6px;
}

.h1 .line > span {
  display: inline-block;
}

/* Com o Lenis, a ancoragem de rolagem do navegador desfaz o fim das rolagens longas até uma âncora. */
html.lenis {
  overflow-anchor: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media (min-width: 600px) {
  body { padding: 12px; }

  .block {
    margin-bottom: 12px;
    padding: 88px 32px;
    border-radius: var(--r-bloco);
  }

  .h1 { font-size: 64px; line-height: 60px; }
  .h2 { font-size: 48px; line-height: 46px; }
  .h3-display { font-size: 30px; line-height: 32px; }
  .serif-sub { font-size: 30px; line-height: 36px; }
}

@media (min-width: 900px) {
  .block { padding: 112px 40px; }
  .h1 { font-size: 76px; line-height: 70px; }
  .h2 { font-size: 60px; line-height: 56px; }
  .section-head { margin-bottom: 56px; }
}

@media (min-width: 1200px) {
  .block { padding: 128px 40px; }
  .h1 { font-size: 88px; line-height: 80px; letter-spacing: -1px; }
  .h2 { font-size: 64px; line-height: 60px; }
  .h3-display { font-size: 34px; line-height: 34px; }
  .serif-sub { font-size: 34px; line-height: 40px; }
}
