/* =========================================================================
   NOVA — Dark Futuristic Design System (shared across all pages)
   Accent palette swaps via [data-theme] on <body>.
   ========================================================================= */

:root {
  /* Base canvas — deep navy / black */
  --bg-0: #05060f;
  --bg-1: #0a0e27;
  --bg-2: #0d1230;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Text */
  --text-0: #f4f6ff;
  --text-1: #c3c8e0;
  --text-2: #7f86ad;

  /* Default accent (overridden per theme) */
  --accent-1: #22d3ee;
  --accent-2: #6366f1;
  --accent-3: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.16);
  --accent-glow: rgba(99, 102, 241, 0.45);

  /* Geometry */
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;

  --font: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI",
    system-ui, sans-serif;
}

/* --- Theme: stocks (cyan -> indigo) --- */
[data-theme="stocks"] {
  --accent-1: #22d3ee;
  --accent-2: #6366f1;
  --accent-3: #38bdf8;
  --accent-soft: rgba(34, 211, 238, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.42);
}

/* --- Theme: payment (violet -> pink, cyan highlight) --- */
[data-theme="payment"] {
  --accent-1: #a855f7;
  --accent-2: #ec4899;
  --accent-3: #22d3ee;
  --accent-soft: rgba(168, 85, 247, 0.16);
  --accent-glow: rgba(236, 72, 153, 0.42);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Ambient radial wash behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 600px at 8% 18%, rgba(99,102,241,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 55%, var(--bg-0));
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img, canvas { display: block; }

h1, h2, h3 { color: var(--text-0); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ------------------------------------------------------------------ accents */
.accent-text {
  background: linear-gradient(100deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 12px 2px var(--accent-1);
}

/* ------------------------------------------------------------------ buttons */
.btn {
  --bg: linear-gradient(100deg, var(--accent-1), var(--accent-2));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #04030a;
  padding: 15px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s ease, filter .25s ease;
  box-shadow: 0 10px 34px -10px var(--accent-glow), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 18px 46px -12px var(--accent-glow), inset 0 0 0 1px rgba(255,255,255,0.28); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; }
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost {
  color: var(--text-0);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: var(--surface-strong); filter: none; box-shadow: 0 8px 30px -16px var(--accent-glow); }

.btn--sm { padding: 11px 20px; font-size: 0.92rem; }
.btn--lg { padding: 18px 36px; font-size: 1.1rem; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn .arrow { transition: none; }
}

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 48px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5, 6, 15, 0.62);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--text-0);
}
.brand .glyph {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 0 22px -4px var(--accent-glow);
  color: #04030a;
  font-weight: 900;
  font-size: 0.95rem;
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
/* Scrim so overlaid text stays legible over the 3D scene */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 18% 50%, rgba(5,6,15,0.78), rgba(5,6,15,0.30) 46%, transparent 70%),
    linear-gradient(180deg, rgba(5,6,15,0.55) 0%, transparent 22%, transparent 60%, var(--bg-0) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 90px;
  padding-bottom: 110px;
}
.hero__content { max-width: 720px; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  margin: 22px 0 0;
}
.hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
  color: var(--text-1);
  margin: 22px 0 36px;
  max-width: 560px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
}
.scroll-hint .mouse {
  width: 24px; height: 38px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  border-radius: 2px;
  background: var(--accent-1);
  transform: translateX(-50%);
  animation: scrollDot 1.7s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translate(-50%, 0); }
  35% { opacity: 1; }
  70% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint .mouse::after { animation: none; opacity: 1; }
}

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(70px, 11vw, 130px) 0; position: relative; }

.section__head { max-width: 660px; margin-bottom: 54px; }
.section__head h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 800;
  margin-top: 18px;
}
.section__head p { color: var(--text-1); font-size: 1.08rem; margin: 16px 0 0; }

