/* ═══════════════════════════════════════════════════════
   VaultAIClub — Design System
   Single source of truth for tokens, base, and shared components.
   ═══════════════════════════════════════════════════════ */

:root {
  /* surfaces */
  --bg: #ffffff;
  --bg-soft: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f5f3ee;
  --bg-card: #ffffff;
  --dark: #101319;

  /* ink */
  --ink: #14181f;
  --muted: #5f6573;
  --text: #14181f;
  --text-muted: #5f6573;
  --text-light: #8a8a90;

  /* borders */
  --line: #e3e6ec;
  --line-soft: #eef0f3;
  --border: #e3e6ec;
  --border-mid: #d1d5dc;

  /* accent (naranja VaultAIClub) */
  --accent: #e76a2c;
  --accent-dark: #c45a22;
  --accent-glow: #f5894a;
  --accent-ink: #ffffff;
  --accent-bg: rgba(231, 106, 44, 0.08);
  --accent-shadow: 0 6px 20px rgba(231, 106, 44, 0.22);

  /* tag colors (mockup palette) */
  --tag-green: #a8e670;
  --tag-coral: #fab1c0;
  --tag-yellow: #ffe066;

  /* feedback */
  --red: #e63946;
  --green: #2f9e44;

  /* fonts */
  --font-sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-italic: 'Fraunces', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-hand: 'Caveat', cursive;

  /* radius / shadow */
  --radius: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(20, 24, 31, 0.04), 0 1px 2px rgba(20, 24, 31, 0.03);
  --shadow: 0 18px 44px rgba(20, 24, 31, 0.10);
  --shadow-lg: 0 24px 60px rgba(20, 24, 31, 0.12);

  color-scheme: light;
}

/* ═══════════════════════════════════════════════════════
   Base / Reset
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
.mono { font-family: var(--font-mono); font-size: 0.9em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, button, textarea, select { font-family: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; font-family: var(--font-sans); }

/* ═══════════════════════════════════════════════════════
   Dark mode automático
   Se anula con data-theme="light" en <html> (home, tienda, producto, checkout).
   ═══════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0f;
    --bg-soft: #1a1a20;
    --surface: #16161a;
    --surface-2: #1e1e24;
    --bg-card: #16161a;
    --ink: #f1f2f4;
    --text: #f1f2f4;
    --text-muted: #a0a4ad;
    --muted: #a0a4ad;
    --text-light: #707479;
    --line: #2a2a32;
    --line-soft: #1f1f24;
    --border: #2a2a32;
    --border-mid: #3a3a44;
    --accent: #f5894a;
    --accent-dark: #e76a2c;
    --accent-bg: rgba(245, 137, 74, 0.14);
    --accent-shadow: 0 4px 14px rgba(245, 137, 74, 0.30);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* Forzado modo claro en las páginas de venta */
html[data-theme="light"] { color-scheme: light; }

/* ═══════════════════════════════════════════════════════
   Skip link (accesibilidad)
   ═══════════════════════════════════════════════════════ */

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: 0 0 8px 0;
  font-weight: 600; z-index: 9999;
}
.skip-link:focus { left: 0; }

/* ═══════════════════════════════════════════════════════
   Logo (VaultAIClub — 3 piezas)
   ═══════════════════════════════════════════════════════ */

.logotype {
  display: inline-flex; align-items: baseline;
  font-family: var(--font-sans); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1; font-size: 21px;
}
.logotype .vault { color: var(--ink); }
.logotype .ai { color: var(--accent); }
.logotype .club {
  font-family: var(--font-italic); font-style: italic;
  font-weight: 400; color: var(--ink);
}

/* ═══════════════════════════════════════════════════════
   Top bar / Nav (mockup pattern)
   ═══════════════════════════════════════════════════════ */

nav.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 16px 28px; max-width: 1180px; margin: 0 auto;
  flex-wrap: wrap;
}
.nav-links { display: flex; gap: 26px; font-size: 14.5px; color: var(--muted); }
.nav-links a { color: inherit; text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--accent); color: #fff; text-decoration: none;
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 8px;
  transition: background 0.16s, transform 0.16s, box-shadow 0.16s;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 12px rgba(231, 106, 44, 0.25);
}
.nav-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(231, 106, 44, 0.35);
}

