/* ==========================================================================
   THBT landing demo
   Look: light grey page, white rounded cards, orange only where we want the eye to go.
   Layout is tuned for a 1440px-wide desktop first, then tablet and phone.
   ========================================================================== */

/* Design tokens */
:root {
  --color-brand: #f26b1d;       /* orange: focus colour (buttons, icons, active states, THBT) */
  --color-brand-strong: #d9530c; /* orange for small text on white (better contrast) */
  --color-brand-soft: #fff1e7;  /* orange tint behind icons and highlights */
  --color-page: #f1f1f3;        /* page background (grey) */
  --color-card: #ffffff;        /* cards and text boxes (white) */
  --color-ink: #16161a;
  --color-muted: #5d5e66;
  --color-line: #e4e4e8;
  --color-navy: #121a33;        /* dark phone tile */
  --brand-gradient: linear-gradient(135deg, #f6802f 0%, #f2541f 55%, #f04a1c 100%);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  --wrap: 1280px;                         /* content width on a 1440 desktop */
  --gutter: clamp(16px, 2.5vw, 32px);     /* space between the cards and the screen edge */
  --section-gap: var(--header-h);          /* space between every section = the band above the hero (header height) */
  --radius-card: clamp(24px, 2.4vw, 36px);
  --radius: 16px;
  --header-h: 60px;                       /* Trust Wallet: ~60px at 1440 */
  --header-inset: clamp(20px, 2.8vw, 40px); /* header text sits this far inside the card edges */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-step: 600ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h); /* in-page jumps land below the sticky header */
  overflow-x: clip; /* nothing may make the page scroll sideways (clip keeps sticky working) */
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  max-width: 100%;
}

/* Every section lines up on the same content width. */
.hero,
.trust,
.why,
.story,
.swap-demo,
.news,
.faq,
.cta {
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.trust,
.why,
.story,
.swap-demo,
.news,
.faq,
.cta {
  margin-top: var(--section-gap);
}

/* Big centred section heading + one line under it. */
.section-intro {
  max-width: 44rem;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
  text-align: center;
}

.section-intro h2,
.story-title,
.swap-intro h2,
.faq-intro h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-intro p,
.swap-intro p,
.faq-intro p {
  margin-top: 0.875rem;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  line-height: 1.5;
}

/* Small label above a section title, e.g. "How to" above "Swap in seconds". */
.eyebrow {
  margin-bottom: 0.625rem;
  color: var(--color-brand-strong);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Thai and Myanmar have no capitals and need normal spacing. */
:lang(th) .eyebrow,
:lang(my) .eyebrow {
  font-size: 0.9375rem;
  letter-spacing: 0;
}

/* The intro paragraph rule (.swap-intro p) must not restyle the label. */
.swap-intro .eyebrow {
  margin-top: 0;
  color: var(--color-brand-strong);
  font-size: 0.8125rem;
  line-height: 1.3;
}

:lang(th) .swap-intro .eyebrow,
:lang(my) .swap-intro .eyebrow {
  font-size: 0.9375rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.375rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms, border-color 180ms, color 180ms, opacity 180ms;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-brand-strong);
}

.btn-ghost {
  border-color: var(--color-line);
  background: var(--color-card);
  color: var(--color-ink);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--color-ink);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn:focus-visible,
.swap-steps button:focus-visible,
.swap-tap:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

/* Orange icon on an orange tint (trust box and feature cards). */
.icon-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-brand-soft);
  color: var(--color-brand);
}

/* A row of the six token coins. */
.coin-row {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.coin-row li {
  width: 36px;
  height: 36px;
  margin-left: -8px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ring, #fff);
}

.coin-row li:first-child {
  margin-left: 0;
}

.coin-row img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Site header ---------- */
/* Programme name on the left, language on the right. Sits on the grey page; turns white once scrolled. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  height: var(--header-h);
  /* Lines up with the cards below, then steps in by --header-inset (as on trustwallet.com). */
  padding: 0 calc(max(var(--gutter), (100% - var(--wrap)) / 2) + var(--header-inset));
  background: rgba(255, 255, 255, 0);
  color: var(--color-ink);
  box-shadow: 0 1px 0 rgba(22, 22, 26, 0);
  transition: background-color 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 rgba(22, 22, 26, 0.08);
}

.site-title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
/* White card that fills the first screen on a 1440 desktop: copy on the left, 3D phone on the right. */
.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  height: clamp(560px, calc(100svh - var(--header-h) - var(--gutter)), 760px);
  padding: clamp(2rem, 4vw, 4rem) clamp(2rem, 5vw, 5rem);
  overflow: clip;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 74% 52%, rgba(246, 128, 47, 0.16) 0, rgba(246, 128, 47, 0) 42%),
    var(--color-card);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Thai Baht TrueMoney → THBT (biggest, orange) → the promise → 6 tokens → button */
