/* Ghalina website: ghalina.com (Firebase Hosting, backend/hosting/).
   Used by invite.html and 404.html (the home pages have home.css). Brand = the app's Plum & Champagne theme
   (docs/THEMES.md): plum #4A2545, ivory #f8f2e6, champagne gold #D4AF6A, red only for SOS. Fonts: Atkinson Hyperlegible Next (English), Readex Pro (Arabic), self-hosted.
   Plain CSS, logical properties (the Arabic page is the same CSS, right to left).
   Shapes: buttons and chips are pills; cards 28px outside / 20px inside; phone frames 44px.
   Layers (z-index): skip link 60, navigation 40 (inside it: bar 2 above the mobile menu 1), the front hero phone 1
   over the back one. Nothing else uses z-index. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Readex Pro";
  src: url("/assets/fonts/readex-pro.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2e9d6;
  --bg-2: #eadfc6;
  --surface: #f8f1e1;
  --line: rgb(34 20 32 / 0.1);
  --line-strong: #dbcaab;
  --text: #221420;
  --muted: #56455a;
  --primary: #4a2545;
  --primary-hover: #3d1f39;
  --primary-ink: #6b3a63;
  --on-primary: #fff6e8;
  --pc: #f1e3ee;
  --on-pc: #3a1b36;
  --accent: #d4af6a;
  --on-accent: #2a1c05;
  --ac: #f5e8cd;
  --on-ac: #57400f;
  --sand: #f2e9e6;
  --hero: #4a2545;
  --on-hero: #fff6e8;
  --hero-muted: #eadbe5;
  --sos: #c62828;
  --badge: #1c1019;
  --on-badge: #fff6e8;
  --frame-a: #3b2b36;
  --frame-b: #140d12;
  --focus: #4a2545;
  --shadow: 60 25 55;
  --tray: rgb(34 20 32 / 0.035);

  --font: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Readex Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-ar-system: "Noto Sans Arabic", "Segoe UI", "Geeza Pro", Tahoma, sans-serif;

  --gutter: 16px;
  --max: 1200px;
  --r-card: 28px;
  --r-inner: 20px;
  --hv-in: 120ms;
  --hv-out: 200ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 40px; }
}

/* Dark (owner 2026-10-21): only when the visitor chose it (assets/js/theme.js), never from the system setting. Values
   from theme.css: deep aubergine page, lighter plum cards with a gold rim, ivory text, gold accents. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--g-bg);
  --bg-2: var(--g-bg-2);
  --surface: var(--g-surface);
  --line: var(--g-line);
  --line-strong: var(--g-rim);
  --text: var(--g-text);
  --muted: var(--g-muted);
  --primary: #5a2d54;
  --primary-hover: #6d3866;
  --primary-ink: var(--g-link);
  --on-primary: #fff6e8;
  --pc: #3c2037;
  --on-pc: #f7ecd9;
  --accent: #e2c48a;
  --on-accent: #2a1c05;
  --ac: #3a2231;
  --on-ac: #f0d9a8;
  --sand: #2a1526;
  --hero: #3a1d36;
  --on-hero: #fff6e8;
  --hero-muted: #eadbe5;
  --badge: #12080f;
  --on-badge: #f7ecd9;
  --frame-a: #2a1f27;
  --frame-b: #0a0609;
  --focus: var(--g-focus);
  --shadow: var(--g-shadow);
  --tray: rgb(255 246 232 / 0.04);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.1875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] body {
  font-family: var(--font-ar);
  font-size: 1.125rem;
  line-height: 1.8;
}

html[lang="en"] [lang="ar"] { font-family: var(--font-ar-system); }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--primary-ink); text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }

p { margin: 0; text-wrap: pretty; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

html[lang="ar"] :is(h1, h2, h3) {
  font-weight: 700;
  letter-spacing: 0;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page { overflow-x: clip; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 60;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: 16px; }

/* ---------- Type ---------- */

