/* ============================================================================
   Step Friend — sistema de diseño del sitio
   Paleta y agua tomadas de la app real:
   - Fondo del juego: water_background.frag  → base #1D6B90 + bandas de ola
   - Colores del ajolote: axolotl_skin_palette.dart (cian, coral, amarillo, rosa)
   - Tipografías del juego: LuckiestGuy (títulos) + Chewy (marca/acentos)
   Se comparte entre la landing EN y ES (y puede reutilizarse en legales).
   ========================================================================== */

@font-face {
  font-family: 'LuckiestGuy';
  src: url('/assets/fonts/LuckiestGuy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Chewy';
  src: url('/assets/fonts/Chewy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Agua — valores exactos del shader del juego */
  --water-deep:  #123f56;   /* profundidad (arriba) */
  --water:       #1d6b90;   /* base del shader vec3(0.114,0.420,0.565) */
  --water-band:  #3980a1;   /* banda de ola */
  --water-mid:   #609ab4;   /* banda media */
  --water-light: #81bbcd;   /* cresta clara */

  /* Ajolote / mundo */
  --sand:        #f2d99a;   /* arena dorada del fondo */
  --coral:       #ff7e6b;   /* branquias coral (skin aurora) */
  --gill:        #ffda22;   /* branquias amarillas (skin cian/mexicano) */
  --mex-pink:    #ff4367;   /* rosa mexicano — CTA */
  --aurora:      #3fe0c8;   /* teal aurora */
  --purple:      #e812ff;   /* morado */

  /* Superficies y tinta */
  --cream:       #fff7ee;   /* tarjetas / texto sobre agua */
  --ink:         #3a1e18;   /* contorno café del arte (outline del ajolote) */
  --ink-soft:    #6b4a40;
  --sticker-sh:  rgba(58, 30, 24, .22);

  --maxw: 1040px;

  --display: 'LuckiestGuy', system-ui, sans-serif;
  --brand:   'Chewy', system-ui, cursive;
  --body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--body);
  color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  /* Columna de agua a lo largo de toda la página: profundo arriba → base →
     luz → arena al fondo (junto al footer). Sin background-attachment:fixed
     para que la arena caiga al final real y no se repita por pantalla. */
  background:
    linear-gradient(180deg,
      var(--water-deep) 0%,
      var(--water) 32%,
      var(--water) 60%,
      var(--water-mid) 88%,
      var(--sand) 100%) no-repeat;
  background-size: 100% 100%;
}

a { color: var(--aurora); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 63, 86, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 247, 238, .12);
}
header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--brand);
  font-size: 24px; letter-spacing: .3px;
  color: var(--cream);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
nav a {
  color: rgba(255, 247, 238, .78);
  margin-left: 22px; font-size: 15px; font-weight: 600;
}
nav a:hover { color: var(--cream); text-decoration: none; }

/* ── Agua animada del hero (ligera: gradiente + 2 olas SVG + burbujas) ────── */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 156px; text-align: center;
}
/* Brillo suave de superficie */
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(1100px 480px at 50% -12%, rgba(129,187,205,.35), transparent 68%);
  pointer-events: none;
}
/* Olas: dos capas SVG anchas (superficie del agua) que derivan en horizontal.
   Curvas altas y suaves para que se lean con volumen, no como una banda plana.
   Se anima background-position-x un tile completo (100vw) → loop sin cortes y
   con cobertura total del ancho. Muy ligero. */
.wave {
  position: absolute; left: -50%; width: 200%; height: 190px;
  background-repeat: repeat-x;
  background-size: 50% 100%;
  background-position-y: bottom;
  pointer-events: none;
}
.wave.w1 {
  bottom: 30px; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 80 C 220 30 420 30 600 80 C 780 130 980 130 1200 80 L1200 200 L0 200 Z' fill='%2381bbcd'/%3E%3C/svg%3E");
  animation: driftx 26s linear infinite;
}
.wave.w2 {
  bottom: 0; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 110 C 180 152 400 58 600 110 C 800 162 1020 66 1200 110 L1200 200 L0 200 Z' fill='%233980a1'/%3E%3C/svg%3E");
  animation: driftx 18s linear infinite reverse;
}
@keyframes driftx {
  from { background-position-x: 0; }
  to   { background-position-x: -100vw; }
}

/* Burbujas que suben con leve vaivén (como bubble_overlay.frag) */
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute; bottom: -30px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.9), rgba(255,255,255,.15) 60%, transparent 72%);
  border: 1px solid rgba(255,255,255,.35);
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translate(0, 0);            opacity: 0; }
  12%  { opacity: .9; }
  85%  { opacity: .9; }
  100% { transform: translate(var(--sway, 14px), -102vh); opacity: 0; }
}