/* ------------------------------------------------------------------ cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.35s ease, background 0.35s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--accent-1), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  background: var(--surface-strong);
  border-color: var(--border-strong);
}
.card:hover::before { opacity: 1; }
.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: 20px;
  color: var(--accent-1);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.28rem; font-weight: 700; }
.card p { margin: 10px 0 0; color: var(--text-1); font-size: 0.98rem; }

@media (prefers-reduced-motion: reduce) {
  .card { transition: border-color 0.35s ease, background 0.35s ease; }
}

/* ------------------------------------------------------------------ stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}
.stat {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: 34px 26px;
  text-align: center;
}
.stat__num {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { color: var(--text-2); font-size: 0.92rem; margin-top: 8px; }

/* ------------------------------------------------------------------ steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.step__num {
  font-size: 0.86rem; font-weight: 800; letter-spacing: 0.16em;
  color: var(--accent-1);
  display: inline-flex; align-items: center; gap: 8px;
}
.step__num::before {
  content: ""; width: 26px; height: 1px; background: var(--accent-1); opacity: 0.6;
}
.step h3 { font-size: 1.2rem; margin: 16px 0 8px; }
.step p { color: var(--text-1); font-size: 0.97rem; margin: 0; }

/* ------------------------------------------------------------------ final CTA */
.cta {
  position: relative;
  text-align: center;
  padding: clamp(56px, 9vw, 92px) clamp(24px, 6vw, 80px);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(120% 140% at 50% -20%, var(--accent-soft), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
}
.cta::after {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  left: 50%; top: -40%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow), transparent 62%);
  filter: blur(20px);
  opacity: 0.55;
  pointer-events: none;
}
.cta h2 {
  position: relative;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.cta p { position: relative; color: var(--text-1); margin: 0 auto 34px; max-width: 520px; font-size: 1.08rem; }
.cta .btn { position: relative; }

/* ------------------------------------------------------------------ footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 30px;
}
.footer__row {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center; justify-content: space-between;
}
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: var(--text-2); font-size: 0.92rem; transition: color 0.2s ease; }
.footer__links a:hover { color: var(--text-0); }
.footer__copy { color: var(--text-2); font-size: 0.86rem; }

/* ------------------------------------------------------------------ index hub */
.hub {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
}
.hub__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.hub__head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; margin: 22px 0 0; }
.hub__head p { color: var(--text-1); font-size: 1.15rem; margin-top: 18px; }

.hub__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.hub-card {
  position: relative;
  display: block;
  padding: 44px 38px;
  min-height: 300px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.4s ease;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hub-card::after {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  right: -80px; top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hub-glow, var(--accent-glow)), transparent 65%);
  opacity: 0.5;
  filter: blur(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.hub-card:hover { transform: translateY(-8px); border-color: var(--border-strong); }
.hub-card:hover::after { opacity: 0.85; transform: scale(1.12); }
.hub-card[data-variant="stocks"] { --hub-glow: rgba(34,211,238,0.45); }
.hub-card[data-variant="payment"] { --hub-glow: rgba(236,72,153,0.45); }
.hub-card__tag {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-2);
}
.hub-card__icon {
  width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: 18px; margin-bottom: 26px;
  border: 1px solid var(--border);
}
.hub-card[data-variant="stocks"] .hub-card__icon { color: #22d3ee; background: rgba(34,211,238,0.14); }
.hub-card[data-variant="payment"] .hub-card__icon { color: #ec4899; background: rgba(236,72,153,0.14); }
.hub-card__icon svg { width: 32px; height: 32px; }
.hub-card h2 { font-size: 2rem; font-weight: 800; margin: 0 0 8px; }
.hub-card p { color: var(--text-1); margin: 0; }
.hub-card__go {
  margin-top: 26px;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--text-0);
}
.hub-card[data-variant="stocks"] .hub-card__go { color: #38bdf8; }
.hub-card[data-variant="payment"] .hub-card__go { color: #f472b6; }
.hub-card__go .arrow { transition: transform 0.3s ease; }
.hub-card:hover .hub-card__go .arrow { transform: translateX(6px); }

/* ------------------------------------------------------------------ reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 920px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hub__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .nav .nav__cta-label { display: none; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}