.h1 {
  font-size: clamp(2.5rem, 1.45rem + 3.6vw, 4rem);
  line-height: 1.04;
}

.h2 {
  font-size: clamp(2rem, 1.4rem + 2.1vw, 3.125rem);
  line-height: 1.08;
  font-weight: 780;
}

.h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 720;
  letter-spacing: -0.01em;
}

html[lang="ar"] .h1 { font-size: clamp(2.25rem, 1.35rem + 3.2vw, 3.6rem); line-height: 1.3; }
html[lang="ar"] .h2 { font-size: clamp(1.85rem, 1.3rem + 1.9vw, 2.8rem); line-height: 1.3; font-weight: 700; }
html[lang="ar"] .h3 { font-size: 1.3rem; line-height: 1.45; font-weight: 600; }

.lead {
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(1.1875rem, 1.12rem + 0.35vw, 1.375rem);
  line-height: 1.55;
}

html[lang="ar"] .lead { font-size: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem); line-height: 1.8; }

.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pc);
  color: var(--on-pc);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[lang="ar"] .eyebrow { font-size: 0.95rem; letter-spacing: 0; text-transform: none; font-weight: 600; }

.section { padding-block: clamp(80px, 10vw, 144px); }

.section-head {
  display: grid;
  gap: 20px;
  max-width: 780px;
  margin-block-end: clamp(40px, 6vw, 72px);
}

.section-head--flush { margin-block-end: 0; }

.section-head--center {
  margin-inline: auto;
  justify-items: center;
  text-align: center;
}

.section-head--center .eyebrow { justify-self: center; }

/* ---------- Icons drawn in CSS (no icon font, nothing to download) ---------- */

.i-arrow {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.i-arrow::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-block-start: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  border-radius: 1px;
  transform: translateY(-50%) rotate(45deg);
}

[dir="rtl"] .i-arrow::after { transform: translateY(-50%) rotate(-45deg); }

.i-check {
  position: relative;
  flex: none;
  display: inline-grid;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--pc);
}

.i-check::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 6px;
  height: 11px;
  border-bottom: 2.5px solid var(--primary-ink);
  border-right: 2.5px solid var(--primary-ink);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 26px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--hv-out) ease-out, background-color var(--hv-out) ease-out, box-shadow var(--hv-out) ease-out;
}
.btn:hover, .btn:focus-visible, .btn:active, .btn:hover .btn__icon, .btn:focus-visible .btn__icon { transition-duration: var(--hv-in); }

.btn:active { transform: scale(0.98); }

.btn--icon { padding-inline-end: 8px; }

.btn__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  transition: transform var(--hv-out) ease-out;
}

.btn:hover .btn__icon { transform: translateX(3px) scale(1.05); }
[dir="rtl"] .btn:hover .btn__icon { transform: translateX(-3px) scale(1.05); }

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 14px 30px -16px rgb(var(--shadow) / 0.7);
}

.btn--primary:hover { background: var(--primary-hover); }
.btn--primary .btn__icon { background: rgb(255 255 255 / 0.16); }

.btn--light {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -18px rgb(var(--shadow) / 0.45);
}

.btn--light .btn__icon { background: var(--pc); color: var(--on-pc); }

.btn--sun {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 14px 30px -16px rgb(0 0 0 / 0.45);
}

.btn--sun .btn__icon { background: rgb(59 41 0 / 0.12); }

.btn--small { min-height: 44px; padding: 6px 20px; font-size: 1rem; }

html[lang="ar"] .btn { font-weight: 600; }

/* "Coming soon on Google Play": a store-style pill (Google's badge art is not used before the listing exists). */
.badge-play {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 26px 8px 18px;
  border-radius: 999px;
  background: var(--badge);
  color: var(--on-badge);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 14px 30px -18px rgb(0 0 0 / 0.5);
  transition: transform var(--hv-out) ease-out;
}
.badge-play:hover, .badge-play:focus-visible, .badge-play:active { transition-duration: var(--hv-in); }