.hero-inner { position: relative; z-index: 2; }
.hero img.axolotl {
  width: 200px; height: auto;
  filter: drop-shadow(0 18px 26px rgba(18,63,86,.45));
  animation: bob 3.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-14px) rotate(1.5deg); }
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.02; margin: 26px auto 16px; max-width: 14ch;
  letter-spacing: .5px; color: var(--cream);
  text-shadow: 0 3px 0 rgba(58,30,24,.28), 0 10px 24px rgba(18,63,86,.4);
}
.hero h1 .pop { color: var(--gill); }
.hero h1 .pop.coral { color: var(--coral); }
.hero p.lead {
  font-size: clamp(17px, 2.4vw, 21px);
  color: rgba(255,247,238,.9);
  max-width: 560px; margin: 0 auto 34px;
}

/* ── Botones sticker (estilo botones del juego) ──────────────────────────── */
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cream); color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 16px; padding: 12px 22px;
  font-weight: 700;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); text-decoration: none; }
.store-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.store-btn .small { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.store-btn .big { display: block; font-size: 15px; }
.store-btn img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.store-btn.soon { opacity: .78; cursor: default; }
.store-btn.soon:hover { transform: none; box-shadow: 0 5px 0 var(--ink); }
.store-btn.soon .small { opacity: .9; }

/* ── Secciones ───────────────────────────────────────────────────────────── */
section { position: relative; }
.section { padding: 64px 0; }
.section h2 {
  font-family: var(--display);
  text-align: center; font-size: clamp(26px, 4vw, 38px);
  letter-spacing: .4px; margin-bottom: 8px; color: var(--cream);
  text-shadow: 0 2px 0 rgba(58,30,24,.22);
}
.section .sub { text-align: center; color: rgba(255,247,238,.82); margin-bottom: 40px; }

/* Tarjetas sticker (crema, contorno café — como el arte) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.feat {
  background: var(--cream); color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 22px; padding: 24px;
  box-shadow: 0 8px 0 var(--sticker-sh);
  transition: transform .15s ease;
}
.feat:hover { transform: translateY(-4px); }
.feat .ico {
  width: 58px; height: 58px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
}
.feat .ico img { width: 100%; height: 100%; object-fit: contain; }
.feat h3 { font-family: var(--brand); font-size: 21px; margin-bottom: 4px; color: var(--ink); }
.feat p { color: var(--ink-soft); font-size: 15px; }

/* Vitrina de skins / mascotas — fila de personajes que flotan */
.cast {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(12px, 3vw, 34px);
}
.cast figure { text-align: center; width: 120px; }
.cast img {
  width: 100%; height: auto;
  filter: drop-shadow(0 10px 14px rgba(18,63,86,.4));
  animation: floaty 4s ease-in-out infinite;
}
.cast figure:nth-child(2n) img { animation-duration: 4.8s; }
.cast figure:nth-child(3n) img { animation-duration: 5.4s; }
.cast figcaption {
  font-family: var(--brand); font-size: 16px;
  color: var(--cream); margin-top: 6px;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

/* Banda Pro — mismo lenguaje que el CoralGradientButton de la app:
   gradiente coral vertical #FF8A80→#FF6B6B, sin borde, sombra coral teñida,
   texto blanco con sombra café. Brillo superior para dar volumen de botón. */
.pro {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ff8a80 0%, #ff6b6b 100%);
  border-radius: 24px; padding: 44px 32px;
  box-shadow: 0 16px 34px rgba(255, 107, 107, .38);
  text-align: center;
}
.pro::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 42%);
  pointer-events: none;
}
.pro > * { position: relative; z-index: 1; }
.pro h2 {
  font-family: var(--display); font-size: clamp(24px, 4vw, 34px);
  color: #fff; margin-bottom: 10px;
  text-shadow: 0 2px 3px rgba(105, 38, 32, .45);
}
.pro .pro-lead { color: rgba(255,247,238,.92); max-width: 560px; margin: 0 auto 22px; }
.pro-perks {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; max-width: 760px; margin: 0 auto 22px; text-align: left;
}
.perk {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,247,238,.14);
  border: 1px solid rgba(255,247,238,.28);
  border-radius: 14px; padding: 12px 14px;
}
.perk img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.perk span { color: var(--cream); font-weight: 600; font-size: 14px; }
.pro .price {
  font-family: var(--brand); font-size: 18px; color: var(--cream);
}
.pro .price small { display: block; font-family: var(--body); font-size: 13px; opacity: .85; font-weight: 400; }