.hero-name {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-title {
  margin-top: 0.25rem;
  font-size: clamp(4.5rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 18em;
  margin-top: clamp(1rem, 2vw, 1.5rem);
  font-size: clamp(1.375rem, 2.3vw, 2.125rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* What THBT is, in one short paragraph under the promise. */
.hero-about {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  line-height: 1.6;
}

.hero-tokens {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  color: var(--color-muted);
  font-size: 1.0625rem;
  font-weight: 600;
}

.hero-copy .btn {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

/* --- 3D phone --- */
.hero-stage {
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.hero-float {
  transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
}

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

.phone3d {
  /* Resting angle, locked by KP on 2026-11-10. */
  --rx: 18deg;
  --ry: -22deg;
  --rz: 14deg;
  --p: 0; /* scroll progress through the hero, 0..1 (set by JS) */
  --bezel: 8px;
  --depth: 2.3px; /* gap between edge layers (18 layers ≈ 41px thick) */
  --pop: 90px; /* how far the Swap banner floats out of the screen */

  position: relative;
  /* Fits inside the hero card: never taller than the card minus its padding. 0.4722 = 391 / 828 */
  width: min(270px, calc((min(100svh, 860px) - 250px) * 0.4722));
  aspect-ratio: 391 / 828;
  transform-style: preserve-3d;
  transform:
    rotateX(calc(var(--rx) * (1 - var(--p))))
    rotateY(calc(var(--ry) * (1 - var(--p))))
    rotateZ(calc(var(--rz) * (1 - var(--p))));
  transition: transform 250ms var(--ease-out);
}

/* Stacked layers behind the front face give the phone real thickness when tilted. */
.p3-edge {
  position: absolute;
  inset: 0;
  border-radius: 44px;
  background: linear-gradient(90deg, #4a4a50, #1b1b1e 30%, #2c2c31 70%, #55555c);
  transform: translateZ(calc(var(--i) * var(--depth) * -1));
}

.p3-front {
  position: absolute;
  inset: 0;
  padding: var(--bezel);
  border-radius: 44px;
  background: #111113;
  box-shadow: 0 0 0 1.5px #3c3c42 inset;
}

.p3-screen {
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
  background: #fff;
}

.p3-screen img {
  display: block;
  width: 100%;
  height: auto;
}

/* Soft glass reflection across the screen. */
.p3-glare {
  position: absolute;
  inset: var(--bezel);
  border-radius: 36px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
}

/* Sits exactly over the screen so the pop-out can use screen % coordinates. */
.p3-layer {
  position: absolute;
  inset: var(--bezel);
  transform-style: preserve-3d;
  pointer-events: none;
}

/* Swap banner: x16 y408 w314 h135 in the 375×812 frame. */
.p3-pop {
  position: absolute;
  left: calc(16 / 375 * 100%);
  top: calc(408 / 812 * 100%);
  width: calc(314 / 375 * 100%);
  height: calc(135 / 812 * 100%);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--pop) * (1 - var(--p)))) translateX(calc(-14% * (1 - var(--p))));
  transition: transform 250ms var(--ease-out);
}

.p3-pop-face {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background-image: url("../img/wallet-screen.png");
  background-repeat: no-repeat;
  background-size: calc(375 / 314 * 100%) calc(812 / 135 * 100%);
  background-position: calc(16 / (375 - 314) * 100%) calc(408 / (812 - 135) * 100%);
  box-shadow:
    0 28px 40px -12px rgba(22, 22, 26, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.35);
  transform: scale(1.06);
  animation: bob 6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: scale(1.06) translateY(0); }
  50% { transform: scale(1.06) translateY(-6px); }
}

/* ---------- Hero coins: burst out of the ฿ coin in the Swap banner ---------- */
/*
  Layout is set by data-coins on .phone3d in index.html:
    halo  = coins float around the outside of the phone (in use)
    orbit = small THBT over the banner, the others orbiting around it (kept as an alternative)
  Positions are in --u units (≈ px on a 300px-wide phone), relative to the ฿ coin in the banner.
  Negative y = up. z is how far the coin floats out of the screen.
*/
.phone3d {
  --u: 0.9px; /* size unit for the coins; smaller on phones */
  --burst: 60px; /* how far the whole group comes out of the screen */
  --orbit-r: 120;
  --orbit-tilt: 64deg;
  --orbit-time: 14s;
  /* THBT position and size (overridden per layout) */
  --hx: 0;
  --hy: 0;
  --hz: 40px;
  --hs: 84;
}

.phone3d[data-coins="orbit"] {
  --burst: 110px;
  --hx: -50; --hy: -150; --hs: 66;
  --orbit-r: 140;
}

/* Halo: a small THBT off the phone's top-right, the other five around the phone. */
.phone3d[data-coins="halo"] {
  --hx: 130; --hy: -230; --hz: 70px; --hs: 52;
}

/* Small coins, in order: USDT, USDC, EURC, XSGD, AUDD.  --x --y --z position, --s size, --d bob delay */
[data-coins="halo"] .coin-slot:nth-child(1) { --x: -200; --y: -150; --z: 50px; --s: 42; --d: -0s; }
[data-coins="halo"] .coin-slot:nth-child(2) { --x: 150; --y: -60; --z: 60px; --s: 44; --d: -0.8s; }
[data-coins="halo"] .coin-slot:nth-child(3) { --x: -195; --y: 90; --z: 40px; --s: 42; --d: -1.6s; }
[data-coins="halo"] .coin-slot:nth-child(4) { --x: 140; --y: 140; --z: 50px; --s: 40; --d: -2.4s; }
[data-coins="halo"] .coin-slot:nth-child(5) { --x: -160; --y: -280; --z: 40px; --s: 38; --d: -3.2s; }

.coin-burst,
.coin-emerge,
.coin-orbit,
.coin-slot,
.coin-counter,
.coin-face,
.coin-hero {
  position: absolute;
  transform-style: preserve-3d;
}

/* Centre of the ฿ coin in the banner: (247.5, 478) in the 375×812 frame. */
.coin-burst {
  left: calc(247.5 / 375 * 100%);
  top: calc(478 / 812 * 100%);
  width: 0;
  height: 0;
  transform: translateZ(calc(var(--burst) * (1 - var(--p))));
  transition: transform 250ms var(--ease-out);
}

/* On load the coins fly out of the banner. */
.coin-emerge {
  inset: 0;
  animation: emerge 1.4s var(--ease-out) 0.3s both;
}

@keyframes emerge {
  from { transform: translateZ(calc(var(--burst) * -1)) scale(0.2); }
  to { transform: none; }
}

/* THBT: the main coin, with a gentle wobble. */
.coin-hero {
  left: calc(var(--hs) * var(--u) / -2);
  top: calc(var(--hs) * var(--u) / -2);
  width: calc(var(--hs) * var(--u));
  transform: translate3d(calc(var(--hx) * var(--u)), calc(var(--hy) * var(--u)), var(--hz));
  animation: wobble 5s ease-in-out infinite alternate;
}

@keyframes wobble {
  from { transform: translate3d(calc(var(--hx) * var(--u)), calc(var(--hy) * var(--u)), var(--hz)) rotateY(-22deg) rotateX(6deg); }
  to { transform: translate3d(calc(var(--hx) * var(--u)), calc(var(--hy) * var(--u)), var(--hz)) rotateY(22deg) rotateX(-6deg); }
}

.coin-hero img,
.coin-face img {
  display: block;
  width: 100%;
  height: auto;
  opacity: calc(1 - var(--p));
}

.coin-hero img {
  filter: drop-shadow(0 14px 18px rgba(22, 22, 26, 0.3));
}

.coin-face img {
  filter: drop-shadow(0 10px 12px rgba(22, 22, 26, 0.25));
}

.coin-orbit,
.coin-slot,
.coin-counter {
  inset: 0;
}

.coin-face {
  left: calc(var(--s, 44) * var(--u) / -2);
  top: calc(var(--s, 44) * var(--u) / -2);
  width: calc(var(--s, 44) * var(--u));
}

/* Orbit layout: a tilted ring spinning around THBT; each coin cancels the spin and tilt to face the viewer. */
[data-coins="orbit"] .coin-orbit {
  transform: translate(calc(var(--hx) * var(--u)), calc(var(--hy) * var(--u))) rotateX(var(--orbit-tilt));
  animation: orbit var(--orbit-time) linear infinite;
}

@keyframes orbit {
  from { transform: translate(calc(var(--hx) * var(--u)), calc(var(--hy) * var(--u))) rotateX(var(--orbit-tilt)) rotateZ(0deg); }
  to { transform: translate(calc(var(--hx) * var(--u)), calc(var(--hy) * var(--u))) rotateX(var(--orbit-tilt)) rotateZ(360deg); }
}

[data-coins="orbit"] .coin-slot {
  --s: 40;
  transform: rotateZ(var(--a)) translateX(calc(var(--orbit-r) * var(--u))) rotateZ(calc(var(--a) * -1));
}

[data-coins="orbit"] .coin-counter {
  animation: orbit-counter var(--orbit-time) linear infinite;
}

@keyframes orbit-counter {
  from { transform: rotateZ(0deg); }
  to { transform: rotateZ(-360deg); }
}

[data-coins="orbit"] .coin-face {
  transform: rotateX(calc(var(--orbit-tilt) * -1));
}

/* Fixed layouts: each coin sits at its own spot and bobs gently. */
.phone3d:not([data-coins="orbit"]) .coin-slot {
  transform: translate3d(calc(var(--x) * var(--u)), calc(var(--y) * var(--u)), var(--z));
}

.phone3d:not([data-coins="orbit"]) .coin-face {
  animation: coin-bob 4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes coin-bob {
  0%, 100% { transform: translateY(0) rotateY(-14deg); }
  50% { transform: translateY(-10px) rotateY(14deg); }
}

/* ---------- Trust box ---------- */
/* Left: shield, heading, legal statement, then the pilot limits in a row.
   Right: the onboarding phone, rising from the bottom edge and cut off there. */
.trust-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 82% 75%, rgba(246, 128, 47, 0.14) 0, rgba(246, 128, 47, 0) 40%),
    var(--color-card);
}

.trust-copy {
  align-self: center;
  padding: clamp(1.75rem, 3.5vw, 3rem) 0;
}

.trust-phone {
  position: relative;
  min-height: 340px;
}

.tp-screen {
  position: absolute;
  top: clamp(2rem, 3.5vw, 3rem);
  left: 50%;
  translate: -50% 0;
  width: min(270px, 90%);
  aspect-ratio: 375 / 812;
  overflow: hidden;
  border: 8px solid #111113;
  border-radius: 42px;
  background: #fff;
  box-shadow: 0 30px 60px -24px rgba(22, 22, 26, 0.45);
}

.tp-base {
  display: block;
  width: 100%;
  height: auto;
}

/* The illustration area of the screen: y 95–377, 376 wide, in the 375×812 frame. */
.tp-art {
  position: absolute;
  left: 0;
  top: calc(95 / 812 * 100%);
  width: calc(376 / 375 * 100%);
  height: calc(282 / 812 * 100%);
  overflow: hidden;
}

.tp-art img {
  position: absolute;
  height: auto;
}

.tp-rings {
  inset: 0;
  width: 100%;
}

/* Coins float gently, each on its own beat; the big THBT coin rocks a little too. */
.tp-coin {
  animation: tp-float 3.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.tp-thbt {
  animation: tp-rock 4.2s ease-in-out infinite;
  transform-origin: 50% 80%;
}

@keyframes tp-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9%) rotate(-5deg); }
}

