/* ============================================================
   AEGIS CLOUD — themable design system
   Dark (default) + Light (premium). Toggle flips html[data-theme].
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* ---- DARK (default) ---- */
  --black: #0b0e16;
  --surface: #11151f;
  --card: #161b27;
  --card-2: #1b2130;
  --border: rgba(255,255,255,0.10);
  --border-bright: rgba(255,255,255,0.20);
  --text: #eef1f7;
  --muted: #9ba1b5;
  --dim: #717892;
  --gold: #d6b35c;
  --gold-light: #efd690;
  --gold-dim: rgba(214,179,92,0.14);
  --green: #3dd68c;
  --red: #ff5757;
  --blue: #4a9eff;
  --on-gold: #0b0e16;
  --grid: rgba(255,255,255,0.015);
  --nav-bg: rgba(11,14,22,0.85);
  --overlay-bg: rgba(11,14,22,0.92);
  --line: rgba(255,255,255,0.05);
  --hover: rgba(255,255,255,0.025);
  --input-bg: #11151f;
  --ghost-bg: transparent;
  --shadow: none;
  --shadow-sm: none;
  --radius: 10px;
  --maxw: 1180px;
}

:root[data-theme="light"] {
  /* ---- LIGHT (premium: warm ivory + white cards + soft shadow + antique gold) ---- */
  --black: #f7f5ef;
  --surface: #efece4;
  --card: #ffffff;
  --card-2: #fbfaf6;
  --border: rgba(28,28,40,0.10);
  --border-bright: rgba(28,28,40,0.18);
  --text: #1b1e28;
  --muted: #5d6473;
  --dim: #9097a4;
  --gold: #9a7a2e;
  --gold-light: #b8933c;
  --gold-dim: rgba(154,122,46,0.10);
  --green: #138a5d;
  --red: #cb3a3a;
  --blue: #2f6fe0;
  --on-gold: #fffdf7;
  --grid: rgba(30,30,45,0.022);
  --nav-bg: rgba(247,245,239,0.85);
  --overlay-bg: rgba(255,255,255,0.92);
  --line: rgba(28,28,40,0.06);
  --hover: rgba(28,28,40,0.025);
  --input-bg: #ffffff;
  --ghost-bg: #ffffff;
  --shadow: 0 1px 2px rgba(20,22,34,.05), 0 6px 22px rgba(20,22,34,.05);
  --shadow-sm: 0 1px 2px rgba(20,22,34,.05), 0 3px 10px rgba(20,22,34,.04);
}

html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: 'DM Mono', monospace; }
.serif { font-family: 'DM Serif Display', serif; }
.up { color: var(--green); }
.dn { color: var(--red); }
.gold { color: var(--gold); }
.dim { color: var(--dim); }
.tag-gold { color: var(--gold); background: rgba(154,122,46,.12); }
section, nav, .ticker-bar, footer, .disclaimer, .wrap { position: relative; z-index: 1; }

/* ---------- NAV + THEME TOGGLE ---------- */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { font-family: 'DM Mono', monospace; font-size: 14px; font-weight: 500; letter-spacing: 3px; color: var(--gold); white-space: nowrap; margin-right: auto; }
.nav-links { display: none; gap: 24px; list-style: none; }
.nav-links a { font-size: 13px; color: var(--muted); letter-spacing: .4px; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--gold); color: var(--on-gold); border: none;
  padding: 9px 18px; font-family: 'Outfit'; font-size: 13px; font-weight: 600;
  letter-spacing: .4px; cursor: pointer; white-space: nowrap; transition: opacity .2s;
}
.nav-cta:hover { opacity: .88; }
.nav-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 32px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--border-bright);
  color: var(--text); font-size: 15px; line-height: 1; padding: 0;
}
@media (min-width: 760px) { .nav-burger { display: none; } }
@media (max-width: 759px) {
  .nav-links.open {
    display: flex; flex-direction: column; gap: 16px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); padding: 18px 22px; z-index: 99;
  }
  .nav-links.open a { font-size: 15px; }
}
.theme-toggle {
  background: transparent; border: 1px solid var(--border-bright); color: var(--muted);
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .5px;
  padding: 7px 11px; cursor: pointer; border-radius: 4px; white-space: nowrap; transition: all .2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--gold); }

