/* talkietype.com — brand palette and font shared with the apps (apps/mobile/src/ui/theme.ts):
   blue #2563EB, white, navy #14213D, gold #D4A84B (small accents only); Prompt (SIL OFL). */
@font-face { font-family: "Prompt"; src: url("/fonts/Prompt-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Prompt"; src: url("/fonts/Prompt-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Prompt"; src: url("/fonts/Prompt-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

/* ── Design tokens ──────────────────────────────────────── */

:root {
  /* Brand colours (unchanged). Gold stays a small accent. */
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-ink: #1e3a8a;
  --blue-bright: #4f86f7;
  --blue-soft: #e8effd;
  --blue-softer: #f3f7fe;
  --navy: #14213d;
  --navy-2: #1c2c50;
  --muted: #5a6478;
  --border: #dde3ee;
  --gold: #d4a84b;
  --gold-soft: #faf3e3;
  --bg: #ffffff;
  --on-dark: #ffffff;
  --on-dark-muted: #b9c4dc;

  /* Type scale. Thai has marks above and below the line, so headings keep generous line height. */
  --fs-display: clamp(44px, 7.4vw, 96px);
  --fs-h1: clamp(36px, 5.4vw, 64px);
  --fs-h2: clamp(30px, 4.4vw, 52px);
  --fs-h3: clamp(20px, 1.8vw, 23px);
  --fs-lead: clamp(18px, 1.55vw, 21px);
  --fs-body: 17px;
  --fs-small: 14px;
  --lh-tight: 1.22;
  --lh-head: 1.3;

  /* Shape and depth. */
  --radius: 16px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --shadow: 0 1px 2px rgba(20, 33, 61, 0.05), 0 10px 30px rgba(20, 33, 61, 0.07);
  --shadow-lift: 0 2px 4px rgba(20, 33, 61, 0.06), 0 22px 50px rgba(20, 33, 61, 0.14);
  --wrap: 1180px;
  --gutter: 24px;

  /* Motion. Everything that moves uses these; prefers-reduced-motion turns motion off. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.2s;
  --dur: 0.45s;
  --dur-slow: 0.9s;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: "Prompt", "Leelawadee UI", "Segoe UI", system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }

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

h1, h2, h3 { line-height: var(--lh-head); margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }

/* Section links (#features, #how, #privacy) stop below the floating header, not under it. */
section[id] { scroll-margin-top: 76px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Keeps a short Thai phrase on one line. Browsers split Thai into words with a dictionary and can guess wrong
   on loanwords ("ส่งอีเมลมาบอก" broke inside "บอก"); lines then wrap only at the spaces between phrases. */
.nb { white-space: nowrap; }

/* ── Buttons ────────────────────────────────────────────── */

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; font-weight: 500; font-size: 15px; line-height: 1.3; text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast), box-shadow var(--dur-fast), color var(--dur-fast); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.38); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { color: var(--blue); }
.btn .arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ── Logo mark: the bars move like the recording pill's sound wave ── */

/* The bars and smile are painted in the colour behind the mark, so they read as cut-outs (brand.ts). */
.mark { --mark-cut: var(--bg); overflow: visible; }
.mark .mark-bar > *, .mark .mark-smile { fill: var(--mark-cut); }
/* A bar is a body plus two round ends (brand.ts). The bar's whole length goes to S times its rest length
   (S = 1, 0.45, 1.25); only the body stretches and the ends slide, so they stay round. --B is the body's
   rest length; a bar never gets shorter than one round end. */
.mark .mark-b-s { --B: 18.6; }
.mark .mark-b-m { --B: 58.4; }
.mark .mark-b-t { --B: 124.5; }
.mark .mark-bar-body { transform-box: fill-box; transform-origin: center; }
.brand:hover .mark-bar-body, .mark.is-live .mark-bar-body { animation: mark-body 0.9s var(--ease-out) infinite; animation-delay: var(--d, 0s); }
.brand:hover .mark-cap-top, .mark.is-live .mark-cap-top { animation: mark-cap-top 0.9s var(--ease-out) infinite; animation-delay: var(--d, 0s); }
.brand:hover .mark-cap-bottom, .mark.is-live .mark-cap-bottom { animation: mark-cap-bottom 0.9s var(--ease-out) infinite; animation-delay: var(--d, 0s); }
.mark .mark-bar:nth-of-type(2) { --d: 0.12s; }
.mark .mark-bar:nth-of-type(3) { --d: 0.24s; }
.mark .mark-bar:nth-of-type(4) { --d: 0.36s; }
.mark .mark-bar:nth-of-type(5) { --d: 0.48s; }
@keyframes mark-body {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(calc(max(0, (var(--B) + 39) * 0.45 - 39) / var(--B))); }
  70% { transform: scaleY(calc(max(0, (var(--B) + 39) * 1.25 - 39) / var(--B))); }
}
@keyframes mark-cap-top {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(calc((var(--B) - max(0, (var(--B) + 39) * 0.45 - 39)) / 2 * 1px)); }
  70% { transform: translateY(calc((var(--B) - max(0, (var(--B) + 39) * 1.25 - 39)) / 2 * 1px)); }
}
@keyframes mark-cap-bottom {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(calc((max(0, (var(--B) + 39) * 0.45 - 39) - var(--B)) / 2 * 1px)); }
  70% { transform: translateY(calc((max(0, (var(--B) + 39) * 1.25 - 39) - var(--B)) / 2 * 1px)); }
}

/* ── Header: a floating rounded bar ─────────────────────── */

.top { position: sticky; top: 0; z-index: 10; padding: 12px var(--gutter) 0; pointer-events: none; }
.top-inner { position: relative; pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: calc(var(--wrap) - 2 * var(--gutter)); height: 60px; margin: 0 auto; padding: 0 10px 0 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.82); border: 1px solid rgba(221, 227, 238, 0.9); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur); }
.top.is-scrolled .top-inner { background: rgba(255, 255, 255, 0.94); box-shadow: 0 10px 30px rgba(20, 33, 61, 0.1); }
.brand { display: flex; flex: none; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: 19px; }
.brand:hover { color: var(--navy); }
/* The logo mark paired with the TalkieType lettering cut from the original logo (no slogan). */
.brand .brand-mark { display: block; flex: none; height: 34px; width: auto; }
.brand .brand-word { display: block; flex: none; height: 21px; width: auto; }
.nav { display: flex; flex: none; align-items: center; gap: 4px; font-size: 15px; }
.nav-link { color: var(--muted); text-decoration: none; white-space: nowrap; padding: 7px 14px; border-radius: 999px; transition: background-color var(--dur-fast), color var(--dur-fast); }
.nav-link:hover { color: var(--navy); background: var(--blue-softer); }
.nav .lang { color: var(--blue); font-weight: 500; text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; margin: 0 6px; transition: border-color var(--dur-fast); }
.nav .lang:hover { border-color: var(--blue); color: var(--blue); }

/* ── Scroll reveal: site.js adds .js to <html>, then .is-in as things come into view ── */

