/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --midnight: #080c14;
  --surface: #0d1421;
  --surface-2: #111927;
  --accent: #6d28d9;
  --accent-light: #8b5cf6;
  --cyan: #06b6d4;
  --green: #4ade80;
  --text-primary: #f0f4f8;
  --text-secondary: #8ba3bc;
  --text-muted: #4a6178;
  --border: rgba(139, 163, 188, 0.1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--midnight);
  color: var(--text-primary);
  font-family: 'Figtree', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* === BACKGROUND TEXTURE === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(109, 40, 217, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* === TYPOGRAPHY === */
h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* === HERO === */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.5rem, 6vw, 8rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero-text h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.hero-text h1 em {
  font-style: italic;
  color: var(--accent-light);
}

.lede {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 44ch;
  line-height: 1.7;
  font-weight: 300;
}

/* === FINANCE CARD === */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.finance-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  width: 280px;
  position: relative;
  box-shadow: 0 0 40px rgba(109, 40, 217, 0.15), 0 8px 32px rgba(0,0,0,0.4);
}

.finance-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.card-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-badge {
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.06em;
}

.card-value {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.card-delta {
  font-size: 0.8rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

.card-delta.positive { color: var(--green); }
.card-delta.negative { color: #f87171; }

.card-spark {
  margin-top: 1rem;
  height: 40px;
}

.card-spark svg { width: 100%; height: 40px; }

.insight-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.insight-icon {
  width: 28px;
  height: 28px;
  background: rgba(167, 139, 250, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === MANIFESTO === */
.manifesto {
  position: relative;
  z-index: 1;
  padding: 6rem clamp(1.5rem, 6vw, 8rem);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.manifesto-text {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
  font-style: italic;
}

.manifesto-text strong {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 600;
}

/* === FEATURES === */
.features {
  position: relative;
  z-index: 1;
  padding: 6rem clamp(1.5rem, 6vw, 8rem);
}

.features-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  align-items: start;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-reverse {
  padding-top: 4rem;
}

.fvis {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.feature-text h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.feature-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  font-weight: 300;
}

/* mini chart for feature */
.fvis-chart .mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 36px;
}

.mc-bar {
  width: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px 3px 0 0;
  height: 40%;
}

.mc-bar.highlight { background: var(--accent); border-color: var(--accent); }

.mc-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* === CLOSING === */
.closing {
  position: relative;
  z-index: 1;
  padding: 8rem clamp(1.5rem, 6vw, 8rem);
  text-align: center;
  overflow: hidden;
}

.closing-inner { max-width: 800px; margin: 0 auto; }

.closing-statement {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 5rem;
}

.closing-statement strong {
  color: var(--accent-light);
}

/* orbit visual */
.closing-visual {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(139, 163, 188, 0.15);
}

.ring-1 { width: 160px; height: 160px; animation: orbit 8s linear infinite; }
.ring-2 { width: 110px; height: 110px; animation: orbit 5s linear infinite reverse; }
.ring-3 { width: 60px; height: 60px; animation: orbit 3s linear infinite; }

@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orbit-core {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

/* === FOOTER === */
footer {
  position: relative;
  z-index: 1;
  padding: 3rem clamp(1.5rem, 6vw, 8rem);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-name {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.footer-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 300;
}

/* === HERO CTA BUTTONS === */
.hero-ctas {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.btn-cta-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  transition: background 0.2s, transform 0.15s;
}

.btn-cta-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-cta-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}

.btn-cta-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* === AUTH MODAL === */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--text-primary); }

.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.modal-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: 'Figtree', sans-serif;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus { border-color: var(--accent-light); }
.form-input::placeholder { color: var(--text-muted); }

.form-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #f87171;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.form-error.visible { display: block; }

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.btn-submit:hover { background: var(--accent-light); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.modal-toggle {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.modal-toggle button {
  background: none;
  border: none;
  color: var(--accent-light);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  padding: 0;
}

.modal-toggle button:hover { text-decoration: underline; }

.modal-success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #4ade80;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.modal-success.visible { display: block; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 5rem 0;
  }

  .hero-text h1 { font-size: 3rem; }
  .hero-visual { align-items: flex-start; }

  .features-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .feature-reverse { padding-top: 0; }

  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
  .manifesto-text { font-size: 1.4rem; }
  .closing-statement { font-size: 1.8rem; }
  .finance-card { width: 100%; }
}