.badge-play:active { transform: scale(0.98); }

.badge-play__glyph {
  width: 22px;
  height: 24px;
  flex: none;
  background: var(--accent);
  clip-path: polygon(8% 4%, 96% 50%, 8% 96%);
  border-radius: 3px;
}

.badge-play__text { display: grid; line-height: 1.15; text-align: start; }
.badge-play__text small { font-size: 0.8125rem; font-weight: 600; opacity: 0.85; }
.badge-play__text strong { font-size: 1.1875rem; font-weight: 750; letter-spacing: -0.01em; }
html[lang="ar"] .badge-play__text small { font-size: 0.875rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

/* ---------- Phone frame ---------- */

.phone {
  position: relative;
  margin: 0;
  width: 100%;
}

.phone__frame {
  position: relative;
  container-type: inline-size;
  padding: 3.4%;
  border-radius: 15% / 7%;
  background: linear-gradient(150deg, var(--frame-a), var(--frame-b));
  box-shadow:
    inset 0 0 0 1.5px rgb(255 255 255 / 0.09),
    0 44px 80px -36px rgb(var(--shadow) / 0.55),
    0 18px 32px -20px rgb(0 0 0 / 0.3);
}

.phone__frame img {
  width: 100%;
  aspect-ratio: 9 / 20;
  border-radius: 12% / 5.6%;
  object-fit: cover;
  object-position: top;
  background: #f2e9d6;
}

/* camera punch-hole, inside the status-bar strip of every screen */
.phone__frame::after {
  content: "";
  position: absolute;
  top: calc(3.4cqw + 1.4cqw);
  left: 50%;
  width: 3.4cqw;
  height: 3.4cqw;
  margin-left: -1.7cqw;
  border-radius: 50%;
  background: #070a09;
  box-shadow: inset 0 0 0 0.6cqw #1d2724;
}

.phone figcaption {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}



/* A phone that rises out of a coloured card and is cut at the card's edge. */
.peek {
  display: flex;
  justify-content: center;
  height: var(--peek-h, 300px);
  padding: 32px 28px 0;
  overflow: hidden;
  background: var(--tint, var(--bg-2));
}

.peek .phone { width: var(--peek-w, 240px); flex: none; }

/* ---------- Cards (outer tray + inner core) ---------- */

.card {
  padding: 7px;
  border-radius: var(--r-card);
  background: var(--tray);
  box-shadow: inset 0 0 0 1px var(--line);
}

.card__core {
  height: 100%;
  overflow: hidden;
  border-radius: var(--r-inner);
  background: var(--tint, var(--surface));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 24px 48px -36px rgb(var(--shadow) / 0.4);
}

.card__body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 26px 28px 30px;
}

.card__body p { color: var(--muted); }

.tint-mint { --tint: var(--pc); }
.tint-sun { --tint: var(--ac); }
.tint-sand { --tint: var(--sand); }
.tint-surface { --tint: var(--surface); }

.tint-mint .card__body p,
.tint-sun .card__body p,
.tint-sand .card__body p { color: var(--muted); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(40px, 6vw, 80px) clamp(72px, 9vw, 128px); }

.hero__grid {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero__copy { display: grid; gap: 28px; justify-items: start; container-type: inline-size; }

.hero__title span { display: block; }
.hero__title .soft { color: var(--primary-ink); }

/* Each sentence keeps to one line on wide screens: the size follows the column (11.8 em per sentence). */
.hero__title { font-size: clamp(2.5rem, 8.3cqi, 3.6rem); }
html[lang="ar"] .hero__title { font-size: clamp(2.25rem, 9.5cqi, 3.6rem); }

.hero__copy .lead { max-width: 34ch; }
html[lang="ar"] .hero__copy .lead { max-width: 38ch; }

.hero__phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-inline: 4%;
}

.hero__phones .phone { width: min(46vw, 272px); }