@keyframes tp-rock {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5%) rotate(4deg); }
}

.trust-main {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.trust-main h2 {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 700;
  line-height: 1.35;
}

.trust-main p {
  margin-top: 0.5rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Pilot limits: three in a row under the text. */
.trust-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.5rem);
  border-top: 1px solid var(--color-line);
}

.trust-facts dt {
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.trust-facts dd {
  margin: 0.125rem 0 0;
  font-size: 1.0625rem;
  font-weight: 700;
}

/* ---------- Why THBT: bento grid ---------- */
/*
  Desktop (4 columns):
    wallet wallet stable safe
    wallet wallet token  easy
    swap   swap   swap   coupon
*/
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "wallet wallet stable safe"
    "wallet wallet token  easy"
    "swap   swap   swap   coupon";
  gap: clamp(12px, 1.4vw, 20px);
}

.tile-wallet { grid-area: wallet; }
.tile-swap { grid-area: swap; }
.tile-coupon { grid-area: coupon; }

.feature,
.tile {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
}

/* White feature cards: orange icon, title, one line. */
.feature {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 250px;
  padding: clamp(1.5rem, 2.2vw, 2rem);
  background: var(--color-card);
}

.feature h3,
.tile h3 {
  margin-top: 1.5rem;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.feature h3 {
  margin-top: 1.25rem;
}

.feature p,
.tile p {
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.tile h3 + p {
  margin-top: 0.625rem;
}

/* Phone tiles: a phone mockup cropped by the bottom of a coloured tile. */
.tile {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 2.6vw, 2.5rem);
}

.tile .tile-text h3 {
  margin-top: 0;
}

.tile-phone {
  position: relative;
  flex: 1 1 0;
  min-height: 240px;
  margin-top: 1.75rem;
}

/* The screenshot gets a dark bezel; whatever falls below the tile is cut off. */
.tile-phone img {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  width: min(290px, 74%);
  height: auto;
  border: 8px solid #111113;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 30px 60px -20px rgba(22, 22, 26, 0.45);
}

.tile-wallet {
  background: var(--brand-gradient);
  color: #fff;
}

.tile-wallet p {
  color: rgba(255, 255, 255, 0.9);
}

.tile-wallet .tile-text {
  max-width: 26rem;
}

.tile-swap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  min-height: 340px;
  padding-bottom: 0;
  background: var(--color-navy);
  color: #fff;
}