.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(0.94); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Children of a [data-stagger] block come in one after another. */
.js [data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js [data-stagger].is-in > * { opacity: 1; transform: none; }
[data-stagger] > :nth-child(2) { transition-delay: 0.08s; }
[data-stagger] > :nth-child(3) { transition-delay: 0.16s; }
[data-stagger] > :nth-child(4) { transition-delay: 0.24s; }
[data-stagger] > :nth-child(5) { transition-delay: 0.32s; }
[data-stagger] > :nth-child(6) { transition-delay: 0.4s; }
[data-stagger] > :nth-child(7) { transition-delay: 0.48s; }
[data-stagger] > :nth-child(8) { transition-delay: 0.56s; }
/* Looping animations stop while off screen (site.js toggles .is-paused). */
.is-paused, .is-paused * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-stagger] > * { opacity: 1; transform: none; }
}

/* ── Hero ───────────────────────────────────────────────── */

/* The floating header sits over the hero's background instead of on a white strip. */
.hero { position: relative; overflow: hidden; margin-top: -72px; padding-top: 72px; background: linear-gradient(180deg, var(--blue-softer), #fff 88%); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero::before { width: 620px; height: 620px; right: -160px; top: -180px; background: radial-gradient(circle, rgba(79, 134, 247, 0.32), transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.hero::after { width: 420px; height: 420px; left: -140px; bottom: 60px; background: radial-gradient(circle, rgba(212, 168, 75, 0.18), transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-40px, 50px) scale(1.08); } }
.hero > * { position: relative; z-index: 1; }
.hero-inner { display: grid; grid-template-columns: 1fr 1.02fr; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 40px; }
.eyebrow { display: inline-block; margin: 0 0 18px; padding: 4px 14px; border-radius: 999px; background: var(--gold-soft); color: #8a6417; font-size: 14px; font-weight: 500; }
.hero h1 { font-size: clamp(44px, 6.6vw, 88px); line-height: 1.2; letter-spacing: -0.025em; margin-bottom: 20px; }
/* One phrase per line, never broken inside a Thai word. */
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 .h1-b { color: var(--blue); }
.lead { font-size: var(--fs-lead); color: var(--muted); margin: 0 0 30px; max-width: 30em; }
/* Platform badges: store-style, two by two. */
.badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 430px; }
.badge { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 16px 10px 14px; border-radius: 14px; background: var(--navy); color: #fff; font-size: 16px; font-weight: 600; line-height: 1.25; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 16px rgba(20, 33, 61, 0.14); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast); }
.badge:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20, 33, 61, 0.2); }
a.badge:hover { color: #fff; }
.badge small { display: block; font-size: 11.5px; font-weight: 400; color: #c9d1e3; }
.badge svg { flex: none; }
.fine { font-size: 14px; color: var(--muted); margin: 16px 0 0; }

/* ── Hero demo: speech → cleanup marks → clean text (played by site.js) ── */

.demo { position: relative; }
.demo-stage { display: flex; flex-direction: column; align-items: center; }
.demo-pill { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 12px; margin-bottom: -24px; padding: 10px 20px 10px 14px; border-radius: 999px; background: var(--navy); color: #fff; box-shadow: 0 14px 30px rgba(20, 33, 61, 0.28); font-size: 14px; font-weight: 500; transition: padding var(--dur) var(--ease-out); }
.demo-pill .mark { color: #fff; --mark-cut: var(--navy); }
.demo-pill .wave { height: 20px; gap: 3px; }
.demo-pill .wave i { width: 3px; background: linear-gradient(180deg, #7ea4f4, #fff 50%, #7ea4f4); }
.pill-status { display: grid; min-width: 7.5em; }
.st { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity var(--dur-fast), transform var(--dur) var(--ease-out); }
.st-done { color: #9fe3b8; }
.demo-card { position: relative; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 26px 18px; box-shadow: var(--shadow-lift); transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur); }
.demo-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.demo-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-bright), var(--blue-dark)); }
.scenes { display: grid; }
.scene { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease-out), visibility 0s var(--dur); }
.scene.is-active { opacity: 1; visibility: visible; transition: opacity var(--dur) var(--ease-out); }
.said { margin: 0; min-height: 5.4em; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.8; color: var(--navy); }

/* Words and spaces are inline blocks so dropped ones can shrink away. */
.tk, .sp { display: inline-block; vertical-align: top; }
.sp { width: 0.3em; }
.tk { position: relative; white-space: nowrap; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), max-width 0.6s var(--ease-out), color var(--dur), background-color var(--dur); }
.sp { transition: width 0.6s var(--ease-out); }
.swap { display: inline-flex; }
.swap .from, .swap .to { display: inline-block; position: relative; overflow: hidden; vertical-align: top; transition: max-width 0.6s var(--ease-out), opacity var(--dur); }
.swap .to { max-width: 0; opacity: 0; color: var(--blue); font-weight: 600; }

/* The hand-drawn strike-through (a gold squiggle) for words that will go. */
.drop::after, .swap .from::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 12px; margin-top: -5px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 12' preserveAspectRatio='none'%3E%3Cpath d='M1 7c5-4 8 3 13-1s8 3 13-1 8 3 12-1' fill='none' stroke='%23d4a84b' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease-out); pointer-events: none; }
.drop.is-marked::after, .swap.is-marked .from::after { transform: scaleX(1); }
.drop.is-marked, .swap.is-marked .from { color: #98a1b3; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--gold-soft); color: #7a5813; opacity: 0; transform: translateY(6px) scale(0.96); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring); }
.chip-num { background: var(--blue-soft); color: var(--blue-dark); }
.chip:nth-child(2) { transition-delay: 0.12s; }
.chip:nth-child(3) { transition-delay: 0.24s; }

.demo-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.demo-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--blue-dark); opacity: 0; transform: translateX(-6px); transition: opacity var(--dur), transform var(--dur) var(--ease-out); }
.demo-hint::before { content: "Aa"; font-weight: 600; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--blue-soft); }
.demo-send { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft); color: #9aa6bf; transition: background-color var(--dur), color var(--dur), transform var(--dur) var(--ease-spring); }

