/* ==========================================================================
   KAPM / Dragon Lab — design tokens
   ========================================================================== */

:root {
  --bg: #05060a;
  --bg-alt: #0b0d14;
  --card: #11141f;

  --accent: #ff6a2e;
  --accent-soft: #ff9a4b;
  --accent-blue: #2ea8ff;
  --accent-blue-soft: #7cc9ff;
  --green: #3dd68c;

  --text: #f5f7ff;
  --muted: #9aa0c2;
  --muted-soft: #6d7295;

  --border: #1b2030;
  --border-soft: rgba(255, 255, 255, 0.08);

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.45);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.16, 0.84, 0.44, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 200ms var(--ease);

  --header-h: 116px;
  --header-h-scrolled: 84px;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  color-scheme: dark;
}

/* ==========================================================================
   Base / reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

body {
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% -8%, rgba(46, 168, 255, 0.1), transparent 42%),
    radial-gradient(circle at 92% 2%, rgba(255, 106, 46, 0.08), transparent 40%),
    radial-gradient(circle at top, #15192a 0, #05060a 55%);
}

/* Fine film-grain overlay — a cheap, image-free texture that keeps large flat
   dark panels from reading as "digital-flat"; imperceptible on its own. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 600;
}

::selection {
  background: rgba(255, 106, 46, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #262c42;
  border-radius: 999px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: #333c5c;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.4rem;
}

.section {
  position: relative;
  padding: clamp(3.2rem, 6vw, 5.5rem) 0;
  scroll-margin-top: calc(var(--header-h) + 10px);
}

.section-alt {
  background: radial-gradient(circle at top left, #14182a 0, #05060a 62%);
}

.section-alt::before,
.section-alt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft) 50%, transparent);
}

.section-alt::before {
  top: 0;
}

.section-alt::after {
  bottom: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-blue-soft);
  margin-bottom: 0.8rem;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-blue-soft);
  opacity: 0.75;
}

.section h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  margin: 0 0 0.7rem;
}

.section-lead {
  max-width: 640px;
  color: var(--muted);
  margin: 0 auto 1.7rem;
  font-size: 1.02rem;
}

/* Modern-tech convention: every section opens on a centered intro block —
   kicker, headline, lead — rather than a left-anchored one. */
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2.2rem, 4vw, 3.2rem);
  text-align: center;
}

.section-head .section-lead {
  margin-bottom: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(5, 6, 10, 0.72);
  border-bottom: 1px solid transparent;
  transition: height 260ms var(--ease), background 260ms var(--ease),
    border-color 260ms var(--ease), box-shadow 260ms var(--ease);
}

.site-header.is-scrolled {
  height: var(--header-h-scrolled);
  background: rgba(5, 6, 10, 0.92);
  border-bottom-color: var(--border-soft);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* Grid, not space-between flex — a 1fr/auto/1fr track keeps the nav links
   genuinely centered in the header regardless of how wide the logo or the
   language-select + Contact button happen to be, matching the modern
   logo-left / nav-center / actions-right convention. */
.nav-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  justify-self: start;
}

.logo-img {
  height: 92px;
  width: auto;
  filter: drop-shadow(0 0 14px rgba(46, 168, 255, 0.18));
  transition: height 260ms var(--ease);
}

.site-header.is-scrolled .logo-img {
  height: 68px;
}

.nav {
  display: flex;
  gap: 1.6rem;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.05rem;
  transition: color var(--transition);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent));
  transition: right 280ms var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  right: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

.language-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.language-select label {
  font-size: 0.9rem;
  opacity: 0.85;
}

.language-select select {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 0.32rem 1.7rem 0.32rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.language-select select:hover,
.language-select select:focus-visible {
  border-color: var(--accent-blue);
}

.language-select select option {
  background: var(--bg-alt);
  color: var(--text);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.35rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease),
    background 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease);
}

.btn-sm {
  padding: 0.42rem 0.95rem;
  font-size: 0.82rem;
}

.btn .btn-icon {
  display: inline-flex;
  transition: transform 220ms var(--ease);
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #17090b;
  box-shadow: 0 10px 26px rgba(255, 106, 46, 0.3);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(255, 106, 46, 0.42);
}

.btn.primary:active {
  transform: translateY(0);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: var(--border-soft);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero — DragonAI decision network as the full-section background
   ========================================================================== */

.hero-split {
  position: relative;
  overflow: hidden;
  min-height: min(72vh, 640px);
  padding: 2.4rem 0 2.8rem;
}

.hero-network-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-network-bg canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* A centered radial vignette rather than a left-to-right wash — the hero
   copy now sits centered over the network, so it needs a dark pool behind
   the middle of the section with the network still visible at the edges. */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse 62% 68% at 50% 42%,
    rgba(5, 6, 10, 0.93) 0%,
    rgba(5, 6, 10, 0.78) 45%,
    rgba(5, 6, 10, 0.4) 78%,
    rgba(5, 6, 10, 0.2) 100%
  );
  pointer-events: none;
}