.tile-swap p {
  color: rgba(255, 255, 255, 0.75);
}

.tile-swap .tile-text {
  align-self: center;
  padding-bottom: clamp(1.5rem, 2.6vw, 2.5rem);
}

.tile-swap .coin-row {
  --ring: var(--color-navy);
  margin-top: 1.5rem;
}

.tile-swap .tile-phone {
  margin-top: 0.5rem;
}

.tile-swap .tile-phone img {
  width: min(260px, 82%);
}

.tile-coupon {
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--color-card);
}

.tile .tile-big {
  color: var(--color-brand);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

.tile-big strong {
  display: block;
  margin-top: 0.25rem;
  font-size: clamp(4rem, 7vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* ---------- Our Service: feature story (autoplaying phone + spotlight) ---------- */
.story-sticky {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 440px);
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 7vw, 6.5rem);
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-card);
  background: var(--color-card);
}

.story-title {
  order: -2; /* title, then chips, then the text */
}

.phone {
  /* Fits the viewport height. 0.4618 = 375 / 812 */
  width: min(290px, calc((100svh - 140px) * 0.4618));
  padding: 8px;
  border-radius: 44px;
  background: #111113;
  box-shadow: 0 30px 60px -24px rgba(22, 22, 26, 0.45);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  aspect-ratio: 375 / 812;
  background: #fff;
}

.screen-zoom {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform var(--dur-step) var(--ease-out);
}

.screen-zoom img {
  display: block;
  width: 100%;
  height: auto;
}

/*
  Spotlight: a box drawn exactly round one part of the wallet screen.
  Its huge shadow dims everything else; a white ring and a soft orange glow mark the edge.
  Position, size and corner radius come from the step's data-x / -y / -w / -h / -r (see story.js).
*/
.spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: 0 0 3px 200vmax rgba(22, 22, 26, 0.42);
  transition:
    left var(--dur-step) var(--ease-out),
    top var(--dur-step) var(--ease-out),
    width var(--dur-step) var(--ease-out),
    height var(--dur-step) var(--ease-out),
    border-radius var(--dur-step) var(--ease-out);
  pointer-events: none;
}

.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.95),
    0 0 14px 2px rgba(242, 107, 29, 0.7);
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.story-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* Text panel: no rounded clip, so letters at the edges are never cut off. */
.story-viewport {
  overflow: hidden;
}

.story-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform var(--dur-step) var(--ease-out);
}

.story-card {
  flex: 0 0 100%;
  padding: 0.25rem 0 0.5rem; /* bottom room for descenders */
  opacity: 0.3;
  transition: opacity var(--dur-step) var(--ease-out);
}

.story-card.is-active {
  opacity: 1;
}

.story-card h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.story-card p {
  color: var(--color-muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* Chips: every feature name as a pill; the playing one is orange with a timer line along its bottom. */
.story-nav {
  order: -1;
}

.story-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.story-dots button {
  position: relative;
  padding: 0.5rem 0.95rem;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-page);
  color: var(--color-ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap; /* a chip never breaks onto two lines */
  cursor: pointer;
  transition: border-color 200ms, background-color 200ms, color 200ms;
}

.story-dots button::before {
  content: attr(aria-label);
}

.story-dots button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.7);
  transform: scaleX(0);
  transform-origin: left;
}

.story-dots button:hover {
  border-color: var(--color-ink);
}

.story-dots button[aria-current="step"] {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: #fff;
}

.story-dots button[aria-current="step"]::after {
  animation: story-timer var(--hold, 1500ms) linear forwards;
}

.story.is-paused .story-dots button[aria-current="step"]::after {
  animation-play-state: paused;
}

@keyframes story-timer {
  to { transform: scaleX(1); }
}

.story-dots button:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

/* ---------- Swap tutorial ---------- */
/* Steps on the left (pick one, or use Back / Next), the phone on the right showing that step. */
.swap-card {
  display: grid;
  grid-template-columns: minmax(0, 480px) auto;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 7vw, 6.5rem);
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-card);
  background: var(--color-card);
}

.swap-intro {
  margin-bottom: 1.75rem;
}

.swap-steps {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swap-steps button {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms, color 180ms;
}

.swap-steps button:hover {
  color: var(--color-ink);
}

.step-num {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--color-line);
  border-radius: 50%;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background-color 180ms, border-color 180ms, color 180ms;
}

.swap-steps li.is-done .step-num {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.swap-steps li.is-active button {
  background: var(--color-brand-soft);
  color: var(--color-ink);
  font-weight: 600;
}

.swap-steps li.is-active .step-num {
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: #fff;
}

.swap-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
}

