/* ==========================================================================
   God's Plan · Sistema de diseño (ver DESIGN_SYSTEM.md)
   Una sola hoja para godsplan.dev. Los tokens de :root son los que
   comparten godsplan.dev, godstap.godsplan.dev y rig.godsplan.dev.
   ========================================================================== */

/* ---------- Fuentes (autoalojadas, subconjunto latino): las mismas de main ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-var.woff2") format("woff2");
  font-weight: 500 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-var.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("fonts/MartianMono-var.woff2") format("woff2");
  font-weight: 300 600; font-stretch: 75% 100%; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Fondos: negro cálido en capas, nunca #000 plano */
  --gp-bg-0: #0b0a0a;   /* lienzo */
  --gp-bg-1: #110f0f;   /* sección alterna */
  --gp-bg-2: #171414;   /* superficie: paneles, marcos */
  --gp-bg-3: #1e1a1a;   /* superficie elevada: hover, filas activas */

  /* Bordes de 1px con baja opacidad */
  --gp-line: rgba(255, 236, 234, 0.08);
  --gp-line-strong: rgba(255, 236, 234, 0.15);
  --gp-line-accent: rgba(239, 80, 88, 0.45);

  /* Texto (contraste sobre --gp-bg-0) */
  --gp-text-1: #f4efee;   /* 17.3:1  títulos y texto principal */
  --gp-text-2: #bcb3b1;   /*  9.6:1  párrafos */
  --gp-text-3: #958b89;   /*  6.0:1  metadatos, etiquetas */

  /* Carmesí de la marca */
  --gp-crimson-700: #8a0303;  /* relleno de CTA (blanco encima 10:1) */
  --gp-crimson-600: #a3080c;  /* hover del CTA (blanco encima 8.1:1) */
  --gp-crimson-400: #ef5058;  /* texto/acento sobre oscuro (5.6:1) */
  --gp-crimson-300: #ff8a8f;  /* hover de enlaces de acento (8.7:1) */
  --gp-crimson-tint: rgba(138, 3, 3, 0.16); /* fondos de estado activo */

  --gp-ok: #3ecf8e;           /* solo para "en línea" */
  --gp-whatsapp: #25d366;     /* solo el glifo de WhatsApp */

  /* Tipografía */
  --gp-font-display: "Montserrat", "Inter", system-ui, sans-serif;
  --gp-font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gp-font-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gp-text-display: clamp(2.75rem, 1.2rem + 6.4vw, 6rem);   /* h1 */
  --gp-text-h2: clamp(2.125rem, 1.3rem + 3.4vw, 4rem);
  --gp-text-h3: clamp(1.5rem, 1.2rem + 1.1vw, 2.25rem);
  --gp-text-statement: clamp(1.625rem, 1.05rem + 2.3vw, 3rem);
  --gp-text-lead: clamp(1.0625rem, 0.98rem + 0.4vw, 1.3125rem);
  --gp-text-body: 1rem;
  --gp-text-small: 0.875rem;
  --gp-text-mono: 0.75rem;

  /* Espaciado (base 4px) */
  --gp-space-1: 0.25rem; --gp-space-2: 0.5rem; --gp-space-3: 0.75rem;
  --gp-space-4: 1rem;    --gp-space-5: 1.5rem; --gp-space-6: 2rem;
  --gp-space-7: 3rem;    --gp-space-8: 4rem;   --gp-space-9: 6rem;
  --gp-space-10: 8rem;
  --gp-section: clamp(5rem, 3rem + 7vw, 9rem);
  --gp-gutter: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);
  --gp-max: 78rem;

  /* Radios */
  --gp-radius-sm: 6px;  /* botones, chips */
  --gp-radius-md: 10px; /* capturas dentro de un marco, filas */
  --gp-radius-lg: 16px; /* paneles y marcos */

  /* Sombras: siempre neutras y con desplazamiento */
  --gp-shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  --gp-shadow-2: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 32px 64px -24px rgba(0, 0, 0, 0.85);

  /* Movimiento */
  --gp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gp-dur-1: 160ms;  /* hover, color */
  --gp-dur-2: 320ms;  /* acordeón, menú */
  --gp-dur-3: 800ms;  /* aparición al hacer scroll */

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--gp-bg-0);
  color: var(--gp-text-2);
  font-family: var(--gp-font-sans);
  font-size: var(--gp-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Grano muy sutil: el fondo tiene textura, no es negro plano */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.035;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--gp-text-1); font-family: var(--gp-font-display); font-weight: 700; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: var(--gp-crimson-700); color: #fff; }
