/* ============================================================
   STYLE.CSS — Landing "COMPRA 20% EXTRA"
   Dirección visual: editorial, sobria, premium.
   - Base negro suave + una sola luz ambiental bordó desde arriba.
   - Textura de grano casi imperceptible (SVG inline, sin imágenes).
   - Marco fino que ordena la composición.
   Sin fuentes externas ni imágenes: carga instantánea en móvil.
============================================================ */

:root {
  --ink:        #0d0a0b;   /* negro suave */
  --ink-2:      #161112;   /* carbón cálido */
  --wine:       #6e0f1d;   /* bordó */
  --wine-deep:  #3a0710;
  --red:        #c8283a;   /* acento */
  --white:      #f7f4f3;   /* blanco cálido, menos duro que #fff */
  --muted:      rgba(247, 244, 243, .62);
  --hairline:   rgba(247, 244, 243, .09);
  --wa:         #25d366;
  --wa-dark:    #1ebe5b;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--ink); }

/* ---------- Fondo ---------- */
body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  color: var(--white);
  background-color: var(--ink);
  /* 1) luz ambiental bordó desde arriba  2) vignette inferior  3) base */
  background-image:
    radial-gradient(90% 55% at 50% -6%, rgba(110, 15, 29, .85) 0%, rgba(58, 7, 16, .45) 45%, transparent 75%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55) 100%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grano de película muy sutil: rompe el "plano digital" del degradado */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Reflejo cálido muy suave detrás de la oferta (profundidad, no brillo) */
body::after {
  content: "";
  position: fixed;
  left: 50%;
  top: 44%;
  width: 120vw;
  height: 60vh;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(200, 40, 58, .14), transparent);
}

/* Marco fino: da estructura y sensación de pieza diseñada */
.frame {
  position: fixed;
  inset: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  z-index: 1;
  pointer-events: none;
  border: 1px solid var(--hairline);
  border-radius: 20px;
}

/* ---------- Composición ---------- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(44px, 8vh, 72px);
  padding: max(48px, env(safe-area-inset-top)) 32px max(48px, env(safe-area-inset-bottom));
  text-align: center;
  animation: enter .7s cubic-bezier(.2, .7, .2, 1) both;
}

.offer {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}

/* "COMPRA": etiqueta espaciada con línea de acento debajo */
.offer__kicker {
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 600;
  letter-spacing: .48em;
  margin-right: -.48em;               /* compensa el tracking para centrar */
  color: var(--muted);
  padding-bottom: 22px;
  margin-bottom: 18px;
  position: relative;
}
.offer__kicker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 2px;
  transform: translateX(calc(-50% - .24em));
  background: var(--red);
  border-radius: 2px;
}

/* "20%": protagonista absoluto */
.offer__number {
  font-size: clamp(116px, 40vw, 200px);
  font-weight: 800;
  letter-spacing: -.055em;
  margin-right: .02em;
  line-height: .86;
  background: linear-gradient(180deg, #ffffff 0%, #f4e9e9 60%, #d9c3c5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45));
}

/* "EXTRA": peso alto, tracking abierto */
.offer__word {
  font-size: clamp(34px, 11.5vw, 56px);
  font-weight: 800;
  letter-spacing: .32em;
  margin-right: -.32em;
  margin-top: 14px;
  color: var(--white);
}

/* ---------- Botón ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  min-height: 60px;
  padding: 0 28px;
  border-radius: 16px;
  background: var(--wa);
  color: #06210f;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: .12em;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .35) inset,
    0 10px 24px -8px rgba(37, 211, 102, .45),
    0 18px 40px -12px rgba(0, 0, 0, .7);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .14s ease, background-color .14s ease, box-shadow .14s ease;
}
.cta__icon { width: 22px; height: 22px; flex-shrink: 0; }

/* Logo oficial de WhatsApp (archivo whatsapp-logo.svg junto a index.html).
   Oculto hasta que carga; si carga, reemplaza al ícono genérico. */
.cta__logo { display: none; width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; }
.cta.has-logo .cta__logo { display: block; }
.cta.has-logo .cta__icon { display: none; }

@media (hover: hover) {
  .cta:hover { background: #2bdc6d; }
}
.cta:active {
  transform: translateY(1px) scale(.985);
  background: var(--wa-dark);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .25) inset,
    0 6px 14px -6px rgba(37, 211, 102, .4),
    0 10px 24px -10px rgba(0, 0, 0, .7);
}
.cta:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

/* ---------- Pantallas bajas / horizontal ---------- */
@media (max-height: 600px) {
  .hero { gap: 28px; padding-top: 32px; padding-bottom: 32px; }
  .offer__number { font-size: clamp(84px, 24vh, 150px); }
  .offer__word { font-size: clamp(26px, 7vh, 44px); margin-top: 8px; }
  .offer__kicker { padding-bottom: 14px; margin-bottom: 12px; }
}

/* ---------- Escritorio: misma pieza, mejor proporción ---------- */
@media (min-width: 768px) {
  .frame { inset: 24px; border-radius: 28px; }
}

/* ---------- Entrada mínima ---------- */
@keyframes enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  .cta { transition: none; }
}