/* ---------- TICKER ---------- */
.ticker-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 9px 0; overflow: hidden; }
.ticker-inner { display: flex; gap: 34px; white-space: nowrap; animation: ticker 32s linear infinite; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { display: flex; align-items: center; gap: 7px; font-family: 'DM Mono', monospace; font-size: 11px; }
.ticker-item .s { color: var(--muted); }

/* ---------- LAYOUT ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 64px 22px; }
.wrap.tight { padding: 40px 22px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green); animation: pulse 2s ease infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.35;} }
.eyebrow-text { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--green); letter-spacing: 2px; text-transform: uppercase; }
.section-label { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px; }
.section-title { font-family: 'DM Serif Display', serif; font-size: clamp(28px, 5vw, 50px); line-height: 1.08; margin-bottom: 16px; font-weight: 400; }
.section-title em { font-style: italic; color: var(--gold); }
.section-sub { font-size: 15px; color: var(--muted); line-height: 1.7; max-width: 600px; margin-bottom: 38px; }

/* ---------- BUTTONS ---------- */
.btn-primary { display:inline-block; background: var(--gold); color: var(--on-gold); border: none; padding: 15px 30px; font-family: 'Outfit'; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s; letter-spacing: .3px; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-ghost { display:inline-block; background: var(--ghost-bg); color: var(--text); border: 1px solid var(--border-bright); padding: 14px 26px; font-family: 'Outfit'; font-size: 15px; cursor: pointer; transition: all .2s; box-shadow: var(--shadow-sm); }
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }
.cta-outline { display:block; width:100%; margin-top: 18px; background: transparent; color: var(--gold); border: 1px solid var(--gold); padding: 12px; font-family: 'Outfit'; font-size: 13px; font-weight: 500; cursor: pointer; letter-spacing: .5px; transition: all .2s; text-align: center; opacity:.9; }
.cta-outline:hover { background: var(--gold); color: var(--on-gold); opacity:1; }
.cta-filled { display:block; width:100%; background: var(--gold); color: var(--on-gold); border: none; padding: 14px; font-family: 'Outfit'; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .2s; text-align: center; }
.cta-filled:hover { opacity: .9; }

/* ---------- HERO ---------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 80px 22px 50px; }
.hero h1 { font-family: 'DM Serif Display', serif; font-size: clamp(38px, 7.5vw, 84px); line-height: 1.04; margin-bottom: 22px; font-weight: 400; }
.hero h1 .gi { font-style: italic; color: var(--gold); }
.hero-sub { font-size: 17px; color: var(--muted); max-width: 560px; line-height: 1.75; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- STAT GRID ---------- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stat-box { background: var(--card); padding: 26px 20px; }
.stat-num { font-family: 'DM Serif Display', serif; font-size: clamp(30px, 5vw, 44px); line-height: 1; color: var(--gold); margin-bottom: 6px; }
.stat-label { font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.stat-sub { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--dim); margin-top: 6px; }

/* ---------- GRID / CARD ---------- */
.grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.grid.c1 { grid-template-columns: 1fr; }
.card { background: var(--card); padding: 26px 22px; }
.card:hover { background: var(--card-2); }
.card-flat { background: var(--card); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.badge-pill { display: inline-block; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; padding: 4px 10px; margin-bottom: 14px; border-radius: 3px; }
.bp-green { color: var(--green); background: rgba(61,214,140,.10); border: 1px solid rgba(61,214,140,.20); }
.bp-gold  { color: var(--gold); background: var(--gold-dim); border: 1px solid rgba(180,140,60,.28); }
.card-name { font-family: 'DM Serif Display', serif; font-size: 21px; margin-bottom: 9px; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 16px; }

/* ---------- DATA TABLE ---------- */
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dtable td { padding: 12px; border-bottom: 1px solid var(--line); }
.dtable tr:hover td { background: var(--hover); }
.dtable .tk { font-family: 'DM Mono', monospace; font-weight: 500; color: var(--text); }
.dtable .sub { font-size: 11px; color: var(--muted); }
.num { font-family: 'DM Mono', monospace; }
.tag { font-family: 'DM Mono', monospace; font-size: 10px; padding: 3px 8px; letter-spacing: .5px; white-space: nowrap; border-radius: 3px; }
.tag-buy { color: var(--green); background: rgba(61,214,140,.12); }
.tag-warn { color: var(--red); background: rgba(255,87,87,.12); }
.tag-watch { color: var(--gold); background: rgba(180,140,60,.16); }

/* ---------- SIGNAL ROW ---------- */
.srow { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.srow .tk { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; }
.srow .lab { font-size: 12px; color: var(--muted); }

/* ---------- BLUR LOCK ---------- */
.blur-wrap { position: relative; }
.blur-content { filter: blur(5px); pointer-events: none; user-select: none; }
.blur-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.blur-card { background: var(--overlay-bg); border: 1px solid var(--border-bright); padding: 18px 24px; text-align: center; max-width: 300px; width: 90%; border-radius: 8px; box-shadow: var(--shadow); }

/* ---------- PRICING ---------- */
.price-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.price-card { background: var(--card); border: 1px solid var(--border); padding: 30px 24px; position: relative; display: flex; flex-direction: column; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.price-card.feat { background: var(--gold-dim); border: 1px solid rgba(180,140,60,.40); box-shadow: var(--shadow); }
.price-tier { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.price-amt { font-family: 'DM Serif Display', serif; font-size: 42px; line-height: 1; margin-bottom: 4px; }
.price-amt small { font-family: 'Outfit'; font-size: 15px; color: var(--muted); font-weight: 300; }
.price-note { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.price-feat { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 11px; }
.price-feat .dot { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.price-tag-top { position: absolute; top: -10px; left: 22px; background: var(--gold); color: var(--on-gold); font-family:'DM Mono',monospace; font-size: 9px; font-weight: 700; padding: 3px 10px; letter-spacing: 1px; border-radius: 3px; }

/* ---------- GAUGE ---------- */
.gauge-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gauge { background: var(--card); padding: 24px; text-align: center; }
.gauge-name { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.gauge-val { font-family: 'DM Serif Display', serif; font-size: 40px; line-height: 1; margin: 6px 0; }
.gauge-state { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 1px; }
.gbar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; margin: 14px 0 8px; position: relative; }
.gbar > span { position: absolute; top: -3px; width: 3px; height: 14px; background: var(--text); border-radius: 2px; }
.gbar-fill { height: 100%; border-radius: 4px; }
.gscale { display: flex; justify-content: space-between; font-family: 'DM Mono', monospace; font-size: 9px; color: var(--dim); }

/* ---------- HEATMAP ---------- */
.heat-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.heat-bar { height: 18px; border-radius: 2px; flex-shrink: 0; }
.heat-name { font-family: 'DM Mono', monospace; white-space: nowrap; }
.heat-val { margin-left: auto; font-family:'DM Mono',monospace; }

/* ---------- CALENDAR ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-h { font-family:'DM Mono',monospace; font-size: 9px; color: var(--dim); text-align: center; padding: 4px 0; }
.cal-cell { background: var(--surface); padding: 5px; min-height: 42px; font-size: 9px; color: var(--dim); text-align: right; border-radius: 3px; }
.cal-cell.bl { background: rgba(255,87,87,.10); border: 1px solid rgba(255,87,87,.28); }
.cal-cell.wt { background: rgba(180,140,60,.12); border: 1px solid rgba(180,140,60,.25); }
.cal-cell.cl { background: rgba(61,214,140,.09); border: 1px solid rgba(61,214,140,.22); }
.cal-cell b { display: block; font-family:'DM Mono',monospace; font-size: 8px; margin-top: 2px; }

/* ---------- EQUITY / SVG ---------- */
.chart-box { background: var(--surface); border: 1px solid var(--border); padding: 16px; border-radius: 8px; }
.kpi-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 1px; border-radius: 8px; overflow: hidden; }
.kpi { background: var(--card); padding: 16px; text-align: center; }
.kpi .n { font-family:'DM Serif Display',serif; font-size: 22px; }
.kpi .l { font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }

/* ---------- FORM ---------- */
.f-input, .f-select { width: 100%; background: var(--input-bg); border: 1px solid var(--border-bright); color: var(--text); padding: 12px 14px; font-family: 'DM Mono', monospace; font-size: 13px; outline: none; border-radius: 6px; }
.f-input::placeholder { color: var(--dim); }
.f-input:focus, .f-select:focus { border-color: var(--gold); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- DISCLAIMER / FOOTER ---------- */
.disclaimer { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 22px; text-align: center; }
.disclaimer p { font-size: 11px; color: var(--dim); line-height: 1.7; max-width: 820px; margin: 0 auto; }
footer { max-width: var(--maxw); margin: 0 auto; padding: 40px 22px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; border-top: 1px solid var(--border); }
.foot-logo { font-family:'DM Mono',monospace; font-size: 13px; color: var(--gold); letter-spacing: 3px; }
.foot-links { display: flex; gap: 18px; list-style: none; flex-wrap: wrap; justify-content: center; }
.foot-links a { font-size: 12px; color: var(--muted); }
.foot-copy { font-family:'DM Mono',monospace; font-size: 11px; color: var(--dim); }

/* ---------- UTIL ---------- */
.center { text-align: center; }
.mt8{margin-top:8px;} .mt16{margin-top:16px;} .mt24{margin-top:24px;} .mb0{margin-bottom:0;}
.note { font-size: 11px; color: var(--dim); line-height: 1.6; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ---------- RESPONSIVE ---------- */
@media (min-width: 760px) {
  nav { padding: 16px 40px; }
  .nav-links { display: flex; margin-right: auto; }
  .nav-logo { margin-right: 0; }
  .wrap { padding: 80px 40px; }
  .hero { padding: 110px 40px 70px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .grid.c2 { grid-template-columns: 1fr 1fr; }
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .price-grid.four { grid-template-columns: repeat(4, 1fr); }
  .gauge-grid { grid-template-columns: repeat(5, 1fr); }
  .kpi-row { grid-template-columns: repeat(5, 1fr); }
  footer { flex-direction: row; justify-content: space-between; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  .split > .card { background: var(--card); }
}
