/* =========================================================
   BakarePay — public marketing site
   Home, About, Terms, Privacy. Load after tokens.css + base.css.
   Every colour comes from tokens.css, so a brand change there
   re-themes the whole site. Fixed colours are only white/black
   overlays on always-dark surfaces.
   ========================================================= */

/* ---------- Page frame ---------- */
html { scroll-padding-top: calc(var(--header-h) + 12px); }
body.site {
  font-size: 16px;
  line-height: 1.6;
  padding-top: var(--header-h);
  /* clip (not hidden) so position:fixed children and sticky keep working */
  overflow-x: clip;
}
.site main { display: block; }
.site h1, .site h2, .site h3 { text-wrap: balance; }
.site p { text-wrap: pretty; }
.site a:focus-visible, .site button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 400;
  padding: 10px 16px; border-radius: 10px;
  background: var(--primary); color: var(--primary-ink); font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; position: relative; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 56px; }
.section-head h2, .split-text h2, .calc-copy h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 14px;
}
.section-head p { color: var(--text-muted); font-size: 16.5px; }

.section-tag {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 16px;
  border-radius: var(--radius-full);
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; line-height: 1.5;
}
.section-tag i { font-size: 16px; }
.section-tag::after {
  content: ""; position: absolute; top: 0; left: -100%; width: 70%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: tagShimmer 5s ease-in-out 2s infinite;
  pointer-events: none;
}

.text-gradient {
  background: var(--gradient);
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradShift 6s ease-in-out infinite;
}
.lead { font-size: 18px; color: var(--text-muted); }
.lead-sm { font-size: 16px; color: var(--text-muted); margin-bottom: 30px; }

/* ---------- Header / navbar ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 250;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself
   would make it the containing block of the fixed mobile drawer. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px color-mix(in srgb, var(--text) 6%, transparent); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-links { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 34px; }
.nav-list a {
  position: relative; display: inline-block;
  font-size: 15px; font-weight: 500; color: var(--text-muted);
  transition: color var(--transition);
}
.nav-list a::after {
  content: ""; position: absolute; bottom: -4px; left: 50%; right: 50%; height: 2px;
  border-radius: 2px; background: var(--gradient);
  transition: left .3s ease, right .3s ease;
}
.nav-list a:hover, .nav-list a.active { color: var(--text); }
.nav-list a:hover::after, .nav-list a.active::after { left: 0; right: 0; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .theme-toggle { width: 40px; height: 40px; border-radius: 50%; }
.nav-install { padding: 0 12px; }
.nav-install i { font-size: 19px; }
.nav-toggle { display: none; font-size: 24px; color: var(--text); }
.nav-close, .nav-drawer-footer { display: none; }
.nav-backdrop {
  position: fixed; inset: 0; z-index: 190;
  background: var(--backdrop);
  opacity: 0; transition: opacity .3s ease;
}
.nav-backdrop.open { opacity: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 70px; isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
}
.hero::before {
  top: -220px; right: -180px; width: 580px; height: 580px;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  animation: blobDrift1 12s ease-in-out infinite alternate;
}
.hero::after {
  bottom: -260px; left: -170px; width: 500px; height: 500px;
  background: radial-gradient(circle, var(--glow-2), transparent 70%);
  animation: blobDrift2 16s ease-in-out infinite alternate-reverse;
}
.hero-particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-particles canvas { position: absolute !important; inset: 0; }
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 60px; align-items: center;
}
.hero-text { min-width: 0; animation: heroInRight .9s cubic-bezier(.22, 1, .36, 1) both; }
.hero-visual { min-width: 0; display: flex; justify-content: center; animation: heroInLeft .9s cubic-bezier(.22, 1, .36, 1) .2s both; }
.hero h1 { font-size: clamp(32px, 4.4vw, 50px); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 20px; }
.hero .lead { max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 20px 40px; }
.hero-stat { animation: statPopIn .65s cubic-bezier(.22, 1, .36, 1) both; }
.hero-stat:nth-child(1) { animation-delay: .35s; }
.hero-stat:nth-child(2) { animation-delay: .5s; }
.hero-stat:nth-child(3), .hero-stat:nth-child(4) { animation-delay: .65s; }
.hero-stat strong, .trade-stat strong, .stat-num {
  display: block;
  font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.2;
  background: var(--gradient); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradShift 6s ease-in-out infinite;
}
.hero-stat > span, .trade-stat > span { font-size: 13.5px; color: var(--text-muted); text-wrap: balance; }

/* ---------- Hero typewriter slides ----------
   Every slide is a .type-ghost stacked in one grid cell, so the headline keeps
   the height of the longest slide while .type-live types over them. Without JS
   (or before home.js runs) the first ghost is the visible headline. */
