/* =====================================================================
   Scrinio — Landing
   Sistema de diseño "Neo-Japanese Gaming" (ver /Design.md de la Suite)
   Midnight Ink + Zen Red · Glassmorphism · Inter / Geist
   ===================================================================== */

:root {
  /* --- Superficies "Midnight Ink" --- */
  --ink:            #0d0e12;
  --ink-2:          #121317;
  --surface:        #1a1c23;
  --surface-2:      #1f1f24;
  --surface-3:      #292a2e;

  /* --- Tinta / texto --- */
  --paper:          #f7f8fa;
  --on-surface:     #e3e2e7;
  --muted:          #9a9ba5;
  --muted-2:        #6f7079;

  /* --- Zen Red --- */
  --red:            #e83929;
  --red-bright:     #ff5542;
  --red-soft:       #ffb4a8;

  /* --- Líneas y cristal --- */
  --hairline:       rgba(247, 248, 250, 0.08);
  --hairline-strong:rgba(247, 248, 250, 0.14);
  --glass:          rgba(18, 19, 23, 0.55);
  --glass-hi:       rgba(41, 42, 46, 0.35);

  /* --- Tipografía --- */
  --font-display: "Geist", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "Geist Mono", "SFMono-Regular", ui-monospace, monospace;

  /* --- Radios --- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* --- Layout --- */
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--ink);
  color: var(--on-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Atmósfera: resplandor Zen Red + textura de grano + rejilla sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(232, 57, 41, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(255, 85, 66, 0.08), transparent 55%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 40%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
}

/* Grano fino */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Tipografía base ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; color: var(--paper); }
p { color: var(--muted); }
a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red-soft);
}

.mono { font-family: var(--font-mono); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(13, 14, 18, 0.6);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--paper); letter-spacing: -0.02em; }
.brand__mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  /* Icono de la app (relativo a este CSS => válido para /en/ y raíz). */
  background: #000 url("icon.png") center / cover no-repeat;
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 0 16px rgba(232, 57, 41, 0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: 0.9rem; color: var(--muted); transition: color 0.2s ease; }
.nav__links a:hover { color: var(--paper); }
.nav__cta { font-size: 0.85rem !important; color: var(--paper) !important; padding: 8px 16px; border: 1px solid var(--hairline-strong); border-radius: var(--r-sm); transition: border-color 0.2s ease, background 0.2s ease; }
.nav__cta:hover { border-color: var(--red); background: rgba(232, 57, 41, 0.1); }
@media (max-width: 680px) { .nav__links > a:not(.nav__cta) { display: none; } }

/* Selector de idioma */
.lang { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--hairline); border-radius: 999px; }
.lang a { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 999px; color: var(--muted); transition: color 0.2s ease, background 0.2s ease; }
.lang a.is-active { background: rgba(232, 57, 41, 0.16); color: var(--red-soft); }
.lang a:hover:not(.is-active) { color: var(--paper); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 14px 24px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: linear-gradient(180deg, var(--red-bright), var(--red)); color: #fff; box-shadow: 0 0 24px rgba(232, 57, 41, 0.35); }
.btn--primary:hover { filter: saturate(1.2) brightness(1.05); }
.btn--ghost { background: transparent; border-color: var(--hairline-strong); color: var(--paper); }
.btn--ghost:hover { border-color: var(--red); background: rgba(232, 57, 41, 0.08); }

/* Badge "Próximamente en App Store" */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--r-md);
  background: var(--glass);
  border: 1px solid var(--hairline-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--paper);
  cursor: not-allowed;
  position: relative;
}
.store-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge__txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge__txt small { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.04em; }
.store-badge__txt strong { font-size: 1rem; font-weight: 600; }
.store-badge__soon {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--red-soft);
  border: 1px solid var(--hairline-strong); border-radius: 999px;
  padding: 3px 8px; margin-left: 4px;
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(48px, 8vw, 88px); }
.hero__grid { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(44px, 6vw, 76px); }
.hero__copy { width: 100%; max-width: 720px; }

.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); margin: 22px 0 0; }
.hero h1 .accent { color: transparent; background: linear-gradient(120deg, var(--red-soft), var(--red-bright)); -webkit-background-clip: text; background-clip: text; }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.22rem); max-width: 46ch; margin: 22px auto 0; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; align-items: center; justify-content: center; }
.hero__meta { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.stat { display: flex; flex-direction: column; }
.stat b { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 500; color: var(--paper); letter-spacing: -0.02em; }
.stat span { font-size: 0.78rem; color: var(--muted-2); letter-spacing: 0.02em; }

/* ---------- Mockup: fila de 3 iPhones con capturas reales ---------- */
.phones {
  display: flex; justify-content: center; align-items: center;
  gap: clamp(12px, 2.4vw, 26px);
  width: 100%;
}
.pico {
  flex: 0 0 auto; margin: 0;
  width: clamp(94px, 22vw, 164px);
  border-radius: 26px; padding: 5px;
  background: linear-gradient(155deg, #2c2d34, #0b0c10);
  box-shadow: 0 28px 50px -24px rgba(0,0,0,0.8),
              0 0 0 1px var(--hairline-strong),
              inset 0 1px 0 rgba(255,255,255,0.07);
}
.pico img {
  display: block; width: 100%; height: auto;
  border-radius: 21px;
  border: 1px solid rgba(0,0,0,0.55);
}
/* La central, ligeramente elevada y con flotación sutil */
.pico--c { transform: translateY(-16px); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(-16px) } 50% { transform: translateY(-28px) } }
@media (prefers-reduced-motion: reduce) { .pico--c { animation: none; transform: translateY(-16px); } }

/* ---------- Secciones genéricas ---------- */
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-top: 14px; }
.section-head p { margin-top: 16px; font-size: 1.05rem; }

