/* cptt.net landing and store pages (ADR-0384). Palette and type follow the app:
   android/prod/.../ui/Theme.kt (DarkScheme/LightScheme), fonts Tektur and IBM Plex Sans Condensed,
   Noto Kufi/Sans Arabic for ar. Phase fills (speak, receive) are the same in both themes. */

@font-face { font-family: "Tektur"; src: url("fonts/tektur.woff2") format("woff2"); font-weight: 400 900; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Plex Cond"; src: url("fonts/plex-cond-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Plex Cond"; src: url("fonts/plex-cond-600.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
/* Kazakh: Plex Condensed has no ә ғ қ ң ө ұ ү һ і — Fira Sans Condensed (OFL) for kk pages only (ADR-0386 p. 4) */
@font-face { font-family: "Fira Cond"; src: url("fonts/fira-cond-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Fira Cond"; src: url("fonts/fira-cond-600.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Kufi CPTT"; src: url("fonts/kufi-arabic-700.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Sans Arabic CPTT"; src: url("fonts/sans-arabic-400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Sans Arabic CPTT"; src: url("fonts/sans-arabic-700.woff2") format("woff2"); font-weight: 600 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }

:root {
  --f-disp: "Tektur", "Kufi CPTT", "Arial Narrow", sans-serif;
  --f-text: "Plex Cond", "Sans Arabic CPTT", "Roboto Condensed", "Liberation Sans Narrow", sans-serif;
  /* fixed phase fills, as in the app */
  --speak: #22A94C;
  --receive: #8CC4FA;
  --on-fill: #08140B;
  /* light scheme (LightScheme) */
  --page: #F1F3EA;
  --card: #FFFFFF;
  --hair: #C9D2BF;
  --text: #18201B;
  --muted: #55624F;
  --lcd: #DCE8C6;
  --lcd-ink: #1F3313;
  --lcd-dim: #4E6A3A;
  --lcd-edge: #9DB58A;
  --idle-key: #DFE6D4;
  --idle-ink: #18201B;
  --globe: #5E8A4A;
  --speak-ink: #17803A;
  --bad: #B3261E;
  --note: #9A5B00;
  --logo-globe: #4E5B44;
  --logo-c: #10160C;
  --focus: #000000;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1C231F;
    --card: #29332D;
    --hair: #34413A;
    --text: #E4EBD7;
    --muted: #A3B09C;
    --lcd: #16241A;
    --lcd-ink: #CBE69C;
    --lcd-dim: #86A472;
    --lcd-edge: #07100A;
    --idle-key: #3A4B40;
    --idle-ink: #E9F0DC;
    --globe: #8FB07E;
    --speak-ink: #22A94C;
    --bad: #FF6B5B;
    --note: #F2C230;
    --logo-globe: #8FB07E;
    --logo-c: #CBE69C;
    --focus: #FFFFFF;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 1.125rem/1.5 var(--f-text);
  overflow-wrap: break-word;
  hyphens: manual;
}
:lang(ar) body, body:lang(ar) { line-height: 1.7; }
:root:lang(kk) { --f-text: "Fira Cond", "Plex Cond", "Roboto Condensed", "Liberation Sans Narrow", sans-serif; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
strong { font-weight: 600; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--speak-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

/* header */
.top .wrap:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.4rem/1 var(--f-disp); letter-spacing: 0.02em; }
.brand:hover { color: inherit; }
.logo { width: 38px; height: 38px; }
.logo-globe { color: var(--logo-globe); }
.logo-c { color: var(--logo-c); }
.docnav ul, .foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
/* language menu without JavaScript (ADR-0386 p. 7): details/summary, the current language on the key */
.langs { position: relative; }
.langs summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px 6px 12px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; line-height: 1.2; color: var(--text); background: var(--card); box-shadow: inset 0 0 0 1px var(--hair);
  cursor: pointer; list-style: none; user-select: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }
.langs summary .ico { width: 1.15em; height: 1.15em; color: var(--muted); }
.langs details[open] summary .chev { transform: rotate(180deg); }
.langs ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 10; list-style: none; margin: 0; padding: 6px;
  min-width: 13rem; max-height: min(70vh, 32rem); overflow-y: auto; display: grid; gap: 2px;
  background: var(--card); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--hair), 0 10px 28px rgba(16, 24, 18, 0.18); }
.langs a, .langs span { display: block; padding: 9px 12px; border-radius: 6px; font-weight: 600; font-size: 0.98rem; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.langs a { color: var(--muted); }
.langs a:hover { color: var(--text); background: var(--page); }
.langs span[aria-current] { color: var(--lcd-ink); background: var(--lcd); }
.langs [lang="kk"] { font-family: "Fira Cond", "Plex Cond", sans-serif; }

/* hero */
.hero { padding-block: 24px 64px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1fr; gap: 56px; } .hero { padding-block: 48px 88px; } }
.hero h1 {
  font: 800 clamp(2.4rem, 1.5rem + 4.4vw, 4.4rem)/0.98 var(--f-disp);
  font-stretch: 88%;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 13em;
}
:lang(ar) .hero h1 { line-height: 1.3; font-size: clamp(2rem, 1.3rem + 3.6vw, 3.6rem); }
.lead { margin-top: 20px; font-size: 1.3rem; line-height: 1.45; max-width: 32em; }
.stores { margin-top: 20px; color: var(--muted); font-size: 1rem; }

/* scene: one press, the whole group hears */
.scene { margin: 0; display: grid; grid-template-columns: minmax(0, 14rem) 2.25rem minmax(0, 1fr); align-items: center; }
.talker { display: flex; flex-direction: column; gap: 10px; }
.lcd { background: var(--lcd); color: var(--lcd-ink); border: 2px solid var(--lcd-edge); border-radius: 18px; padding: 12px; display: grid; gap: 12px; }
.lcd-ch { display: flex; align-items: center; gap: 8px; font: 600 1.05rem/1.2 var(--f-disp); white-space: nowrap; overflow: hidden; }
.chip { background: var(--lcd-ink); color: var(--lcd); border-radius: 6px; padding: 2px 6px; font-weight: 800; font-size: 0.9rem; }
.plate { display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; font: 800 1.25rem/1 var(--f-disp); letter-spacing: 0.02em; }
.plate-tx { padding: 10px 12px; background: var(--speak); color: var(--on-fill); }
.key { position: relative; aspect-ratio: 300 / 170; border-radius: 26px; border: 2px solid var(--lcd-edge); background: var(--speak); color: var(--on-fill); display: grid; place-items: center; overflow: hidden; }
.key-globe { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.16; }
.key > .ico { position: relative; width: 52px; height: 52px; }
.who { font-weight: 600; line-height: 1.25; }
.me { text-align: center; color: var(--muted); }
.wire { height: 3px; background: var(--speak); transform-origin: left center; }
[dir="rtl"] .wire { transform-origin: right center; }
.listeners { list-style: none; margin: 0; padding: 0 0 0 0; padding-inline-start: 14px; border-inline-start: 3px solid var(--speak); display: grid; gap: 10px; }
.listeners li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 10px 12px; }
.listeners li::before { content: ""; position: absolute; inset-inline-start: -15px; top: 50%; width: 14px; height: 3px; margin-top: -1.5px; background: var(--speak); }
.plate-rx { padding: 6px 8px; font-size: 0.95rem; background: var(--receive); color: var(--on-fill); white-space: nowrap; }
@media (max-width: 639px) {
  .scene { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .talker { width: min(100%, 17rem); }
  .wire { width: 3px; height: 26px; transform-origin: center top; }
  [dir="rtl"] .wire { transform-origin: center top; }
  .listeners { width: 100%; grid-template-columns: 1fr 1fr; border-inline-start: 0; padding-inline-start: 0; border-top: 3px solid var(--speak); padding-top: 14px; }
  .listeners li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .listeners li::before { inset-inline-start: calc(50% - 1.5px); top: -15px; width: 3px; height: 14px; margin-top: 0; }
}
/* phones: a smaller scene with two listeners, so the next section starts sooner */
@media (max-width: 480px) {
  .hero { padding-block: 16px 40px; }
  .hero-grid { gap: 28px; }
  .talker { width: 13rem; gap: 8px; }
  .lcd { padding: 8px; gap: 8px; border-radius: 14px; }
  .lcd-ch { font-size: 0.95rem; }
  .plate-tx { padding: 7px 10px; font-size: 1.05rem; }
  .key { border-radius: 20px; }
  .key > .ico { width: 40px; height: 40px; }
  .me { font-size: 0.95rem; }
  .wire { height: 18px; }
  .listeners { width: min(100%, 20rem); gap: 8px; }
  .listeners .rx3, .listeners .rx4 { display: none; }
  .listeners li { padding: 8px 10px; }
}

/* the one moment: the key turns green, the group lights up blue */
@keyframes press { from { background: var(--idle-key); color: var(--idle-ink); } }
@keyframes draw { from { transform: scale(0); } }
@keyframes hear { from { background: var(--idle-key); color: var(--idle-ink); } }
@media (prefers-reduced-motion: no-preference) {
  .key, .plate-tx { animation: press 0.25s ease-out 0.6s both; }
  .wire { animation: draw 0.3s ease-out 0.85s both; }
  .plate-rx { animation: hear 0.25s ease-out 1.15s both; }
  .rx2 .plate-rx { animation-delay: 1.23s; }
  .rx3 .plate-rx { animation-delay: 1.31s; }
  .rx4 .plate-rx { animation-delay: 1.39s; }
}

/* sections */
.band { padding-block: 56px; border-top: 1px solid var(--hair); }
@media (min-width: 960px) { .band { padding-block: 80px; } }
.band h2 { font: 800 clamp(1.8rem, 1.3rem + 2vw, 2.7rem)/1.05 var(--f-disp); font-stretch: 90%; text-wrap: balance; max-width: 22em; }
:lang(ar) .band h2 { line-height: 1.35; }
.section-lead { margin-top: 14px; font-size: 1.2rem; max-width: 36em; }

.not { background: var(--lcd); color: var(--lcd-ink); border-top-color: var(--lcd-edge); }
.ledger { margin-top: 36px; display: grid; gap: 32px; }
@media (min-width: 800px) { .ledger { grid-template-columns: 1fr 1fr; gap: 48px; } }
.ledger h3 { font: 700 1.35rem/1.2 var(--f-disp); padding-bottom: 10px; border-bottom: 2px solid currentColor; }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding-block: 12px; border-bottom: 1px solid var(--lcd-edge); }
.ledger li .ico { margin-top: 0.15em; }
.ledger li div { color: var(--lcd-dim); }
.ledger strong { color: var(--lcd-ink); }
.ico.yes { color: var(--speak-ink); }
.ico.no { color: var(--bad); }

.cases { margin-top: 32px; display: grid; gap: 20px; }
@media (min-width: 800px) { .cases { grid-template-columns: 1fr 1fr; gap: 28px; } }
.case { background: var(--card); border: 1px solid var(--hair); border-radius: 18px; padding: 24px; }
.case h3 { font: 700 1.5rem/1.15 var(--f-disp); }
.case p { margin-top: 10px; color: var(--muted); }
.case ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.case li { position: relative; padding-inline-start: 20px; }
.case li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 2px; background: var(--globe); }
.who-1 { border: 2px solid var(--text); }
.facts { margin: 16px 0 0; display: grid; gap: 12px; }
.facts div { padding-top: 12px; border-top: 1px solid var(--hair); }
.facts dt { font-weight: 600; }
.facts dd { margin: 4px 0 0; color: var(--muted); }
.facts dd strong { color: var(--text); }
.why-h { margin-top: 48px; font: 700 1.5rem/1.2 var(--f-disp); }
.why { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; max-width: 46rem; }
.why li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding-block: 10px; border-bottom: 1px solid var(--hair); }
.why li .ico { margin-top: 0.15em; }
.why li div { color: var(--muted); }
.why strong { color: var(--text); }
.more { margin-top: 28px; font-weight: 600; font-size: 1.1rem; }
.apk { margin-top: 8px; font-size: 1rem; }
.badges { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.badges a { display: inline-flex; }
/* The Google Play badge carries its own clear space: 58px tall shows the same height as the 40px App Store badge. */
.badges .badge-gp { height: 58px; width: auto; margin: -9px 0; }
.badges .badge-as { height: 40px; width: auto; }
.case-group { margin-top: 40px; }
.case-group h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.cases-page h1 { font: 800 clamp(2rem, 1.4rem + 2.4vw, 3rem)/1.05 var(--f-disp); font-stretch: 90%; }
.use-h { margin-top: 14px; }

.steps { counter-reset: step; list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before { content: "0" counter(step); display: inline-block; background: var(--lcd-ink); color: var(--lcd); border-radius: 6px; padding: 3px 8px; font: 800 1.1rem/1.2 var(--f-disp); }
.steps h3 { margin-top: 14px; font: 600 1.3rem/1.25 var(--f-text); }
.steps p { margin-top: 6px; color: var(--muted); }

.plan-groups { margin-top: 32px; display: grid; gap: 40px; }
@media (min-width: 900px) { .plan-groups { grid-template-columns: 2fr 1fr; gap: 48px; } }
.group-h { font: 800 1.15rem/1.2 var(--f-disp); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.plans { margin-top: 16px; display: grid; gap: 32px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 40px; } }
.plan { padding-top: 16px; border-top: 3px solid var(--text); }
.plan h3 { font: 700 1.5rem/1.2 var(--f-disp); }
.plan p { margin-top: 12px; color: var(--muted); max-width: 32em; }
.prices { margin: 14px 0 0; display: grid; gap: 14px; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 22px; }
.price-row dt { flex-basis: 100%; font-weight: 600; }
.price-row dd { margin: 0; }
.amt { font: 800 2.4rem/1.1 var(--f-disp); font-variant-numeric: tabular-nums; }
.plan-group:first-child .plan:first-child .amt { color: var(--speak-ink); }
.per { color: var(--muted); }
.plans-note { margin-top: 32px; max-width: 46rem; }
.seller { margin-top: 14px; max-width: 46rem; color: var(--muted); font-size: 1rem; }
.pay { margin-top: 32px; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 22px; border-radius: 12px; background: var(--text); color: var(--page); font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.button:hover { color: var(--page); background: var(--speak-ink); }

/* footer */
.foot { border-top: 1px solid var(--hair); padding-block: 28px 40px; color: var(--muted); font-size: 1rem; }
.foot p + p, .foot-links + p { margin-top: 10px; }
.foot-links { gap: 8px 22px; }
.fine { font-size: 0.9rem; }

/* store pages */
.docnav { padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.docnav a, .docnav span { display: inline-block; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 1rem; text-decoration: none; color: var(--muted); }
.docnav span[aria-current] { color: var(--text); background: var(--card); box-shadow: inset 0 0 0 1px var(--hair); }
.docnav a:hover { color: var(--text); }
.doc { padding-block: 36px 64px; }
.doc > * { max-width: 46rem; }
.doc h1 { font: 800 clamp(1.7rem, 1.1rem + 2.8vw, 3rem)/1.05 var(--f-disp); font-stretch: 90%; }
:lang(ar) .doc h1 { line-height: 1.35; }
.updated { margin-top: 10px; color: var(--muted); font-size: 1rem; }
.doc h2 { margin-top: 2em; font: 600 1.4rem/1.25 var(--f-text); }
.doc p, .doc ul, .doc ol { margin: 0.8em 0 0; }
.doc ul, .doc ol { padding-inline-start: 1.3em; }
.doc li + li { margin-top: 0.4em; }
.doc .summary { margin-top: 24px; padding: 16px 20px; background: var(--lcd); color: var(--lcd-ink); border-radius: 14px; }
.doc .summary li { color: var(--lcd-ink); }
.doc .note { margin-top: 24px; padding: 12px 16px; border-inline-start: 4px solid var(--note); background: var(--card); border-radius: 8px; }
.doc .path { font-weight: 600; }

/* CPTT Field (ADR-0406): the home block and the three Field pages */
.field-head { display: flex; align-items: center; gap: 16px; }
.field-mark { width: 56px; height: 56px; flex: none; }
.field-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.field-page .why { margin-top: 24px; }
.field-page .cases { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.field-plan { margin-top: 32px; max-width: 32rem; }
