/* ============================================================================
   FinYang AI — marketing site
   Palette from the brand board: deep navy ground, gold (yang / growth),
   royal blue (yin / control). Dependency-free, responsive, reduced-motion aware.
   ========================================================================== */

:root {
  --navy-950: #070C1C;
  --navy-900: #0A1128;
  --navy-800: #0E1A3A;
  --navy-700: #14224A;
  --navy-600: #1B2D5E;

  --gold-200: #F0DA9A;
  --gold-300: #E8CF8C;
  --gold-400: #D4B36A;
  --gold-500: #C9A24E;
  --gold-600: #B8923F;
  --gold-700: #A67F2E;

  --royal-300: #8FA8FF;
  --royal-400: #6C8DFF;
  --royal-500: #3B6CF6;
  --royal-600: #2F5BEA;

  --text: #EEF2FA;
  --text-muted: #B7C2DA;
  --text-dim: #7E8BAA;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);

  --font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--navy-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.gold { color: var(--gold-400); }
.blue { color: var(--royal-400); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold-400); color: var(--navy-950); padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--royal-400); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.15rem; border-radius: 999px;
  font-weight: 700; font-size: .92rem; letter-spacing: .01em;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: .95rem 1.5rem; font-size: 1rem; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-200) 0%, var(--gold-400) 55%, var(--gold-600) 100%);
  color: var(--navy-950);
  box-shadow: 0 10px 30px rgba(212, 179, 106, 0.28);
}
.btn-gold:hover { box-shadow: 0 14px 38px rgba(212, 179, 106, 0.4); }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { background: var(--surface-2); border-color: rgba(255,255,255,.28); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ------------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 17, 40, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.brand-mark { width: 40px; height: 40px; filter: drop-shadow(0 4px 12px rgba(212,179,106,.25)); }
.wordmark { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; line-height: 1; display: inline-flex; align-items: baseline; }
.wm-fin { color: #fff; }
.wm-yang { color: var(--gold-400); }
.wm-ai { color: var(--royal-400); font-size: .48em; font-weight: 700; letter-spacing: .08em; margin-left: .35em; vertical-align: super; }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a { color: var(--text-muted); font-weight: 600; font-size: .92rem; position: relative; padding: .3rem 0; white-space: nowrap; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--gold-400); transition: right .2s ease; }
.site-nav a:hover { color: #fff; }
.site-nav a:hover::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------- Hero */
.hero { position: relative; padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; opacity: .55; }
.hero-glow-gold { width: 620px; height: 620px; background: rgba(212, 179, 106, 0.22); top: -240px; right: -160px; }
.hero-glow-blue { width: 560px; height: 560px; background: rgba(59, 108, 246, 0.25); bottom: -260px; left: -200px; }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .8rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .28em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 1.4rem;
}
.eyebrow-rule { width: 28px; height: 1px; background: var(--royal-500); }
.hero-title { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 800; color: #fff; }
.hero-sub { margin-top: 1.4rem; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--text-muted); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 1.1rem 1.6rem; margin-top: 2rem; font-size: .88rem; color: var(--text-muted); font-weight: 600; }
.hero-proof li { display: inline-flex; align-items: center; gap: .55rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-gold { background: var(--gold-400); box-shadow: 0 0 0 4px rgba(212,179,106,.15); }
.dot-blue { background: var(--royal-500); box-shadow: 0 0 0 4px rgba(59,108,246,.18); }

.hero-visual { display: flex; justify-content: center; }
.orb-wrap { position: relative; width: min(100%, 420px); aspect-ratio: 1; display: grid; place-items: center; }
.orb-wrap::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(212,179,106,.22), transparent 60%), radial-gradient(circle at 70% 75%, rgba(59,108,246,.28), transparent 60%);
  filter: blur(30px);
}
.hero-mark { width: 72%; height: auto; position: relative; filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)); animation: floaty 7s ease-in-out infinite; }
.float-card {
  position: absolute; display: grid; gap: .15rem;
  padding: .8rem 1rem; border-radius: 14px; min-width: 165px;
  background: rgba(14, 26, 58, 0.85); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); box-shadow: var(--shadow);
  animation: floaty 8s ease-in-out infinite;
}
.fc-1 { top: 4%; left: -6%; animation-delay: -2s; }
.fc-2 { right: -8%; top: 38%; animation-delay: -4s; }
.fc-3 { bottom: 4%; left: 6%; animation-delay: -6s; }
.fc-label { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); }
.fc-value { font-weight: 800; font-size: 1.15rem; color: #fff; }
.fc-value.ok { color: #6EE7B7; font-size: .98rem; }
.fc-value.gold { color: var(--gold-300); }
.fc-value.blue { color: var(--royal-300); }
.fc-meta { font-size: .72rem; color: var(--text-dim); }

@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* -------------------------------------------------------------------- Strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--navy-950); }
.strip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.4rem 0; }
.strip-item { display: flex; align-items: baseline; gap: .6rem; font-size: .88rem; color: var(--text-muted); }
.strip-item strong { font-size: 1.5rem; color: var(--gold-400); font-weight: 800; letter-spacing: -0.02em; }