.swap-count {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.swap-restart-label,
.swap-demo.is-last .swap-next-label {
  display: none;
}

.swap-demo.is-last .swap-restart-label {
  display: inline;
}

.swap-phone {
  width: min(290px, calc((100svh - 140px) * 0.46), 72vw);
  padding: 8px;
  border-radius: 44px;
  background: #111113;
  box-shadow: 0 30px 60px -24px rgba(22, 22, 26, 0.45);
}

.swap-screen {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  aspect-ratio: 598 / 1300;
  background: #fff;
}

.swap-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

/* The outgoing screen stays underneath while the new one animates in. */
.swap-shot.is-prev {
  opacity: 1;
  z-index: 1;
}

.swap-shot.is-active {
  opacity: 1;
  z-index: 2;
}

.swap-shot.is-active[data-enter="fade"],
.swap-shot.is-active.is-back[data-enter] {
  animation: shot-fade 400ms var(--ease-out);
  box-shadow: none;
}

/* Bottom sheets (token picker, confirm) slide up a little. */
.swap-shot.is-active[data-enter="sheet"] {
  animation: shot-sheet 450ms var(--ease-out);
}

/* New page (success) pushes in from the right. */
.swap-shot.is-active[data-enter="push"] {
  animation: shot-push 450ms var(--ease-out);
  box-shadow: -12px 0 24px rgba(22, 22, 26, 0.18);
}

@keyframes shot-fade {
  from { opacity: 0; }
}

@keyframes shot-sheet {
  from { opacity: 0; transform: translateY(12%); }
}

@keyframes shot-push {
  from { transform: translateX(100%); }
}

/* Where to tap next: a pulsing orange ring on the screen. Tapping it goes to the next step. */
.swap-tap {
  position: absolute;
  z-index: 3;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  padding: 0;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: rgba(242, 107, 29, 0.55);
  box-shadow: 0 0 0 0 rgba(242, 107, 29, 0.6), 0 6px 16px rgba(22, 22, 26, 0.3);
  cursor: pointer;
  animation: tap-pulse 1.6s var(--ease-out) infinite;
}

.swap-tap[hidden] {
  display: none;
}

@keyframes tap-pulse {
  0% { box-shadow: 0 0 0 0 rgba(242, 107, 29, 0.6), 0 6px 16px rgba(22, 22, 26, 0.3); }
  70%, 100% { box-shadow: 0 0 0 18px rgba(242, 107, 29, 0), 0 6px 16px rgba(22, 22, 26, 0.3); }
}

/* ---------- FAQ ---------- */
/* Title on the left, questions in a white card on the right. */
/* Questions box on the left, title and intro on the right (phones: title on top, see the phone rules). */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.faq-list {
  order: -1;
}

.faq-list {
  padding: 0.5rem clamp(1.25rem, 3vw, 2.25rem);
  border-radius: var(--radius-card);
  background: var(--color-card);
}

.faq-item + .faq-item {
  border-top: 1px solid var(--color-line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.375rem 0;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
  border-radius: 6px;
}

/* Plus that turns into a minus. */
.faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-page);
  color: var(--color-ink);
  transition: background-color 250ms var(--ease-out), color 250ms;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 300ms var(--ease-out);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-icon {
  background: var(--color-brand);
  color: #fff;
}

.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-answer {
  max-width: 62ch;
  padding: 0 3.5rem 1.5rem 0;
}

.faq-answer p {
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.faq-answer p + p {
  margin-top: 0.875rem;
}

/* Smooth open/close where the browser supports it (Chrome 131+); elsewhere it just opens. */
@supports (interpolate-size: allow-keywords) {
  .faq {
    interpolate-size: allow-keywords;
  }

  .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 350ms var(--ease-out), content-visibility 350ms allow-discrete;
  }

  .faq-item[open]::details-content {
    block-size: auto;
  }
}

/* Room under the last section (no footer for now). */
main {
  padding-bottom: var(--section-gap);
}

/* ---------- Language switcher ----------
   "🌐 English ▾" as plain underlined text; it opens a white menu of full language names,
   with a tick on the current one. Built by assets/js/i18n.js. */
.lang-switch {
  position: relative;
  justify-self: end;
  font-size: 0.8125rem;
  font-weight: 600;
}

.lang-switch button {
  font: inherit;
  cursor: pointer;
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 40px;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.9375rem;
}

.lang-current {
  display: none; /* the toggle shows the full name instead of the code */
}

.lang-current-name {
  text-decoration: underline 1.5px;
  text-underline-offset: 5px;
}

.lang-caret {
  font-size: 0.7em;
  transition: transform 200ms var(--ease-out);
}

.lang-switch.is-open .lang-caret {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px -12px rgba(22, 22, 26, 0.35), 0 0 0 1px rgba(22, 22, 26, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 180ms;
}

.lang-switch.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-ink);
  font-size: 0.9375rem;
  text-align: left;
}

.lang-menu button:hover {
  background: rgba(22, 22, 26, 0.05);
}

.lang-menu button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lang-menu button[aria-pressed="true"] {
  background: var(--color-brand-soft);
}

.lang-menu button[aria-pressed="true"]::after {
  content: "✓";
  color: var(--color-brand);
}

.lang-short {
  display: none;
}

/* ---------- Per-language typography ---------- */
:lang(th) body,
body:lang(th) {
  font-family: "Noto Sans Thai", var(--font-sans);
}

:lang(my) body,
body:lang(my) {
  font-family: "Noto Sans Myanmar", "Myanmar Text", "Padauk", var(--font-sans);
}

/* Thai and Myanmar scripts have tall stacked marks; give them more room. */
:lang(th) h2,
:lang(th) h3,
:lang(th) .hero-lead,
:lang(my) h2,
:lang(my) h3,
:lang(my) .hero-lead {
  line-height: 1.4;
  letter-spacing: 0;
}

:lang(th) p,
:lang(my) p {
  line-height: 1.7;
}

/* Visually hidden, still read by screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- News & highlights ("Stay in the loop") ---------- */
/* Title + arrows on the left; cards from there to the right edge of the screen (they run off it). */
.news {
  /* How far the cards may run past the content width: to the screen edge. */
  --bleed: calc((100vw - min(var(--wrap), 100vw - var(--gutter) * 2)) / 2);
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.news-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.news-side h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.news-side p {
  margin-top: 0.875rem;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.5;
}

.news-arrows {
  display: flex;
  gap: 0.5rem;
  margin-top: auto; /* at the bottom of the left column */
  padding-top: 2rem;
}

.news-arrows button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-ink);
  box-shadow: 0 4px 12px -6px rgba(22, 22, 26, 0.25);
  cursor: pointer;
  transition: background-color 180ms, color 180ms, opacity 180ms;
}