/* Mum's phone comes first and sits in front; the family phone slides under it. */
.hero__phones .phone--front {
  z-index: 1;
  translate: 0 9%;
  rotate: -3deg;
}

.hero__phones .phone--back {
  margin-inline-start: -12%;
  translate: 0 -2%;
  rotate: 3deg;
}

[dir="rtl"] .hero__phones .phone--back { rotate: -3deg; }
[dir="rtl"] .hero__phones .phone--front { rotate: 3deg; }

.hero__phones .phone figcaption {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
}

.hero__phones .phone { text-align: center; }
.hero__phones .phone--back { text-align: end; }

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.4fr 1fr; gap: 40px; }
  .hero__phones { justify-content: flex-end; padding-inline: 0; }
  .hero__phones .phone { width: min(20vw, 262px); }
}

@media (max-width: 1023px) {
  .hero__phones { margin-bottom: 7%; }
}

@media (max-width: 380px) {
  .hero .actions > * { width: 100%; }
}

/* ---------- How it works: three steps joined by a line ---------- */

.flow {
  position: relative;
  display: grid;
  gap: 20px;
  counter-reset: none;
}

.flow > li { position: relative; }

@media (min-width: 900px) {
  .flow { grid-template-columns: 1.1fr 0.9fr 1.1fr; align-items: start; gap: 24px; }
  .flow > li:nth-child(2) { margin-top: 88px; }
  .flow::before {
    content: "";
    position: absolute;
    inset-inline: 12% 12%;
    top: 150px;
    border-top: 2px dashed var(--line-strong);
  }
}

.flow .peek { --peek-h: 280px; }
.flow > li:nth-child(2) .peek { --peek-w: 210px; }

/* ---------- Safety story: three screens in order ---------- */

.story {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(76%, 300px);
  gap: 20px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  overscroll-behavior-x: contain;
}

.story > li { display: grid; align-content: start; gap: 22px; scroll-snap-align: start; }
.story .phone { width: 100%; max-width: 270px; margin-inline: auto; }

.story__text { display: grid; gap: 8px; padding-inline: 4px; }
.story__who { color: var(--primary-ink); font-size: 1rem; font-weight: 700; }
.story__text p:last-child { color: var(--muted); }

.story:focus-visible { outline-offset: -3px; border-radius: 20px; }

@media (min-width: 900px) {
  .story {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }
  .story > li:nth-child(2) { margin-top: 64px; }
}

.duo { display: grid; gap: 20px; margin-top: clamp(48px, 7vw, 88px); }

@media (min-width: 900px) {
  .duo { grid-template-columns: 1fr 1fr; }
}

.calls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.calls__person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 700;
}

html[dir="rtl"] .calls__person { padding: 6px 6px 6px 16px; }

.calls__initial {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ac);
  color: var(--on-ac);
  font-weight: 800;
}

.calls .i-arrow { color: var(--muted); }

.duo .split-card { display: grid; height: 100%; }

@media (min-width: 640px) {
  .duo .split-card--peek { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .duo .split-card--peek .peek { order: 2; height: 100%; min-height: 300px; padding-top: 28px; }
  .duo .split-card--peek .card__body { align-content: center; }
}

.duo .split-card--peek .peek { --peek-w: 200px; }

/* ---------- Medicines: phone + four points ---------- */

.meds {
  display: grid;
  gap: 48px;
  align-items: center;
}

.meds__media {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 64px) 24px;
  border-radius: var(--r-card);
  background: var(--ac);
}

.meds__media .phone { width: min(64vw, 290px); }

.points { display: grid; gap: 30px 44px; margin-top: 44px; }

.point { display: grid; gap: 6px; align-content: start; }
.point::before {
  content: "";
  width: 36px;
  height: 4px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: var(--accent);
}

.point p { color: var(--muted); }
.point .tag { justify-self: start; }

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--pc);
  color: var(--on-pc);
  font-size: 0.875rem;
  font-weight: 700;
  vertical-align: 2px;
}