.nav-toggle {
  display: none; flex-shrink: 0;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(128, 128, 128, 0.04);
  cursor: pointer; color: var(--ink);
}
.nav-toggle:hover { background: rgba(128, 128, 128, 0.08); }
.nav-toggle-inner { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.nav-toggle-bar {
  display: block; height: 2px; width: 100%; border-radius: 1px;
  background: currentColor; transition: transform 0.22s, opacity 0.2s;
}
.is-nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.is-nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.is-nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 12px 28px 18px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(20, 24, 31, 0.08);
  }
  .is-nav-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Legacy topbar alias (kept for old includes) */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; max-width: 1180px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.brand { font-weight: 700; letter-spacing: -0.03em; font-size: 1.05rem; display: flex; align-items: center; min-width: 0; color: var(--ink); }
.brand .brand-dot { display: none; }
.urgency-bar { background: var(--dark); color: #fff; text-align: center; font-size: 0.82rem; font-weight: 600; padding: 9px 22px; letter-spacing: 0.02em; border-bottom: 1px solid #1f1f1f; }
.urgency-bar strong { color: var(--accent); font-weight: 700; }

/* ═══════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════ */

.btn {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-family: var(--font-sans); font-weight: 600; font-size: 16px;
  padding: 16px 28px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}
.btn:active { transform: translateY(1px); }
.btn-p { background: var(--accent); color: #fff; box-shadow: var(--accent-shadow); }
.btn-p:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(231, 106, 44, 0.3); }
.btn-s { background: var(--bg); color: var(--ink); border: 1px solid var(--border); }
.btn-s:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn-cart { background: var(--accent-bg); border: 1px solid rgba(231, 106, 44, 0.2); color: var(--accent-dark); }
.btn-cart:hover { background: rgba(231, 106, 44, 0.14); border-color: var(--accent); }
.btn-sm { padding: 11px 18px; font-size: 14px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════ */

section { padding: 88px 0; position: relative; }
.s-label {
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 9px; margin-bottom: 18px;
}
.s-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h2.section {
  font-family: var(--font-sans); font-weight: 700;
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -0.035em;
  max-width: 19ch; margin-bottom: 16px;
}
h2.section em { font-family: var(--font-italic); font-style: italic; font-weight: 400; color: var(--accent); }
.s-sub { font-size: 17.5px; color: var(--muted); max-width: 56ch; margin-bottom: 48px; line-height: 1.6; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section--dark { background: var(--dark); color: #fff; }
.section--dark .s-label { color: rgba(255, 255, 255, 0.6); }
.section--dark h2.section { color: #fff; }
.section--dark h2.section em { color: var(--accent); }
.section--dark .s-sub { color: rgba(255, 255, 255, 0.7); }

/* ═══════════════════════════════════════════════════════
   Product card (shared component)
   ═══════════════════════════════════════════════════════ */

.prod {
  border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; background: var(--bg);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  display: flex; flex-direction: column;
}
.prod:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(20, 24, 31, 0.09);
  border-color: transparent;
}
.prod-tag {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 5px;
  display: inline-block; margin-bottom: 16px; align-self: flex-start;
}
.prod-tag.t-g { background: var(--tag-green); color: var(--ink); }
.prod-tag.t-c { background: var(--tag-coral); color: var(--ink); }
.prod-tag.t-y { background: var(--tag-yellow); color: var(--ink); }
.prod h3 { font-family: var(--font-sans); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; margin-bottom: 9px; }
.prod p { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin-bottom: 20px; flex: 1; }
.prod-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 18px; border-top: 1px solid var(--border);
}
.prod-price { font-family: var(--font-mono); font-weight: 700; font-size: 19px; color: var(--ink); }
.prod-price s { color: var(--muted); font-weight: 400; font-size: 13px; margin-right: 7px; opacity: 0.65; }
.prod-link {
  font-family: var(--font-sans); font-weight: 600; font-size: 14px;
  color: var(--accent); text-decoration: none;
  display: flex; align-items: center; gap: 5px;
  transition: gap 0.15s;
}
.prod-link:hover { gap: 9px; }

/* ═══════════════════════════════════════════════════════
   Stats / numbers
   ═══════════════════════════════════════════════════════ */

.stat-n {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 700;
  color: var(--accent); letter-spacing: -0.02em; line-height: 1;
}
.stat-l {
  font-size: 0.75rem; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   Recovery section
   ═══════════════════════════════════════════════════════ */

.recovery-card {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 40px;
}
.recovery-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--ink); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.recovery-icon svg { width: 28px; height: 28px; }
.recovery-title {
  font-family: var(--font-sans); font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.025em;
}
.recovery-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.5; margin: 0 0 18px; }
.recovery-form { display: flex; gap: 8px; flex-wrap: wrap; }
.recovery-form input {
  flex: 1; min-width: 220px; padding: 13px 16px;
  font: inherit; font-size: 0.95rem;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.recovery-form input::placeholder { color: var(--text-light); }
.recovery-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 106, 44, 0.18);
}
.recovery-form input.err {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}
.recovery-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; font: inherit; font-size: 0.95rem; font-weight: 700;
  background: var(--ink); color: var(--accent);
  border: 1px solid var(--ink); border-radius: 10px;
  cursor: pointer; letter-spacing: -0.01em;
  transition: background 0.15s, transform 0.1s;
}
.recovery-btn:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.recovery-btn:active:not(:disabled) { transform: translateY(1px); }
.recovery-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.recovery-btn-spinner {
  display: none; width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.recovery-btn.is-loading .recovery-btn-spinner { display: inline-block; }
.recovery-btn.is-loading .recovery-btn-label { opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }
.recovery-msg { min-height: 1.4em; margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.recovery-msg.is-ok { color: var(--green); font-weight: 600; }
.recovery-msg.is-err { color: var(--red); font-weight: 600; }
.recovery-note { font-size: 0.82rem; color: var(--text-light); margin: 10px 0 0; }
.recovery-note a { color: var(--accent-dark); text-decoration: underline; }

@media (max-width: 640px) {
  .recovery-card { grid-template-columns: 1fr; padding: 28px 24px; gap: 18px; }
  .recovery-icon { width: 52px; height: 52px; }
  .recovery-form { flex-direction: column; }
  .recovery-form input { min-width: 0; }
  .recovery-btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════
   Footer (mockup pattern)
   ═══════════════════════════════════════════════════════ */

footer.site-footer { padding: 56px 0 68px; border-top: 1px solid var(--border); background: var(--bg); }
.foot-in { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.foot-brand { max-width: 36ch; }
.foot-desc { font-size: 14px; color: var(--muted); max-width: 34ch; margin-top: 12px; line-height: 1.6; }
.foot-social { display: flex; gap: 10px; margin-top: 18px; }
.foot-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--ink);
  transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.15s;
}
.foot-social a:hover {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-bg); transform: translateY(-1px);
}
.foot-social svg { display: block; }
.foot-links { display: flex; gap: 44px; flex-wrap: wrap; }
.foot-col h4 {
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 13px;
}
.foot-col a {
  display: block; font-size: 14.5px; color: var(--ink);
  text-decoration: none; margin-bottom: 9px;
  transition: color 0.15s;
}
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════
   Fade-in (scroll triggered)
   ═══════════════════════════════════════════════════════ */

.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.is-visible { opacity: 1; transform: translateY(0); }
.fade-in.delay-1 { transition-delay: 0.08s; }
.fade-in.delay-2 { transition-delay: 0.16s; }
.fade-in.delay-3 { transition-delay: 0.24s; }
.fade-in.delay-4 { transition-delay: 0.32s; }

/* ═══════════════════════════════════════════════════════
   Focus & reduced motion
   ═══════════════════════════════════════════════════════ */

a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: 32px; }
.hidden { display: none; }
.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;
}
