/* ============================================================
   STYLE.CSS — Base, layout e seções · "Melancia"
   ============================================================ */

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

html {
  scroll-behavior: auto; /* gerenciado por Lenis */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background var(--dur-mid) var(--ease-in-out),
              color var(--dur-mid) var(--ease-in-out);
}

body.is-loading { overflow: hidden; height: 100vh; }

img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

::selection { background: var(--red-vivid); color: var(--white); }

/* Esconde cursor nativo quando o custom está ativo (apenas desktop com mouse) */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor * { cursor: none; }
}

/* ---------- Tipografia utilitária ---------- */
.display { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -0.02em; }
.eyebrow {
  font-size: var(--fs-small);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.text-muted { color: var(--text-muted); }
.text-pulp {
  background: var(--grad-pulp);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-rind {
  background: var(--grad-rind);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
section { position: relative; padding-block: var(--section-pad); }
.section-head { max-width: 720px; margin-bottom: var(--space-lg); }
.section-head h2 { font-size: var(--fs-h2); margin-block: var(--space-sm) var(--space-md); }
.section-head p { color: var(--text-muted); font-size: var(--fs-body); }

/* ---------- Fonte descritiva Bangers — aplicada em todos os parágrafos descritivos ---------- */
.hero__sub,
.section-head p,
.prose p,
.card p,
.reveal__lead,
.timeline__item p,
.faq-item__a p {
  font-family: "Bangers", cursive;
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  letter-spacing: 0.04em;
  line-height: 1.45;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  /* vermelho de base (fallback enquanto os frames carregam) */
  background: var(--red-brand);
}
/* Animação de fundo — sequência da melancia explodindo (canvas) */
.hero__seq {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; display: block;
}
/* Vinheta para garantir leitura do texto sobre a animação */
.hero__scrim {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(140,10,6,0.62) 0%, rgba(140,10,6,0.28) 38%, rgba(140,10,6,0) 66%),
    linear-gradient(0deg, rgba(140,10,6,0.35) 0%, rgba(140,10,6,0) 30%);
}
.hero__noise { position: absolute; inset: 0; z-index: -1; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__inner {
  position: relative; z-index: 2;
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline-start: clamp(1.25rem, 5vw, 6rem);
  justify-self: start;
  /* preenche o "box" da hero: bloco alto, conteúdo distribuído na vertical */
  min-height: min(65svh, 560px);
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(1.4rem, 4.5vh, 3.2rem);
}
.hero__copy { max-width: 100%; display: flex; flex-direction: column; gap: clamp(1.2rem, 3.5vh, 2.6rem); }
.hero .eyebrow { font-size: clamp(0.95rem, 1.3vw, 1.25rem); letter-spacing: 0.32em; }
.hero__title {
  font-size: clamp(2.4rem, 6vw, 6.5rem);
  line-height: 0.9; letter-spacing: -0.02em;
  color: var(--white); margin: 0;
  font-weight: 700;
  display: flex; flex-direction: column;
  gap: 0.06em;
}
.hero__line {
  display: flex; align-items: baseline;
  gap: 0.05em 0.2em;
}
.hero__sub {
  max-width: 54ch; margin: 0;
  color: rgba(255,255,255,0.92); font-size: clamp(1.05rem, 1.4vw, 1.45rem);
}
.hero__product {
  position: relative;
  justify-self: end;
  width: 100%; max-width: 600px;
  /* a imagem já vem no mesmo vermelho do fundo (#F5443B): funde-se à página.
     recortamos a base para ocultar a marca d'água do canto inferior direito */
  aspect-ratio: 2752 / 1392;
  overflow: hidden;
}
.hero__product img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--white); font-size: var(--fs-small);
  letter-spacing: 0.25em; text-transform: uppercase; display: grid; gap: 0.6rem; justify-items: center;
}
.hero__scroll .bar { width: 1px; height: 48px; background: var(--white); transform-origin: top; }

/* Melancia que segue o cursor */
.melon {
  position: fixed; top: 0; left: 0; z-index: 5;
  width: clamp(120px, 16vw, 220px); aspect-ratio: 1;
  pointer-events: none; will-change: transform;
  display: grid; place-items: center;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.45));
}
.melon.is-hidden { opacity: 0; transition: opacity .4s; }
.melon svg { width: 100%; height: 100%; overflow: visible; }
.melon__seed { transform-origin: center; }