.note {
  margin-top: 36px;
  color: var(--muted);
  font-size: 1rem;
}

@media (min-width: 640px) {
  .points { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .meds { grid-template-columns: 5fr 7fr; gap: 80px; }
}

/* ---------- Everyday features: bento ---------- */

.bento { display: grid; gap: 16px; }

.tile .card__core { display: flex; flex-direction: column; }
.tile .card__body { flex: none; }
.tile .peek { flex: 1; min-height: 260px; }

.tile--voice .card__core {
  background: var(--hero);
  color: var(--on-hero);
  justify-content: space-between;
}

.tile--voice .card__body p { color: var(--hero-muted); }

.voices {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
  gap: 10px;
  padding: 0 28px 30px;
}

.voices li {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
  font-size: 1.125rem;
  font-weight: 700;
}

/* The two main examples are shown big, as spoken phrases. */
.voices li.say {
  flex-basis: 100%;
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.voices li.say + li.say { margin-bottom: 12px; color: var(--accent); }
.voices li.say[lang="ar"] { font-weight: 700; letter-spacing: 0; }

.themes {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 28px);
  padding: 28px 20px 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--tint, var(--bg-2));
}

.themes .phone { width: min(30%, 200px); flex: none; }
.themes .phone:nth-child(2) { translate: 0 22px; }

.tile--themes .theme-names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.tile--themes .theme-names li {
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile--contacts { grid-column: span 6; }
  .tile--photos { grid-column: span 6; }
  .tile--magnifier { grid-column: span 3; }
  .tile--voice { grid-column: span 3; }
  .tile--themes { grid-column: span 6; }
}

@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .tile--contacts { grid-column: 1 / span 5; grid-row: 1 / span 2; }
  .tile--contacts .peek { --peek-w: 300px; }
  .tile--photos { grid-column: 6 / span 7; grid-row: 1; }
  .tile--photos .card__core { flex-direction: row; }
  .tile--photos .card__body { flex: 1; align-content: center; }
  .tile--photos .peek { flex: 0 0 46%; min-height: 330px; }
  .tile--magnifier { grid-column: 6 / span 3; grid-row: 2; }
  .tile--magnifier .peek { --peek-w: 190px; }
  .tile--voice { grid-column: 9 / span 4; grid-row: 2; }
  .tile--themes { grid-column: 1 / span 12; grid-row: 3; }
  .tile--themes .card__core { flex-direction: row; }
  .tile--themes .card__body { flex: 0 0 34%; align-content: center; padding-inline-start: 40px; }
  .tile--themes .themes { flex: 1; height: 360px; aspect-ratio: auto; }
}

/* ---------- Your phone: phone in the middle, points around it ---------- */

.orbit { display: grid; gap: 40px; align-items: center; }

.orbit__phone {
  display: grid;
  place-items: center;
  padding: 36px 20px;
  border-radius: var(--r-card);
  background: var(--pc);
}

.orbit__phone .phone { width: min(64vw, 280px); }

.orbit__col { display: grid; gap: 36px; }

