/* ============================================
   XPONENTS — Design System
   Shared styles for all pages
   ============================================ */

:root {
  /* Brand */
  --ember-50:  #FEF2F2;
  --ember-100: #FFE4E1;
  --ember-500: #EF4444;
  --ember-600: #DC2626;
  --ember-700: #B91C1C;
  --sunset:    #F97316;
  --brand-grad: linear-gradient(135deg, #B91C1C 0%, #DC2626 35%, #F97316 100%);

  /* Neutrals */
  --ink:       #0B1426;
  --navy:      #0F172A;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --steel:     #CBD5E1;
  --mist:      #E2E8F0;
  --fog:       #F1F5F9;
  --paper:     #F8FAFC;
  --cream:     #FAF7F2;
  --cloud:     #FFFFFF;
  --pulse:     #10B981;

  /* Type */
  --sans:  'Inter', -apple-system, system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --maxw:  1440px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "tnum", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

body {
  padding-bottom: 64px;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 600px at 85% 5%, rgba(249, 115, 22, 0.05), transparent 60%),
    radial-gradient(ellipse 700px 500px at 5% 25%, rgba(185, 28, 28, 0.03), transparent 60%);
}

a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  display: block;
  height: 32px;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 640px) {
  .logo-img { height: 28px; }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}
.nav-links a {
  color: var(--slate-600);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--ember-600); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -22px; left: 0; right: 0;
  height: 2px;
  background: var(--brand-grad);
}

.nav-cta {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cloud);
  background: var(--ember-600);
  border-radius: 8px;
  transition: all 0.25s var(--ease);
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.1);
}
.nav-cta:hover {
  background: var(--ember-700);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.25);
}

.menu-toggle { display: none; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

section { position: relative; z-index: 2; }

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--slate-600);
}
.eyebrow::before {
  content: '';
  width: 32px; height: 2px;
  background: var(--brand-grad);
  border-radius: 2px;
}
.eyebrow .ember-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-weight: 700; font-size: clamp(28px, 4vw, 48px); }
h3 { font-weight: 700; font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-weight: 600; font-size: 18px; }

.serif-italic {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

p { color: var(--slate-600); }
.lede { font-size: 19px; line-height: 1.6; color: var(--slate-600); }

/* ===== BUTTONS ===== */
.btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--ember-600);
  color: var(--cloud);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.12), 0 1px 0 rgba(255,255,255,0.15) inset;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--brand-grad);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.28), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--steel);
}
.btn-ghost:hover {
  border-color: var(--ember-600);
  color: var(--ember-600);
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ===== CARDS ===== */
.card {
  background: var(--cloud);
  border: 1px solid var(--mist);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
}
.card-icon {
  width: 44px; height: 44px;
  background: var(--ember-50);
  color: var(--ember-600);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.55;
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 160px 40px 80px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.page-hero .eyebrow { margin-bottom: 28px; }
.page-hero h1 { margin-bottom: 24px; max-width: 900px; }
.page-hero .lede { max-width: 720px; }

/* ===== FOOTER ===== */
footer {
  background: var(--ink);
  color: var(--steel);
  padding: 80px 0 0;
  margin-bottom: 56px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer-brand p {
  margin-top: 20px;
  color: var(--slate-400);
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}
.footer-col h4 {
  color: var(--cloud);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--steel);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--sunset); }
.footer-col p { color: var(--steel); font-size: 14px; line-height: 1.7; }

.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--slate-400);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom .legal-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-bottom a:hover { color: var(--sunset); }

/* ===== INDEX TICKER (signature) ===== */
.ticker {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: var(--ink);
  z-index: 50;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.ticker-label {
  flex-shrink: 0;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--cloud);
  text-transform: uppercase;
  font-weight: 600;
  background: linear-gradient(90deg, var(--ink) 80%, rgba(11, 20, 38, 0) 100%);
  z-index: 2;
}
.ticker-tick {
  width: 4px; height: 22px;
  background: var(--brand-grad);
  border-radius: 2px;
  animation: tickerPulse 3s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
}
@keyframes tickerPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.5; transform: scaleY(0.7); }
}
.ticker-track {
  display: flex;
  gap: 56px;
  animation: scroll 90s linear infinite;
  white-space: nowrap;
  padding-left: 56px;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--steel);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.ticker-item:hover { color: var(--cloud); }
.ticker-item .co { color: var(--cloud); font-weight: 600; letter-spacing: 0.06em; }
.ticker-item .sep { color: var(--slate-400); opacity: 0.5; }
.ticker-item .up { color: var(--pulse); font-weight: 500; }
.ticker-item .tag {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes lineReveal {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ===== POLICY PAGE STYLES ===== */
.policy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 40px 80px;
}
.policy-page h1 { margin-bottom: 16px; }
.policy-page .updated {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--slate-500);
  margin-bottom: 48px;
}
.policy-page h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}
.policy-page h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}
.policy-page p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--slate-700);
}
.policy-page ul, .policy-page ol {
  margin: 0 0 20px 24px;
  color: var(--slate-700);
}
.policy-page li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.policy-page a {
  color: var(--ember-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.policy-page a:hover { color: var(--ember-700); }
.policy-page strong { color: var(--ink); font-weight: 600; }
.policy-page .legal-note {
  background: var(--ember-50);
  border-left: 3px solid var(--ember-600);
  padding: 20px 24px;
  border-radius: 4px;
  margin: 32px 0;
}
.policy-page .legal-note p:last-child { margin-bottom: 0; }

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .menu-toggle {
    display: flex;
    background: none;
    border: 1px solid var(--mist);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
  }
  .nav-cta { display: none; }
}
@media (max-width: 640px) {
  nav { padding: 14px 20px; }
  .container, .page-hero, .policy-page { padding-left: 20px; padding-right: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 0 20px 40px; }
  .footer-bottom { padding: 24px 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .ticker-label { padding: 0 16px; font-size: 10px; }
  .page-hero { padding: 110px 20px 60px; }
}

/* ===== HELPERS ===== */
.text-grad {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.divider { border: 0; border-top: 1px solid var(--mist); margin: 80px 0; }