.news-arrows button:hover:not(:disabled) {
  background: var(--color-brand);
  color: #fff;
}

.news-arrows button:disabled {
  opacity: 0.4;
  cursor: default;
}

.news-arrows button:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

.news-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(270px, 26vw, 380px); /* ≈ 2½ cards visible on a 1440 screen */
  gap: clamp(12px, 1.2vw, 16px);
  margin: 0 calc(var(--bleed) * -1) 0 0;
  padding: 6px var(--bleed) 10px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
}

.news-list::-webkit-scrollbar {
  display: none;
}

.news-list li {
  scroll-snap-align: start;
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 10px 1.5rem;
  border-radius: var(--radius-card);
  background: var(--color-card);
  color: inherit;
  text-decoration: none;
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(22, 22, 26, 0.3);
}

.news-card:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

/* Thumbnail: a coloured tile with a THBT visual, phone screens cropped by the bottom edge. */
.news-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 10px);
}

.thumb-orange { background: var(--brand-gradient); }
.thumb-navy { background: var(--color-navy); }
.thumb-soft { background: var(--color-brand-soft); }
.thumb-white { background: var(--color-page); }

.news-thumb .coin-row img {
  width: clamp(34px, 3.4vw, 46px);
  height: auto;
  margin-left: -10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #f2611f;
}

.news-thumb .coin-row img:first-child {
  margin-left: 0;
}

.news-phone {
  position: absolute;
  top: 14%;
  left: 50%;
  translate: -50% 0;
  width: 38%;
  height: auto;
  border: 5px solid #111113;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 40px -16px rgba(22, 22, 26, 0.5);
}

