/* ==========================================================================
   souus — design system
   Premium (Apple-like restraint) + youthful tech energy. Dark, glassy,
   gradient-accented, motion-aware. Dependency-free.
   ========================================================================== */

:root {
  --bg: #05070d;
  --bg-2: #0a0e1a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f5fb;
  --muted: #9aa6c4;
  --muted-2: #6b7799;

  --brand: #6ea8fe;      /* finance / primary blue */
  --brand-2: #a78bfa;    /* violet */
  --mint: #5eead4;       /* vocab accent */
  --pink: #fb7fb3;

  --grad-primary: linear-gradient(120deg, #6ea8fe 0%, #a78bfa 50%, #fb7fb3 100%);
  --grad-finance: linear-gradient(135deg, #6ea8fe, #7c5cff);
  --grad-vocab: linear-gradient(135deg, #5eead4, #37b3ff);

  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --nav-h: 64px;

  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica,
    Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

/* Ambient animated background: soft aurora blobs + fine grid. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw;
  z-index: -2;
  background:
    radial-gradient(38vw 38vw at 12% 8%, rgba(110, 168, 254, 0.18), transparent 60%),
    radial-gradient(34vw 34vw at 88% 2%, rgba(167, 139, 250, 0.16), transparent 60%),
    radial-gradient(40vw 40vw at 80% 90%, rgba(94, 234, 212, 0.10), transparent 60%);
  filter: blur(10px);
  animation: drift 26s var(--ease) infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black, transparent 80%);
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 80%);
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -4%, 0) scale(1.08); }
}

/* --- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(64px, 10vw, 132px) 0; position: relative; }
.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.08; font-weight: 800; }
.h-hero { font-size: clamp(2.4rem, 6.2vw, 4.6rem); }
.h-sec { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 640px; }
.center .lede { margin-left: auto; margin-right: auto; }
.text-grad {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* --- Nav ----------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: rgba(5, 7, 13, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-color: var(--border); background: rgba(5, 7, 13, 0.82); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.brand .dot { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.94rem;
  padding: 8px 12px; border-radius: 10px; transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }
.lang-toggle {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px;
  overflow: hidden; margin-left: 8px;
}
.lang-toggle button {
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
  font: inherit; font-size: 0.82rem; font-weight: 700; padding: 6px 12px; transition: all 0.2s;
}
.lang-toggle button.active { background: var(--grad-finance); color: #fff; }
.nav-burger { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.98rem; text-decoration: none;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}
.btn-primary { background: var(--grad-finance); color: #fff; box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(124, 92, 255, 0.7); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* --- Cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 16px; background: var(--surface-2);
}
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* App promo cards (home) */
.app-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 34px; min-height: 320px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--surface); transition: transform 0.35s var(--ease), border-color 0.3s;
  text-decoration: none; color: var(--text);
}
.app-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.app-card .glow { position: absolute; inset: 0; opacity: 0.5; z-index: 0; }
.app-card .glow.finance { background: radial-gradient(60% 60% at 80% 0%, rgba(124, 92, 255, 0.35), transparent 70%); }
.app-card .glow.vocab { background: radial-gradient(60% 60% at 80% 0%, rgba(94, 234, 212, 0.30), transparent 70%); }
.app-card > * { position: relative; z-index: 1; }
.app-card .badge { align-self: flex-start; margin-bottom: auto; }
.app-card h3 { font-size: 1.7rem; margin: 18px 0 8px; }
.app-card p { color: var(--muted); }
.app-card .more { margin-top: 16px; font-weight: 700; color: var(--brand); }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted);
}

/* Feature list */
.feature-list { list-style: none; display: grid; gap: 2px; }
.feature-list li { padding: 16px 0 16px 34px; position: relative; border-top: 1px solid var(--border); }
.feature-list li:first-child { border-top: none; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 22px;
  width: 18px; height: 18px; border-radius: 6px;
  background: var(--grad-finance);
}
.feature-list strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.feature-list span { color: var(--muted); font-size: 0.95rem; }

/* Split rows (alternating feature showcases) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse .split-media { order: 2; }
.split .split-body h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.split .split-body p { color: var(--muted); margin-bottom: 18px; }

/* --- Phone mockups (faux app screenshots, CSS-only) ---------------------- */
.phone {
  width: 268px; max-width: 78vw; aspect-ratio: 9 / 19.5;
  border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #1b2236, #0b0f1c);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.04);
  position: relative; margin: 0 auto;
}
.phone::before {
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; border-radius: 999px; background: #05070d; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden;
  background: linear-gradient(180deg, #0c1120, #070a14);
  display: flex; flex-direction: column; position: relative;
}
/* Real device screenshot slot. When the PNG exists it covers the CSS faux
   screen below; if it 404s, an inline onerror removes it and the faux mockup
   shows through — so the site never renders a broken image. */
.phone-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 32px; z-index: 2; display: block;
}
.phone-tilt { transform: perspective(1400px) rotateY(-16deg) rotateX(6deg); }

