/* ============================================================
   ZEN TRADING ACADEMY — SHARED STYLES
   File: assets/styles.css
   ------------------------------------------------------------
   Theme: dual-mode (dark / light) with localStorage persistence
   Dark   = Midnight + Purple  (existing mood, Option 3 background)
   Light  = Midnight + Slate + Ice  (modern fintech)
   ============================================================ */


/* ============ DESIGN TOKENS ============ */
:root,
[data-theme="dark"] {
  /* Gold */
  --gold: #C9A961;
  --gold-light: #E8C97A;
  --gold-grad: linear-gradient(120deg, #E8C97A 0%, #C9A961 50%, #A88438 100%);
  --gold-grad-metal: linear-gradient(
    135deg,
    #FFF4C8 0%, #F0C951 18%, #D4A234 42%,
    #C9962B 58%, #8A5F1A 82%, #E5B44A 100%
  );

  /* Surfaces & text */
  --bg-dark: #070B1A;
  --bg-dark-2: #0D1229;
  --card: rgba(255, 255, 255, 0.03);
  --surface-solid: #0D1229;
  --text: #E8E9F0;
  --text-muted: #9CA3B8;
  --text-inverse: #0A0E1F;
  --border: rgba(201, 169, 97, 0.20);
  --border-strong: rgba(201, 169, 97, 0.45);

  /* Header glass */
  --header-bg: rgba(7, 11, 26, 0.6);
  --header-border: rgba(201, 169, 97, 0.14);

  /* Buttons */
  --btn-ghost-bg: rgba(255, 255, 255, 0.06);
  --btn-ghost-border: rgba(255, 255, 255, 0.20);
  --btn-ghost-text: #FFFFFF;

  /* Status colors */
  --success: #4ADE80;
  --success-bg: rgba(74, 222, 128, 0.10);
  --fail: #EF4444;
  --fail-bg: rgba(239, 68, 68, 0.08);
  --takeaway: #B4B9D1;

  /* Layout */
  --hero-pad-top: 80px;
  --hero-pad-bottom: 50px;
  --section-pad-y: 55px;
  --section-head-gap: 36px;
  --about-extra-gap: 20px;
  --scroll-offset: 90px;
}

[data-theme="light"] {
  /* Gold — richer/darker so it reads on white */
  --gold: #B8860B;
  --gold-light: #C9962B;
  --gold-grad: linear-gradient(120deg, #D4A234 0%, #B8860B 50%, #8A5F1A 100%);
  --gold-grad-metal: linear-gradient(
    135deg,
    #F5E5B0 0%, #E5B44A 20%, #C9962B 45%,
    #A07520 65%, #7A5014 85%, #D4A234 100%
  );

  /* Surfaces & text */
  --bg-dark: #F5F7FA;
  --bg-dark-2: #FFFFFF;
  --card: #FFFFFF;
  --surface-solid: #FFFFFF;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(201, 150, 43, 0.45);

  /* Header glass */
  --header-bg: rgba(255, 255, 255, 0.75);
  --header-border: rgba(15, 23, 42, 0.06);

  /* Buttons */
  --btn-ghost-bg: rgba(15, 23, 42, 0.04);
  --btn-ghost-border: rgba(15, 23, 42, 0.12);
  --btn-ghost-text: #0F172A;

  /* Status colors (kept similar for brand consistency) */
  --success: #16A34A;
  --success-bg: rgba(22, 163, 74, 0.10);
  --fail: #DC2626;
  --fail-bg: rgba(220, 38, 38, 0.08);
  --takeaway: #475569;
}


/* ============ BASE / RESET ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background .35s ease, color .35s ease;
}

/* Dark theme — Option 3 purple mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 10% 0%, rgba(120, 80, 255, 0.20), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 20%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(ellipse 900px 700px at 50% 100%, rgba(255, 90, 180, 0.12), transparent 60%),
    radial-gradient(ellipse 700px 600px at 100% 80%, rgba(192, 38, 211, 0.18), transparent 65%);
  pointer-events: none;
  z-index: 0;
  transition: background .35s ease;
}

/* Light theme — matching lavender-ice mesh */
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 800px 600px at 10% 0%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 20%, rgba(168, 85, 247, 0.08), transparent 60%),
    radial-gradient(ellipse 900px 700px at 50% 100%, rgba(236, 72, 153, 0.05), transparent 60%),
    radial-gradient(ellipse 700px 600px at 100% 80%, rgba(192, 38, 211, 0.06), transparent 65%);
}

header, section, footer { position: relative; z-index: 1; }
section[id] { scroll-margin-top: var(--scroll-offset); }


/* ============ CONTAINERS ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ============ HEADER (SINGLE SOURCE OF TRUTH) ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  transition: background .35s ease, border-color .35s ease;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(201, 169, 97, 0.4));
}

.brand-text {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.3px;
  transition: color .35s ease;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--gold-light); }

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold-grad);
  transition: width .3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold-light); }
.nav-links a.active::after { width: 100%; }

/* Header right-side actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle button — works both inside .nav-actions (home)
   and standalone in a minimal header (legal / founder pages) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--btn-ghost-bg);
  border: 1px solid var(--btn-ghost-border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: all .25s ease;
  flex-shrink: 0;
  position: relative;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Theme toggle tooltip */