.pad { padding-block: clamp(56px, 9vw, 104px); }
.divider { height: 1px; background: var(--hairline); border: 0; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.card {
  padding: 26px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--glass-hi), var(--glass));
  border: 1px solid var(--hairline);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--hairline-strong); }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: rgba(232, 57, 41, 0.12); border: 1px solid rgba(232,57,41,0.28);
  color: var(--red-soft); margin-bottom: 18px;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.15rem; color: var(--paper); }
.card p { margin-top: 10px; font-size: 0.95rem; }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 22px; border-radius: var(--r-lg); border: 1px solid var(--hairline); background: var(--glass); }
.step__n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--red-soft); letter-spacing: 0.1em; }
.step h3 { font-size: 1.1rem; margin-top: 12px; color: var(--paper); }
.step p { margin-top: 8px; font-size: 0.92rem; }

/* ---------- Captura de email ---------- */
.subscribe { position: relative; }
.subscribe__panel {
  border-radius: var(--r-xl);
  padding: clamp(32px, 6vw, 64px);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(232,57,41,0.14), transparent 55%),
    linear-gradient(160deg, var(--surface), var(--ink-2));
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.9);
  text-align: center;
}
.subscribe__panel h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.subscribe__panel > p { margin: 16px auto 0; max-width: 52ch; font-size: 1.05rem; }

.form { margin: 30px auto 0; max-width: 520px; text-align: left; }
.form__row { display: flex; gap: 10px; }
@media (max-width: 560px) { .form__row { flex-direction: column; } }
.form input[type="email"] {
  flex: 1; width: 100%;
  font-family: var(--font-body); font-size: 1rem; color: var(--paper);
  background: rgba(13,14,18,0.5); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm); padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form input[type="email"]::placeholder { color: var(--muted-2); }
.form input[type="email"]:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(232,57,41,0.18); }
.form .btn--primary { white-space: nowrap; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 0.82rem; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--red); flex-shrink: 0; }
.consent a { color: var(--red-soft); text-decoration: underline; text-underline-offset: 2px; }

.form__note { margin-top: 14px; font-size: 0.8rem; text-align: center; min-height: 1.2em; }
.form__note.is-error { color: var(--red-soft); }
.form__note.is-ok { color: #7ee0a8; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding-block: 44px; margin-top: clamp(48px, 8vw, 96px); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__links a { font-size: 0.88rem; color: var(--muted); transition: color 0.2s ease; }
.footer__links a:hover { color: var(--paper); }
.footer__copy { font-size: 0.82rem; color: var(--muted-2); }

/* ---------- Páginas legales ---------- */
.legal { padding-top: clamp(48px, 8vw, 80px); padding-bottom: 40px; }
.legal__doc { max-width: 760px; }
.legal__doc .eyebrow { display: block; }
.legal__doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 14px 0 6px; }
.legal__updated { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted-2); }
.legal__doc h2 { font-size: 1.35rem; margin-top: 40px; color: var(--paper); }
.legal__doc h3 { font-size: 1.05rem; margin-top: 24px; color: var(--on-surface); }
.legal__doc p, .legal__doc li { color: var(--muted); font-size: 1rem; margin-top: 12px; line-height: 1.7; }
.legal__doc ul, .legal__doc ol { margin-top: 12px; padding-left: 22px; }
.legal__doc li { margin-top: 8px; }
.legal__doc a { color: var(--red-soft); text-decoration: underline; text-underline-offset: 2px; }
.legal__doc strong { color: var(--on-surface); }
.legal__note {
  margin-top: 20px; padding: 16px 18px; border-radius: var(--r-md);
  background: rgba(232,57,41,0.08); border: 1px solid rgba(232,57,41,0.22);
  font-size: 0.9rem; color: var(--muted);
}
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 40px; font-size: 0.9rem; color: var(--red-soft); }
.back-link:hover { text-decoration: underline; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.reveal[data-d="1"] { animation-delay: 0.08s; }
.reveal[data-d="2"] { animation-delay: 0.16s; }
.reveal[data-d="3"] { animation-delay: 0.24s; }
.reveal[data-d="4"] { animation-delay: 0.32s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; animation: none; } }

/* ---------- Focus visible accesible ---------- */
:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 2px; border-radius: 4px; }