.type-stage { display: grid; }
.type-stage > * { grid-area: 1 / 1; min-width: 0; }
.type-ghost { visibility: hidden; }
.type-ghost:first-child { visibility: visible; }
.type-stage.is-typing .type-ghost { visibility: hidden; }
.type-stage em {
  font-style: normal;
  background: var(--gradient); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradShift 6s ease-in-out infinite;
}
.type-rest { visibility: hidden; }
.type-caret {
  /* A plain inline box drawn by its left border: zero net width and no break opportunity
     (an inline-block would let the line break right before it), so typed words never move */
  display: inline; font-size: .86em;
  margin: 0 calc(-4px - .06em) 0 .06em;
  border-left: 4px solid var(--primary); border-radius: 2px;
  animation: caretBlink 1.05s steps(1) infinite;
}
.type-live.is-busy .type-caret { animation: none; }
/* Paused (button, off screen, hidden tab): the caret stops blinking too */
.type-stage.is-paused .type-caret { animation: none; }

/* Sub-lines: stacked like the ghosts, the active one fades in */
.hero-subs { display: grid; max-width: 540px; margin-bottom: 22px; }
.hero .hero-subs > .lead {
  grid-area: 1 / 1; margin: 0; max-width: none;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s;
}
.hero .hero-subs > .lead.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .45s ease .08s, transform .45s ease .08s, visibility 0s;
}
.hero-subs strong { color: var(--text); }

/* Progress bars (one per slide) + pause */
.hero-slides-nav { display: flex; align-items: center; gap: 4px; margin-bottom: 30px; }
.slide-bar {
  display: grid; align-items: center; width: 30px; height: 24px; padding: 0 3px;
  transition: width .35s ease;
}
.slide-bar::before, .slide-bar .fill { grid-area: 1 / 1; height: 4px; border-radius: 2px; }
.slide-bar::before { content: ""; background: color-mix(in srgb, var(--text-muted) 80%, transparent); }
.slide-bar .fill { background: var(--gradient); transform: scaleX(0); transform-origin: left center; }
.slide-bar.is-done .fill { transform: scaleX(1); }
.slide-bar.is-active { width: 52px; }
.slide-bar.is-active .fill { animation: slideFill var(--dur, 6s) linear forwards; }
.hero-slides-nav.is-paused .slide-bar.is-active .fill { animation-play-state: paused; }
.slide-bar:hover::before { background: var(--text-muted); }
.slide-toggle {
  width: 30px; height: 30px; margin-left: 6px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  color: var(--text-muted); border: 1px solid var(--border); background: var(--surface);
}
.slide-toggle:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Hero card stack (BakarePay faces) ---------- */
.card-stack {
  position: relative; width: 360px; height: 300px; flex-shrink: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.bk-card {
  position: absolute; top: 0; left: 0; width: 360px; height: 210px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px 26px; border-radius: 22px; overflow: hidden;
  color: #fff; text-align: left; user-select: none;
  /* Built from the brand tokens, darkened so white text stays readable in both themes */
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 72%, black), color-mix(in srgb, var(--brand) 44%, black));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28), 0 8px 24px rgba(0, 0, 0, .16);
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), opacity .5s ease;
}
.bk-card::before, .bk-card::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.bk-card::before { top: -70px; right: -60px; width: 220px; height: 220px; background: rgba(255, 255, 255, .09); }
.bk-card::after { bottom: -90px; left: -50px; width: 260px; height: 260px; background: rgba(255, 255, 255, .05); }
.bk-card > * { position: relative; z-index: 1; }
.bk-card--fund      { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 70%, black), color-mix(in srgb, var(--brand-2) 52%, black)); }
.bk-card--withdraw  { background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 42%, black), color-mix(in srgb, var(--brand-2) 48%, black)); }
.bk-card--community { background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 56%, black), color-mix(in srgb, var(--brand) 50%, black)); }

.bk-card[data-pos="0"] { transform: translateY(0) scale(1); z-index: 5; opacity: 1; }
.bk-card[data-pos="1"] { transform: translateY(18px) scale(.95); z-index: 4; opacity: 1; }
.bk-card[data-pos="2"] { transform: translateY(32px) scale(.9); z-index: 3; opacity: .85; }
.bk-card[data-pos="3"] { transform: translateY(44px) scale(.85); z-index: 2; opacity: .65; }
.bk-card[data-pos="4"] { transform: translateY(54px) scale(.8); z-index: 1; opacity: .45; }
.bk-card.sliding-out { transform: translateX(140%) rotate(14deg) scale(.92) !important; opacity: 0 !important; z-index: 10 !important; }

.bk-card-top, .bk-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bk-card-brand { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.bk-card-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 20px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
}
.bk-card-label { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .92); margin-bottom: 2px; }
.bk-card-value {
  display: block; font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1.15;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bk-card-value.is-acct { letter-spacing: .06em; }
.bk-card-sub { display: block; margin-top: 3px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-card-bottom { font-size: 11.5px; color: rgba(255, 255, 255, .9); }
.bk-card-bottom .mono { font-size: 11px; letter-spacing: .02em; }
.bk-card-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; font-size: 11.5px; white-space: nowrap;
}
.bk-card-chip i { font-size: 13px; }
.card-stack.is-single { height: auto; cursor: default; }
.card-stack.is-single > .bk-card { position: relative; }
.card-stack-hint {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--text-muted); white-space: nowrap;
}
.card-stack-hint:hover { color: var(--text); background: var(--surface-2); }