/* States. "still" is the no-JS / reduced-motion picture: the cleanup marks on the first scene. */
[data-state="still"] .st-clean, [data-state="clean"] .st-clean, [data-state="listen"] .st-listen, [data-state="done"] .st-done, [data-state="out"] .st-done { opacity: 1; transform: none; }
[data-state="still"] .drop::after, [data-state="still"] .swap .from::after { transform: scaleX(1); }
[data-state="still"] .drop, [data-state="still"] .swap .from { color: #98a1b3; }
[data-state="still"] .swap .to { max-width: 6em; opacity: 1; padding-left: 0.3em; }
[data-state="still"] .chip, [data-state="clean"] .chip { opacity: 1; transform: none; }
[data-state="still"] .demo-pill .wave i, [data-state="clean"] .demo-pill .wave i, [data-state="done"] .demo-pill .wave i, [data-state="out"] .demo-pill .wave i { animation: none; height: 20%; transition: height var(--dur); }
[data-state="still"] .mark .mark-bar > *, [data-state="clean"] .mark .mark-bar > *, [data-state="done"] .mark .mark-bar > *, [data-state="out"] .mark .mark-bar > * { animation: none; }

[data-state="listen"] .scene.is-active .tk { opacity: 0; transform: translateY(8px); }
[data-state="listen"] .scene.is-active .tk.is-on { opacity: 1; transform: none; }

[data-state="done"] .drop, [data-state="out"] .drop { max-width: 0 !important; opacity: 0; }
[data-state="done"] .sp-x, [data-state="out"] .sp-x { width: 0; }
[data-state="done"] .swap .from, [data-state="out"] .swap .from { max-width: 0 !important; opacity: 0; }
[data-state="done"] .swap .to, [data-state="out"] .swap .to { max-width: 6em; opacity: 1; }
[data-state="done"] .en, [data-state="out"] .en { color: var(--blue-dark); background: var(--blue-soft); border-radius: 6px; box-shadow: 0 0 0 3px var(--blue-soft); }
[data-state="done"] .demo-card { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 0 0 5px var(--blue-soft), var(--shadow-lift); }
[data-state="done"] .demo-hint { opacity: 1; transform: none; }
[data-state="done"] .demo-send { background: var(--blue); color: #fff; transform: scale(1.08); }
[data-state="out"] .scene.is-active { opacity: 0; }

/* ── Phrase ribbon: mixed Thai-English phrases running along a curved blue band ── */

.ribbon { margin-top: 8px; line-height: 0; }
.ribbon svg { display: block; width: 100%; height: clamp(120px, 13vw, 200px); overflow: visible; }
.ribbon-band { stroke: var(--blue); stroke-width: 58; fill: none; }
.ribbon-text { fill: #fff; font-family: inherit; font-size: 25px; font-weight: 500; letter-spacing: 0.01em; white-space: pre; }

/* Two columns down to 820px, so the demo sits beside the text on tablets and small laptops. */
@media (max-width: 1040px) {
  .hero-inner { gap: 32px; }
  .hero h1 { font-size: clamp(44px, 6.4vw, 88px); }
}

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; padding-top: 56px; }
  .demo { max-width: 560px; width: 100%; margin: 0 auto; }
}

/* One column on a wide-enough screen: the text keeps the left side and a voice "orb" with
   floating words fills the right, behind nothing, so the text stays clear. */
.hero-deco { display: none; }
@media (min-width: 560px) and (max-width: 820px) {
  .hero-copy { max-width: 64%; }
  .hero-deco { position: absolute; z-index: 0; top: 150px; right: max(16px, 3vw); display: block; width: 32%; height: 360px; pointer-events: none; }
}
.orb { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; background: linear-gradient(160deg, var(--blue-bright), var(--blue-dark)); color: #fff; box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35); }
.orb::before, .orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(37, 99, 235, 0.35); animation: orb-ring 2.8s var(--ease-out) infinite; }
.orb::after { animation-delay: 1.4s; }
@keyframes orb-ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.orb .wave { height: 34px; gap: 4px; }
.orb .wave i { width: 4px; background: #fff; }
.deco-chip { position: absolute; padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--navy); font-size: 14px; font-weight: 500; white-space: nowrap; animation: floaty 6s ease-in-out infinite; }
.deco-chip.en { color: var(--blue-dark); background: var(--blue-soft); border-color: transparent; }
.deco-chip.ok { color: #2f8f5b; }
.deco-chip:nth-of-type(1) { left: 0; top: 8%; animation-delay: -1s; }
.deco-chip:nth-of-type(2) { right: 0; top: 22%; animation-delay: -3s; }
.deco-chip:nth-of-type(3) { left: 4%; bottom: 18%; animation-delay: -2s; }
.deco-chip:nth-of-type(4) { right: 2%; bottom: 6%; animation-delay: -4.5s; }

/* Below 840px the text links no longer fit beside the logo and the button (English labels are the longest), so they move into a menu. */
@media (max-width: 840px) {
  .nav-link { display: none; }
  .nav .menu { display: block; }
}
/* Under 420px the language switch moves into the menu too, to leave room for the logo. */
@media (max-width: 420px) {
  .nav .lang { display: none; }
}

/* Menu: a <details>, so it opens without JavaScript; site.js closes it after a tap, on Escape, or on a tap outside. */
.menu { display: none; }
.menu-btn { list-style: none; display: grid; place-items: center; width: 42px; height: 42px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--border); background: #fff; cursor: pointer; transition: border-color var(--dur-fast), background-color var(--dur-fast); }
.menu-btn::-webkit-details-marker { display: none; }
.menu-btn:hover { border-color: var(--blue); }
.menu[open] .menu-btn { background: var(--navy); border-color: var(--navy); }
.burger { position: relative; display: block; width: 18px; height: 12px; }
.burger i { position: absolute; left: 0; width: 18px; height: 2px; border-radius: 2px; background: var(--navy); transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast), background-color var(--dur-fast); }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 5px; }
.burger i:nth-child(3) { top: 10px; }
.menu[open] .burger i { background: #fff; }
.menu[open] .burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu[open] .burger i:nth-child(2) { opacity: 0; }
.menu[open] .burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.menu-panel { position: absolute; left: 0; right: 0; top: calc(100% + 10px); display: flex; flex-direction: column; padding: 10px; border-radius: 24px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lift); animation: menu-in var(--dur) var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.menu-link { padding: 13px 16px; border-radius: 14px; color: var(--navy); font-size: 17px; font-weight: 500; text-decoration: none; }
.menu-link:hover { background: var(--blue-softer); color: var(--blue); }
.menu-lang { margin-top: 6px; padding: 13px 16px 8px; border-top: 1px solid var(--border); color: var(--blue); font-weight: 500; text-decoration: none; }

@media (max-width: 640px) {
  .demo-card { padding: 38px 18px 14px; }
  .said { min-height: 7.2em; }
  .hero::before { width: 380px; height: 380px; }
}

/* Sound wave, as in the desktop recording pill. */
.wave { display: inline-flex; align-items: center; gap: 4px; height: 26px; }
/* The bars change length, not scale, so their round ends stay round at every height. */
.wave i { display: block; width: 4px; height: 25%; border-radius: 99px; background: var(--blue); animation: bar 1.1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: 0.15s; }
.wave i:nth-child(3n) { animation-delay: 0.3s; }
.wave i:nth-child(4n) { animation-delay: 0.45s; }
.wave i:nth-child(5n) { animation-delay: 0.6s; }
@keyframes bar { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .wave i { animation: none; height: 60%; } }

/* ── Sections ───────────────────────────────────────────── */

.section { padding: 88px 0; }
.section.alt { background: var(--blue-softer); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 44px; }

kbd { font-family: inherit; font-size: 0.85em; font-weight: 500; padding: 1px 9px; border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 7px; background: #fff; white-space: nowrap; }

.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ── Privacy: a calm navy panel. It barely moves on purpose. ── */

.privacy-sec { padding: 104px var(--gutter) 0; background: var(--blue-softer); }
.privacy-panel { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto; padding: 72px clamp(28px, 5vw, 72px); border-radius: var(--radius-xl); background: radial-gradient(60% 80% at 0% 0%, rgba(37, 99, 235, 0.35), transparent 60%), var(--navy); color: #fff; }
.privacy-head { position: sticky; top: 110px; }
.lock-badge { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 22px; border-radius: 22px; background: rgba(255, 255, 255, 0.08); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 10px rgba(212, 168, 75, 0.06); }
.privacy-head h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); margin-bottom: 20px; }
.privacy-head h2 span { display: block; white-space: nowrap; }
.link-light { display: inline-flex; gap: 6px; color: #fff; font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.35); padding-bottom: 2px; transition: border-color var(--dur-fast), gap var(--dur-fast) var(--ease-out); }
.link-light:hover { color: #fff; border-color: #fff; gap: 10px; }
.privacy-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pv-card { padding: 22px 22px 24px; border-radius: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.pv-card:nth-child(2) { grid-row: span 2; }
.pv-card:nth-child(4) { grid-column: 1 / -1; }
.pv-card h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.pv-card p { margin: 0; font-size: 15.5px; line-height: 1.75; color: var(--on-dark-muted); }

/* ── Closing call to action ─────────────────────────────── */

.cta-sec { padding: 104px var(--gutter); background: linear-gradient(180deg, var(--blue-softer), #fff); }
.cta-card { position: relative; overflow: hidden; max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto; padding: 72px 28px 64px; border-radius: var(--radius-xl); text-align: center; color: #fff; background: radial-gradient(50% 70% at 50% 0%, var(--blue-bright), transparent 70%), linear-gradient(160deg, var(--blue), var(--blue-dark) 60%, var(--blue-ink)); }
.cta-card > :not(.cta-chips) { position: relative; z-index: 1; }
.cta-mark { display: inline-grid; place-items: center; width: 132px; height: 132px; margin-bottom: 22px; border-radius: 36px; background: #fff; color: var(--blue); box-shadow: 0 20px 50px rgba(8, 20, 60, 0.35); }
.cta-card h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); margin-bottom: 12px; }
.cta-card p { max-width: 34em; margin: 0 auto 28px; color: #dbe5fb; font-size: var(--fs-lead); }
.cta-card .cta-fine { margin: 18px auto 0; font-size: 14px; color: #c7d7fb; }
.cta-chips span { position: absolute; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font-size: 15px; font-weight: 500; animation: floaty 7s ease-in-out infinite; }
.cta-chips span:nth-child(1) { left: 7%; top: 18%; rotate: -8deg; }
.cta-chips span:nth-child(2) { right: 8%; top: 14%; rotate: 6deg; animation-delay: -1.5s; }
.cta-chips span:nth-child(3) { left: 12%; bottom: 20%; rotate: 5deg; animation-delay: -3s; font-size: 22px; font-weight: 600; }
.cta-chips span:nth-child(4) { right: 10%; bottom: 26%; rotate: -5deg; animation-delay: -4.5s; }
.cta-chips span:nth-child(5) { left: 3%; top: 46%; rotate: 3deg; animation-delay: -2s; opacity: 0.7; }
.cta-chips span:nth-child(6) { right: 3%; top: 48%; rotate: -4deg; animation-delay: -5.5s; opacity: 0.7; }
@keyframes floaty { 50% { transform: translateY(-14px); } }

/* ── Feature collage: tilted sticker cards with small live examples ── */

.collage-sec { padding-top: 104px; }
.collage { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; max-width: 980px; margin: 8px auto 0; padding-bottom: 40px; }
.fc { position: relative; padding: 24px 26px 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), rotate var(--dur) var(--ease-spring), scale var(--dur) var(--ease-spring); }
.fc:hover { rotate: 0deg; scale: 1.02; z-index: 2; }
.fc h3 { margin: 18px 0 6px; font-size: var(--fs-h3); }
.fc > p { margin: 0; font-size: 16px; }
.fc-white { background: #fff; border: 1px solid var(--border); rotate: -2deg; }
.fc-white > p { color: var(--muted); }
.fc-navy { background: var(--navy); color: #fff; rotate: 1.6deg; translate: 0 44px; }
.fc-navy > p { color: var(--on-dark-muted); }
.fc-gold { background: var(--gold-soft); border: 1px solid #efdfb6; rotate: 1.2deg; }
.fc-gold > p { color: #6b5a33; }
.fc-blue { background: var(--blue); color: #fff; rotate: -1.6deg; translate: 0 44px; }
.fc-blue > p { color: #dbe5fb; }

.fc-demo { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 120px; padding: 16px 18px; border-radius: 18px; background: var(--blue-softer); }
.fc-navy .fc-demo, .fc-blue .fc-demo { background: rgba(255, 255, 255, 0.08); }
.fc-gold .fc-demo { background: rgba(255, 255, 255, 0.7); }
.fc-demo p { margin: 0; }
.mini { font-size: 19px; line-height: 1.7; }
.x { position: relative; display: inline-block; color: #98a1b3; }
.fc-navy .x { color: #7f8aa6; }
.x::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 12px; margin-top: -5px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 12' preserveAspectRatio='none'%3E%3Cpath d='M1 7c5-4 8 3 13-1s8 3 13-1 8 3 12-1' fill='none' stroke='%23d4a84b' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; transform-origin: left; transition: transform 0.5s var(--ease-out); }
.fix { display: inline-block; padding: 0 8px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 500; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring); }
.big-num { font-size: 52px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring); }
.big-num small { font-size: 20px; font-weight: 500; color: var(--on-dark-muted); }
.wl { font-size: 14px; color: #6b5a33; }
.wl-tag { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 6px; background: var(--gold); color: #fff; font-size: 12px; font-weight: 600; }
.apps { display: flex; gap: 12px; }
.apps span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, 0.16); color: #fff; animation: bob 3.2s ease-in-out infinite; }
.apps span:nth-child(2) { animation-delay: 0.4s; }
.apps span:nth-child(3) { animation-delay: 0.8s; }
.apps span:nth-child(4) { animation-delay: 1.2s; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* The examples play once when the collage comes into view; without site.js they show finished. */
.js .collage:not(.is-in) .x::after { transform: scaleX(0); }
.js .collage:not(.is-in) .fix, .js .collage:not(.is-in) .big-num { opacity: 0; transform: translateY(8px) scale(0.92); }
.collage.is-in .x::after { transition-delay: 0.7s; }
.collage.is-in .x + .x::after, .collage.is-in .x ~ .x::after { transition-delay: 1s; }
.collage.is-in .fix, .collage.is-in .big-num { transition-delay: 1.2s; }

.fc-sticker { position: absolute; z-index: 3; left: 50%; top: 46%; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; background: var(--gold); color: var(--navy); line-height: 1.15; font-size: 13px; font-weight: 600; text-align: center; box-shadow: 0 12px 30px rgba(20, 33, 61, 0.22), inset 0 0 0 4px rgba(255, 255, 255, 0.5); rotate: 12deg; animation: wobble 6s ease-in-out infinite; }
.fc-sticker b { font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
@keyframes wobble { 50% { rotate: 4deg; } }

/* ── Language panel: blue band, awkward Thai spellings corrected back to English ── */

.lang-sec { padding: 24px var(--gutter) 104px; }
.lang-panel { position: relative; overflow: hidden; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto; padding: 72px clamp(28px, 5vw, 72px); border-radius: var(--radius-xl); background: radial-gradient(70% 90% at 100% 0%, var(--blue-bright), transparent 60%), var(--blue); color: #fff; }
.lang-panel::after { content: "Aa ก"; position: absolute; right: -20px; bottom: -70px; font-size: 260px; font-weight: 600; line-height: 1; color: rgba(255, 255, 255, 0.06); pointer-events: none; }
.lang-panel .kicker { color: #c7d7fb; }
.lang-copy h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); margin-bottom: 16px; }
.lang-copy p { margin: 0; color: #dbe5fb; font-size: var(--fs-lead); max-width: 26em; }
.lang-rows { position: relative; z-index: 1; }
.lang-row { margin: 0; padding-top: 0.75em; font-size: clamp(24px, 3vw, 38px); font-weight: 600; line-height: 1.5; white-space: nowrap; }
.slot { display: inline-grid; vertical-align: bottom; }
.bad, .good { grid-area: 1 / 1; }
/* Final state: the Thai spelling is a small struck-out note above the English, like a proofreading mark. */
.bad { position: relative; justify-self: start; color: rgba(255, 255, 255, 0.6); font-weight: 500; z-index: 1; transform: translateY(-92%) scale(0.42); transform-origin: left bottom; transition: transform 0.6s var(--ease-out), color 0.6s; }
.bad::after { content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 3px; border-radius: 2px; background: var(--gold); transform-origin: left; transition: transform 0.45s var(--ease-out); }
.good { justify-self: start; padding: 0 0.28em; border-radius: 12px; background: #fff; color: var(--blue); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-spring); }
/* With site.js the row starts with the Thai spelling in place, then corrects itself. */
.js .lang-rows:not(.is-in) .bad { transform: none; color: #fff; }
.js .lang-rows:not(.is-in) .bad::after { transform: scaleX(0); }
.js .lang-rows:not(.is-in) .good { opacity: 0; transform: translateY(0.3em) scale(0.9); }
.lang-rows.is-in .lang-row .bad::after { transition-delay: 0.9s; }
.lang-rows.is-in .lang-row .bad { transition-delay: 1.35s; }
.lang-rows.is-in .lang-row .good { transition-delay: 1.45s; }
.lang-rows.is-in .lang-row:nth-child(2) .bad::after { transition-delay: 1.5s; }
.lang-rows.is-in .lang-row:nth-child(2) .bad { transition-delay: 1.95s; }
.lang-rows.is-in .lang-row:nth-child(2) .good { transition-delay: 2.05s; }
.lang-rows.is-in .lang-row:nth-child(3) .bad::after { transition-delay: 2.1s; }
.lang-rows.is-in .lang-row:nth-child(3) .bad { transition-delay: 2.55s; }
.lang-rows.is-in .lang-row:nth-child(3) .good { transition-delay: 2.65s; }

@media (max-width: 900px) {
  .collage { grid-template-columns: minmax(0, 1fr); max-width: 560px; gap: 24px; }
  .fc-navy, .fc-blue { translate: none; }
  .fc-white, .fc-blue { rotate: -1deg; }
  .fc-navy, .fc-gold { rotate: 1deg; }
  .fc-sticker { left: auto; right: -6px; top: -40px; margin: 0; width: 104px; height: 104px; }
  .fc-sticker b { font-size: 32px; }
  .lang-panel { grid-template-columns: 1fr; gap: 28px; padding: 52px 24px; border-radius: var(--radius-lg); }
  .lang-sec { padding-left: 12px; padding-right: 12px; }
  .lang-row { font-size: clamp(22px, 6.4vw, 32px); }
}

/* ── How it works: sticky mockup, steps scroll past (site.js sets data-step on .how) ── */

.how-sec { background: var(--blue-softer); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.how-head { text-align: center; }
.kicker { display: inline-block; margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.how-head .section-title { font-size: var(--fs-h2); line-height: var(--lh-tight); max-width: 16em; margin: 0 auto 28px; }

/* Android / Windows switch: two radios, a sliding thumb, CSS :has(). */
.plat-tabs { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 540px); margin: 0 auto 48px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: #fff; box-shadow: var(--shadow); }
.plat-tabs label { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; padding: 6px 8px; border-radius: 999px; text-align: center; font-weight: 500; font-size: 15px; line-height: 1.2; color: var(--muted); cursor: pointer; transition: color var(--dur-fast); }
/* iPhone and Mac: shown, greyed out and not selectable until those apps exist. */
.plat-tabs label.soon { color: #aab2c4; cursor: not-allowed; }
.plat-tabs label small { margin-top: 1px; font-size: 11px; font-weight: 500; color: #b8975a; }
.plat-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 999px; background: var(--navy); transition: transform var(--dur) var(--ease-spring); }
.plat-tabs input:checked + label { color: #fff; }
.plat-tabs:has(#plat-win:checked) .plat-thumb { transform: translateX(200%); }
.plat-tabs:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
@media (max-width: 640px) {
  .plat-tabs, .plat-tabs label, .plat-thumb { border-radius: 18px; }
  .plat-tabs label { font-size: 14px; padding: 6px 4px; }
}

.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.how-stage { position: sticky; top: 104px; display: grid; place-items: center; min-height: 560px; }
.how-stage .device { grid-area: 1 / 1; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.how:has(#plat-win:checked) .phone, .how:not(:has(#plat-win:checked)) .desk { opacity: 0; transform: scale(0.94) translateY(16px); pointer-events: none; }
.how:has(#plat-win:checked) .steps-and, .how:not(:has(#plat-win:checked)) .steps-win { display: none; }

.how-steps { list-style: none; margin: 0; padding: 0; }
/* Each step is a tall block whose text holds still mid-screen (sticky) while you scroll through it, so
   every step, the last one too, stays readable beside the pinned mockup for a while. */
.how-step { display: block; min-height: 72vh; transition: opacity var(--dur) var(--ease-out); }
.step-body { position: sticky; top: calc(50vh - 80px); display: grid; grid-template-columns: 52px 1fr; column-gap: 18px; padding: 24px 0; }
.how-step:first-child { padding-top: 56px; }
.how-step:last-child { min-height: 92vh; }
.step-n { grid-row: span 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 1px solid var(--border); font-weight: 600; font-size: 20px; color: var(--blue); transition: background-color var(--dur), color var(--dur), border-color var(--dur), transform var(--dur) var(--ease-spring); }
.how-step h3 { margin: 6px 0 6px; font-size: clamp(24px, 2.4vw, 32px); line-height: var(--lh-tight); }
.how-step p { margin: 0; color: var(--muted); font-size: var(--fs-lead); max-width: 24em; }
.js .how-step { opacity: 0.35; }
.js [data-step="1"] [data-step-n="1"], .js [data-step="2"] [data-step-n="2"], .js [data-step="3"] [data-step-n="3"] { opacity: 1; }
[data-step="1"] [data-step-n="1"] .step-n, [data-step="2"] [data-step-n="2"] .step-n, [data-step="3"] [data-step-n="3"] .step-n { background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(1.06); }

/* Shared bits */
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -0.15em; background: var(--blue); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Phone */
.phone { width: 290px; height: 560px; padding: 12px; border-radius: 44px; background: var(--navy); box-shadow: var(--shadow-lift), inset 0 0 0 2px #2b3c63; }
.ph-screen { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 34px; background: #f4f6fb; }
.ph-top { display: flex; align-items: center; gap: 10px; padding: 26px 16px 12px; background: #fff; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.3; }
.ph-top b { display: block; font-weight: 600; }
.ph-top small { color: #3aa76d; }
.ph-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #f3c97a, var(--gold)); }
.ph-chat { flex: 1; padding: 14px; }
.bubble { width: fit-content; max-width: 80%; margin: 0; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: #fff; font-size: 13.5px; line-height: 1.5; box-shadow: 0 1px 2px rgba(20, 33, 61, 0.06); }
.ph-field { position: relative; display: flex; align-items: flex-end; gap: 6px; min-height: 48px; margin: 0 10px 10px; padding: 8px 46px 8px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--border); font-size: 13.5px; line-height: 1.5; transition: border-color var(--dur); }
.ph-text { display: inline-block; overflow: hidden; clip-path: inset(0 100% 0 0); max-width: 0; max-height: 1.5em; transition: clip-path 0.9s var(--ease-out), max-width 0s 0.9s, max-height 0s 0.9s; }
.ph-send { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: #9aa6bf; transition: background-color var(--dur), color var(--dur); }
.ph-kb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 22px; background: #fff; border-top: 1px solid var(--border); transform: translateY(100%); transition: transform 0.6s var(--ease-out); }
.ph-kb-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ph-kb-head .mark { color: var(--blue); }
.ph-mic-wrap { position: relative; display: grid; place-items: center; width: 84px; height: 84px; }
.ph-mic { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35); transition: transform var(--dur) var(--ease-spring), background-color var(--dur); }
.ph-ring { position: absolute; inset: 10px; border-radius: 50%; background: rgba(37, 99, 235, 0.25); opacity: 0; }
.ph-status { display: grid; place-items: center; height: 24px; font-size: 13px; font-weight: 500; color: var(--navy); }
.ph-status > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity var(--dur-fast); }
.ph-status .wave { height: 16px; gap: 3px; }
.ph-status .wave i { width: 3px; }
.ph-status .st3 { color: #2f8f5b; }

[data-step="1"] .ph-kb, [data-step="2"] .ph-kb, [data-step="3"] .ph-kb { transform: none; }
[data-step="1"] .ph-field, [data-step="2"] .ph-field { border-color: var(--blue); }
[data-step="1"] .st1, [data-step="2"] .st2, [data-step="3"] .st3 { opacity: 1; }
[data-step="2"] .ph-mic { transform: scale(1.08); background: var(--blue-dark); }
[data-step="2"] .ph-ring { animation: ring 1.6s var(--ease-out) infinite; }
[data-step="2"] .ph-ring.r2 { animation-delay: 0.8s; }
@keyframes ring { from { opacity: 0.9; transform: scale(0.8); } to { opacity: 0; transform: scale(1.6); } }
[data-step="3"] .ph-text { clip-path: inset(0 0 0 0); max-width: 100%; max-height: 6em; transition: clip-path 0.9s var(--ease-out) 0.15s, max-width 0s, max-height 0s; }
[data-step="3"] .ph-send { background: var(--blue); color: #fff; }
.phone .caret { flex: none; }

/* Desktop */
.desk { width: min(100%, 520px); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.dk-window { position: relative; width: 100%; height: 360px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lift); overflow: hidden; }
.dk-bar { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; background: #f7f8fb; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.dk-dots { display: inline-flex; gap: 6px; }
.dk-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d5dbe8; }
.dk-body { position: relative; padding: 22px 26px; font-size: 15.5px; }
.dk-line { margin: 0 0 6px; }
.dk-type { position: relative; min-height: 1.7em; }
.dk-text { display: inline-block; clip-path: inset(0 100% 0 0); max-width: 0; white-space: nowrap; vertical-align: top; transition: clip-path 0.9s var(--ease-out), max-width 0s 0.9s; }
.dk-click { position: absolute; left: -6px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; }
.dk-ghost { display: block; height: 10px; margin-top: 14px; border-radius: 5px; background: #eef1f7; }
.dk-ghost.g1 { width: 82%; margin-top: 22px; }
.dk-ghost.g2 { width: 68%; }
.dk-ghost.g3 { width: 45%; }
/* The desktop pill: a thin bar at rest that opens up while listening (as in the app). */
.dk-pill { position: absolute; left: 50%; bottom: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 56px; height: 8px; margin-left: -28px; border-radius: 999px; background: var(--navy); overflow: hidden; box-shadow: 0 8px 20px rgba(20, 33, 61, 0.25); transition: width var(--dur) var(--ease-spring), height var(--dur) var(--ease-spring), margin-left var(--dur) var(--ease-spring); }
.dk-pill .mark, .dk-pill .wave { opacity: 0; transition: opacity var(--dur-fast); }
.dk-pill .mark { color: #fff; flex: none; --mark-cut: var(--navy); }
.dk-pill .wave { height: 18px; gap: 3px; }
.dk-pill .wave i { width: 3px; background: linear-gradient(180deg, #7ea4f4, #fff 50%, #7ea4f4); }
.dk-keys { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.key { display: inline-flex; align-items: center; gap: 6px; min-width: 72px; justify-content: center; padding: 10px 16px; font-size: 16px; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--border); border-bottom-width: 5px; border-radius: 12px; transition: transform var(--dur-fast) var(--ease-out), border-bottom-width var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast); }

[data-step="1"] .dk-click { animation: click 1.4s var(--ease-out) infinite; }
@keyframes click { from { opacity: 1; transform: scale(0.3); } 70%, to { opacity: 0; transform: scale(1.4); } }
[data-step="2"] .dk-pill { width: 160px; height: 38px; margin-left: -80px; }
[data-step="2"] .dk-pill .mark, [data-step="2"] .dk-pill .wave { opacity: 1; }
[data-step="2"] .key { transform: translateY(4px); border-bottom-width: 1px; background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 5px var(--blue-soft); }
[data-step="3"] .dk-text { clip-path: inset(0 0 0 0); max-width: 100%; transition: clip-path 0.9s var(--ease-out) 0.15s, max-width 0s; }

@media (max-width: 900px) {
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .how-stage { top: 76px; z-index: 2; min-height: 0; height: 330px; min-width: 0; grid-template-columns: minmax(0, 1fr); padding: 10px 0; overflow: clip; background: var(--blue-softer); }
  .how-stage .device { transform-origin: top center; }
  .phone { transform: scale(0.56); margin-bottom: -246px; }
  .desk { transform: scale(0.62); margin-bottom: -164px; width: 520px; }
  .how:has(#plat-win:checked) .phone { transform: scale(0.5); }
  .how:not(:has(#plat-win:checked)) .desk { transform: scale(0.56); }
  /* Phones: the text holds just below the pinned mockup strip (76px from the top + 330px tall). */
  .how-step, .how-step:first-child { min-height: 62vh; padding-top: 0; }
  .how-step:last-child { min-height: 70vh; }
  .step-body { top: 418px; padding: 18px 0; }
  .how-sec { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

/* ── Pricing page: Free and Pro side by side, then a short FAQ ── */

.pricing { position: relative; overflow: hidden; margin-top: -72px; padding: 152px 0 104px; background: radial-gradient(60% 50% at 85% 0%, rgba(79, 134, 247, 0.22), transparent 70%), linear-gradient(180deg, var(--blue-softer), #fff 60%); }
.pricing-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.pricing-head h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); margin-bottom: 14px; }
.pricing-head .lead { margin: 0 auto; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 920px; margin: 0 auto; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 34px 32px 32px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lift); }
.plan h2 { margin: 0 0 6px; font-size: 22px; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.plan-price b { font-size: 52px; line-height: 1.1; letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); font-size: 15px; }
.plan-note { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.plan-list { list-style: none; margin: 0 0 28px; padding: 22px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.55; }
.plan-list svg { flex: none; margin-top: 3px; color: var(--blue); }
.plan-cta { justify-content: center; }
.plan-pro { background: radial-gradient(80% 60% at 100% 0%, rgba(37, 99, 235, 0.45), transparent 65%), var(--navy); border-color: var(--navy); color: #fff; }
.plan-pro .plan-price b { font-size: 44px; }
.plan-pro .plan-price span, .plan-pro .plan-note { color: var(--on-dark-muted); }
.plan-pro .plan-list { border-color: rgba(255, 255, 255, 0.14); }
.plan-pro .plan-list svg { color: var(--gold); }
.plan-badge { position: absolute; top: 22px; right: 22px; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 13px; font-weight: 600; }

.faq { max-width: 760px; margin: 88px auto 0; }
.faq h2 { text-align: center; font-size: var(--fs-h3); margin-bottom: 18px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; list-style: none; padding: 18px 40px 18px 4px; font-weight: 500; font-size: 17px; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg); transition: transform var(--dur) var(--ease-out); }
.faq-item[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq-item p { margin: 0 4px 20px; color: var(--muted); }

@media (max-width: 760px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
  .plan { padding: 30px 22px 24px; }
  .pricing { padding-top: 120px; }
}

/* ── Legal pages ────────────────────────────────────────── */

.prose { max-width: 820px; padding-top: 56px; padding-bottom: 104px; }
.legal-head { margin-bottom: 36px; padding: 40px clamp(24px, 4vw, 44px) 32px; border-radius: var(--radius-lg); background: radial-gradient(70% 100% at 100% 0%, var(--blue-soft), transparent 70%), var(--blue-softer); border: 1px solid var(--border); }
.legal-head h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); margin-bottom: 8px; }
.legal-head p { margin: 0; }
.prose h2 { font-size: clamp(22px, 2vw, 26px); margin-top: 52px; padding-top: 20px; border-top: 1px solid var(--border); scroll-margin-top: 96px; }
.prose > h2:first-of-type { border-top: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 12px 28px; margin: 20px 0 32px; }
.facts dt { font-weight: 500; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 12px; } }

/* Legal pages with several sections get a sticky "on this page" list (built in layout.ts). */
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 820px); gap: 56px; justify-content: center; }
.legal-layout .prose { max-width: none; }
.toc { position: sticky; top: 104px; align-self: start; margin-top: 56px; padding: 18px 0 18px 18px; border-left: 2px solid var(--border); font-size: 14px; line-height: 1.5; }
.toc-h { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.toc a { display: block; color: var(--muted); text-decoration: none; transition: color var(--dur-fast), translate var(--dur-fast) var(--ease-out); }
.toc a:hover { color: var(--navy); }
.toc a[aria-current="true"] { color: var(--blue); font-weight: 500; translate: 4px 0; }
.prose p, .prose li { color: #2b3650; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.draft { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: var(--gold-soft); border: 1px solid #ecd9a8; color: #6b4d10; font-size: 15px; }
.tbc { background: #fff4d6; color: #6b4d10; border-radius: 6px; padding: 1px 6px; font-size: 0.92em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--blue-softer); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 12px; }
.step-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; background: var(--blue-softer); }
.step-card h2 { margin-top: 0 !important; font-size: 20px !important; }
.step-card ol { margin: 0; }

.notfound { text-align: center; padding-top: 96px; padding-bottom: 120px; }
.notfound .mark { color: var(--blue); margin: 0 auto 8px; }
.nf-code { margin: 0; font-size: clamp(88px, 16vw, 168px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; background: linear-gradient(160deg, var(--blue-bright), var(--blue-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: var(--fs-h3); margin: 12px 0 4px; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }

/* ── Footer: navy, link columns, and the slogan large across the bottom ── */

.foot { position: relative; overflow: hidden; background: var(--navy); color: var(--on-dark-muted); }
.foot::before { content: ""; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 75%; background: radial-gradient(60% 60% at 50% 100%, rgba(37, 99, 235, 0.45), transparent 70%); pointer-events: none; }
.foot > * { position: relative; }
.foot-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; padding-top: 72px; padding-bottom: 40px; }
/* On navy the lettering turns white; the mark keeps its own colours. */
.foot-logo { display: inline-flex; gap: 12px; }
/* On the navy footer the whole logo is white (D-058); the mark's cut-outs show the navy. */
.foot-logo .brand-mark { height: 44px; filter: brightness(0) invert(1); }
.foot-logo .brand-word { height: 27px; filter: brightness(0) invert(1); }
.foot-brand p { margin: 14px 0 24px; font-size: 16px; max-width: 26em; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.foot-h { margin: 0 0 12px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #8693b0; }
.foot-links { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.foot-links a { color: var(--on-dark); text-decoration: none; width: fit-content; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--dur) var(--ease-out); }
.foot-links a:hover { color: var(--on-dark); background-size: 100% 1px; }
.foot-slogan { margin: 0; padding: 8px var(--gutter) 0; text-align: center; font-weight: 600; font-size: clamp(28px, 10.2vw, 150px); line-height: 1.35; letter-spacing: -0.02em; white-space: nowrap; color: var(--blue-bright); }
/* The English line is longer than the Thai one, so it runs a size smaller to stay on one line. */
.foot-slogan:lang(en) { font-size: clamp(24px, 7.2vw, 108px); letter-spacing: -0.03em; }
.foot-slogan span { display: inline-block; }
.foot-slogan span + span { color: var(--on-dark); }
.foot-company { padding-top: 18px; padding-bottom: 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 13px; color: #8693b0; }
.foot-company p { margin: 0 0 4px; }
.foot-company a { color: var(--on-dark); }
.foot-company + .foot-legal { border-top: 0; padding-top: 0; }
.foot-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 13px; color: #8693b0; }

/* ── Small screens ──────────────────────────────────────── */

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .nav-link { padding: 7px 10px; }
  .top .brand { gap: 8px; }
  .top .brand .brand-mark { height: 30px; }
  .top .brand .brand-word { height: 18px; }
  .privacy-panel { grid-template-columns: 1fr; gap: 32px; padding: 52px 24px; border-radius: var(--radius-lg); }
  .privacy-head { position: static; }
  .privacy-sec { padding: 72px 12px 0; }
  .cta-sec { padding: 72px 12px; }
  .cta-card { padding: 120px 20px 56px; border-radius: var(--radius-lg); }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .foot-top { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top { padding: 8px 12px 0; }
  .top-inner { padding: 0 6px 0 14px; height: 56px; }
  .top .brand .brand-mark { height: 30px; }
  .top .brand .brand-word { height: 19px; }
  .nav .lang { margin: 0 4px; padding: 6px 12px; }
  .section { padding: 64px 0; }
  .foot-top { padding-top: 56px; }
  .privacy-cards { grid-template-columns: 1fr; }
  .pv-card:nth-child(2) { grid-row: auto; }
  .cta-chips span:nth-child(n + 3) { display: none; }
  .cta-chips span { font-size: 13px; }
  .cta-chips span:nth-child(1) { top: 7%; }
  .cta-chips span:nth-child(2) { top: 11%; }
}

@media (max-width: 400px) {
  .top .brand .brand-word { height: 17px; }
  .top .brand { gap: 7px; }
  .top .brand .brand-mark { height: 27px; }
  .nav { gap: 0; }
  .nav .lang { margin: 0 6px; padding: 5px 10px; }
  .nav-cta { padding: 9px 14px; }
}

/* ── Download page: steps on the left, a looping animation of them on the right ── */

body.download .top, body.download .foot { display: none; }
body.download { background: #14213d; }

.dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); min-height: 100vh; }
.dl-text { background: #14213d; color: #fff; padding: 56px clamp(24px, 6vw, 96px); display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.dl-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 600; font-size: 24px; margin-bottom: 56px; }
.dl-brand:hover { color: #fff; }
.dl-text h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.2; margin-bottom: 28px; }
.dl-steps { list-style: none; counter-reset: step; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dl-step { counter-increment: step; display: flex; gap: 14px; align-items: baseline; font-size: 18px; line-height: 1.5; opacity: 0.5; animation-duration: 10s; animation-iteration-count: infinite; animation-timing-function: ease; }
.dl-step::before { content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255, 255, 255, 0.14); font-size: 15px; font-weight: 600; }
.dl-step-1 { animation-name: dl-step-1; }
.dl-step-2 { animation-name: dl-step-2; }
.dl-step-3 { animation-name: dl-step-3; }
.dl-text kbd { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.dl-retry, .dl-soon, .dl-back { margin: 0; color: #c9d1e3; font-size: 16px; }
.dl-soon { margin-bottom: 6px; }
.dl-text a { color: #fff; }
.dl-text a:hover { color: var(--gold); }
.dl-back { margin-top: 18px; font-size: 15px; }
.dl-stores { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.dl-stores .badge { background: #fff; color: var(--navy); }
.dl-stores a.badge:hover { color: var(--navy); }
.dl-stores .badge small { color: var(--muted); }
.dl-stores .badge.is-soon { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: none; }
.dl-stores .badge.is-soon small { color: #c9d1e3; }
.dl-note { margin: 0 0 32px; color: #c9d1e3; font-size: 15px; }
.dl-sub { margin: 0 0 12px; font-size: 20px; }
.dl-para { margin: 0 0 28px; font-size: 17px; line-height: 1.6; color: #e3e8f2; }
.badge.is-soon { opacity: 0.72; }
.badge.is-soon:hover { transform: none; box-shadow: 0 6px 16px rgba(20, 33, 61, 0.14); }

.dl-stage { position: relative; background: linear-gradient(160deg, #2563eb, #1d4ed8 55%, #14213d); display: grid; place-items: center; overflow: hidden; padding: 40px; }

.dl-window { position: relative; width: min(560px, 100%); aspect-ratio: 16 / 11; background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(8, 14, 30, 0.45); overflow: hidden; }
.dl-toolbar { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--border); background: #f7f8fb; }
.dl-dots { display: inline-flex; gap: 6px; }
.dl-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d5dbe8; }
.dl-address { flex: 1; height: 26px; border-radius: 8px; background: #e8ecf5; }
.dl-dl-btn { display: inline-grid; place-items: center; width: 34px; height: 30px; border-radius: 8px; background: var(--gold); color: #fff; animation: dl-btn 10s infinite; }

.dl-scene { position: absolute; inset: 52px 0 0 0; opacity: 0; animation-duration: 10s; animation-iteration-count: infinite; animation-timing-function: ease; }
.dl-scene-1 { animation-name: dl-scene-1; }
.dl-scene-2 { animation-name: dl-scene-2; }
.dl-scene-3 { animation-name: dl-scene-3; }

.dl-popover { position: absolute; top: 12px; right: 22px; width: 62%; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; }
.dl-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; animation: dl-file 10s infinite; }
.dl-ghost { position: absolute; left: 22px; height: 26px; border-radius: 8px; background: #f0f2f7; }
.dl-ghost-1 { top: 96px; width: 44%; }
.dl-ghost-2 { top: 136px; width: 34%; }

.dl-installer, .dl-app { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.dl-installer p, .dl-app p { margin: 0; font-weight: 600; font-size: 18px; }
.dl-progress { width: 56%; height: 10px; border-radius: 6px; background: var(--blue-soft); overflow: hidden; }
.dl-progress i { display: block; height: 100%; border-radius: 6px; background: var(--blue); transform-origin: left; transform: scaleX(0); animation: dl-progress 10s infinite; }
.dl-app img { animation: dl-pop 10s infinite; }
.dl-keys { display: inline-flex; align-items: center; gap: 8px; }
.dl-keys b { color: var(--muted); font-weight: 500; }
.dl-app .wave { margin-top: 4px; }

.dl-cursor { position: absolute; left: 86%; top: 62%; z-index: 3; line-height: 0; opacity: 0; animation: dl-cursor 10s infinite; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)); }

@keyframes dl-step-1 { 0%, 31% { opacity: 1; } 35%, 100% { opacity: 0.5; } }
@keyframes dl-step-2 { 0%, 31% { opacity: 0.5; } 35%, 63% { opacity: 1; } 67%, 100% { opacity: 0.5; } }
@keyframes dl-step-3 { 0%, 63% { opacity: 0.5; } 67%, 96% { opacity: 1; } 100% { opacity: 0.5; } }

@keyframes dl-scene-1 { 0%, 1% { opacity: 0; } 5%, 31% { opacity: 1; } 35%, 100% { opacity: 0; } }
@keyframes dl-scene-2 { 0%, 33% { opacity: 0; } 38%, 63% { opacity: 1; } 67%, 100% { opacity: 0; } }
@keyframes dl-scene-3 { 0%, 65% { opacity: 0; } 70%, 95% { opacity: 1; } 99%, 100% { opacity: 0; } }

@keyframes dl-btn { 0%, 2% { transform: scale(1); } 6% { transform: scale(1.18); } 10%, 100% { transform: scale(1); } }
@keyframes dl-file { 0%, 19% { background: transparent; } 22%, 31% { background: var(--blue-soft); } 35%, 100% { background: transparent; } }
@keyframes dl-progress { 0%, 37% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); } }
@keyframes dl-pop { 0%, 68% { transform: scale(0.6); } 73% { transform: scale(1.15); } 77%, 100% { transform: scale(1); } }

/* The pointer comes in, hovers the file, double-clicks it, and leaves. */
@keyframes dl-cursor {
  0%, 6% { opacity: 0; left: 86%; top: 62%; transform: scale(1); }
  10% { opacity: 1; left: 86%; top: 62%; transform: scale(1); }
  16% { opacity: 1; left: 62%; top: 24%; transform: scale(1); }
  19% { opacity: 1; left: 62%; top: 24%; transform: scale(0.86); }
  21% { opacity: 1; left: 62%; top: 24%; transform: scale(1); }
  23% { opacity: 1; left: 62%; top: 24%; transform: scale(0.86); }
  25% { opacity: 1; left: 62%; top: 24%; transform: scale(1); }
  31%, 100% { opacity: 0; left: 62%; top: 24%; transform: scale(1); }
}

@media (max-width: 900px) {
  .dl { grid-template-columns: 1fr; min-height: 0; }
  .dl-text { padding: 40px 24px; }
  .dl-brand { margin-bottom: 32px; }
  .dl-stage { padding: 28px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-step, .dl-scene, .dl-dl-btn, .dl-file, .dl-progress i, .dl-app img, .dl-cursor { animation: none; }
  .dl-step { opacity: 1; }
  .dl-scene-3 { opacity: 1; }
  .dl-progress i { transform: scaleX(1); }
}

/* The smallest phones (320px): compact logo, language switch and button. */
@media (max-width: 360px) {
  .top { padding: 8px 8px 0; }
  .top-inner { padding: 0 5px 0 10px; gap: 8px; }
  .top .brand { gap: 6px; }
  .top .brand .brand-mark { height: 24px; }
  .top .brand .brand-word { height: 15px; }
  .nav .lang { margin: 0 4px; padding: 4px 8px; font-size: 13px; }
  .nav-cta { padding: 8px 12px; font-size: 13px; }
  .nav-cta .arrow { display: none; }
  .menu-btn { width: 36px; height: 36px; margin-left: 4px; }
}
.dl-note a { color: #fff; }
.dl-started { margin: -4px 0 18px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); color: #e3e8f2; font-size: 15px; }
.dl-started[hidden] { display: none; }