/* ============================================================
   STORY / HISTÓRIA — construída pelas partículas
   ============================================================ */
/* Divisor suave (60px) no rodapé de "A Origem": onda da polpa (vermelho)
   subindo para dentro do verde. Fica colado no fundo da seção. */
.story-divider {
  position: absolute;
  left: 0; bottom: 0; width: 100%; height: 300px;
  line-height: 0;
  pointer-events: none;
  z-index: 1;
}
.story-divider svg {
  display: block;
  width: 100%; height: 100%;
}
.story-divider__wave { fill: var(--bg); }
.story-divider__wave--back { opacity: 0.45; }

.story {
  position: relative;
  isolation: isolate;
  /* respiro normal embaixo + os 200px do divisor que fica colado no rodapé */
  padding-bottom: calc(clamp(3rem, 7vw, 5.5rem) + 200px);
  /* tom verde-casca sólido — mesma cor da onda (#103218) → costura invisível.
     Degradê curto SÓ no topo: funde o vermelho do hero no verde (~120px). */
  background:
    linear-gradient(180deg, rgba(140,10,6,0.55) 0, rgba(140,10,6,0) 120px),
    #103218;
}
/* Marca d'água: SVG no fundo de TODA a seção (atrás de vídeo e texto),
   bem suave para não atrapalhar a leitura. */
.story::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url("../../Recriar imagem mais definida.svg") no-repeat center / cover;
  opacity: 0.10;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at center, #000 55%, transparent 92%);
          mask-image: radial-gradient(ellipse 90% 80% at center, #000 55%, transparent 92%);
}
/* Grain (≈2.5%) */
.story::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.story__grid {
  display: grid; gap: var(--space-xl);
  grid-template-columns: 1fr;
}
/* ── Bloco de texto da "A origem" — tipografia alegre, maior e destacada ── */
.story__text { position: relative; max-width: 72ch; text-align: center; margin-inline: auto; }
.story__text .eyebrow {
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  letter-spacing: 0.26em;
}
/* Título "desforme" — palavras de tamanhos variados, escala de Hero (ref. CRAV) */
.story__text .story-title {
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.01em;
  font-size: clamp(2.4rem, 5.5vw, 6rem);
  margin-block: var(--space-sm) var(--space-md);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 0.05em 0.2em;
}
.story-title .w,
.hero__title .w { display: inline-block; will-change: transform; }
.story-title .w-sm,
.hero__title .w-sm  { font-size: 0.46em; opacity: 0.92; }
.story-title .w-md,
.hero__title .w-md  { font-size: 0.66em; }
.story-title .w-lg,
.hero__title .w-lg  { font-size: 0.92em; }
.story-title .w-xl,
.hero__title .w-xl  { font-size: 1.06em; }
.story-title .w-2xl,
.hero__title .w-2xl { font-size: 1.24em; }
.story-title .w-accent,
.hero__title .w-accent { color: var(--green-neon); }
.story-title .w-rot,
.hero__title .w-rot   { transform: rotate(-4deg);  transform-origin: bottom left; }
.story-title .w-rot-r,
.hero__title .w-rot-r { transform: rotate(3deg);   transform-origin: bottom left; }
.story__text .prose p {
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1.5;
  color: var(--text);
}
.story__text .prose strong { color: var(--green-neon); }
.story__media {
  aspect-ratio: 16 / 7; width: 100%;
  position: relative; overflow: hidden;
  background: transparent;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.story__video {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
}
.media-slot {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(255,255,255,0.85); text-align: center; gap: .5rem;
  font-size: var(--fs-small); letter-spacing: .15em; text-transform: uppercase;
}
.media-slot span { display: block; opacity: .7; }

/* ============================================================
   BENEFÍCIOS — cards
   ============================================================ */
.benefits {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}
.benefits__grid {
  display: grid; gap: var(--space-sm);
  grid-template-columns: repeat(6, 1fr);
  overflow: visible;
}
.benefits__grid .card {
  padding: 1.5rem var(--space-sm);
  min-height: 260px;
}
.benefits__grid .card__icon {
  width: 44px; height: 44px; font-size: 1.3rem; margin-bottom: 0.5rem;
}
.benefits__grid .card__metric {
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
}
.benefits__grid .card h3 {
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  margin-bottom: 0.25rem;
}
.benefits__grid .card p {
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ============================================================
   CURIOSIDADES — marquee + grid
   ============================================================ */
.facts { overflow: hidden; }
.marquee {
  display: flex; gap: 3rem; white-space: nowrap; width: max-content;
  font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 6rem);
  color: transparent; -webkit-text-stroke: 1.5px var(--green-neon);
  will-change: transform;
}
.marquee span { padding-inline: 1rem; }
.facts__grid {
  margin-top: var(--space-lg);
  display: grid; gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; }
.timeline__track { position: relative; padding-left: 2rem; }
.timeline__line {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.timeline__progress {
  position: absolute; inset: 0; background: var(--grad-pulp);
  transform: scaleY(0); transform-origin: top;
}
.timeline__item { position: relative; padding: 0 0 var(--space-lg) var(--space-md); }
.timeline__item::before {
  content: ""; position: absolute; left: calc(-2rem - 5px); top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 5px var(--bg-section);
}
.timeline__year { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--accent); }
.timeline__item h4 { font-size: var(--fs-h3); margin: .25rem 0 .5rem; }

/* ============================================================
   GALERIA — carrossel infinito
   ============================================================ */
.gallery {
  position: relative;
  overflow: hidden;
  background: #228B22;
  padding-top: 260px;
  padding-bottom: 320px;
}

/* Shape dividers Waves animadas (top e bottom) */
.gallery__divider {
  position: absolute;
  left: 0; width: 100%; height: 240px;
  pointer-events: none; z-index: 1; line-height: 0;
}
.gallery__divider svg { display: block; width: 100%; height: 100%; }
.gallery__divider--top { top: 0; }
.gallery__divider--bottom { bottom: 0; }

/* Conteúdo acima das ondas */
.gallery .container,
.gallery__carousel { position: relative; z-index: 2; }

.gallery__carousel {
  overflow: hidden;
  padding-block: var(--space-sm);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.gallery__track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: gallery-scroll 40s linear infinite;
}

@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.gallery__slide {
  height: clamp(460px, 56vh, 580px);
  width: auto;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.45);
  transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .gallery__track:hover { animation-play-state: paused; }

  .gallery__slide:hover {
    transform: scale(1.04);
    box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.6);
    z-index: 1;
    position: relative;
  }
}