/* ---------- Calculator section ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 56px; align-items: center; }
.calc-copy .lead-sm { margin-bottom: 26px; }
.check-list { display: flex; flex-direction: column; gap: 16px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); font-size: 15.5px; }
.check-list li i { color: var(--primary); font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.check-list li strong { color: var(--text); }
.calc-widget .rcalc { border-radius: var(--radius-lg); }
.calc-widget { position: relative; }
.calc-widget::before {
  content: ""; position: absolute; inset: 8% 4%; z-index: 0; border-radius: 40px;
  background: var(--gradient); opacity: .16; filter: blur(40px); pointer-events: none;
}
.calc-widget > * { position: relative; z-index: 1; }

/* ---------- How it works (glass step cards) ---------- */
.steps-section { overflow: hidden; }
.steps-section::before, .steps-section::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
}
.steps-section::before { width: 520px; height: 520px; top: 10%; left: -160px; background: radial-gradient(circle, var(--glow), transparent 70%); opacity: .7; }
.steps-section::after { width: 460px; height: 460px; bottom: -120px; right: -120px; background: radial-gradient(circle, var(--glow-2), transparent 70%); opacity: .8; }
.steps-section > .container { position: relative; z-index: 1; }
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.step-card {
  position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border-soft));
  box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s ease, border-color .4s ease;
}
.step-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: scaleX(0); transition: transform .45s ease;
}
.step-number {
  display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px;
  border-radius: var(--radius); background: var(--primary-soft); color: var(--primary);
  font-family: var(--font-display); font-size: 22px; font-weight: 800;
  transition: transform .3s ease, box-shadow .3s ease;
}
.step-card h3 { font-size: 18px; margin-bottom: 10px; }
.step-card p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- Split sections (image + text) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 60px; align-items: center; }
.split--text-wide { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 56px; }
.split-text { min-width: 0; }
.split-media { position: relative; min-width: 0; border-radius: var(--radius-lg); }
.split-media .media-frame {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-lg);
  background: var(--surface-2);
  aspect-ratio: 4 / 4.7;
}
.split-media--wide .media-frame { aspect-ratio: 5 / 4; }
.split-media--story .media-frame { aspect-ratio: 4 / 3.2; }
.split-media img {
  /* The box starts 6px above the frame: some source photos carry 1–3 black
     rows on their top edge, and this keeps them out of view. */
  position: absolute; left: 0; top: -6px; width: 100%; height: calc(100% + 6px);
  max-width: none; object-fit: cover; object-position: 50% 30%;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
.split-media:hover img { transform: scale(1.05); }
.media-badge {
  position: absolute; left: 22px; right: 22px; bottom: 22px; z-index: 2;
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-lg);
  animation: badgeFloat 5s ease-in-out infinite;
}
.media-badge .badge-icon {
  width: 44px; height: 44px; border-radius: var(--radius); flex-shrink: 0;
  display: grid; place-items: center; font-size: 22px;
  background: var(--primary-soft); color: var(--primary);
}
.media-badge strong { display: block; font-size: 14.5px; line-height: 1.3; }
.media-badge span { font-size: 12.5px; color: var(--text-muted); }
.media-badge .acct-num { font-family: var(--font-display); font-size: 17px; letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.media-badge .badge-end { margin-left: auto; flex-shrink: 0; }

.feature-rows { display: flex; flex-direction: column; gap: 24px; }
.feature-rows--2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; }
.feature-row { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon {
  width: 50px; height: 50px; border-radius: var(--radius); flex-shrink: 0;
  display: grid; place-items: center; font-size: 24px;
  background: var(--primary-soft); color: var(--primary);
}
.feature-row h3 { font-size: 16px; margin-bottom: 4px; }
.feature-row p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; }
.split-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trade-stats { display: flex; flex-wrap: wrap; gap: 18px 36px; margin: 6px 0 8px; }
.trade-stat strong { font-size: 28px; }

