/* ═══════════════════════════════════════════════════════════════════════
   NozakiStruct — "Estelar" · Sistema de diseño compartido (shell sin 3D)
   Fuente de verdad para TODAS las subpáginas. La home (index-estelar.html)
   mantiene su propia copia inline + el motor 3D (Three.js).
   Extraído de index-estelar.html (2026-06-02).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Variables de tema ── */
:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --surface-2: #1c1c1c;
  --border: #262626;
  --border-strong: #353535;
  --text: #ffffff;
  --text-dim: #a8a09a;
  --text-faint: #858585;
  --amber: #D97757;
  --amber-soft: rgba(217, 119, 87, 0.12);
  --cta-ink: #0a0a0a;
  --cta-fill: var(--amber);
  --cta-rest: rgba(217,119,87,0.12);
  --mint: #2DD4BF;
  --mint-soft: rgba(45, 212, 191, 0.12);
  --grid-line: rgba(255, 255, 255, 0.042);
  --nav-bg: rgba(13, 13, 13, 0.0);
  --nav-bg-scrolled: rgba(13, 13, 13, 0.72);
  --card-hover: #1f1f1f;
}
[data-theme="light"] {
  --bg: #ECEEF0;
  --surface: #ffffff;
  --surface-2: #e6e9eb;
  --border: #d8dcde;
  --border-strong: #c0c5c8;
  --text: #0a0a0a;
  --text-dim: #5e6468;
  --text-faint: #6b7176;
  --amber: #B07E28;
  --amber-soft: rgba(176,126,40, 0.10);
  --cta-ink: #ffffff;
  --cta-fill: #0d0d0d;
  --cta-rest: rgba(176,126,40,0.20);
  --mint: #0D9488;
  --mint-soft: rgba(13, 148, 136, 0.10);
  --grid-line: rgba(0, 0, 0, 0.044);
  --nav-bg: rgba(236, 238, 240, 0.0);
  --nav-bg-scrolled: rgba(236, 238, 240, 0.78);
  --card-hover: #fafbfb;
}

/* ── Base ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: color 0.4s ease;
  overflow-x: hidden;
}
body { background: #05070b; }
[data-theme="light"] body { background: var(--bg); }

::selection { background: var(--amber); color: #070707; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.mono { font-family: 'DM Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; }
.serif-it { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.section { border-top: 1px solid var(--border); position: relative; }
.section--band {
  background-color: rgba(22, 22, 22, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 0 var(--border) inset, 0 -1px 0 0 var(--border) inset;
}
[data-theme="light"] .section--band { background-color: rgba(255, 255, 255, 0.82); }
.section--band::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, transparent 0%, var(--amber) 20%, var(--amber) 80%, transparent 100%);
  opacity: 0.45;
}
.section-tag {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 11px; letter-spacing: 0.18em;
}
.section-tag::before {
  content: ""; width: 7px; height: 7px; background: var(--amber); border-radius: 50%; flex-shrink: 0;
}

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; font-size: 14px; font-weight: 500;
  border-radius: 2px; transition: all 0.2s ease; white-space: nowrap;
}
.btn-amber { background: #ffffff; color: #0a0a0a; letter-spacing: 0.01em; }
.btn-amber:hover { background: #f0ebe5; transform: translateY(-1px); box-shadow: 0 4px 24px rgba(255,255,255,0.14); }
[data-theme="light"] .btn-amber { background: #0d0d0d; color: #ffffff; }
[data-theme="light"] .btn-amber:hover { background: #242424; transform: translateY(-1px); box-shadow: none; }
.btn-outline { border: 1px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { color: var(--text-dim); padding: 10px 14px; }
.btn-ghost:hover { color: var(--text); }

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ═══ Fondo DINÁMICO LIVIANO: estrellas (canvas) + auroras que respiran, SIN 3D WebGL ═══
   Markup: <div id="sky-sur"><canvas id="sky"></canvas><div class="orb orb-a"></div><div class="orb orb-b"></div></div>
   Requiere starfield-sur.js (canvas puro). El motor Three.js/GLB queda SOLO en la home. */