/* Faux screen chrome */
.scr { padding: 44px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.scr-title { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
.scr-sub { font-size: 0.72rem; color: var(--muted-2); }
.scr-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.78rem;
}
.scr-row .l { color: var(--text); font-weight: 600; }
.scr-row .r { color: var(--mint); font-weight: 700; }
.scr-big { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; }
.scr-pill {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700; padding: 5px 10px;
  border-radius: 999px; background: rgba(94,234,212,0.14); color: var(--mint);
}
.scr-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.scr-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--grad-finance); }
.scr-chart { display: flex; align-items: flex-end; gap: 6px; height: 92px; padding-top: 6px; }
.scr-chart > i { flex: 1; border-radius: 6px 6px 0 0; background: var(--grad-vocab); opacity: 0.85; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 12px; }
.stat b { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* Testimonials */
.quote {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 16px; height: 100%;
}
.quote p { font-size: 1.02rem; }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote .avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--grad-primary); flex: none;
}
.quote .who b { font-size: 0.92rem; display: block; }
.quote .who span { font-size: 0.8rem; color: var(--muted-2); }
.stars { color: #ffca6a; font-size: 0.9rem; letter-spacing: 2px; }

/* FAQ accordion */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  color: var(--text); font: inherit; font-weight: 700; font-size: 1.02rem;
  padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-q .plus { transition: transform 0.3s var(--ease); color: var(--brand); font-size: 1.3rem; flex: none; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-a p { padding: 0 20px 18px; color: var(--muted); }

/* CTA band */
.cta {
  border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px);
  text-align: center; position: relative; overflow: hidden;
  border: 1px solid var(--border-strong);
  background: linear-gradient(120deg, rgba(110,168,254,0.14), rgba(167,139,250,0.14), rgba(251,127,179,0.12));
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; color: var(--muted); }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); margin-bottom: 14px; }
.footer a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0; font-size: 0.94rem; }
.footer a:hover { color: var(--text); }
.footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; }

/* --- i18n visibility ----------------------------------------------------- */
[data-lang] { display: none; }
html[lang^="zh"] [data-lang="zh"] { display: revert; }
html[lang="en"] [data-lang="en"] { display: revert; }

/* --- Scroll reveal ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  body::before { animation: none; }
  html { scroll-behavior: auto; }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .split, .grid-2 { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: rgba(5,7,13,0.97); border-bottom: 1px solid var(--border); padding: 12px; gap: 4px;
    transform: translateY(-140%); transition: transform 0.3s var(--ease); }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 12px 14px; }
  .lang-toggle { margin: 8px 0 0; align-self: flex-start; }
  .nav-burger { display: inline-flex; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Per-app themes — shared structure, differentiated skin.
   The home / about / contact pages stay on the neutral primary palette.
   Finance leans sober, cool and trustworthy (a slightly tighter radius and
   calmer motion); Vocab leans youthful, mint-bright and rounder.
   ========================================================================== */
.theme-finance {
  --brand: #6aa1ff;
  --brand-2: #8f9cff;
  --grad-primary: linear-gradient(120deg, #5b8def 0%, #7b8cff 100%);
  --grad-finance: linear-gradient(135deg, #4f7fe0, #6d5cff);
  --radius: 18px;
  --radius-lg: 24px;
  --radius-sm: 12px;
}
.theme-finance .btn-primary { box-shadow: 0 10px 30px -8px rgba(79, 127, 224, 0.55); }
.theme-finance .btn-primary:hover { box-shadow: 0 16px 40px -8px rgba(79, 127, 224, 0.65); }
.theme-finance .reveal { transition-duration: 0.85s; transform: translateY(20px); }
.theme-finance .card:hover { transform: translateY(-3px); }

.theme-vocab {
  --brand: #2fd6b0;
  --brand-2: #37b3ff;
  --grad-primary: linear-gradient(120deg, #34e0bd 0%, #37b3ff 55%, #7c5cff 100%);
  --grad-finance: linear-gradient(135deg, #34e0bd, #2aa9ff);
  --radius: 24px;
  --radius-lg: 30px;
  --radius-sm: 16px;
}
.theme-vocab .btn-primary { color: #04231d; box-shadow: 0 10px 30px -8px rgba(52, 224, 189, 0.5); }
.theme-vocab .btn-primary:hover { box-shadow: 0 16px 40px -8px rgba(52, 224, 189, 0.6); }
.theme-vocab .lang-toggle button.active { color: #04231d; }
.theme-vocab .reveal { transition-duration: 0.62s; transform: translateY(30px); }
.theme-vocab .card:hover { transform: translateY(-6px); }

/* --- Success stories / case studies ------------------------------------- */
.story {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.story:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.story .metric { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; }
.story .story-tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
}
.story h3 { font-size: 1.12rem; }
.story p { color: var(--muted); font-size: 0.96rem; }
.story .who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 8px; }
.story .who .avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: var(--grad-finance);
}
.story .who b { font-size: 0.9rem; display: block; }
.story .who span { font-size: 0.78rem; color: var(--muted-2); }