/* Soft fade at the foot of the hero so it dissolves into the next section
   rather than cutting off hard against the network background. */
.hero-split::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  z-index: 1;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-split-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: inherit;
}

.hero-split-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.36rem 0.85rem 0.36rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 168, 255, 0.28);
  background: rgba(46, 168, 255, 0.07);
  color: var(--accent-blue-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.15rem;
}

.hero-eyebrow .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  animation: pulse-ring 2.2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 168, 255, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(46, 168, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 168, 255, 0);
  }
}

.hero-split-text h1 {
  font-size: clamp(2.15rem, 3.6vw, 3.05rem);
  line-height: 1.1;
  margin: 0 0 0.9rem;
}

.hero-split-text p {
  color: var(--muted);
  margin: 0 auto 1.6rem;
  max-width: 560px;
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.hero-caps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.hero-cap {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
}

.hero-cap svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--accent-blue-soft);
}

/* Entrance animation — pure CSS so it can never flash unstyled content while
   waiting for GSAP to load, and degrades cleanly with no JS at all. */
.hero-reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-in 0.85s var(--ease-out) forwards;
}

.hero-eyebrow.hero-reveal {
  animation-delay: 0.05s;
}

h1.hero-reveal {
  animation-delay: 0.16s;
}

.hero-split-text > p.hero-reveal {
  animation-delay: 0.3s;
}

.hero-actions.hero-reveal {
  animation-delay: 0.42s;
}