#sky-sur {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(180deg, #05070b 0%, #05070b 35%, #04060a 100%);
}
#sky-sur #sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
/* Auroras que respiran */
#sky-sur .orb { position: absolute; border-radius: 50%; filter: blur(100px); z-index: 1; will-change: transform, opacity; }
#sky-sur .orb-a { width: 820px; height: 820px; top: -400px; right: -360px;
  background: radial-gradient(circle, #D97757 0%, transparent 68%); opacity: .20; }
#sky-sur .orb-b { width: 780px; height: 780px; bottom: -280px; left: -180px;
  background: radial-gradient(circle, #2DD4BF 0%, transparent 68%); opacity: .17; animation: plsB 19s ease-in-out infinite; }
@keyframes plsB { 0%, 100% { opacity: .14 } 50% { opacity: .21 } }
/* Scrim uniforme (top+bottom) para legibilidad del contenido a ancho completo */
#sky-sur::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,9,14,.42) 0%, rgba(6,9,14,.16) 26%, rgba(6,9,14,.16) 62%, rgba(6,9,14,.50) 100%);
}

/* Tema claro: grid + auroras CSS, sin estrellas ni orbs (igual que la home) */
[data-theme="light"] #sky-sur {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(217,119,87,0.16), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(45,212,191,0.12), transparent 55%),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
    linear-gradient(60deg,  var(--grid-line) 1px, transparent 1px),
    linear-gradient(120deg, var(--grid-line) 1px, transparent 1px);
  background-size: 900px 900px, 850px 850px, 56px 97px, 56px 97px, 56px 97px;
  background-position: top right, bottom left, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat;
}
[data-theme="light"] #sky-sur #sky { display: none; }
[data-theme="light"] #sky-sur .orb { display: none; }
[data-theme="light"] #sky-sur::after {
  background: linear-gradient(180deg, rgba(236,238,240,.34) 0%, rgba(236,238,240,.10) 28%, rgba(236,238,240,.10) 62%, rgba(236,238,240,.48) 100%);
}
@media (prefers-reduced-motion: reduce) { #sky-sur .orb { animation: none !important; } }

/* el contenido debe ir por encima del fondo */
.ns-page { position: relative; z-index: 1; }

/* ── Film grain overlay ── */
body::after {
  content: ""; position: fixed; inset: 0; width: 100%; height: 100%;
  background-image: var(--grain-url, none);
  background-repeat: repeat; background-size: 256px 256px;
  opacity: 0.022; pointer-events: none; z-index: 9998;
}
[data-theme="light"] body::after { opacity: 0.03; }
@media (prefers-reduced-motion: reduce) { body::after { animation: none !important; } }

/* ═══════════════════ HEADER (shell compartido) ═══════════════════ */
.ns-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.ns-header.is-scrolled {
  background: var(--nav-bg-scrolled);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.ns-header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }

.ns-logo {
  display: inline-flex; align-items: baseline; font-family: 'DM Sans', sans-serif;
  font-size: 20px; line-height: 1; letter-spacing: -0.01em; color: var(--text); flex: 0 0 auto;
}
.ns-logo-1 { opacity: 0.95; font-weight: 300; }
.ns-logo-2 { font-weight: 700; color: var(--amber); }

.ns-nav {
  display: flex; align-items: center; gap: 4px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.ns-nav a {
  padding: 10px 14px; font-size: 14px; color: var(--text-dim);
  transition: color 0.18s ease;
}
.ns-nav a:hover, .ns-nav a.is-active { color: var(--text); }

.ns-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ns-icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 2px; color: var(--text-dim);
  transition: border-color 0.18s, color 0.18s; flex-shrink: 0; position: relative;
}
.ns-icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.ns-cart-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--amber); color: #0a0a0a;
  font-size: 9px; font-family: 'DM Mono', monospace; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; line-height: 1; pointer-events: none;
}
.ns-cta { padding: 10px 16px !important; font-size: 13px !important; }
.ns-cta span { font-family: 'DM Mono', monospace; margin-left: 2px; }

.ns-burger {
  display: none; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 2px; color: var(--text);
  align-items: center; justify-content: center;
}

/* Panel móvil */
.ns-mobile { display: none; border-top: 1px solid var(--border); background: var(--surface); padding: 20px 0; }
.ns-mobile.open { display: block; }
.ns-mobile .container { display: flex; flex-direction: column; gap: 0; }
.ns-mobile a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--border); }
.ns-mobile a:last-child { border-bottom: none; color: var(--text-dim); }
.ns-mobile a.ns-mobile-dim { color: var(--text-dim); }

@media (max-width: 920px) {
  .ns-nav { display: none !important; }
  .ns-burger { display: inline-flex !important; }
  .ns-cta { display: none !important; }
}

/* Accesibilidad: indicador de foco SOLO para navegación por teclado */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* Anti-FOUC: mientras React no ha montado, #root está vacío y mide 0,
   lo que hacía que el footer estático "saltara" pegado al header un instante.
   Reservamos el alto de viewport SOLO mientras está vacío; al montar el
   contenido, :empty deja de aplicar y la regla desaparece sola. */
#root:empty { min-height: 100vh; }

/* ═══════════════════ FOOTER (shell compartido) ═══════════════════ */
.ns-footer { border-top: 1px solid var(--border); position: relative; padding: 48px 0 36px; }
.ns-footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.ns-footer .ns-logo { font-size: 14px; }
.ns-footer-copy { font-size: 10px; letter-spacing: 0.04em; color: var(--text-faint); font-family: 'DM Mono', monospace; }
.ns-footer-links { display: flex; align-items: center; gap: 20px; }
.ns-footer-links a { font-size: 10px; letter-spacing: 0.06em; color: var(--text-dim); font-family: 'DM Mono', monospace; transition: color 0.18s; }
.ns-footer-links a:hover { color: var(--text); }
.ns-footer-links .sep { color: var(--text-faint); font-size: 10px; }
@media (max-width: 720px) {
  .ns-footer-grid { grid-template-columns: 1fr; }
  .ns-footer-links { flex-wrap: wrap; gap: 12px; }
}

/* ── Responsive base ── */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .container { padding: 0 20px; }
}

/* offset para el header fijo: las páginas ponen padding-top en .ns-page o su primer bloque */
.ns-top-pad { padding-top: 80px; }