/* ----------------------------------------------------------------- Sections */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-alt { background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 3rem; }
.kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--royal-400); margin-bottom: .9rem; }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); color: #fff; }
.lede { margin-top: 1rem; color: var(--text-muted); font-size: 1.05rem; }

/* -------------------------------------------------------------------- Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  position: relative; padding: 1.8rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.card-icon { display: flex; align-items: center; gap: .9rem; height: 44px; margin-bottom: 1.4rem; }
.disc { width: 36px; height: 36px; border-radius: 50%; display: inline-block; }
.disc-gold { background: linear-gradient(135deg, var(--gold-200), var(--gold-600)); box-shadow: 0 8px 20px rgba(212,179,106,.3); }
.disc-blue { background: linear-gradient(135deg, var(--royal-300), var(--royal-600)); box-shadow: 0 8px 20px rgba(59,108,246,.35); }
.bars { width: 44px; height: 30px; fill: var(--gold-400); }
.bars-blue { fill: var(--royal-500); }
.card h3 { font-size: 1.2rem; color: #fff; margin-bottom: .6rem; }
.card h3 .sep { color: var(--text-dim); font-weight: 500; }
.card p { color: var(--text-muted); font-size: .96rem; }
.card-yang { background: linear-gradient(160deg, rgba(212,179,106,.10), var(--surface) 55%); }
.card-yin { background: linear-gradient(160deg, rgba(59,108,246,.12), var(--surface) 55%); }
.card-balance { background: linear-gradient(160deg, rgba(255,255,255,.06), var(--surface) 55%); }

/* -------------------------------------------------------------------- Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
.step { padding: 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; }
.step-num { font-family: var(--mono); color: var(--gold-400); font-size: .8rem; letter-spacing: .2em; }
.step h3 { margin: .7rem 0 .6rem; font-size: 1.15rem; color: #fff; }
.step p { color: var(--text-muted); font-size: .93rem; }
.step::after {
  content: ""; position: absolute; left: 1.6rem; right: 1.6rem; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold-400), var(--royal-500)); border-radius: 2px; opacity: .8;
}

/* ------------------------------------------------------------------- Global */
.global-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
/* Grid items default to min-width:auto, which lets the ticker's max-content
   track dictate the column width and squeeze the copy beside it. */