.hero-caps.hero-reveal {
  animation-delay: 0.54s;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Cards & grids
   ========================================================================== */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.card {
  background: linear-gradient(160deg, #12162599, #0a0c1599);
  background-color: #0d1020;
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.5rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform 280ms var(--ease), border-color 280ms var(--ease),
    box-shadow 280ms var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}

.icon-badge {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 0 auto 1.1rem;
}

.icon-badge svg {
  width: 20px;
  height: 20px;
}

.icon-badge.blue {
  background: rgba(46, 168, 255, 0.12);
  color: var(--accent-blue);
}

.icon-badge.orange {
  background: rgba(255, 106, 46, 0.12);
  color: var(--accent);
}

.icon-badge.green {
  background: rgba(61, 214, 140, 0.12);
  color: var(--green);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* At a Glance */

.at-a-glance {
  margin: 2.4rem auto 0;
  max-width: 900px;
  padding: 1.35rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}

.at-a-glance h3 {
  margin: 0 0 0.85rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
}

.at-a-glance ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem 1.5rem;
}

.at-a-glance li {
  padding: 0;
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
}

.at-a-glance li strong {
  color: var(--muted-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.at-a-glance li span {
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================================
   Dragon Lab — stacked, centered feature blocks (modern-tech convention:
   a centered intro, then a rhythm of centered content blocks, rather than
   a persistent left/right split)
   ========================================================================== */

.feature-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 4vw, 2.8rem);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.feature-stack-wide {
  max-width: 780px;
}

.feature-block {
  width: 100%;
}

.feature-block h3,
.highlight-card h3 {
  font-size: 1.08rem;
  margin: 0 0 0.6rem;
}

.feature-block p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.highlight-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 620px;
  background: radial-gradient(circle at top, #181c30 0, #05060a 65%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 1.8rem 1.7rem;
  text-align: center;
}

.highlight-card::before {
  content: "";
  position: absolute;
  top: -35%;
  right: -18%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 106, 46, 0.16), transparent 70%);
  pointer-events: none;
}

.highlight-tag {
  position: relative;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 106, 46, 0.1);
  border: 1px solid rgba(255, 106, 46, 0.28);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.highlight-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Checklist — a centered, wrapped row of check-badge + label pairs, rather
   than a left-aligned vertical list, to match the centered content rhythm. */

.checklist {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  color: var(--text);
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 0.6rem 1.4rem;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.checklist li::before {
  content: "\2713";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  border-radius: 50%;
  background: rgba(61, 214, 140, 0.14);
  color: var(--green);
}

/* ==========================================================================
   Dashboard / Code‑Dragon
   ========================================================================== */

.dash-preview {
  width: 100%;
  background: radial-gradient(circle at top, #181c30 0, #05060a 60%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-align: left;
  transition: box-shadow 320ms var(--ease), border-color 320ms var(--ease);
}

.dash-preview:hover {
  border-color: rgba(46, 168, 255, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(46, 168, 255, 0.06);
}

.dash-copy {
  width: 100%;
  max-width: 620px;
}

/* Dashboard bar — macOS-style window chrome, purely decorative UI framing */

.dash-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.015);
}

.dash-bar .traffic {
  display: flex;
  gap: 0.4rem;
}

.dash-bar .traffic span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.dash-bar .traffic .r {
  background: #ff5f57;
}

.dash-bar .traffic .a {
  background: #febc2e;
}

.dash-bar .traffic .g {
  background: #28c840;
}

.dash-bar .dash-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-left: 0.3rem;
}

.dash-bar .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
  margin-left: auto;
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Methodology slideshow — formulas, decision gate, illustrative uptrend charts.
   All notation is symbolic / illustrative — deliberately not the live
   strategy's real parameters. */

.dash-body {
  padding: 0;
}

.slideshow {
  position: relative;
  min-height: 380px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 1rem 1.1rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.6rem;
  opacity: 0;
  transform: scale(0.985) translateY(8px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.slide-head {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.slide-note {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

/* Formula list */

.formula-list {
  display: grid;
  gap: 0.4rem;
}

.formula {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  transition: background 220ms var(--ease), border-color 220ms var(--ease);
}

.formula:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--accent-blue-soft);
}

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

.formula .f-math {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
}

.formula .f-math.f-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.formula .f-math sub {
  font-size: 0.7em;
}

/* Decision-gate flow */

.gate-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.3rem;
}

.gate-node {
  display: inline-block;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  white-space: nowrap;
  transition: border-color 220ms var(--ease), background 220ms var(--ease);
}

.gate-node.in {
  border-color: var(--accent-blue);
  color: #cfe9ff;
}

.gate-node.out {
  border-color: var(--green);
  color: #c9f5df;
}

.gate-node.aside {
  border-style: dashed;
  border-color: var(--accent);
  color: #ffd6c2;
}

.gate-arrow {
  color: var(--muted);
  font-size: 0.9rem;
}

.gate-offramp {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 1.3rem;
}

/* Illustrative charts */

.slide-chart-wrap {
  flex: 1;
  min-height: 130px;
  display: flex;
}

.slide-chart {
  width: 100%;
  height: 100%;
}

.slide-chart .grid-line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.slide-chart .area {
  fill: url(#priceFill);
}

.slide-chart .price {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.slide-chart .ma-fast {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  opacity: 0.9;
}

.slide-chart .ma-slow {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.4;
  opacity: 0.65;
}

.slide-chart .cone {
  fill: rgba(255, 106, 46, 0.14);
  stroke: rgba(255, 106, 46, 0.5);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.slide-chart .cone-b {
  fill: rgba(46, 168, 255, 0.12);
  stroke: none;
}

.slide-chart .proj {
  fill: none;
  stroke-width: 1.3;
  stroke-dasharray: 4 3;
}

.slide-chart .mk-entry {
  fill: var(--green);
}

.slide-chart .mk-exit {
  fill: var(--accent);
}

.slide-chart .regime-band {
  fill: rgba(61, 214, 140, 0.06);
}

.slide-chart .regime-label {
  fill: var(--green);
  font-size: 9px;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
}

.slide-chart .draw {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}

.slide.is-active .slide-chart .draw {
  animation: chart-draw 1.6s ease forwards;
}

@keyframes chart-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Auto-advance progress bar — a CSS keyframe animation (not a JS timer) so it
   can be paused/resumed natively via animation-play-state on hover. */

.slide-progress {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: 2.15rem;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.slide-progress-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-blue), var(--accent));
  border-radius: 2px;
  animation-name: progress-fill;
  animation-duration: 6.5s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  animation-play-state: paused;
}

.slide-progress-fill.running {
  animation-play-state: running;
}

@keyframes progress-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Carousel dots */

.slide-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.slide-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.slide-dot.is-active {
  background: var(--accent);
  transform: scale(1.3);
}

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

  .slide.is-active .slide-chart .draw {
    animation: none;
  }

  .slide-chart .draw {
    stroke-dashoffset: 0;
  }

  .slide-progress-fill {
    animation: none;
  }
}

@media (max-width: 900px) {
  .slideshow {
    min-height: 400px;
  }

  .formula .f-math {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-card {
  margin: 1.2rem auto 0;
  padding: 1.9rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left, #14182a 0, #0a0c15 70%);
  box-shadow: var(--shadow-card);
  max-width: 620px;
  text-align: center;
}

.contact-card .section-lead {
  margin-bottom: 1.4rem;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.contact-email {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-email strong {
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  border-top: 1px solid var(--border-soft);
  padding: 1.5rem 0 1.7rem;
  background: var(--bg);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(46, 168, 255, 0.35),
    rgba(255, 106, 46, 0.35),
    transparent
  );
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}


/* Legal notice + links (footer) and the Early Access notice link */
.footer-legal {
  max-width: 760px;
  margin: 0.6rem auto 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--muted-soft);
}

.footer-company {
  margin: 0.45rem 0 0;
  font-size: 0.74rem;
  color: var(--muted-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.2rem;
  margin-top: 0.35rem;
}

.footer-links a,
.beta-legal a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover,
.beta-legal a:hover {
  color: var(--text);
}

.beta-legal {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-split {
    min-height: 52vh;
  }
}

@media (max-width: 860px) {
  .site-header {
    height: auto;
  }

  .site-header.is-scrolled {
    height: auto;
  }

  .nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 0.7rem;
    padding: 0.75rem 0;
  }

  .logo-img,
  .site-header.is-scrolled .logo-img {
    height: 60px;
  }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    padding-top: 0.6rem;
    margin-top: 0.15rem;
    border-top: 1px solid var(--border-soft);
    font-size: 0.86rem;
  }

  .header-actions {
    gap: 0.7rem;
  }
}

/* Under-construction strip (portal not open yet; remove with the banner when it launches) */
.uc-banner { background:#3a1d0f; color:#ffd2b8; text-align:center; font:500 13px ui-monospace, Menlo, Consolas, monospace; padding:8px 12px; border-bottom:1px solid rgba(255,106,46,.35); }


/* Offerings: four product cards (Learn / Build / Content / Signals) */
.offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.offer-card { text-align: left; display: flex; flex-direction: column; }
.offer-card .icon-badge { margin-left: 0; }
.offer-list { list-style: none; padding: 0; margin: 0.9rem 0 0; font-size: 0.88rem; color: var(--text); display: flex; flex-direction: column; gap: 0.45rem; }
.offer-list li { display: flex; align-items: flex-start; gap: 0.55rem; }
.offer-list li::before { content: "\2713"; flex-shrink: 0; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 0.64rem; border-radius: 50%; background: rgba(61, 214, 140, 0.14); color: var(--green); margin-top: 0.1rem; }
.offer-price { margin: 1rem 0 0.9rem !important; font-size: 0.84rem !important; color: var(--accent-blue-soft) !important; }
.offer-card .btn { align-self: flex-start; margin-top: auto; }
.offer-card { scroll-margin-top: 90px; }
@media (max-width: 900px) { .offer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   v4 (2026-10-22) — sections below the original hero: animated showcase,
   demo loops with timed captions, steps, tools, plans. Appended to the
   original stylesheet; the header and hero above keep their original rules.
   ========================================================================== */

html[lang="zh-Hans"] body { font-family: "Noto Sans SC", "Inter", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif; }
html[lang="zh-Hans"] h1, html[lang="zh-Hans"] h2, html[lang="zh-Hans"] h3 { font-family: "Noto Sans SC", "Space Grotesk", sans-serif; letter-spacing: 0; line-height: 1.25; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn.btn-lg { padding: 0.95rem 1.6rem; font-size: 1rem; }
.hero-free { font-size: 0.85rem; color: var(--muted-soft); margin: 0.9rem 0 1.6rem; }
/* "try it now" box in the hero: six template chips that deep-link to the Analyst's public verdict page */
.try-box {
  max-width: 640px; margin: 1.1rem auto 1.5rem; padding: 14px 16px 12px;
  border: 1px solid var(--border-soft); border-radius: 16px;
  background: rgba(5, 6, 10, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation-delay: 0.48s;
}
.hero-split-text .try-box p.try-label { margin: 0 0 10px; font-size: 0.9rem; font-weight: 600; color: var(--text); max-width: none; }
.try-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.try-chip {
  display: inline-block; padding: 7px 13px; border-radius: 999px; font-size: 0.82rem; font-weight: 500;
  color: var(--text); text-decoration: none; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-soft);
  transition: background 160ms, border-color 160ms, transform 160ms var(--ease-out);
}
.try-chip:hover { background: rgba(255, 106, 46, 0.18); border-color: var(--accent); transform: translateY(-1px); }
.hero-split-text .try-box p.try-note { margin: 10px 0 0; font-size: 0.78rem; color: var(--muted-soft); max-width: none; }
.hero-caps.hero-reveal { animation-delay: 0.6s; }
@media (max-width: 640px) {
  .try-box { padding: 12px 12px 10px; }
  .try-chip { font-size: 0.78rem; padding: 6px 11px; }
}
.show-try { margin: 18px 0 0; font-size: 15px; text-align: center; }
.plan-wait { align-self: center; margin-left: 6px; }
.hero-split-text .hero-actions { justify-content: center; }
.hdr-signin { margin-right: 0.35rem; }
@media (max-width: 600px) { .hdr-signin { display: none; } }

.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.4; }
.tag.free { background: rgba(61, 214, 140, 0.14); color: var(--green); }
.tag.pro { background: rgba(255, 106, 46, 0.16); color: var(--accent-soft); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1), transform 650ms cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--delay, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* --------------------------------------------------------------------------
   Showcase: the animated learn-and-build journey (CSS + a small script)
   -------------------------------------------------------------------------- */
.showcase { padding-top: 2rem; }
.show {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.show-rail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.show-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: background 200ms, color 200ms;
}
.show-item:hover { background: rgba(255, 255, 255, 0.04); }
.show-item.is-on { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.show-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--border-soft); color: var(--muted);
}
.show-item.is-on .show-num { background: var(--accent); border-color: var(--accent); color: #14080a; font-weight: 700; }
.show-item.is-done .show-num { border-color: var(--green); color: var(--green); }
.show-label { font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.show-bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; opacity: 0; transition: opacity 200ms; }
.show-item.is-on .show-bar { opacity: 1; }
.show-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-blue)); }
.show-item.is-on .show-bar i { animation: show-fill var(--stage-ms, 6000ms) linear forwards; }
.show.is-paused .show-bar i { animation-play-state: paused; }
@keyframes show-fill { from { width: 0; } to { width: 100%; } }

.show-stage {
  position: relative;
  min-height: 420px;
  background: #fff;
  color: #1f1e1d;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.show-chrome, .demo-bar {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  background: #eef0f4; border-bottom: 1px solid #dde0e7;
}
.show-chrome span, .demo-bar span:not(.tag) { width: 9px; height: 9px; border-radius: 50%; background: #c4c9d4; }
.show-chrome em, .demo-bar em { margin-left: 10px; font-style: normal; font-size: 12px; color: #5d6373; background: #fff; border-radius: 6px; padding: 2px 10px; font-family: var(--font-sans); }
.demo-bar .tag { margin-left: auto; }

.sp { position: absolute; inset: 34px 0 0 0; padding: 28px 32px; opacity: 0; visibility: hidden; transition: opacity 350ms var(--ease-out), visibility 0s 350ms; font-family: var(--font-sans); }
.sp.is-on { opacity: 1; visibility: visible; transition: opacity 350ms var(--ease-out); }
.sp-label { font-size: 13px; font-weight: 600; color: #3f4552; margin-bottom: 14px; letter-spacing: 0.02em; }

/* stage 1 — typewriter */
.sp-box { min-height: 112px; border: 1.5px solid #cfd4de; border-radius: 12px; padding: 16px 18px; font-size: 19px; line-height: 1.5; color: #1f1e1d; background: #fbfbfc; }
.sp-type { white-space: pre-wrap; }
.sp-caret { display: inline-block; width: 2px; height: 1.1em; background: #1f1e1d; vertical-align: -0.2em; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sp-btn { margin-top: 16px; background: #4b5560; color: #fff; border: 0; border-radius: 999px; padding: 11px 20px; font: inherit; font-size: 14.5px; font-weight: 600; opacity: 0.55; transform: scale(0.98); transition: opacity 300ms, transform 300ms, background 300ms; }
.sp-1.is-ready .sp-btn { opacity: 1; transform: scale(1); animation: sp-press 1.2s var(--ease-out) 1 forwards; }
@keyframes sp-press { 0%, 70% { background: #4b5560; transform: scale(1); } 80% { transform: scale(0.95); background: #e8571c; } 100% { transform: scale(1); background: #e8571c; } }
.sp-note { margin: 14px 0 0; font-size: 13px; color: #6b7080; }

/* stage 2 — rules written back */
.sp-rules { display: grid; gap: 8px; }
.sp-rule { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: baseline; background: #f4f5f8; border-radius: 10px; padding: 11px 14px; font-size: 14.5px; opacity: 0; transform: translateX(-14px); }
.sp-rule b { color: #e8571c; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.sp.is-on .sp-rule { animation: sp-in 500ms var(--ease-out) forwards; }
.sp.is-on .sp-rule:nth-child(1) { animation-delay: 150ms; }
.sp.is-on .sp-rule:nth-child(2) { animation-delay: 550ms; }
.sp.is-on .sp-rule:nth-child(3) { animation-delay: 950ms; }
.sp.is-on .sp-rule:nth-child(4) { animation-delay: 1350ms; }
@keyframes sp-in { to { opacity: 1; transform: none; } }
.sp-checks { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: #3f4552; }
.sp-checks li { position: relative; padding-left: 20px; opacity: 0; }
.sp-checks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 5px; border-left: 2px solid #1a9e5c; border-bottom: 2px solid #1a9e5c; transform: rotate(-45deg); }
.sp-checks li.sp-default::before { border-color: #a9691f; }
.sp.is-on .sp-checks li { animation: sp-in 400ms var(--ease-out) forwards; }
.sp.is-on .sp-checks li:nth-child(1) { animation-delay: 1900ms; }
.sp.is-on .sp-checks li:nth-child(2) { animation-delay: 2100ms; }
.sp.is-on .sp-checks li:nth-child(3) { animation-delay: 2300ms; }
.sp.is-on .sp-checks li:nth-child(4) { animation-delay: 2700ms; }

/* stage 3 — honest backtest */
.sp-timeline { display: flex; height: 54px; border-radius: 12px; overflow: hidden; border: 1px solid #cfd4de; margin-bottom: 18px; }
.sp-seg { display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff; width: 0; overflow: hidden; white-space: nowrap; }
.sp-seg-a { background: #4b5560; }
.sp-seg-b { background: #2f6f8f; }
.sp.is-on .sp-seg-a { animation: seg-a 1400ms var(--ease-out) 200ms forwards; }
.sp.is-on .sp-seg-b { animation: seg-b 900ms var(--ease-out) 1500ms forwards; }
@keyframes seg-a { to { width: 66%; } }
@keyframes seg-b { to { width: 34%; } }
.sp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sp-facts li { display: flex; gap: 12px; align-items: center; font-size: 14.5px; color: #1f1e1d; opacity: 0; transform: translateY(8px); }
.sp-facts li i { width: 22px; height: 22px; border-radius: 50%; background: #e7f6ee; flex: 0 0 auto; position: relative; }
.sp-facts li i::after { content: ""; position: absolute; left: 6px; top: 5px; width: 9px; height: 5px; border-left: 2px solid #1a9e5c; border-bottom: 2px solid #1a9e5c; transform: rotate(-45deg); }
.sp.is-on .sp-facts li { animation: sp-in 450ms var(--ease-out) forwards; }
.sp.is-on .sp-facts li:nth-child(1) { animation-delay: 2500ms; }
.sp.is-on .sp-facts li:nth-child(2) { animation-delay: 3000ms; }
.sp.is-on .sp-facts li:nth-child(3) { animation-delay: 3500ms; }
.sp.is-on .sp-facts li:nth-child(4) { animation-delay: 4000ms; }
.sp-count { color: #e8571c; }

/* stage 4 — verdict */
.sp-stamp { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 30px; color: #a9691f; border: 3px solid #a9691f; border-radius: 10px; padding: 8px 18px; transform: rotate(-4deg) scale(1.6); opacity: 0; margin: 4px 0 18px; }
.sp.is-on .sp-stamp { animation: stamp 500ms cubic-bezier(0.2, 1.2, 0.3, 1) 300ms forwards; }
@keyframes stamp { to { transform: rotate(-3deg) scale(1); opacity: 1; } }
.sp-lines { list-style: disc; margin: 0 0 20px 18px; padding: 0; font-size: 14.5px; line-height: 1.5; color: #1f1e1d; }
.sp-lines li { opacity: 0; }
.sp.is-on .sp-lines li { animation: sp-in 450ms var(--ease-out) forwards; }
.sp.is-on .sp-lines li:nth-child(1) { animation-delay: 1100ms; }
.sp.is-on .sp-lines li:nth-child(2) { animation-delay: 1600ms; }
.sp.is-on .sp-lines li:nth-child(3) { animation-delay: 2100ms; }
.sp-vrow { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-v { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid #dde0e7; color: #6b7080; opacity: 0; }
.sp-v.v-pass { color: #1a9e5c; } .sp-v.v-luck { color: #a9691f; } .sp-v.v-worse { color: #c9392f; } .sp-v.v-thin { color: #2d62a3; }
.sp-v.is-hit { border-color: #a9691f; background: #fff7ec; }
.sp.is-on .sp-v { animation: sp-in 400ms var(--ease-out) forwards; }
.sp.is-on .sp-v:nth-child(1) { animation-delay: 2800ms; }
.sp.is-on .sp-v:nth-child(2) { animation-delay: 2950ms; }
.sp.is-on .sp-v:nth-child(3) { animation-delay: 3100ms; }
.sp.is-on .sp-v:nth-child(4) { animation-delay: 3250ms; }

/* stage 5 — forward log */
.sp-days { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-bottom: 12px; }
.sp-days i { aspect-ratio: 1; border-radius: 6px; background: #eef0f4; border: 1px solid #dde0e7; opacity: 0.5; transform: scale(0.85); }
.sp.is-on .sp-days i { animation: day-in 300ms var(--ease-out) forwards; }
@keyframes day-in { to { opacity: 1; transform: scale(1); background: #dff1e8; border-color: #1a9e5c; } }
.sp-dayrow { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: #3f4552; margin-bottom: 16px; }
.sp-daycount { font-family: var(--font-mono); font-size: 15px; color: #1f1e1d; }
.sp-daycount b { color: #e8571c; }
.sp-facts-2 li:nth-child(1) { animation-delay: 300ms !important; }
.sp-facts-2 li:nth-child(2) { animation-delay: 2600ms !important; }
.sp-facts-2 li:nth-child(3) { animation-delay: 4200ms !important; }

@media (max-width: 900px) {
  .show { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .show-rail { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .show-item { grid-template-columns: 22px 1fr; min-width: 170px; padding: 10px 10px; }
  .show-num { width: 22px; height: 22px; font-size: 11px; }
  .show-label { font-size: 12.5px; }
  .show-stage { min-height: 400px; }
  .sp { padding: 20px 18px; }
  .sp-box { font-size: 16px; }
  .sp-stamp { font-size: 24px; }
}

/* learn strip */
.learn-strip { margin-top: 56px; }
.learn-head { max-width: 760px; margin-bottom: 22px; }
.learn-head h3 { font-size: 1.5rem; margin: 0 0 0.4rem; }
.learn-head p { color: var(--muted); margin: 0; }
.learn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lesson {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 6px 14px;
  background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 18px; color: var(--text); text-decoration: none;
  transition: transform 220ms var(--ease-out), border-color 220ms;
}
.lesson:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.22); }
.lesson-ring { grid-row: 1 / 3; position: relative; width: 44px; height: 44px; }
.lesson-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.lesson-ring .r-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 3; }
.lesson-ring .r-fg { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: 97.4; }
.lesson:hover .r-fg, .lesson.is-in .r-fg { animation: ring 1.4s var(--ease-out) forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }
.lesson-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; }
.lesson-body strong { display: block; font-family: var(--font-display); font-size: 15.5px; margin-bottom: 4px; }
.lesson-body span { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }
.lesson-meta { grid-column: 2; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted-soft); }
.lesson-meta em { font-style: normal; }
.learn-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 960px) { .learn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .learn-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Demo loops (real screen recordings) with timed captions
   -------------------------------------------------------------------------- */
.demo { margin: 0; display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45); }
.demo video { display: block; width: 100%; height: auto; background: #fff; }
.demo-cue { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 9px 14px; background: var(--card); border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.demo-cue i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(255, 106, 46, 0.5); animation: pulse 2s infinite; }
.demo-cue span { transition: opacity 200ms; }
.demo-cue span.is-fading { opacity: 0; }
.demo.is-waiting .demo-cue i { animation: none; opacity: 0.4; }

.steps { display: grid; gap: 72px; }
.step { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.step-flip .step-copy { order: 2; }
.step-flip .step-visual { order: 1; }
.step-num { display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--accent-soft); margin-bottom: 10px; }
.step h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.step p { color: var(--muted); }
.ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 8px; width: 13px; height: 7px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.step-visual { display: grid; gap: 16px; }
.step-visual-two { grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 1100px) and (min-width: 961px) { .step-visual-two { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .step-visual-two { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .step { grid-template-columns: 1fr; gap: 22px; }
  .step-flip .step-copy { order: 1; }
  .step-flip .step-visual { order: 2; }
}

.verdicts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.verdict { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 16px 12px; border-top: 3px solid var(--muted-soft); }
.verdict p { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }
.verdict-word { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.v-pass { border-top-color: var(--green); } .v-pass .verdict-word { color: var(--green); }
.v-luck { border-top-color: #f0b429; } .v-luck .verdict-word { color: #f0b429; }
.v-worse { border-top-color: #ff5c5c; } .v-worse .verdict-word { color: #ff5c5c; }
.v-thin { border-top-color: var(--accent-blue); } .v-thin .verdict-word { color: var(--accent-blue); }
@media (max-width: 520px) { .verdicts { grid-template-columns: 1fr; } }

.honest-band { padding: 72px 0; background: radial-gradient(circle at 20% 0%, rgba(255, 106, 46, 0.12), transparent 50%), radial-gradient(circle at 85% 100%, rgba(46, 168, 255, 0.12), transparent 50%); }
.honest-quote { margin: 0 auto; max-width: 900px; text-align: center; }
.honest-quote p { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 600; line-height: 1.2; margin: 0 0 1rem; }
.honest-quote footer { color: var(--muted); font-size: 15px; }
html[lang="zh-Hans"] .honest-quote p { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }

.demo-css .sp { position: relative; inset: auto; min-height: 300px; }
.demo-css .sp.is-on { transition: none; }
.vd-tabs { display: flex; gap: 22px; padding: 12px 18px 0; background: #fff; font-family: var(--font-sans); font-size: 13.5px; color: #6b7080; border-bottom: 1px solid #e6e4df; }
.vd-tabs span { padding-bottom: 10px; }
.vd-tabs span.is-on { color: #1f1e1d; font-weight: 600; box-shadow: inset 0 -2px 0 #1f1e1d; }
.demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; } }
.also-free { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .also-free { grid-template-columns: repeat(2, 1fr); } }
.also-free li { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: var(--muted); }
.also-free b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
@media (max-width: 760px) { .also-free { grid-template-columns: 1fr; } }

/* plans */
.plan-scroll-hint { display: none; font-size: 12.5px; color: var(--muted-soft); margin: -28px 0 12px; }
@media (max-width: 700px) { .plan-scroll-hint { display: block; } }
.plan-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }
.plan-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.plan-table th, .plan-table td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.plan-table thead th { padding-top: 22px; padding-bottom: 16px; vertical-align: top; }
.plan-table tbody th { text-align: left; font-weight: 500; color: var(--muted); width: 44%; }
.plan-table tr:last-child th, .plan-table tr:last-child td { border-bottom: 0; }
.plan-name { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.plan-price { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.is-hi { background: rgba(255, 106, 46, 0.07); }
.plan-table thead th.is-hi { box-shadow: inset 0 3px 0 var(--accent); }
.plan-table .yes { color: var(--green); font-weight: 700; }
.plan-table .no { color: var(--muted-soft); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.plan-note { color: var(--muted-soft); font-size: 13.5px; margin-top: 16px; max-width: 820px; }

/* also from KAPM */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.more-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.more-card h3 { font-size: 1.15rem; }
.more-card p { color: var(--muted); font-size: 14.5px; }
.link-arrow { color: var(--accent-soft); font-weight: 600; font-size: 14.5px; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }
@media (max-width: 760px) { .more-grid { grid-template-columns: 1fr; } }

/* ---- dfin.uk additions (the rest of this file is the kapm.uk template, unchanged) ---- */
.logo-link { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-sub { font-family: var(--font-display, inherit); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.01em; color: var(--text); white-space: nowrap; }
.brand-sub::before { content: ""; display: inline-block; width: 1px; height: 1.4rem; background: var(--border-soft, rgba(255,255,255,.2)); margin-right: 0.7rem; vertical-align: middle; }
@media (max-width: 760px) { .brand-sub { display: none; } }
.slideshow.shots { min-height: 0; aspect-ratio: 1400 / 1020; }
.slideshow.shots .slide { inset: 0.8rem 0.9rem 2.6rem; gap: 0.45rem; }
.shot-img { flex: 1 1 auto; min-height: 0; width: 100%; object-fit: contain; object-position: top center; border-radius: 8px; border: 1px solid var(--border-soft, rgba(255,255,255,.12)); background: #fff; }
.offer-card .offer-list { margin-bottom: 0; }
.logo-link, .logo-link:hover { text-decoration: none; }

/* pricing cards */
.price-grid { align-items: stretch; }
.price-card { text-align: left; display: flex; flex-direction: column; gap: 0.2rem; }
.price-card .offer-list { margin-bottom: 1.2rem; }
.price-card .btn { align-self: flex-start; margin-top: auto; }
.price-tag { font-family: var(--font-mono, monospace); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-blue-soft, #7db4ff); }
.price-big { font-family: var(--font-display, inherit); font-size: 2.3rem; font-weight: 700; margin: 0.4rem 0 0.2rem; color: var(--text); }
.price-big small { font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.price-hi { border-color: rgba(255,106,46,.55); box-shadow: 0 0 0 1px rgba(255,106,46,.25), 0 18px 40px rgba(0,0,0,.35); }

.price-card .price-big { font-family: var(--font-display, inherit); font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: 0.5rem 0 0.9rem; color: var(--text); }
.price-card .price-big small { font-size: 0.95rem; font-weight: 500; color: var(--muted); }


/* Dragon Finance's own logo */
.logo-img.dfin-logo { height: 38px; width: auto; max-width: 62vw; }
.site-header.is-scrolled .logo-img.dfin-logo { height: 32px; }
