/* ==========================================================================
   SIMIAN SAGE — LANDING v2
   Marca global: grafito + blanco + la S. El color de cada edición solo en su sección.
   ========================================================================== */

/* Inter: alojar en el servidor (assets/fonts/). Si falta, se usa la fuente del sistema. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: local("Inter"), local("Inter Regular"), url("../assets/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: local("Inter SemiBold"), local("Inter-SemiBold"), url("../assets/fonts/Inter-SemiBold.woff2") format("woff2"); }

:root {
  --ink: #07090c;
  --ink-2: #0e1218;
  --ink-3: #161b23;
  --paper: #ffffff;
  --paper-2: #f4f6f8;
  --line: #e6e9ef;
  --line-dark: rgba(255, 255, 255, 0.1);
  --text: #1f2937;
  --muted: #5d6674;
  --muted-dark: #9aa3ad;
  --blue: #2563eb;
  --blue-ink: #1d4ed8;
  --orange: #ff8a00;
  --red: #ff2055;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -12px rgba(16, 24, 40, 0.14);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 14px; border-radius: 8px; background: var(--paper); color: var(--ink);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Iconos ---------- */
.i { width: 18px; height: 18px; flex: none; }
.i-lg { width: 28px; height: 28px; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover .i { transform: translateX(2px); }
.btn .i { transition: transform .2s; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #e9edf2; }
.btn-ghost { color: var(--paper); border-color: rgba(255, 255, 255, 0.28); background: transparent; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.05); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-ink); }
.btn-outline { color: var(--text); border-color: #cfd5de; background: var(--paper); }
.btn-outline:hover { border-color: var(--text); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions-center { justify-content: center; }

/* ---------- Textos comunes ---------- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; color: var(--muted-dark); margin-bottom: 14px;
}
.eyebrow-dark { color: var(--muted); }
.eyebrow-blue { color: var(--blue); }
.lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 60ch; margin-top: 18px; }
.note { margin-top: 28px; text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  color: var(--paper);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(7, 9, 12, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line-dark);
}
.header-row { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 32px; height: 32px; color: currentColor; }
.brand-text { display: flex; flex-direction: column; font-weight: 600; font-size: 15px; letter-spacing: 0.18em; line-height: 1.1; }
.brand-text small { font-size: 9.5px; letter-spacing: 0.42em; color: var(--muted-dark); margin-top: 3px; font-weight: 500; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a:not(.btn) { font-size: 14.5px; text-decoration: none; color: #cfd5dc; transition: color .2s; }
.main-nav a:not(.btn):hover { color: var(--paper); }
.nav-cta { min-height: 40px; padding: 0 16px; font-size: 14px; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 920px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 56px;
  background: var(--ink); color: var(--paper);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; opacity: 0.85; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 9, 12, 0.96) 0%, rgba(7, 9, 12, 0.82) 38%, rgba(7, 9, 12, 0.2) 75%, rgba(7, 9, 12, 0.35) 100%),
    linear-gradient(0deg, rgba(7, 9, 12, 0.9) 0%, rgba(7, 9, 12, 0) 30%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 60%);
}
.hero-inner { position: relative; }
.hero h1 { font-size: clamp(40px, 7.2vw, 88px); }
.hero h1 span { color: #c9d0d8; white-space: nowrap; }
.hero-lead { margin-top: 24px; max-width: 52ch; font-size: clamp(16px, 1.7vw, 19px); color: #c3cad3; }
.hero-lead strong { color: var(--paper); font-weight: 600; }

.levels {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; gap: 10px; max-width: 360px;
  font-size: 12px; letter-spacing: 0.16em;
}
.levels li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-dark); }
.levels strong { font-weight: 600; color: var(--paper); }
.levels em { font-style: normal; letter-spacing: 0.04em; color: var(--muted-dark); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-blue { background: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18); }
.dot-orange { background: var(--orange); }
.dot-red { background: var(--red); }

/* Entrada del hero tras la intro */
.hero-inner > * { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
body.is-intro .hero-inner > * { opacity: 0; transform: translateY(14px); }
.hero-inner > *:nth-child(2) { transition-delay: .08s; }
.hero-inner > *:nth-child(3) { transition-delay: .16s; }
.hero-inner > *:nth-child(4) { transition-delay: .24s; }
.hero-inner > *:nth-child(5) { transition-delay: .32s; }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-soft { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .eyebrow { color: var(--muted-dark); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(32px, 4.6vw, 52px); }
.section-head p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 17px; }
.section-dark .section-head p:not(.eyebrow) { color: var(--muted-dark); }

/* ---------- Ediciones ---------- */
.editions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.edition {
  position: relative; display: flex; flex-direction: column;
  padding: 28px; border-radius: var(--radius); background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden;
}
.edition::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); }
.edition-blue { --accent: var(--blue); }
.edition-orange { --accent: var(--orange); }
.edition-red { --accent: var(--red); }
.edition-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.edition-mark { width: 40px; height: 40px; color: var(--accent); }
.edition-family { font-size: 11px; letter-spacing: 0.22em; color: var(--muted); font-weight: 600; }
.edition h3 { font-size: 30px; margin-top: 6px; }
.edition-tag { margin: 6px 0 14px; color: var(--accent); font-weight: 600; font-size: 15px; }
.edition p:not(.edition-family):not(.edition-tag) { color: var(--muted); font-size: 15px; }
.edition .btn { margin-top: auto; align-self: flex-start; }
.edition > p:last-of-type { margin-bottom: 26px; }
.edition-orange, .edition-red { background: #fbfcfd; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: var(--paper-2); border: 1px solid var(--line);
}
.badge-live { color: var(--blue); background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.2); }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