.global-grid > *, .hero-grid > *, .security-grid > *, .footer-grid > * { min-width: 0; }
.checklist { margin-top: 1.6rem; display: grid; gap: .8rem; }
.checklist li { position: relative; padding-left: 2rem; color: var(--text-muted); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='12'/></svg>") center/contain no-repeat;
}
.checklist li::after {
  content: ""; position: absolute; left: 5px; top: calc(.35em + 4px); width: 8px; height: 5px;
  border-left: 2px solid var(--navy-950); border-bottom: 2px solid var(--navy-950); transform: rotate(-45deg);
}
.globe-panel { padding: 1.6rem; border-radius: var(--radius); background: var(--navy-800); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.ticker { overflow: hidden; width: 100%; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: flex; gap: 1.2rem; width: max-content; animation: ticker 40s linear infinite; }
.ticker-track span { font-family: var(--mono); font-weight: 600; font-size: .9rem; color: var(--gold-300); padding: .4rem .75rem; border-radius: 999px; background: rgba(212,179,106,.08); border: 1px solid rgba(212,179,106,.18); }
@keyframes ticker { to { transform: translateX(-50%); } }
.region-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.region-chips span { font-size: .8rem; font-weight: 600; color: var(--text-muted); padding: .35rem .7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.region-chips .more { color: var(--royal-300); border-color: rgba(59,108,246,.35); }
.globe-note { margin-top: 1.2rem; font-size: .84rem; color: var(--text-dim); }

/* ----------------------------------------------------------------- Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature { padding: 1.7rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease; }
.feature:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.f-icon { width: 40px; height: 40px; fill: none; stroke: var(--gold-400); stroke-width: 1.7; margin-bottom: 1.1rem; }
.f-icon path[opacity], .f-icon circle[opacity] { stroke: var(--royal-400); }
.feature h3 { font-size: 1.08rem; color: #fff; margin-bottom: .5rem; }
.feature p { color: var(--text-muted); font-size: .93rem; }

/* ----------------------------------------------------------------- Security */
.security-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: start; }
.security-list { display: grid; gap: .9rem; }
.security-list li { padding: 1rem 1.2rem 1rem 3rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text-muted); position: relative; font-size: .95rem; }
.security-list li strong { color: #fff; font-weight: 700; }
.security-list li::before {
  content: ""; position: absolute; left: 1.1rem; top: 1.15rem; width: 18px; height: 18px; border-radius: 6px;
  background: linear-gradient(135deg, var(--royal-400), var(--royal-600));
}
.security-list li::after {
  content: ""; position: absolute; left: calc(1.1rem + 5px); top: calc(1.15rem + 4px); width: 8px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}

/* ---------------------------------------------------------------------- CTA */
.cta-band { padding: clamp(4rem, 8vw, 6rem) 0; background: radial-gradient(ellipse at top, rgba(212,179,106,.14), transparent 55%), var(--navy-950); border-top: 1px solid var(--line); }
.cta-inner { text-align: center; display: grid; justify-items: center; gap: 1rem; max-width: 42rem; }
.cta-inner h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: #fff; }
.cta-inner p { color: var(--text-muted); }
.cta-inner .btn { margin-top: .6rem; }

/* ------------------------------------------------------------------- Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--navy-950); padding: 3rem 0 2.2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem; align-items: center; }
.footer-brand { display: grid; gap: .8rem; }
.footer-tag { color: var(--text-muted); font-weight: 600; font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { color: var(--text-muted); font-size: .9rem; font-weight: 600; }
.footer-links a:hover { color: #fff; }
.footer-legal { grid-column: 1 / -1; color: var(--text-dim); font-size: .8rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }

/* ------------------------------------------------------------------- Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-mark, .float-card, .ticker-track { animation: none; }
  .btn, .card, .feature { transition: none; }
}

/* --------------------------------------------------------------- Responsive */
@media (max-width: 1180px) {
  .site-nav { gap: 1.1rem; }
  .site-nav a { font-size: .88rem; }
}
@media (max-width: 1024px) {
  /* Collapse the primary navigation into the menu button as soon as the links
     would start wrapping; a wrapped "How it works" is not a navigation. */
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem;
    background: rgba(10, 17, 40, 0.97); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(0,0,0,.35);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav a::after { display: none; }
  .nav-toggle { display: flex; }
  /* One column: the message leads, the mark follows. Putting the visual first
     pushed the headline off a phone screen entirely. */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 1; margin-top: 1rem; }
  .orb-wrap { width: min(100%, 340px); }
  .cards-3, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .global-grid, .security-grid { grid-template-columns: 1fr; }
  .strip-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .btn-ghost { display: none; }
  .nav-row { height: 64px; }
  .site-nav { top: 64px; }
  .brand-mark { width: 34px; height: 34px; }
  .wordmark { font-size: 1.25rem; }
  .nav-actions .btn-gold { padding: .6rem .95rem; font-size: .85rem; }
  .cards-3, .feature-grid, .steps, .strip-row { grid-template-columns: 1fr; }
  /* On a phone the cards leave the orbit and stack under the mark in normal
     flow, where they read as three facts instead of overlapping clutter. */
  .hero-visual { width: 100%; }
  .orb-wrap {
    width: 100%; aspect-ratio: auto;
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
  }
  .orb-wrap::before { display: none; }
  .hero-mark { width: 190px; margin-bottom: .4rem; }
  .float-card {
    position: static; animation: none; width: 100%; min-width: 0;
    padding: .7rem .9rem;
  }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  /* Small phones: the brand, the primary action and the menu button must fit
     one row at 320px with nothing pushed off the side. */
  .container { width: min(100% - 1.5rem, var(--container)); }
  .brand { gap: .45rem; }
  .brand-mark { width: 30px; height: 30px; }
  .wordmark { font-size: 1.05rem; }
  .nav-actions { gap: .35rem; }
  .nav-actions .btn-gold { padding: .5rem .7rem; font-size: .78rem; }
  .nav-toggle { width: 40px; height: 40px; }
  .hero-title { font-size: 2.2rem; }
  .btn-lg { width: 100%; justify-content: center; }
  .strip-item strong { font-size: 1.3rem; }
}