.news-big {
  color: var(--color-brand);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.news-tag {
  align-self: flex-start;
  margin: 1.125rem 0.875rem 0;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--color-brand-soft);
  color: var(--color-brand-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

.news-card h3 {
  margin: 0.75rem 0.875rem 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.news-card p {
  margin: 0.5rem 0.875rem 0;
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* ---------- Closing banner (to Support) ---------- */
.cta-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: clamp(380px, 36vw, 500px);
  padding: 0 clamp(2rem, 7vw, 8rem);
  overflow: hidden;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 78% 70%, rgba(242, 107, 29, 0.28) 0, rgba(242, 107, 29, 0) 45%),
    var(--color-navy); /* same navy as the swap tiles */
  color: #fff;
}

.cta-copy {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.cta-copy h2 {
  max-width: 11em;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.cta-copy p {
  max-width: 26rem;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.5;
}

.cta-copy .btn {
  margin-top: 2rem;
}

.btn-light {
  background: #fff;
  color: var(--color-ink);
}

.btn-light:hover {
  background: var(--color-brand-soft);
}

.cta .btn:focus-visible {
  outline-color: #fff;
}

/* The phone rises from the bottom edge of the banner and is cut off there. */
.cta-phone {
  align-self: stretch;
  position: relative;
}

.cta-phone img {
  position: absolute;
  top: clamp(2rem, 4vw, 3.5rem);
  left: 50%;
  translate: -50% 0;
  width: min(320px, 80%);
  height: auto;
  border: 9px solid #111113;
  border-radius: 46px;
  background: #fff;
  box-shadow: 0 30px 60px -20px rgba(22, 22, 26, 0.5);
}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1023px) {
  /* Trust box: phone moves under the text, still cut off by the bottom edge. */
  .trust-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .trust-copy {
    padding-bottom: 0;
  }

  .trust-phone {
    min-height: 320px;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "wallet wallet"
      "stable safe"
      "token  easy"
      "swap   swap"
      "coupon coupon";
  }

  .tile-wallet {
    min-height: 520px;
  }

}

/* ==========================================================================
   Phone: one column, everything centred
   ========================================================================== */
@media (max-width: 799px) {
  :root {
    --header-h: 52px;
  }

  .site-header {
    gap: 0.75rem;
  }

  /* The name can wrap onto two lines rather than run into the language button. */
  .site-title {
    font-size: 0.8125rem;
    line-height: 1.25;
    white-space: normal;
  }

  /* Hero: copy on top, phone underneath. */
  .hero-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 2.5rem;
    height: auto;
    padding: 2.5rem 1.25rem 3.5rem;
    text-align: center;
    background:
      radial-gradient(circle at 50% 78%, rgba(246, 128, 47, 0.16) 0, rgba(246, 128, 47, 0) 50%),
      var(--color-card);
  }

  .hero-copy {
    align-items: center;
  }

  .hero-title {
    font-size: clamp(5rem, 28vw, 7.5rem);
  }

  .hero-lead {
    font-size: 1.5rem;
  }

  .hero-tokens {
    flex-direction: column;
    gap: 0.625rem;
  }

  .phone3d {
    width: min(210px, 56vw);
    --u: 0.68px;
  }

  .trust-main {
    flex-direction: column;
  }

  .trust-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "wallet"
      "stable"
      "safe"
      "token"
      "easy"
      "swap"
      "coupon";
  }

  /* Feature cards: icon on the left, text on the right, so the four cards stay short. */
  .feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
    column-gap: 1rem;
    row-gap: 0.375rem;
    min-height: 0;
    padding: 1.375rem;
  }

  .feature .icon-badge {
    grid-row: span 2;
  }

  .feature h3 {
    margin-top: 0;
    font-size: 1.1875rem;
  }

  .tile-wallet {
    min-height: 480px;
  }

  .tile-swap {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
  }

  .tile-swap .tile-text {
    padding-bottom: 0;
  }

  .tile-swap .tile-phone {
    min-height: 280px;
    margin-top: 1.75rem;
  }

  /*
    Our Service on phones, everything centred, in this order:
    title → chips (wrapped, centred) → phone → feature text.
    .story-copy becomes "display: contents" so its parts can sit above and below the phone.
  */
  .story-sticky {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0;
    padding: 2.5rem 0;
    text-align: center;
  }

  .story-copy {
    display: contents;
  }

  .story-title {
    order: 1;
    padding: 0 1rem;
  }

  .story-nav {
    order: 2;
    width: 100%;
    min-width: 0;
    margin-top: 1.25rem;
  }

  .story-sticky > .phone {
    order: 3;
    margin-top: 1.5rem;
  }

  .story-viewport {
    order: 4;
    width: 100%;
    max-width: 420px;
    min-height: 5em; /* keeps the layout steady when text length changes */
    margin-top: 1.25rem;
  }

  /* Side padding lives inside each card so the neighbouring cards stay hidden. */
  .story-card {
    padding: 0.25rem 1.25rem 0.5rem;
  }

  .story-dots {
    justify-content: center;
    gap: 0.375rem;
    padding: 0 1rem;
  }

  .story-dots button {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .phone,
  .swap-phone {
    width: min(290px, 72vw);
  }

  .story-card h3 {
    font-size: 1.5rem;
  }

  .story-card p {
    font-size: 0.9375rem;
  }

  /* Swap on phones: title → phone → the current step only → Back / Next. */
  .swap-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0;
    padding: 2.5rem 1.25rem;
    text-align: center;
  }

  .swap-guide {
    display: contents;
  }

  .swap-intro {
    order: 1;
    margin-bottom: 1.5rem;
  }

  .swap-phone {
    order: 2;
  }

  .swap-steps {
    order: 3;
    width: 100%;
    min-height: 4.5em;
    margin-top: 1.25rem;
  }

  .swap-steps li {
    display: none;
  }

  .swap-steps li.is-active {
    display: block;
  }

  .swap-steps li.is-active button {
    justify-content: center;
    background: transparent;
    font-size: 1.0625rem;
    text-align: center;
    cursor: default;
  }

  .swap-steps .step-num {
    display: none;
  }

  .swap-controls {
    order: 4;
    width: 100%;
    max-width: 360px;
    margin-top: 0.75rem;
  }

  .swap-controls .btn {
    min-width: 0;
    padding: 0 1rem;
  }

  .faq {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .faq-intro {
    text-align: center;
  }

  .faq-list {
    order: 0; /* back under the title on phones */
  }

  /* News on phones: title on top (centred), swipe the cards, no arrow buttons. */
  .news {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .news-side {
    align-items: center;
    text-align: center;
  }

  .news-arrows {
    display: none;
  }

  .news-list {
    grid-auto-columns: 78%;
    margin-left: calc(var(--bleed) * -1);
    padding-left: var(--bleed);
    scroll-padding-inline: var(--bleed);
  }

  /* Closing banner: text on top, phone underneath, cut off by the bottom edge. */
  .cta-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 1.5rem;
    text-align: center;
  }

  .cta-copy {
    padding: 2.75rem 0 2rem;
  }

  .cta-copy h2,
  .cta-copy p {
    margin-inline: auto;
  }

  .cta-phone {
    height: 300px;
  }

  .cta-phone img {
    top: 0;
    width: min(260px, 72%);
  }

  .faq-answer {
    padding-right: 0;
  }
}

/* ==========================================================================
   Reduced motion: no zoom, no sliding, no pulsing
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .news-card,
  .screen-zoom,
  .spot,
  .story-track,
  .story-card,
  .phone3d,
  .p3-pop,
  .site-header,
  .faq-item::details-content,
  .faq-icon,
  .faq-icon::before,
  .faq-icon::after {
    transition: none;
  }

  .tp-coin,
  .tp-thbt,
  .spot::before,
  .hero-float,
  .p3-pop-face,
  .coin-emerge,
  .coin-hero,
  .coin-orbit,
  .coin-counter,
  .coin-face,
  .swap-shot.is-active,
  .swap-tap {
    animation: none !important;
  }

  .story-dots button::after {
    animation: none !important;
  }
}

/* ==========================================================================
   Design options (switched from the Options panel, assets/js/options.js)
   Each option is a data attribute on <html>. The first option of each group is the page as designed.
   ========================================================================== */

/* --- 1. Hero background --- */
/* B. Clear: no card colour, the hero sits straight on the grey page. */
[data-hero="clear"] .hero-card {
  background: transparent;
}

[data-hero="clear"] .hero-tokens .coin-row {
  --ring: var(--color-page);
}

/* C. Orange: the card turns brand orange, text and button turn white. */
[data-hero="orange"] .hero-card {
  background:
    radial-gradient(circle at 74% 52%, rgba(255, 214, 160, 0.45) 0, rgba(255, 214, 160, 0) 45%),
    var(--brand-gradient);
  color: #fff;
}

[data-hero="orange"] .hero-title {
  background: linear-gradient(180deg, #ffffff 40%, #ffe2c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-hero="orange"] .hero-about,
[data-hero="orange"] .hero-tokens {
  color: rgba(255, 255, 255, 0.88);
}

[data-hero="orange"] .hero-tokens .coin-row {
  --ring: #f2611f;
}

[data-hero="orange"] .hero .btn-primary {
  background: #fff;
  color: var(--color-brand-strong);
}

[data-hero="orange"] .hero .btn-primary:hover {
  background: var(--color-brand-soft);
}

[data-hero="orange"] .hero .btn:focus-visible {
  outline-color: #fff;
}

/* --- 1.1 Programmable Payment box background --- */
/* A. Navy: same navy as the Swap tile; text turns white. */
[data-trust="navy"] .trust-card {
  background:
    radial-gradient(circle at 82% 80%, rgba(242, 107, 29, 0.3) 0, rgba(242, 107, 29, 0) 42%),
    var(--color-navy);
  color: #fff;
}

[data-trust="navy"] .trust-main p,
[data-trust="navy"] .trust-facts dt {
  color: rgba(255, 255, 255, 0.7);
}

[data-trust="navy"] .trust-facts {
  border-top-color: rgba(255, 255, 255, 0.14);
}

[data-trust="navy"] .tp-screen {
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

/* B. Soft orange: a light orange tint. */
[data-trust="soft"] .trust-card {
  background:
    radial-gradient(circle at 82% 80%, rgba(255, 255, 255, 0.8) 0, rgba(255, 255, 255, 0) 42%),
    var(--color-brand-soft);
}

[data-trust="soft"] .trust-facts {
  border-top-color: rgba(242, 107, 29, 0.18);
}

/* C. White: as designed in the stylesheet above (same as the hero). */

/* --- 2. Feature card icons (also used for the previews in the panel) --- */
/* B. Solid: white icon on a solid orange square. */
[data-icons="solid"] .feature .icon-badge,
.opt-icon[data-style="solid"] {
  background: var(--color-brand);
  color: #fff;
}

/* C. Duotone: a bigger icon, no box; the main shape is filled with a light orange. */
[data-icons="duo"] .feature .icon-badge,
.opt-icon[data-style="duo"] {
  background: none;
  color: var(--color-brand);
}

[data-icons="duo"] .feature .icon-badge {
  place-items: start;
  width: 52px;
  height: 52px;
}

[data-icons="duo"] .feature .icon-badge svg {
  width: 44px;
  height: 44px;
  stroke-width: 1.6;
}

[data-icons="duo"] .feature .icon-badge svg > :first-child,
.opt-icon[data-style="duo"] svg > :first-child {
  fill: currentColor;
  fill-opacity: 0.2;
}

/* D. Coin: a round orange coin with a soft glow, like the THBT coin. */
[data-icons="coin"] .feature .icon-badge,
.opt-icon[data-style="coin"] {
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.28),
    0 10px 20px -8px rgba(240, 74, 28, 0.6);
}

[data-icons="coin"] .feature .icon-badge {
  width: 52px;
  height: 52px;
}

/* --- 3. FAQ --- */
/* B. Cards: every question is its own white card; the open one gets an orange outline. */
[data-faq="cards"] .faq-list {
  display: grid;
  gap: 10px;
  padding: 0;
  background: none;
}

[data-faq="cards"] .faq-item {
  padding: 0 clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: 20px;
  background: var(--color-card);
  transition: box-shadow 250ms var(--ease-out);
}

[data-faq="cards"] .faq-item + .faq-item {
  border-top: 0;
}

[data-faq="cards"] .faq-item[open] {
  box-shadow: inset 0 0 0 1.5px var(--color-brand);
}

/* C. Chevron: a down arrow instead of the plus; it flips up and turns orange when open. */
[data-faq="chevron"] .faq-icon,
[data-faq="chevron"] .faq-item[open] .faq-icon {
  background: none;
  color: var(--color-ink);
}

[data-faq="chevron"] .faq-icon::before {
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  background: none;
  transform: translate(-50%, -70%) rotate(45deg);
}

[data-faq="chevron"] .faq-icon::after {
  display: none;
}

[data-faq="chevron"] .faq-item[open] .faq-icon {
  color: var(--color-brand);
}

[data-faq="chevron"] .faq-item[open] .faq-icon::before {
  transform: translate(-50%, -30%) rotate(225deg);
}

/* D. Plain: no box, hairlines straight on the grey page, bigger questions. */
[data-faq="plain"] .faq-list {
  padding: 0;
  border-top: 1px solid #cfcfd5;
  border-radius: 0;
  background: none;
}

[data-faq="plain"] .faq-item {
  border-bottom: 1px solid #cfcfd5;
}

[data-faq="plain"] .faq-item + .faq-item {
  border-top: 0;
}

[data-faq="plain"] .faq-item summary {
  padding: 1.625rem 0;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
}

[data-faq="plain"] .faq-icon {
  background: none;
  box-shadow: inset 0 0 0 1.5px #b9b9c0;
}

[data-faq="plain"] .faq-item[open] .faq-icon {
  box-shadow: none;
}

/* --- The panel (bottom-left: bottom-right belongs to the chat coin, assets/css/chat-widget.css) --- */
.opt-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-ink);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 24px -8px rgba(22, 22, 26, 0.45);
  cursor: pointer;
}

.opt-panel {
  position: fixed;
  left: 16px;
  bottom: 72px;
  z-index: 50;
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100svh - 140px);
  overflow-y: auto;
  padding: 1rem 1rem 0.75rem;
  border-radius: 20px;
  background: #fff;
  color: var(--color-ink);
  font-family: var(--font-sans);
  box-shadow: 0 24px 60px -16px rgba(22, 22, 26, 0.4), 0 0 0 1px rgba(22, 22, 26, 0.06);
}