/* ---------- Pilares ---------- */
.section-pillars { padding: clamp(48px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); }
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.pillar { padding: 8px 24px; border-left: 1px solid var(--line); }
.pillar:first-child { border-left: 0; padding-left: 0; }
.pillar .i-lg { color: var(--text); margin-bottom: 16px; }
.pillar h3 { font-size: 19px; }
.pillar p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* ---------- Essential ---------- */
.section-essential { background: linear-gradient(180deg, #f7f9fc 0%, var(--paper) 40%); }
.ess-intro { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.ess-intro h2 { font-size: clamp(30px, 3.7vw, 46px); }

.shot {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.35);
}
.shot-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #f1f3f6; border-bottom: 1px solid var(--line); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d3d8df; }
.shot-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.shot img { width: 100%; }
.shot-slot {
  aspect-ratio: 16 / 10; display: grid; place-content: center; gap: 6px; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--blue);
  background:
    repeating-linear-gradient(45deg, rgba(37, 99, 235, 0.04) 0 12px, transparent 12px 24px),
    #f8fafc;
  outline: 2px dashed rgba(37, 99, 235, 0.35); outline-offset: -14px;
}
.shot-slot::after { content: attr(data-size) " px"; font-size: 12px; font-weight: 500; color: var(--muted); }
.shot-wide .shot-slot { aspect-ratio: 16 / 9; }
.diff .shot-slot { aspect-ratio: 3 / 2; }

.diff {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 5vw, 64px); align-items: center;
}
.diff h3 { font-size: clamp(26px, 3vw, 34px); }
.checks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.checks .i { color: var(--blue); margin-top: 3px; }

.modules {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.module { display: flex; flex-direction: column; gap: 4px; padding: 22px; background: var(--paper); }
.module .i { color: var(--blue); width: 22px; height: 22px; margin-bottom: 8px; }
.module strong { font-size: 15.5px; font-weight: 600; }
.module span { font-size: 14px; color: var(--muted); }

.shot-wide { margin-top: clamp(40px, 6vw, 72px); }

/* ---------- Pasos ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.step { padding: 28px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-dark); }
.step-n { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; color: var(--muted-dark); }
.step h3 { font-size: 21px; margin-top: 18px; }
.step p { margin-top: 10px; color: var(--muted-dark); font-size: 15px; }

/* ---------- Planes ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan {
  display: flex; flex-direction: column; padding: 30px 28px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.plan h3 { font-size: 22px; }
.plan-term { color: var(--muted); font-size: 15px; margin-top: 4px; }
.plan-price { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin: 24px 0 26px; }
.plan .btn { margin-top: auto; }
.plan-includes {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; font-size: 15px;
}
.plan-includes li { display: flex; align-items: center; gap: 8px; }
.plan-includes .i { color: var(--blue); }

/* ---------- Confianza ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-item { padding: 26px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-dark); }
.trust-item .i-lg { color: var(--paper); }
.trust-item h3 { font-size: 18px; margin-top: 18px; }
.trust-item p { margin-top: 10px; color: var(--muted-dark); font-size: 14.5px; }

/* ---------- Preguntas ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 17px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); }

/* ---------- Contacto ---------- */
.section-cta { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); text-align: center; }
.cta-mark { position: absolute; right: -6%; top: 50%; width: min(52vw, 560px); height: auto; transform: translateY(-50%); color: rgba(255, 255, 255, 0.04); pointer-events: none; }
.cta-inner { position: relative; }
.cta-inner h2 { font-size: clamp(38px, 6vw, 68px); }
.cta-inner .lead { margin: 18px auto 0; color: var(--muted-dark); }
.cta-alt { margin-top: 26px; font-size: 14px; color: var(--muted-dark); }
.cta-alt a { color: var(--paper); }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: var(--muted-dark); border-top: 1px solid var(--line-dark); padding: 40px 0 28px; font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 14px; color: var(--paper); }
.footer-brand strong { font-size: 13px; letter-spacing: 0.16em; font-weight: 600; }
.footer-brand p { color: var(--muted-dark); margin-top: 2px; }
.footer-brand a { color: var(--paper); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--paper); }
.footer-legal { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: 13px; }

/* ---------- Aparición al hacer scroll ---------- */
/* Solo se ocultan si hay JavaScript (clase .js puesta en el <head>): sin JS todo se ve */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .pillars { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .pillar:nth-child(4) { border-left: 0; padding-left: 0; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-grid; place-content: center; gap: 6px; width: 44px; height: 44px; margin-right: -8px;
    background: transparent; border: 0; cursor: pointer; color: var(--paper);
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: rgba(7, 9, 12, 0.97);
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a:not(.btn) { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line-dark); }
  .nav-cta { margin-top: 18px; min-height: 48px; }
  .site-header.menu-open { background: rgba(7, 9, 12, 0.97); }

  .editions, .plans, .steps { grid-template-columns: 1fr; }
  .ess-intro, .diff { grid-template-columns: 1fr; }
  .diff .shot { order: -1; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding-bottom: 44px; }
  .hero-bg img { object-position: 78% center; opacity: 0.55; }
  .hero::before { background: linear-gradient(180deg, rgba(7,9,12,.55) 0%, rgba(7,9,12,.9) 55%, rgba(7,9,12,1) 100%); }
  .levels { margin-top: 40px; }
  .actions .btn { flex: 1 1 100%; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar, .pillar:nth-child(4) { border-left: 0; padding: 0; }
  .pillar:last-child { grid-column: 1 / -1; }
  .trust, .modules { grid-template-columns: 1fr; }
  .module { padding: 18px; }
  .edition, .plan, .step, .trust-item { padding: 24px 22px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero-inner > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