/* Bloque "Hecho en México" */
.origin {
  background: var(--cream); color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 26px; padding: 32px;
  box-shadow: 0 8px 0 var(--sticker-sh);
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.origin img { width: 96px; height: auto; flex: none; }
.origin h2 { font-family: var(--brand); font-size: 24px; color: var(--ink); margin-bottom: 6px; text-align: left; text-shadow: none; }
.origin p { color: var(--ink-soft); font-size: 15px; }
.origin .who { flex: 1 1 260px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(58,30,24,.25);
  background: rgba(242,217,154,.35);
  padding: 34px 0; color: var(--ink); font-size: 14px;
}
footer a { color: var(--ink); font-weight: 600; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
footer .links a { margin-left: 18px; }
footer .links a:first-child { margin-left: 0; }

@media (max-width: 560px) {
  header .wrap { height: 58px; }
  nav a { margin-left: 14px; font-size: 13px; }
  nav a[href^="#"] { display: none; } /* ocultar anclas internas, dejar idioma/legales */
  .hero { padding: 60px 0 80px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
  footer .links a { margin-left: 0; margin-right: 18px; }
  .origin { flex-direction: column; text-align: center; }
  .origin h2 { text-align: center; }
}

/* ── Documentos legales (privacidad, términos, soporte, eliminar cuenta) ────
   Tarjeta "papel" crema flotando sobre el agua: atada a la marca pero con
   texto oscuro sobre claro para lectura cómoda. */
main.doc-main { padding: 40px 0 72px; }
.doc {
  max-width: 820px; margin: 0 auto;
  padding: 0 20px;
}
.doc-card {
  background: var(--cream); color: #3a2620;
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 10px 0 var(--sticker-sh);
  padding: clamp(26px, 5vw, 52px);
  line-height: 1.7;
}
.doc-card h1 {
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 40px);
  color: var(--ink); margin-bottom: 8px; letter-spacing: .5px; line-height: 1.05;
}
.doc-card h2 {
  font-family: var(--brand); font-weight: 400;
  font-size: 23px; margin: 34px 0 12px; color: var(--ink);
  scroll-margin-top: 84px; /* que la ancla no quede bajo el header sticky */
}
.doc-card h3 { font-size: 16px; margin: 22px 0 8px; color: #c0455e; }
.doc-card p { margin-bottom: 14px; }
.doc-card ul, .doc-card ol { margin: 12px 0 16px; padding-left: 24px; }
.doc-card li { margin-bottom: 8px; }
.doc-card a { color: #1d6b90; font-weight: 600; }
.doc-card strong { color: var(--ink); }
.doc-card hr { border: none; border-top: 1px solid rgba(58,30,24,.16); margin: 30px 0; }
.doc-card .dates { color: var(--ink-soft); font-size: 14px; margin-bottom: 24px; }
.doc-card .dates strong { color: var(--ink); }

.doc-card table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.doc-card th, .doc-card td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid rgba(58,30,24,.14); vertical-align: top;
}
.doc-card th { background: #f4e7d5; color: var(--ink); font-weight: 700; }

.doc-card .note {
  background: #fdeee6; border-left: 4px solid var(--coral);
  border-radius: 10px; padding: 14px 18px; margin: 16px 0;
}
.doc-card .contact-card {
  background: #fbf1e6; border: 1.5px solid rgba(58,30,24,.2);
  border-radius: 14px; padding: 20px 24px; margin-top: 16px;
}
.doc-card .contact-card .email { font-size: 18px; font-weight: 700; }
.doc-card .contact-card .meta { color: var(--ink-soft); font-size: 14px; margin-top: 8px; }
.doc-card .em { color: var(--ink-soft); font-size: 13px; font-style: italic; margin-top: 32px; display: block; }

/* Índice (privacidad) */
.toc {
  background: #fbf1e6; border: 1.5px solid rgba(58,30,24,.18);
  border-radius: 14px; padding: 18px 22px; margin: 8px 0 12px;
}
.toc strong { display: block; font-family: var(--brand); font-size: 18px; margin-bottom: 10px; color: var(--ink); }
.toc ol { columns: 2; column-gap: 30px; margin: 0; padding-left: 20px; font-size: 14px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { color: #1d6b90; font-weight: 600; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* Accesibilidad: sin animación si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .wave, .bubble, .hero img.axolotl, .cast img { animation: none !important; }
  .bubble { display: none; }
}