@media (min-width: 640px) and (max-width: 1023px) {
  .orbit { grid-template-columns: 1fr 1fr; }
  .orbit__phone { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .orbit { grid-template-columns: 1fr minmax(300px, 1fr) 1fr; gap: 56px; }
  .orbit__col:first-child { text-align: end; }
  .orbit__col:first-child .point::before { justify-self: end; }
  .orbit__col:first-child .point .tag { justify-self: end; }
}

/* ---------- Privacy ---------- */

.panel {
  padding: 8px;
  border-radius: calc(var(--r-card) + 8px);
  background: color-mix(in srgb, var(--hero) 12%, transparent);
}

.panel__core {
  padding: clamp(36px, 6vw, 80px) clamp(24px, 6vw, 80px);
  border-radius: var(--r-card);
  background: var(--hero);
  color: var(--on-hero);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
  --focus: var(--accent);
}

.panel__core .lead { color: var(--hero-muted); }
.panel__core .eyebrow { background: rgb(255 255 255 / 0.12); color: var(--on-hero); }
.panel__core a { color: #ffffff; }

.promises { display: grid; gap: 36px 56px; margin-top: clamp(40px, 6vw, 64px); }

.promise { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; }
.promise .i-check { grid-row: span 2; margin-top: 2px; background: var(--accent); }
.promise .i-check::after { border-color: var(--on-accent); }
.promise p { grid-column: 2; color: var(--hero-muted); }

.panel__link { display: inline-flex; align-items: center; gap: 12px; margin-top: 48px; font-weight: 700; }

@media (min-width: 768px) {
  .promises { grid-template-columns: 1fr 1fr; }
}

/* ---------- Pricing ---------- */

.plans { display: grid; gap: 20px; align-items: stretch; }

.plan { display: flex; flex-direction: column; }

.plan__core {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 22px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-inner);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), 0 24px 48px -36px rgb(var(--shadow) / 0.4);
}

.plan--pass {
  padding: 8px;
  border-radius: var(--r-card);
  background: var(--primary);
}

.plan--free { padding: 8px; border-radius: var(--r-card); background: var(--tray); box-shadow: inset 0 0 0 1px var(--line); }

.plan__ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 14px;
  color: var(--on-primary);
  font-weight: 700;
}

.plan__ribbon .tag { flex: none; background: var(--accent); color: var(--on-accent); white-space: nowrap; }

.plan__name { font-size: 1.5rem; }

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.price strong {
  font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

html[lang="ar"] .price strong { letter-spacing: 0; font-weight: 700; }
.price span { color: var(--muted); font-weight: 700; }

.checks { display: grid; gap: 14px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; }
.checks .i-check { margin-top: 1px; }

.plans__foot { margin-top: 28px; color: var(--muted); font-size: 1rem; text-align: center; }

@media (min-width: 900px) {
  .plans { grid-template-columns: 1fr 1.12fr; }
}

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 40px; }

.faq__head { display: grid; gap: 18px; align-content: start; }

.faq__list { display: grid; gap: 12px; }

.faq details {
  border-radius: var(--r-inner);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.faq summary {
  position: relative;
  display: block;
  padding: 22px 64px 22px 24px;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-inner);
}

html[dir="rtl"] .faq summary { padding: 22px 24px 22px 64px; }

.faq summary::-webkit-details-marker { display: none; }

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 24px;
  top: 50%;
  width: 18px;
  height: 2.5px;
  margin-top: -1.25px;
  border-radius: 2px;
  background: var(--primary-ink);
  transition: transform 0.5s var(--spring);
}

.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }

.faq details > div { padding: 0 24px 24px; color: var(--muted); }
.faq details > div p + p { margin-top: 10px; }

@media (min-width: 1024px) {
  .faq { grid-template-columns: 4fr 7fr; gap: 72px; }
  .faq__head { position: sticky; top: 120px; }
}

/* ---------- Beta ---------- */

.beta {
  padding: 8px;
  border-radius: calc(var(--r-card) + 8px);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.beta__core {
  display: grid;
  gap: 48px;
  padding: clamp(32px, 6vw, 72px);
  border-radius: var(--r-card);
  background: var(--ac);
}

.beta__copy { display: grid; gap: 22px; align-content: start; justify-items: start; }
.beta__copy .eyebrow { background: var(--accent); color: var(--on-accent); }
.beta__copy .lead,
.beta__note { color: var(--on-ac); }
.beta__note { font-size: 1rem; }

.steps { display: grid; gap: 14px; counter-reset: step; }

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  padding: 22px 24px;
  border-radius: var(--r-inner);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
}

.steps p { color: var(--muted); }