.opt-panel[hidden] {
  display: none;
}

.opt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.opt-head h2 {
  font-size: 1rem;
  font-weight: 700;
}

.opt-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--color-page);
  color: var(--color-ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.opt-group {
  margin: 0;
  padding: 0.75rem 0;
  border: 0;
  border-top: 1px solid var(--color-line);
}

.opt-group legend {
  float: left; /* keeps the legend inside the top border */
  width: 100%;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

.opt-choice {
  clear: both;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.3;
  cursor: pointer;
}

.opt-choice:hover {
  background: var(--color-page);
}

.opt-choice:has(input:checked) {
  background: var(--color-brand-soft);
}

.opt-choice input {
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--color-brand);
}

.opt-label b {
  color: var(--color-brand-strong);
}

.opt-swatch {
  color: var(--color-brand);
  font-size: 0.75rem;
  font-weight: 800;
}

.opt-swatch,
.opt-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(22, 22, 26, 0.12);
}

/* A. (default) preview: orange line on a light orange square. */
.opt-icon {
  background: var(--color-brand-soft);
  color: var(--color-brand);
  box-shadow: none;
}

.opt-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 0 0.25rem;
  border-top: 1px solid var(--color-line);
}

.opt-foot button {
  min-height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #fff;
  color: var(--color-ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.opt-toggle:focus-visible,
.opt-panel button:focus-visible,
.opt-choice:has(input:focus-visible) {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

@media print {
  .opt-toggle,
  .opt-panel {
    display: none;
  }
}