:focus-visible { outline: 2px solid var(--gp-crimson-400); outline-offset: 3px; border-radius: var(--gp-radius-sm); }
html { scrollbar-color: #3a3131 var(--gp-bg-0); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--gp-bg-0); }
::-webkit-scrollbar-thumb { background: #3a3131; border-radius: 10px; border: 2px solid var(--gp-bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--gp-crimson-700); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: .6rem 1rem; background: var(--gp-crimson-700); color: #fff; border-radius: var(--gp-radius-sm); font-weight: 600; transition: top var(--gp-dur-1); }
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--gp-max); margin-inline: auto; padding-inline: var(--gp-gutter); }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

/* ---------- Tipos de texto ---------- */
.mono { font-family: var(--gp-font-mono); font-size: var(--gp-text-mono); font-stretch: 87.5%; font-weight: 400; letter-spacing: 0; font-variant-numeric: tabular-nums slashed-zero; }
.label { font-family: var(--gp-font-mono); font-size: var(--gp-text-mono); font-stretch: 87.5%; color: var(--gp-text-3); display: inline-flex; align-items: center; gap: .6rem; }
.label__mark { width: 7px; height: 7px; background: var(--gp-crimson-400); flex: none; }
.h2 { font-size: var(--gp-text-h2); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.lead { font-size: var(--gp-text-lead); line-height: 1.55; color: var(--gp-text-2); max-width: 36rem; }
.accent { color: var(--gp-crimson-400); }
.wordmark { font-family: var(--gp-font-display); font-weight: 800; letter-spacing: -0.025em; color: var(--gp-text-1); }
.wordmark b { font-weight: inherit; color: var(--gp-crimson-400); }

/* ---------- Botones ---------- */
.btn {
  --_bg: transparent; --_fg: var(--gp-text-1); --_bd: var(--gp-line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 2.875rem; padding: .7rem 1.15rem;
  background: var(--_bg); color: var(--_fg); border: 1px solid var(--_bd); border-radius: var(--gp-radius-sm);
  font-family: var(--gp-font-sans); font-size: .9375rem; font-weight: 550; line-height: 1; white-space: nowrap;
  transition: background-color var(--gp-dur-1) var(--gp-ease-out), border-color var(--gp-dur-1) var(--gp-ease-out), color var(--gp-dur-1) var(--gp-ease-out);
}
.btn .icon { font-size: 1.05em; transition: transform var(--gp-dur-2) var(--gp-ease-out); }
.btn:hover .icon--move { transform: translateX(3px); }
.btn:hover .icon--diag { transform: translate(2px, -2px); }
.btn--primary { --_bg: var(--gp-crimson-700); --_fg: #fff; --_bd: var(--gp-crimson-700); }
.btn--primary:hover { --_bg: var(--gp-crimson-600); --_bd: var(--gp-crimson-600); }
.btn--ghost:hover { --_bd: var(--gp-text-3); --_bg: var(--gp-bg-2); }
.btn--sm { min-height: 2.375rem; padding: .55rem .9rem; font-size: .875rem; }

.link-accent { color: var(--gp-crimson-400); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--gp-dur-1); }
.link-accent:hover { color: var(--gp-crimson-300); }

/* ---------- Encabezado ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid transparent; transition: background-color var(--gp-dur-2) var(--gp-ease-out), border-color var(--gp-dur-2); }
.site-header.is-scrolled { background: rgba(11, 10, 10, 0.86); border-bottom-color: var(--gp-line); -webkit-backdrop-filter: saturate(140%) blur(16px); backdrop-filter: saturate(140%) blur(16px); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--gp-font-display); font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.02em; color: var(--gp-text-1); }
.brand__mark { width: 1.25rem; height: 1.25rem; color: var(--gp-crimson-400); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav__link { display: none; position: relative; padding: .5rem .75rem; font-size: .875rem; color: var(--gp-text-2); transition: color var(--gp-dur-1); }
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--gp-text-1); }
.nav__link[aria-current="true"]::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .25rem; height: 1px; background: var(--gp-crimson-400); }
.nav__wa { display: inline-grid; place-items: center; width: 2.375rem; height: 2.375rem; border: 1px solid var(--gp-line-strong); border-radius: var(--gp-radius-sm); color: var(--gp-whatsapp); transition: border-color var(--gp-dur-1); }
.nav__wa:hover { border-color: var(--gp-whatsapp); }
.nav .btn { margin-left: .5rem; }
@media (min-width: 640px) { .nav__link { display: inline-block; } }

/* ---------- Momentos (secciones) ---------- */
.moment { padding-block: clamp(7rem, 4rem + 10vw, 13rem); }
.center { text-align: center; margin-inline: auto; }

/* ---------- 1. Portada ---------- */
.intro { min-height: min(100svh, 62rem); display: grid; align-content: center; padding-top: clamp(8rem, 6rem + 6vw, 11rem); padding-bottom: clamp(5rem, 3rem + 6vw, 8rem); }
.intro__title { font-size: clamp(3rem, 1.1rem + 7.6vw, 6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; max-width: 14ch; }
.intro__title .accent { color: var(--gp-crimson-400); }
.intro__sub { margin-top: 1.75rem; font-size: var(--gp-text-lead); color: var(--gp-text-2); }
.access { display: grid; gap: .75rem; width: 100%; max-width: 44rem; margin-top: clamp(3.5rem, 2.5rem + 3vw, 5rem); text-align: left; }
.access__item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .35rem 1rem; padding: 1.35rem 1.5rem; background: var(--gp-bg-2); border: 1px solid var(--gp-line); border-radius: var(--gp-radius-lg); transition: border-color var(--gp-dur-1), background-color var(--gp-dur-1); }
.access__item:hover { border-color: var(--gp-line-strong); background: var(--gp-bg-3); }
.access__name { font-size: 1.5rem; line-height: 1.1; }
.access__desc { grid-column: 1; font-size: var(--gp-text-small); color: var(--gp-text-2); }
.access__go { grid-column: 2; grid-row: 1 / span 2; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border: 1px solid var(--gp-line-strong); border-radius: 50%; color: var(--gp-text-2); transition: color var(--gp-dur-1), background-color var(--gp-dur-1), border-color var(--gp-dur-1), transform var(--gp-dur-2) var(--gp-ease-out); }
.access__item:hover .access__go { color: #fff; background: var(--gp-crimson-700); border-color: var(--gp-crimson-700); transform: translateY(2px); }
@media (min-width: 760px) { .access { grid-template-columns: 1fr 1fr; } }

/* ---------- 2. Productos ---------- */
.products__lede { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); font-family: var(--gp-font-sans); font-weight: 400; color: var(--gp-text-3); letter-spacing: 0; }
.product { padding-top: clamp(5rem, 3rem + 7vw, 10rem); }
.product__head { max-width: 46rem; }
.product__name { font-size: clamp(3.5rem, 1.8rem + 7vw, 6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.product__name b { font-weight: inherit; color: var(--gp-crimson-400); }
.product__value { margin-top: 1.5rem; font-size: var(--gp-text-lead); line-height: 1.5; color: var(--gp-text-2); text-wrap: balance; }
.product .actions { justify-content: center; margin-top: 2.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.frame { display: block; position: relative; max-width: 70rem; margin: clamp(3.5rem, 2.5rem + 4vw, 6rem) auto 0; background: var(--gp-bg-2); border: 1px solid var(--gp-line); border-radius: var(--gp-radius-lg); padding: .5rem; box-shadow: var(--gp-shadow-2); transition: border-color var(--gp-dur-2) var(--gp-ease-out); }
.frame:hover { border-color: var(--gp-line-strong); }
.frame__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem .5rem .6rem; color: var(--gp-text-3); }
.frame__bar .icon { font-size: .9rem; transition: transform var(--gp-dur-2) var(--gp-ease-out), color var(--gp-dur-1); }
.frame:hover .frame__bar .icon { transform: translate(2px, -2px); color: var(--gp-text-1); }
.frame__shot { display: block; overflow: hidden; border-radius: var(--gp-radius-md); border: 1px solid var(--gp-line); background: var(--gp-bg-0); aspect-ratio: 1260 / 543; }
.frame__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.2s var(--gp-ease-out); }
.frame:hover .frame__shot img { transform: scale(1.012); }
/* En celular cada captura se recorta a lo importante: el teléfono de GodsTap y el título del catálogo de GodsRig */
@media (max-width: 639px) {
  .frame--tap .frame__shot { aspect-ratio: 1 / 1; }
  .frame--tap .frame__shot img { object-position: 92% top; }
  .frame--rig .frame__shot { aspect-ratio: 16 / 10; }
}

.facts { display: grid; gap: 0; max-width: 70rem; margin: clamp(2.5rem, 2rem + 2vw, 3.5rem) auto 0; }
.facts li { padding: 1.1rem 0; border-top: 1px solid var(--gp-line); color: var(--gp-text-2); font-size: .975rem; line-height: 1.5; }
.facts li strong { display: block; margin-bottom: .2rem; color: var(--gp-text-1); font-weight: 600; }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.5rem; }
}

/* ---------- 3. Manifiesto + contacto ---------- */
.closing { border-top: 1px solid var(--gp-line); background: linear-gradient(180deg, var(--gp-bg-1), var(--gp-bg-0) 60%); }
.manifesto { max-width: 52rem; }
.manifesto__text { font-family: var(--gp-font-display); font-size: clamp(1.75rem, 1.05rem + 2.6vw, 3.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.18; color: var(--gp-text-1); text-wrap: balance; }
.manifesto__text span { color: var(--gp-text-3); }
.process { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 1rem; margin-top: 3rem; color: var(--gp-text-3); }
.process li { display: inline-flex; align-items: center; gap: 1rem; }
.process li + li::before { content: ""; width: 1.5rem; height: 1px; background: var(--gp-line-strong); }
.process b { font-weight: 400; color: var(--gp-crimson-400); margin-right: .45rem; }
.manifesto__note { margin-top: 1.5rem; color: var(--gp-text-2); }
@media (max-width: 639px) {
  .process { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: .75rem 2rem; }
  .process li + li::before { display: none; }
}

.contact { margin-top: clamp(7rem, 4rem + 9vw, 12rem); padding-top: clamp(4rem, 3rem + 4vw, 6rem); border-top: 1px solid var(--gp-line); max-width: 52rem; }
.contact__title { font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.contact__sub { margin-top: 1.25rem; font-size: var(--gp-text-lead); color: var(--gp-text-2); }
.contact .actions { justify-content: center; margin-top: 2.5rem; }
.btn .icon--wa { color: var(--gp-whatsapp); font-size: 1.15rem; }
.btn--primary .icon--wa { color: #fff; }

/* ---------- Pie ---------- */
.site-footer { padding: 2.5rem 0 2.25rem; border-top: 1px solid var(--gp-line); font-size: var(--gp-text-small); }
.footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer__links a { color: var(--gp-text-2); transition: color var(--gp-dur-1); }
.footer__links a:hover { color: var(--gp-text-1); }
.footer__base { margin-top: 1.75rem; color: var(--gp-text-3); }

/* ---------- Aparición al hacer scroll ---------- */
/* El contenido es visible por defecto; solo se oculta si hay JS y se permite movimiento. */
.motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--gp-dur-3) var(--gp-ease-out), transform var(--gp-dur-3) var(--gp-ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }
.motion .frame[data-reveal] { transform: translateY(48px) scale(.97); transition-duration: 1.1s; }
.motion .frame[data-reveal].is-in { transform: none; }
.motion [data-enter] { opacity: 0; transform: translateY(18px); filter: blur(6px); animation: gp-enter 1s var(--gp-ease-out) forwards; animation-delay: calc(var(--d, 0) * 110ms + 80ms); }
@keyframes gp-enter { to { opacity: 1; transform: none; filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-delay: 0s !important; }
}

/* ---------- Páginas de texto (privacidad, términos) ---------- */
.doc-head { padding: 9rem 0 3rem; border-bottom: 1px solid var(--gp-line); background: linear-gradient(180deg, var(--gp-bg-1), var(--gp-bg-0)); }
.doc-head h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 1.25rem 0 1rem; }
.doc { padding: 3.5rem 0 var(--gp-section); }
.doc .wrap { max-width: 46rem; }
.prose { color: var(--gp-text-2); font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--gp-line); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.prose ul { padding-left: 1.25rem; list-style: none; }
.prose li { position: relative; }
.prose li + li { margin-top: .6rem; }
.prose li::before { content: ""; position: absolute; left: -1.1rem; top: .75em; width: 5px; height: 5px; background: var(--gp-crimson-400); }
.prose strong { color: var(--gp-text-1); font-weight: 600; }
.prose a { color: var(--gp-crimson-400); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--gp-crimson-300); }

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: left; padding: var(--gp-gutter); }
.notfound h1 { font-size: clamp(5rem, 3rem + 10vw, 10rem); font-weight: 800; letter-spacing: -0.03em; line-height: .9; color: var(--gp-text-1); margin: 1.25rem 0; }
.notfound h1 span { color: var(--gp-crimson-400); }
.notfound p { color: var(--gp-text-2); margin-bottom: 2rem; font-size: 1.125rem; }