/* Gradiente que cobre o verde residual no rodapé da galeria */
.gallery::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 320px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 55%);
  pointer-events: none;
  z-index: 3;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { padding-top: var(--space-xl); }
.faq__list { max-width: 820px; }

/* ============================================================
   REVEAL — surpresa final
   ============================================================ */
.reveal {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, #3A100D 0%, var(--red-night) 60%, #1A0504 100%);
  color: var(--white); overflow: hidden; isolation: isolate;
}
.reveal__glow { position: absolute; inset: 0; z-index: -1; background: var(--grad-glow); opacity: .5; }
.reveal__inner { position: relative; z-index: 2; padding-inline: 1.25rem; max-width: 880px; }
.reveal__kicker { color: var(--green-neon); }
.reveal__title { font-size: var(--fs-h2); margin: var(--space-sm) 0 var(--space-md); }
.reveal__title .text-pulp { background: var(--grad-pulp); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal__lead { color: rgba(255,255,255,0.82); max-width: 620px; margin-inline: auto; }
.reveal__cta { margin-top: var(--space-lg); display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   PÁGINAS INTERNAS — cabeçalho simples
   ============================================================ */
.page-hero {
  min-height: 56svh; display: grid; align-items: end; padding-bottom: var(--space-lg);
  background: var(--grad-rind); color: var(--white);
}
.page-hero h1 { font-size: var(--fs-h2); max-width: 14ch; }
.prose { max-width: 70ch; }
.prose p { margin-bottom: var(--space-md); color: var(--text-muted); }
.prose h3 { font-size: var(--fs-h3); margin: var(--space-lg) 0 var(--space-sm); }

/* 404 */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: clamp(5rem, 22vw, 16rem); }