/* ---------- Academy marquee ---------- */
.academy-band { position: relative; padding: 18px 0; background: var(--hero-bg); color: #fff; }
.academy-viewport {
  overflow: hidden; margin-right: 56px; /* keep the scrolling text clear of the pause button */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.academy-track { display: flex; width: max-content; animation: marqueeScroll 46s linear infinite; }
.academy-band:hover .academy-track { animation-play-state: paused; }
html.motion-paused *, html.motion-paused *::before, html.motion-paused *::after { animation-play-state: paused !important; }
.academy-toggle {
  position: absolute; top: 50%; right: 12px; z-index: 2; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  color: #fff; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .3);
}
.academy-toggle:hover { background: rgba(0, 0, 0, .65); }
.academy-band .academy-toggle:focus-visible { outline-color: #fff; }
.academy-set { display: flex; align-items: center; gap: 24px; padding-right: 24px; flex-shrink: 0; }
.academy-set span {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(18px, 2.3vw, 25px);
  letter-spacing: -.01em; white-space: nowrap;
}
.academy-set i { font-size: 15px; color: color-mix(in srgb, var(--brand-2) 65%, #fff); }
.academy-name { color: color-mix(in srgb, var(--brand-2) 55%, #fff); }
/* The sentence for screen readers (and the static version under reduced motion) */
.academy-static { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Rate board (always-dark panel) ----------
   Set out like a printed rate sheet: date line, the two rates, then the terms as ruled rows.
   No icons-in-boxes, badges or pulsing dots. */
.rate-board {
  max-width: 900px; margin: 0 auto; padding: 30px 36px 26px; border-radius: 24px;
  background: var(--hero-bg); color: #fff; box-shadow: var(--shadow-lg);
}
.rate-board a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rate-board a:focus-visible { outline-color: #fff; }
.board-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
  padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.board-date { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.3; }
.board-unit { font-size: 14px; color: rgba(255, 255, 255, .72); }
.board-rates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.board-rate { min-width: 0; padding: 24px 32px 26px 0; }
.board-rate + .board-rate { padding: 24px 0 26px 32px; border-left: 1px solid rgba(255, 255, 255, .2); }
.board-rate dt { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .85); }
.board-rate dt i { font-size: 19px; color: color-mix(in srgb, var(--brand-2) 60%, #fff); }
.board-figure {
  margin-top: 4px; font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 4.6vw, 50px); line-height: 1.1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.board-per { font-family: var(--font); font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .68); }
.board-note { margin-top: 8px; max-width: 34ch; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .74); }
.board-terms { border-top: 1px solid rgba(255, 255, 255, .2); }
.board-terms > div {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 20px; padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.board-terms > div:last-child { border-bottom: 0; padding-bottom: 0; }
.board-terms > div[hidden] { display: none; }
.board-terms dt { font-size: 15px; font-weight: 700; }
.board-terms dd { font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .86); }

/* ---------- How to deposit / withdraw ---------- */
.howto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.howto-card {
  min-width: 0; display: flex; flex-direction: column; padding: 32px; border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border-soft));
  box-shadow: var(--shadow);
}
.howto-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.howto-icon {
  width: 56px; height: 56px; flex-shrink: 0; display: grid; place-items: center; font-size: 30px;
  border-radius: 16px; background: var(--gradient); color: var(--primary-ink); box-shadow: 0 10px 24px var(--glow);
}
.howto-icon.is-accent { background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 10px 24px var(--glow-2); }
.howto-kicker { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.howto-head h3 { font-size: 24px; line-height: 1.25; }
.howto-steps { flex: 1; display: flex; flex-direction: column; margin-bottom: 24px; }
.howto-steps li { position: relative; display: flex; align-items: flex-start; gap: 16px; padding: 10px 0; }
.howto-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 56px; bottom: -8px; width: 2px; border-radius: 1px;
  background: linear-gradient(var(--primary-line), transparent);
}
.howto-num {
  width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px;
  font-family: var(--font-display); font-size: 15px; font-weight: 800;
  background: var(--primary-soft); color: var(--primary);
}
.howto-steps li > div { min-width: 0; padding-top: 10px; }
.howto-step-title { display: block; margin-bottom: 3px; font-size: 16.5px; line-height: 1.35; color: var(--text); }
.howto-steps p { font-size: 15.5px; line-height: 1.55; color: var(--text-muted); }
.howto-steps p strong { color: var(--text); }
.howto-cta { align-self: flex-start; }

/* ---------- New to Deriv / affiliate ---------- */
.deriv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.deriv-card {
  position: relative; overflow: hidden; isolation: isolate; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 36px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow);
}
.deriv-card::before {
  content: ""; position: absolute; z-index: -1; top: -110px; right: -90px; width: 280px; height: 280px;
  border-radius: 50%; background: var(--gradient-soft); pointer-events: none;
}
.deriv-card-icon {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 28px; border-radius: 16px;
  background: var(--gradient); color: var(--primary-ink); box-shadow: 0 10px 24px var(--glow);
}
.deriv-card-kicker { margin-top: 22px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.deriv-card h3 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; margin: 6px 0 10px; }
.deriv-card p { flex: 1; margin-bottom: 26px; color: var(--text-muted); }
.deriv-card .btn i { font-size: 18px; }
.deriv-card.is-dark { background: var(--hero-bg); border-color: transparent; color: #fff; }
.deriv-card.is-dark::before { background: radial-gradient(circle, color-mix(in srgb, var(--brand-2) 38%, transparent), transparent 70%); }
.deriv-card.is-dark .deriv-card-icon { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); color: #fff; box-shadow: none; }
.deriv-card.is-dark .deriv-card-kicker { color: color-mix(in srgb, var(--brand-2) 55%, #fff); }
.deriv-card.is-dark p { color: rgba(255, 255, 255, .8); }
.deriv-card.is-dark .btn:focus-visible { outline-color: #fff; }
/* White button for always-dark panels (btn-inverse follows --brand-ink, which is dark in dark mode) */
.btn-light { background: #fff; color: color-mix(in srgb, var(--brand) 65%, #0A0F24); box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
.btn-light:hover { transform: translateY(-2px); }
.deriv-note { margin-top: 24px; font-size: 14px; color: var(--text-muted); text-align: center; text-wrap: balance; }
.deriv-note i { font-size: 17px; vertical-align: -3px; margin-right: 2px; }

.nowrap { white-space: nowrap; }

/* ---------- Trading communities ---------- */
.community-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.community-card {
  --c: #229ED9; /* Telegram blue; WhatsApp green below. Third-party brand colours, icon tiles only. */
  min-width: 0; display: flex; align-items: center; gap: 16px; padding: 22px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow);
  color: var(--text);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), border-color .3s ease, box-shadow .3s ease;
}
.community-card.is-whatsapp { --c: #25D366; }
.community-icon {
  width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; font-size: 30px;
  border-radius: 16px; background: var(--c); color: #fff;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 32%, transparent);
}
.community-text { flex: 1; min-width: 0; }
.community-text strong { display: block; font-size: 16px; line-height: 1.35; }
.community-text span { display: block; font-size: 13.5px; color: var(--text-muted); }
.community-join { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.community-join i { font-size: 18px; transition: transform var(--transition); }
.follow-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: 36px; }
.follow-label { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.follow-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.follow-links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.follow-links a:hover { border-color: var(--primary); color: var(--primary); }
.follow-links i { font-size: 19px; }
.x-logo { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
.follow-links .x-logo, .social-row .x-logo { width: 15px; height: 15px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
  margin-bottom: 14px; transition: border-color .3s ease, box-shadow .3s ease;
}
.faq-item:hover { border-color: var(--primary-line); box-shadow: var(--shadow); }
.faq-item h3 { font-size: inherit; font-family: var(--font); letter-spacing: 0; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; text-align: left; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.45;
}
.faq-q i { font-size: 22px; color: var(--text-dim); flex-shrink: 0; transition: transform var(--transition), color var(--transition); }
.faq-item.open .faq-q i { transform: rotate(180deg); color: var(--primary); }
/* Collapses with the 0fr → 1fr grid-rows technique, so answers of any length fit.
   Only once JS is ready: without JS every answer stays readable. */
.faq-a { display: grid; grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; min-height: 0; }
.faq-a-inner > div { padding: 0 24px 22px; color: var(--text-muted); font-size: 15px; }
.faq-a-inner p + p, .faq-a-inner p + ul, .faq-a-inner ul + p { margin-top: 10px; }
.faq-a-inner ul { list-style: disc; padding-left: 20px; }
.faq-a-inner li + li { margin-top: 4px; }
.faq-a-inner strong { color: var(--text); }
.faq-list.is-ready .faq-a { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .3s ease, visibility 0s linear .3s; }
.faq-list.is-instant .faq-a { transition: none !important; }
.faq-list.is-ready .faq-item.open .faq-a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .3s ease, visibility 0s linear 0s; }
.faq-foot { text-align: center; margin-top: 30px; color: var(--text-muted); font-size: 15px; }

/* ---------- Install the app (home band; js/pwa.js runs the button) ---------- */
.install-section { padding: 0; }
.install-band {
  display: flex; align-items: center; gap: 20px; max-width: 900px; margin: 0 auto; padding: 22px 26px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow);
}
.install-band .pwa-tile { width: 60px; height: 60px; }
.install-band-text { flex: 1; min-width: 0; }
.install-band h2 { font-size: 19px; margin-bottom: 4px; }
.install-band p { color: var(--text-muted); font-size: 15px; }
.install-band .btn { flex-shrink: 0; }

/* ---------- CTA banner ---------- */
.cta-section { padding-top: 30px; }
.cta-banner {
  position: relative; overflow: hidden; text-align: center;
  padding: 60px 56px; border-radius: var(--radius-lg);
  background: var(--gradient); background-size: 200% 200%;
  color: var(--primary-ink);
  animation: ctaWave 8s ease-in-out infinite;
  box-shadow: 0 24px 60px var(--glow);
}
.cta-banner::before {
  content: ""; position: absolute; top: -60%; left: -20%; width: 140%; height: 220%;
  background: radial-gradient(ellipse at 60% 40%, rgba(255, 255, 255, .16) 0%, transparent 55%);
  pointer-events: none; animation: ctaOrb 9s ease-in-out infinite alternate;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; color: inherit; }
.cta-banner p { font-size: 16.5px; max-width: 560px; margin: 0 auto 30px; color: color-mix(in srgb, var(--primary-ink) 82%, transparent); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn-inverse { background: var(--primary-ink); color: var(--primary); box-shadow: 0 10px 26px rgba(0, 0, 0, .14); }
.btn-inverse:hover { transform: translateY(-2px); }
.btn-outline-inverse { background: transparent; color: var(--primary-ink); border: 1.5px solid color-mix(in srgb, var(--primary-ink) 50%, transparent); }
.btn-outline-inverse:hover { background: color-mix(in srgb, var(--primary-ink) 12%, transparent); border-color: var(--primary-ink); }
.cta-banner .btn:focus-visible { outline-color: var(--primary-ink); }

/* ---------- Page header (About / legal) ---------- */
.page-header {
  position: relative; overflow: hidden; text-align: center;
  padding: 72px 0 48px; border-bottom: 1px solid var(--border-soft);
}
.page-header::before {
  content: ""; position: absolute; top: -90px; left: 50%; transform: translateX(-50%);
  width: 720px; max-width: 140%; height: 360px; pointer-events: none;
  background: radial-gradient(ellipse, var(--glow) 0%, transparent 70%); opacity: .8;
}
.page-header > .container { position: relative; }
.page-header h1 { font-size: clamp(30px, 4.5vw, 48px); line-height: 1.15; margin-bottom: 14px; }
.page-header p { color: var(--text-muted); font-size: 17px; max-width: 600px; margin: 0 auto; }

/* ---------- About ---------- */
.story-text p { color: var(--text-muted); margin-bottom: 16px; }
.story-text p:last-child { margin-bottom: 0; }
.stats-band { padding: 52px 0; background: var(--gradient); background-size: 200% 200%; color: var(--primary-ink); animation: ctaWave 10s ease-in-out infinite; }
.stats-band-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; text-align: center; }
.stat-block strong { display: block; font-family: var(--font-display); font-size: clamp(26px, 4vw, 36px); font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.stat-block > span { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; text-wrap: balance; color: color-mix(in srgb, var(--primary-ink) 75%, transparent); }
.values-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.value-card {
  text-align: center; padding: 30px 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), border-color .3s ease;
}
.value-card .feature-icon { margin: 0 auto 16px; }
.value-card h3 { font-size: 17px; margin-bottom: 8px; }
.value-card p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- Legal pages ---------- */
.legal-content { max-width: 780px; margin: 0 auto; padding: 56px 0 100px; }
.legal-content .updated { color: var(--text-dim); font-size: 14px; margin-bottom: 26px; display: flex; align-items: center; gap: 8px; }
.legal-toc {
  padding: 20px 22px; margin-bottom: 36px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-soft);
}
.legal-toc h2 { font-size: 13px !important; margin: 0 0 10px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-family: var(--font); }
.legal-toc ol { list-style: decimal; padding-left: 22px; columns: 2; column-gap: 32px; }
.legal-toc li { margin-bottom: 6px; font-size: 14.5px; color: var(--text-muted); break-inside: avoid; }
.legal-content .legal-toc a { color: var(--text); font-weight: 500; }
.legal-content .legal-toc a:hover { color: var(--primary); text-decoration: underline; }
.legal-content > section { scroll-margin-top: calc(var(--header-h) + 16px); }
.legal-content h2 { font-size: 21px; margin: 40px 0 14px; }
.legal-content h3 { font-size: 16px; margin: 20px 0 8px; }
.legal-content p, .legal-content li { color: var(--text-muted); font-size: 15.5px; margin-bottom: 12px; }
.legal-content ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.legal-content li { margin-bottom: 8px; }
.legal-content strong { color: var(--text); }
.legal-content a { color: var(--primary); font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }
.legal-note {
  display: flex; gap: 12px; padding: 14px 16px; margin: 18px 0; border-radius: 12px;
  background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--text); font-size: 14.5px;
}
.legal-note i { color: var(--primary); font-size: 20px; flex-shrink: 0; margin-top: 1px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 64px 0 28px; margin-top: 60px; background: var(--bg); }
.page-about .site-footer, .page-legal .site-footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-about p { color: var(--text-muted); font-size: 14.5px; margin: 16px 0 20px; max-width: 340px; }
.site-footer .footer-h { font-size: 15px; margin-bottom: 16px; }
.footer-links li { margin-bottom: 11px; }
.footer-links a, .footer-link-btn { color: var(--text-muted); font-size: 14.5px; transition: color var(--transition); }
.footer-links a:hover, .footer-link-btn:hover { color: var(--primary); }
.footer-link-btn { padding: 0; text-align: left; line-height: inherit; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.social-row a:hover { background: var(--gradient); color: var(--primary-ink); transform: translateY(-2px); }
.footer-risk {
  padding: 20px 22px; margin-bottom: 28px; border-radius: var(--radius);
  background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent);
}
.site-footer .footer-risk .footer-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.footer-risk .footer-h i { font-size: 18px; color: var(--warning); }
.footer-risk p { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.footer-risk p + p { margin-top: 6px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--border-soft);
  font-size: 13.5px; color: var(--text-muted);
}
.footer-bottom .footer-live { margin-left: 6px; }
.flag-ng {
  display: inline-block; width: 18px; height: 12px; margin: 0 2px; vertical-align: -1px; border-radius: 2px;
  background: linear-gradient(90deg, #008751 0 33.4%, #fff 33.4% 66.6%, #008751 66.6% 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}
.footer-legal { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--primary); }
/* Keep the last row clear of the WhatsApp button */
body.has-wa .site-footer { padding-bottom: 96px; }

/* ---------- Motion keyframes ---------- */
@keyframes tagShimmer { 0% { left: -100%; } 100% { left: 220%; } }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes blobDrift1 {
  0% { transform: scale(1) translate(0, 0); opacity: 1; }
  50% { transform: scale(1.18) translate(50px, 25px); opacity: .6; }
  100% { transform: scale(.92) translate(-15px, 50px); opacity: 1; }
}
@keyframes blobDrift2 {
  0% { transform: scale(1) translate(0, 0); opacity: 1; }
  50% { transform: scale(1.12) translate(-35px, -20px); opacity: .55; }
  100% { transform: scale(1.08) translate(20px, 40px); opacity: 1; }
}
@keyframes statPopIn { from { opacity: 0; transform: scale(.8) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes heroInRight { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes heroInLeft { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes caretBlink { 50% { opacity: 0; } }
@keyframes slideFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes badgeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes ctaWave { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ctaOrb { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, 20px) scale(1.15); } }

/* Hover effects only where hover is real: a tap leaves :hover stuck */
@media (hover: hover) {
  .step-card:hover { transform: translateY(-12px); border-color: var(--primary-line); box-shadow: 0 28px 64px var(--glow), var(--shadow); }
  .step-card:hover::after { transform: scaleX(1); }
  .step-card:hover .step-number { transform: scale(1.1); box-shadow: 0 0 0 8px var(--primary-soft), 0 0 0 16px color-mix(in srgb, var(--primary) 5%, transparent); }
  .community-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--c) 45%, var(--border-soft)); box-shadow: var(--shadow-lg); }
  .community-card:hover .community-join i { transform: translateX(3px); }
  .follow-links a:hover { transform: translateY(-2px); }
  .value-card:hover { transform: translateY(-6px); border-color: var(--primary-line); }
}

/* ---------- Responsive (one set of breakpoints for the whole site) ---------- */
@media (min-width: 1101px) and (max-width: 1179px) {
  .hero h1 { font-size: 46px; }
}
@media (min-width: 1101px) {
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(400px, .8fr); }
  .card-stack { width: 400px; height: 330px; }
  .bk-card { width: 400px; height: 234px; padding: 26px 30px; }
  .bk-card-value { font-size: 31px; }
}
@media (max-width: 1100px) {
  .feature-rows--2col { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .nav-list { gap: 26px; }
}
/* Six nav links: tighten between the drawer breakpoint and full desktop */
@media (min-width: 861px) and (max-width: 1040px) {
  .nav-list { gap: 20px; }
  .nav-list a { font-size: 14.5px; white-space: nowrap; }
  .nav-actions .btn-ghost { padding: 0 10px; }
}
@media (min-width: 861px) and (max-width: 920px) {
  .nav-bar, .nav-list { gap: 14px; }
}
/* Not enough room for the words: the install button keeps just its icon (the name stays for screen readers) */
@media (min-width: 861px) and (max-width: 1179px) {
  .nav-install { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--surface); border-color: var(--border); }
  .nav-install-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Below 960px not even the icon fits beside "Log in" and "Get started" (it pushed them off the
   edge); the footer link and the homepage band still offer the install */
@media (min-width: 861px) and (max-width: 959px) {
  .nav-install { display: none; }
}
/* Side-by-side hero between 981 and 1100px: the three stats share one row */
@media (min-width: 981px) and (max-width: 1100px) {
  .hero-stats { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px 20px; }
  .hero-stat > span { display: block; line-height: 1.35; }
}
/* Three community cards in a row on tablets: "Join" moves under the text */
@media (min-width: 901px) and (max-width: 1140px) {
  .community-card { display: grid; grid-template-columns: 54px minmax(0, 1fr); column-gap: 16px; row-gap: 6px; align-items: start; align-content: start; }
  .community-join { grid-column: 2; }
}
@media (max-width: 980px) {
  .hero { padding: 48px 0 60px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; text-align: center; }
  .hero-visual { order: -1; }
  .hero .lead { margin: 0 auto 30px; }
  .hero-actions, .hero-stats, .hero-slides-nav { justify-content: center; }
  .hero-subs { margin-left: auto; margin-right: auto; }
  .card-stack { width: min(360px, calc(100% - 32px)); margin: 0 auto; }
  .bk-card { width: 100%; }
  .steps-grid, .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  /* Every split image — features, story and platform alike — sits above its text */
  .split-media { order: -1; max-width: 460px; width: 100%; margin: 0 auto; }
  .split-media--wide, .split-media--story { max-width: 560px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .howto-grid { grid-template-columns: minmax(0, 1fr); max-width: 620px; margin: 0 auto; }
  .community-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .calc-widget { max-width: 480px; width: 100%; margin: 0 auto; }
}
@media (max-width: 860px) {
  .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-grid; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
    width: min(320px, 84vw); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 84px 20px 24px; overflow-y: auto;
    background: var(--bg-soft); border-left: 1px solid var(--border-soft); box-shadow: var(--shadow-lg);
    transform: translateX(100%); visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
  }
  .nav-links.open { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s linear 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-list a { display: block; padding: 13px 14px; border-radius: var(--radius-sm); font-size: 16px; border: 2px solid transparent; }
  .nav-list a::after { display: none; }
  .nav-list a:hover { background: var(--surface-2); }
  .nav-list a.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-weight: 700; }
  .nav-close {
    display: grid; place-items: center; position: absolute; top: 18px; right: 18px;
    width: 40px; height: 40px; border-radius: 50%; font-size: 22px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  }
  .nav-close:hover { color: var(--text); }
  .nav-drawer-footer { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border-soft); }
  .nav-drawer-footer .btn { width: 100%; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 768px) {
  .section, .hero { overflow-x: clip; }
  .deriv-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding: 36px 0 52px; }
  .hero .lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-stats, .trade-stats { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
  .hero-stat strong, .trade-stat strong { font-size: 22px; }
  .hero-stat > span, .trade-stat > span { display: block; font-size: 12.5px; line-height: 1.35; }
  .card-stack { width: calc(100% - 28px); height: 290px; margin: 0 14px; }
  .bk-card { height: 200px; padding: 20px 22px; }
  .bk-card-value { font-size: 25px; }
  .steps-grid, .values-grid { grid-template-columns: minmax(0, 1fr); }
  .step-card { padding: 24px; }
  .academy-band { padding: 14px 0; }
  .academy-track { animation-duration: 34s; }
  .rate-board { padding: 22px 18px 20px; border-radius: 22px; }
  .board-date { font-size: 17px; }
  .board-rates { grid-template-columns: minmax(0, 1fr); }
  .board-rate, .board-rate + .board-rate { padding: 20px 0; }
  .board-rate + .board-rate { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  .board-figure { font-size: 38px; }
  .board-terms > div { grid-template-columns: minmax(0, 1fr); }
  .howto-card { padding: 22px 18px; }
  .howto-head h3 { font-size: 21px; }
  .howto-step-title { font-size: 16px; }
  .howto-steps p { font-size: 15px; }
  .howto-cta { align-self: stretch; }
  .deriv-card { padding: 26px 22px; }
  .deriv-card .btn { width: 100%; }
  .community-card { gap: 12px; padding: 16px; }
  .community-icon { width: 46px; height: 46px; font-size: 26px; border-radius: 14px; }
  .cta-banner { padding: 40px 20px; }
  .cta-actions .btn { flex: 1 1 100%; }
  .install-band { flex-direction: column; gap: 14px; padding: 26px 20px; text-align: center; }
  .install-band .btn { width: 100%; }
  .split-actions .btn { flex: 1 1 100%; }
  .media-badge { left: 14px; right: 14px; bottom: 14px; padding: 12px; gap: 12px; }
  .stats-band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .page-header { padding: 48px 0 36px; }
  .legal-content { padding: 40px 0 72px; }
  .legal-toc ol { columns: 1; }
  .faq-q { padding: 18px 18px; font-size: 15.5px; }
  .faq-a-inner > div { padding: 0 18px 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom .footer-live { display: block; margin: 4px 0 0; }
}
@media (max-width: 380px) {
  .bk-card-value { font-size: 22px; }
  .bk-card { padding: 18px; }
  .cta-banner { padding: 40px 16px; }
  .cta-actions .btn { padding: 0 16px; }
  .community-join { font-size: 0; gap: 0; } /* the whole card is the link: keep just the arrow */
  .community-join i { font-size: 22px; }
}

/* ---------- Reduced motion: everything that moves on its own stops ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after,
  .hero-text, .hero-visual, .hero-stat,
  .text-gradient, .hero-stat strong, .trade-stat strong, .stat-num,
  .section-tag::after, .media-badge,
  .cta-banner, .cta-banner::before, .stats-band,
  .type-stage em, .type-caret { animation: none !important; }
  .section-tag::after { display: none; }
  .hero-particles { display: none; }
  .bk-card, .step-card, .step-card::after, .step-number, .community-card,
  .split-media img, .value-card, .faq-a, .hero .hero-subs > .lead, .slide-bar { transition: none !important; }
  .slide-bar.is-active .fill { animation: none; transform: scaleX(1); }
  .split-media:hover img { transform: none; }
  /* The academy marquee becomes one static line */
  .academy-viewport { -webkit-mask-image: none; mask-image: none; }
  .academy-track, .academy-toggle { display: none; }
  .academy-static {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
    padding: 0 16px; text-align: center;
    font-family: var(--font-display); font-weight: 800; font-size: clamp(17px, 2.2vw, 22px);
  }
}

@media print {
  .site-header, .nav-backdrop, .hero-particles, .card-stack-hint, .hero-slides-nav, .academy-toggle, .wa-float { display: none !important; }
  body.site { padding-top: 0; }
}