.beta__msg {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (min-width: 1024px) {
  .beta__core { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
}

/* ---------- Footer ---------- */

.footer {
  padding-block: 64px 48px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.footer__grid { display: grid; gap: 40px; }

.footer__brand { display: grid; gap: 16px; align-content: start; max-width: 46ch; }
.footer__brand p { color: var(--muted); }

.footer__mail { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 750; }

.footer h2 { margin-bottom: 14px; font-size: 1rem; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.footer ul { display: grid; gap: 10px; }
.footer ul a { color: var(--text); font-weight: 600; text-decoration: none; }
.footer ul a:hover { text-decoration: underline; }

.footer__legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Simple pages: invite, 404 ---------- */

.simple-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100% - 2 * var(--gutter), 720px);
  margin: 0 auto;
  padding-block: 20px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.lang-btn__globe { width: 19px; height: 19px; flex: none; }
.lang-btn[lang="ar"] { font-family: var(--font-ar-system); }
html[lang="ar"] .lang-btn:not([lang="ar"]) { font-family: var(--font); }

.simple {
  width: min(100% - 2 * var(--gutter), 720px);
  margin: 0 auto;
  padding-block: 8px 72px;
  display: grid;
  gap: 24px;
}

.invite-card .card__core { padding: clamp(24px, 6vw, 48px); display: grid; gap: 20px; justify-items: start; }
.invite-card h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); line-height: 1.12; }
html[lang="ar"] .invite-card h1 { font-size: clamp(1.6rem, 1.15rem + 2.2vw, 2.3rem); line-height: 1.45; }
.invite-card .lead { font-size: 1.1875rem; }

.code {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 22px 24px;
  border-radius: var(--r-inner);
  background: var(--pc);
}

.code__label { color: var(--on-pc); font-weight: 700; font-size: 1rem; }

.code__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }

.code__value {
  direction: ltr;
  color: var(--on-pc);
  font-family: var(--font);
  /* 12 characters in groups of four (K7M2-9QXR-4HTD): fits a 320 px phone. */
  font-size: clamp(1.55rem, 1rem + 2.8vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.code__copy { min-height: 44px; }

.invite-error {
  width: 100%;
  padding: 18px 22px;
  border-radius: var(--r-inner);
  background: var(--ac);
  color: var(--on-ac);
}

.install { display: grid; gap: 20px; padding: clamp(28px, 6vw, 40px); }
.install h2 { font-size: 1.5rem; }
.install .steps li { background: var(--bg); }

.simple-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  color: var(--muted);
  font-size: 1rem;
}

.simple-foot a { color: var(--muted); font-weight: 600; }

[hidden] { display: none !important; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise 0.9s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero__phones .phone--back { animation: rise-phone 1.2s var(--ease) 0.1s both; }
  .hero__phones .phone--front { animation: rise-phone 1.2s var(--ease) 0.22s both; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal both var(--ease);
      animation-timeline: view();
      animation-range: entry 0% cover 24%;
    }
    .reveal:nth-child(2) { animation-range: entry 6% cover 30%; }
    .reveal:nth-child(3) { animation-range: entry 12% cover 36%; }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
}

@keyframes rise-phone {
  from { opacity: 0; transform: translateY(48px); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(56px) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- The beta page (beta.html, 2026-10-10) ---------- */

.beta-page { display: grid; gap: 24px; }
.beta-hero .card__core { display: grid; gap: 18px; justify-items: center; padding: clamp(28px, 6vw, 52px); text-align: center; }
.beta-hero__logo { width: 112px; height: 112px; } /* the mark-only logo carries its own gold rim and corners (2026-10-24) */
.beta-hero h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); line-height: 1.15; }
html[lang="ar"] .beta-hero h1 { line-height: 1.45; }
.beta-hero .lead { max-width: 34rem; font-size: 1.1875rem; }
.btn--big { min-height: 64px; padding-inline: 34px; font-size: 1.1875rem; white-space: normal; text-align: center; }
.beta-hero__note { color: var(--muted); font-size: 1rem; }
.beta-page .install { scroll-margin-top: 16px; }
.beta-page .install:focus { outline: none; }
.beta-page .steps li > * { grid-column: 2; }
@media (max-width: 559px) {
  .beta-page .install { padding: 24px 14px; }
  .beta-page .steps li { gap: 4px 12px; padding: 18px 14px; }
}
.beta-sub { display: grid; gap: 6px; margin-top: 6px; padding-inline-start: 1.3em; list-style: disc; color: var(--muted); }
.beta-page .steps .beta-sub li { display: list-item; padding: 0; border-radius: 0; background: none; box-shadow: none; counter-increment: none; }
.beta-page .steps .beta-sub li::before { content: none; }
.beta-page__note { color: var(--muted); }

/* The "Join the beta" form (v30, 2026-10-10) */
.beta-form { display: grid; gap: 12px; width: 100%; max-width: 30rem; margin-top: 4px; text-align: start; }
.beta-form__label { font-weight: 700; font-size: 1.0625rem; }
html[lang="ar"] .beta-form__label { font-weight: 600; }
.beta-form__input {
  width: 100%;
  min-height: 60px;
  padding: 14px 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 18px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1.1875rem;
  transition: border-color var(--hv-out) ease-out, box-shadow var(--hv-out) ease-out;
}
.beta-form__input:hover, .beta-form__input:focus { transition-duration: var(--hv-in); }
[dir="rtl"] .beta-form__input { text-align: right; }
.beta-form__input:hover { border-color: var(--primary-ink); }
.beta-form__input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.beta-form__input[aria-invalid="true"] { border-color: var(--sos); }
.beta-form .btn--big { width: 100%; margin-top: 4px; }
.beta-form .btn[disabled] { opacity: 0.75; cursor: progress; transform: none; }
.beta-form__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.beta-form__status:empty { display: none; }
.beta-form__msg { display: grid; gap: 8px; padding: 14px 18px; border-radius: 16px; font-size: 1rem; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.beta-form__msg[hidden] { display: none; }
.beta-form__msg--ok { background: var(--pc); color: var(--on-pc); }
.beta-form__msg--error { background: color-mix(in srgb, var(--sos) 8%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sos) 35%, transparent); }
.beta-form__fallback { font-size: 0.9375rem; }
.beta-form__fallback a, .beta-form__msg a { color: var(--primary-ink); }
.beta-form .beta-hero__note { text-align: center; }

/* ---------- Phones up to 420 px: the invite code fits its card; Arabic buttons with two lines (2026-10-20) ---------- */
@media (max-width: 420px) {
  .code { padding: 18px 16px; }
  .code__value { font-size: clamp(1.2rem, 6.4vw, 1.55rem); letter-spacing: 0.04em; }
}
.btn:lang(ar) { line-height: 1.45; }

/* ---------- Light and dark (owner 2026-10-21) ---------- */

/* The moon/sun button sits before the language button (theme.css draws it). */
.simple-head .brand { margin-inline-end: auto; }
.lang-btn { transition: background-color var(--hv-out) ease-out, box-shadow var(--hv-out) ease-out; }
.lang-btn:hover, .lang-btn:focus-visible, .lang-btn:active { transition-duration: var(--hv-in); }
.lang-btn:hover { background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--primary-ink); }
.lang-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[data-theme="dark"] .lang-btn { box-shadow: inset 0 0 0 1px var(--line-strong); }
[data-theme="dark"] .lang-btn:hover { background: var(--g-surface-2); box-shadow: inset 0 0 0 1.5px var(--primary-ink); }
[data-theme="dark"] .card { box-shadow: inset 0 0 0 1px var(--g-rim); }
[data-theme="dark"] .card__core { box-shadow: inset 0 1px 0 rgb(255 246 232 / 0.05), 0 24px 48px -36px rgb(0 0 0 / 0.7); }
[data-theme="dark"] .brand img { filter: drop-shadow(0 3px 6px rgb(0 0 0 / 0.55)); }

/* The beta is on Google Play by invitation: a plain text line (no store badge until the public page exists). */
.soon { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.soon::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.7; }