.theme-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--surface-solid, #0D1229);
  color: var(--text, #E8E9F0);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.theme-toggle:hover::after,
.theme-toggle:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (hover: none) {
  .theme-toggle::after { display: none; }
}

/* Compact "Enroll Now" button — metallic gold pill */
.nav-cta {
  position: relative;
  overflow: hidden;
  padding: 9px 20px;
  background: linear-gradient(120deg, #E8C97A 0%, #C9A961 50%, #A88438 100%);
  color: #2A1E06;
  font-weight: 700;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: -0.1px;
  transition: transform .22s ease, box-shadow .22s ease;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 6px 16px rgba(201, 169, 97, 0.30);
}

.nav-cta::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  border-radius: 100px 100px 0 0;
  pointer-events: none;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 10px 24px rgba(201, 169, 97, 0.48);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.6rem;
  cursor: pointer;
}


/* ============================================================
   BUTTONS — METALLIC GOLD SYSTEM
   ============================================================ */

.btn-gold,
.btn-ghost,
.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: -0.1px;
  white-space: nowrap;
  transition: transform .22s ease, box-shadow .22s ease,
              background .22s ease, color .22s ease, border-color .22s ease;
}

.btn-gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #E8C97A 0%, #C9A961 50%, #A88438 100%);
  color: #2A1E06;
  font-weight: 700;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 8px 22px rgba(201, 169, 97, 0.30);
}
.btn-gold::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  border-radius: 100px 100px 0 0;
  pointer-events: none;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 12px 30px rgba(201, 169, 97, 0.48);
}

.btn-ghost {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-text);
  border: 1px solid var(--btn-ghost-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  border-color: var(--border-strong);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold-light);
  border: 1.5px solid var(--gold);
  padding: 11px 22px;
}
.btn-outline-gold:hover {
  background: rgba(201, 169, 97, 0.10);
  transform: translateY(-2px);
}

.btn-lg { font-size: 1rem;    padding: 16px 32px; }
.btn-md { font-size: 0.88rem; padding: 11px 22px; }
.btn-sm { font-size: 0.82rem; padding: 8px 18px;  }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}


/* ============================================================
   GOLD NUMBERS
   ============================================================ */
.stat-num {
  font-family: 'Inter', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -1px;
}

.process-step-num {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-grad);
  color: #1A1206;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(201, 169, 97, 0.30);
  flex-shrink: 0;
}


/* ============ SECTION HEADINGS ============ */
.section { padding: var(--section-pad-y) 24px; }

.section-head {
  text-align: center;
  margin-bottom: var(--section-head-gap);
}

.section-eyebrow {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}


/* ============ BACK LINK ============ */
.back-link-wrap { padding: 22px 0 0; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: color .3s ease;
}

.back-link:hover { color: var(--gold-light); }

.back-link .arrow {
  display: inline-block;
  transition: transform .3s ease;
  font-size: 0.9em;
}

.back-link:hover .arrow { transform: translateX(-3px); }


/* ============ FOOTER ============ */
footer {
  padding: 50px 24px 30px;
  text-align: center;
  border-top: 1px solid var(--header-border);
  background: var(--card);
  position: relative;
  transition: background .35s ease, border-color .35s ease;
}

.footer-inner { max-width: 900px; margin: 0 auto; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--btn-ghost-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all .3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.footer-social svg { width: 18px; height: 18px; }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: 14px;
}

.disclaimer {
  max-width: 820px;
  margin: 0 auto 22px;
  color: var(--text-muted);
  font-size: 0.78rem;
  opacity: 0.6;
  line-height: 1.6;
}

.footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  padding: 18px 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color .3s ease;
  letter-spacing: 0.2px;
}

.footer-legal a:hover { color: var(--gold-light); }
.footer-legal a.active { color: var(--gold-light); }

.footer-credit {
  position: absolute;
  bottom: 14px;
  right: 24px;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.3px;
  font-weight: 400;
  transition: opacity .3s ease;
  text-decoration: none;
}

.footer-credit:hover { opacity: 1; }


/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   LIGHT-MODE SAFETY NET
   Pages that hardcode #fff on headings become unreadable in
   light mode. These overrides keep every page legible.
   ============================================================ */
[data-theme="light"] .page-title,
[data-theme="light"] .founder-title,
[data-theme="light"] .thanks-wrap h1,
[data-theme="light"] .brand-mini span,
[data-theme="light"] .program-hero h1,
[data-theme="light"] .bottom-cta h3,
[data-theme="light"] .details-card h2,
[data-theme="light"] .info-card h2,
[data-theme="light"] .journey-card h3,
[data-theme="light"] .founder-name-block h1,
[data-theme="light"] .legal-content h3 {
  color: var(--text);
}


/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  :root {
    --hero-pad-top: 55px;
    --hero-pad-bottom: 35px;
    --section-pad-y: 40px;
    --section-head-gap: 26px;
    --scroll-offset: 75px;
  }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { max-height: 620px; padding: 16px 0; }
  .nav-links li { padding: 12px 24px; }

  .menu-toggle { display: block; }
  .nav-cta { display: none; }

  .footer-credit {
    position: static;
    display: block;
    text-align: center;
    margin-top: 14px;
    padding-right: 0;
  }

  footer { padding-bottom: 30px; }
  .footer-legal { gap: 8px 16px; }
  .footer-legal a { font-size: 0.76rem; }
}