/* adwety.com: the one stylesheet (scripts/build-site.mjs copies it to hosting/assets).
   Colours, radii and shadows are the app's (src/theme/tokens.ts: cyan, cyanV3Radius,
   planGold); the dark theme follows the device. Fonts are the app's: Poppins (English),
   Almarai (Arabic), self-hosted subsets. */

@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/poppins-400.woff2?v=c3a9d8d9fa") format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/poppins-600.woff2?v=5c6978da2f") format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/poppins-700.woff2?v=4980dfb0e5") format("woff2"); }
@font-face { font-family: Almarai; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/almarai-400.woff2?v=bc322146e7") format("woff2"); }
@font-face { font-family: Almarai; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/almarai-700.woff2?v=a08ab5f976") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #F1FBFD;            /* cyan.bg: the app's screen ground */
  --surface: #FFFFFF;       /* cyan.surface: cards */
  --primary: #0E7490;       /* cyan.primary: buttons, links */
  --primary-pressed: #0B5563;
  --on-primary: #FFFFFF;
  --accent: #8ED8EC;        /* cyan.accent */
  --tint: #D6F0F7;          /* cyan.tint: chips, icon tiles */
  --tint-soft: #E4F4F9;     /* cyan.neutralTint */
  --border: #C6E6EF;        /* cyan.border */
  --text: #0A2A33;          /* cyan.text */
  --muted: #4A6B73;         /* cyan.muted */
  --logo: #64C2E9;          /* the icon's blue */
  --gold: #D4A72C;          /* planGold */
  --gold-bg: #FBF1D3;
  --gold-text: #7A5A08;
  --r-card: 20px;           /* cyanV3Radius */
  --r-input: 14px;
  --r-btn: 16px;
  --shadow-card: 0 3px 14px rgba(12, 40, 35, 0.07);
  --shadow-btn: 0 6px 18px rgba(11, 85, 99, 0.25);
  --font: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --phone: #0A2A33;
  --phone-edge: #24414a;
  --phone-shadow: 0 24px 60px rgba(10, 42, 51, 0.22);
}
.lang-ar { --font: Almarai, "Noto Kufi Arabic", "Segoe UI", Tahoma, "Geeza Pro", Arial, sans-serif; }

/* Dark: the device's setting, unless the visitor chose Light; or the visitor chose Dark
   (the theme switch: site.js sets data-theme on <html> before the page draws). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B1A1F;
    --surface: #12262D;
    --primary: #8ED8EC;
    --primary-pressed: #B9E8F4;
    --on-primary: #0A2A33;
    --tint: #18363F;
    --tint-soft: #15303A;
    --border: #1E3A43;
    --text: #E6F4F8;
    --muted: #9DBBC3;
    --gold: #C9A23A;
    --gold-bg: #3A2F12;
    --gold-text: #F1D27A;
    --shadow-card: none;
    --shadow-btn: none;
    --phone: #050d10;
    --phone-edge: #2a4650;
    --phone-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1A1F;
  --surface: #12262D;
  --primary: #8ED8EC;
  --primary-pressed: #B9E8F4;
  --on-primary: #0A2A33;
  --tint: #18363F;
  --tint-soft: #15303A;
  --border: #1E3A43;
  --text: #E6F4F8;
  --muted: #9DBBC3;
  --gold: #C9A23A;
  --gold-bg: #3A2F12;
  --gold-text: #F1D27A;
  --shadow-card: none;
  --shadow-btn: none;
  --phone: #050d10;
  --phone-edge: #2a4650;
  --phone-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.65; text-rendering: optimizeLegibility;
}
.lang-ar body, body.lang-ar { line-height: 1.8; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-pressed); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 12px; font-weight: 700; }
h1 { font-size: clamp(30px, 6vw, 48px); letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -0.01em; }
h3 { font-size: 18px; }
.lang-ar h1, .lang-ar h2 { letter-spacing: 0; }
p { margin: 0 0 12px; }
/* Focus rings for the keyboard only: a tap or a click shows none (and iOS's grey tap box is off). */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--logo); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 20; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 24px; border-radius: var(--r-btn);
  font: 600 16px/1.2 var(--font); text-decoration: none; border: 0; cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--primary-pressed); color: var(--on-primary); }
.btn-small { min-height: 42px; padding: 8px 18px; font-size: 15px; box-shadow: none; }

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); }
/* The frosted glass on a layer of its own: a backdrop-filter on the bar itself would make
   the phone menu's fixed backdrop fill only the bar. */
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); }
.brand:hover { color: var(--text); }
.nav-desktop { display: none; gap: 4px; margin-inline-start: 12px; }
.nav-desktop a, .menu-panel > a:not(.btn) {
  color: var(--text); text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 10px;
}
.nav-desktop a:hover, .menu-panel > a:not(.btn):hover { background: var(--tint-soft); color: var(--text); }
.topbar-actions { display: none; align-items: center; gap: 12px; margin-inline-start: auto; }
.lang-switch { font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.lang-switch[lang="ar"] { font-family: Almarai, Tahoma, Arial, sans-serif; }
.lang-switch[lang="en"] { font-family: Poppins, -apple-system, "Segoe UI", Arial, sans-serif; }
.menu { margin-inline-start: auto; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  /* Fixed to the screen, right under the (sticky) top bar, wherever the page is scrolled. */
  position: fixed; inset-inline-end: 16px; top: 66px; z-index: 2; width: min(300px, calc(100vw - 32px));
  max-height: calc(100vh - 82px); max-height: calc(100dvh - 82px); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: 0 12px 32px rgba(10, 42, 51, 0.16);
  opacity: 0; transform: translateY(-8px); transition: opacity 200ms ease, transform 200ms ease;
}
/* The phone menu: a dimmed backdrop over the whole page (a tap on it only closes the menu),
   the panel above it; site.js opens and closes them with a 200 ms fade. */
.menu summary { position: relative; z-index: 3; }
.menu-backdrop {
  position: fixed; inset: 0; z-index: 1; background: rgba(6, 30, 38, 0.38); opacity: 0;
  transition: opacity 200ms ease; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.menu.is-open .menu-backdrop { opacity: 1; }
.menu.is-open .menu-panel { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .menu-backdrop { background: rgba(0, 0, 0, 0.55); } }
:root[data-theme="dark"] .menu-backdrop { background: rgba(0, 0, 0, 0.55); }
/* Only the root: overflow on body as well would make body the box the sticky bar sticks to,
   and the bar (with the menu) would jump to the top of the page. */
html.menu-locked { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .menu-panel, .menu-backdrop { transition: none; } }
.menu-panel .lang-switch { margin: 6px 0; text-align: center; }
.menu-panel .btn { width: 100%; }
@media (min-width: 900px) {
  .nav-desktop, .topbar-actions { display: flex; }
  .menu { display: none; }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-tint { background: var(--tint-soft); }
@media (min-width: 900px) { .section { padding: 80px 0; } }
.section-title { text-align: center; margin-bottom: 28px; }
.section-lead { text-align: center; color: var(--muted); max-width: 640px; margin: -12px auto 28px; font-size: 17px; }
.lead { font-size: 18px; color: var(--muted); }
.note { text-align: center; color: var(--muted); font-size: 14px; max-width: 680px; margin: 24px auto 0; }
.muted { color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.grid { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 640px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { padding: 40px 0 24px; }
.hero-inner { display: grid; gap: 36px; align-items: center; }
.hero-text { text-align: center; }
.hero-text .lead { max-width: 560px; margin: 0 auto 24px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.badge { display: inline-block; border-radius: 9px; }
.badge img { height: 48px; width: auto; }
.soon { margin-top: 12px; color: var(--muted); font-size: 14px; }
.hero-phone { display: flex; justify-content: center; }
.phone {
  width: 270px; padding: 9px; border-radius: 44px; background: var(--phone);
  box-shadow: var(--phone-shadow), inset 0 0 0 2px var(--phone-edge);
}

/* ── The family demo: four screenshots, a profile chip in each is a tab ─────── */
.demo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.demo-screens { position: relative; aspect-ratio: 645 / 1398; border-radius: 35px; overflow: hidden; background: #F1FBFD; }
/* A slow, soft crossfade with a hint of movement (just the fade with reduced motion). */
.demo-shot { position: absolute; inset: 0; opacity: 0; transform: translateY(6px); transition: opacity 800ms ease, transform 800ms ease; }
.demo-shot.is-active { opacity: 1; transform: none; }
.demo-bar { display: flex; align-items: center; justify-content: center; gap: 10px; }
.demo-toggle {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.demo-toggle svg { width: 16px; height: 16px; }
.demo-toggle .i-play { display: none; }
.demo-toggle[aria-pressed="true"] .i-play { display: block; }
.demo-toggle[aria-pressed="true"] .i-pause { display: none; }
.demo-shot img { width: 100%; height: 100%; }
.demo-tabs { position: absolute; inset: 0; pointer-events: none; }
.demo-tab {
  position: absolute; pointer-events: auto; padding: 0; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.demo-tab:focus { outline: none; }
.demo-tab:focus-visible { outline: 3px solid var(--logo); outline-offset: 1px; }
.demo-hint { color: var(--muted); font-size: 14px; text-align: center; margin: 0; }
@media (prefers-reduced-motion: reduce) { .demo-shot { transform: none; transition: opacity 800ms ease; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Theme switch: sun at the start, moon at the end, the knob slides to the theme in use ─ */
.theme-toggle {
  position: relative; flex: none; width: 66px; height: 36px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--tint-soft); color: var(--muted);
}
.theme-toggle .tt-knob {
  position: absolute; top: 3px; inset-inline-start: 3px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(10, 42, 51, 0.25); transition: transform 260ms ease;
}
.theme-toggle .tt-icon {
  position: absolute; top: 9px; width: 16px; height: 16px; z-index: 1; transition: color 260ms ease;
}
.theme-toggle .tt-sun { inset-inline-start: 9px; color: var(--gold); }
.theme-toggle .tt-moon { inset-inline-end: 9px; }
.theme-toggle[aria-checked="true"] .tt-knob { transform: translateX(30px); }
[dir="rtl"] .theme-toggle[aria-checked="true"] .tt-knob { transform: translateX(-30px); }
.theme-toggle[aria-checked="true"] .tt-sun { color: var(--muted); }
.theme-toggle[aria-checked="true"] .tt-moon { color: var(--primary); }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; color: var(--text); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .theme-toggle .tt-knob, .theme-toggle .tt-icon { transition: none; } }
@media (min-width: 900px) {
  .hero { padding: 64px 0 40px; }
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .hero-text { text-align: start; }
  .hero-text .lead { margin-inline: 0; }
  .badges { justify-content: flex-start; }
  .phone { width: 300px; }
}

/* ── Features, family, steps ──────────────────────────────────────────────── */
.feature { padding: 24px; }
.feature p, .step p { color: var(--muted); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--tint); color: var(--primary); margin-bottom: 16px; }
.split { display: grid; gap: 28px; align-items: center; }
.split .section-title { text-align: start; margin-bottom: 12px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
/* A screenshot beside its text: text first on phones; on wide screens the shot leads
   (left in English, right in Arabic: the grid follows the page's direction). */
.split-media .split-shot { order: 2; display: flex; justify-content: center; }
.phone-sm { width: 250px; }
.phone .shot { display: block; width: 100%; height: auto; border-radius: 35px; }
@media (min-width: 900px) {
  .split-media { grid-template-columns: 0.8fr 1.2fr; }
  .split-media .split-shot { order: 0; }
  .phone-sm { width: 280px; }
}
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks-large { padding: 24px; gap: 16px; font-weight: 500; }
.icon-check { flex: none; width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.lang-ar .icon-check { margin-top: 4px; }
.step { padding: 24px; position: relative; }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 700; margin-bottom: 14px; }

/* ── Plans ────────────────────────────────────────────────────────────────── */
.plan { padding: 24px; display: flex; flex-direction: column; }
.plan h3 { font-size: 20px; margin-bottom: 2px; }
.plan-who { color: var(--muted); margin-bottom: 18px; font-size: 15px; }
.plan-paid { border: 2px solid var(--gold); }
.plan-family .plan-who { display: inline-block; align-self: flex-start; background: var(--gold-bg); color: var(--gold-text); padding: 2px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 12px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary { align-items: center; }
.faq-chev { flex: none; width: 22px; height: 22px; color: var(--primary); transition: transform 300ms ease; }
/* site.js animates the answer's height (300 ms) and marks a closing item so the chevron
   turns back with it; without the script the details open and close as usual. */
.faq details[open]:not(.is-closing) .faq-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .faq-chev { transition-duration: 150ms; } }
.faq-a { overflow: hidden; }
.faq details p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* ── Legal pages ──────────────────────────────────────────────────────────── */
.doc { padding-top: 32px; padding-bottom: 56px; max-width: 840px; }
.doc-card { padding: 28px 20px; }
@media (min-width: 720px) { .doc-card { padding: 44px 48px; } }
.doc-card h1 { font-size: clamp(28px, 5vw, 38px); }
.doc-card h2 { font-size: 21px; margin-top: 32px; scroll-margin-top: 90px; }
.doc-card p, .doc-card li { max-width: 70ch; }
.doc-card ul, .doc-card ol { padding-inline-start: 22px; }
.doc-card li { margin-bottom: 6px; }
.toc { background: var(--tint-soft); border-radius: var(--r-input); padding: 16px 20px; margin: 20px 0 8px; }
.toc-title { font-weight: 600; margin: 0 0 6px; }
.toc ol { margin: 0; padding: 0; list-style: none; columns: 1; }   /* the headings carry their numbers */
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 32px; } }
.toc li { margin: 2px 0; break-inside: avoid; }

/* ── Confirmed, 404 ───────────────────────────────────────────────────────── */
.center-page { padding-top: 48px; padding-bottom: 64px; }
.center-card { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.center-card h1 { font-size: clamp(26px, 5vw, 34px); }
.center-card .btn { margin: 12px 0 8px; min-width: 220px; }
.center-icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 20px; box-shadow: 0 0 0 1px var(--border); }
.big-code { font-size: 64px; font-weight: 700; color: var(--accent); margin: 0; line-height: 1; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
.footer-links a { color: var(--text); }
.footer-note { max-width: 640px; }
.footer-copy { margin: 0; }

/* Built: the family demo's tabs over the chips (site/content.mjs DEMO_CHIPS). */
.demo-en .demo-tab-youssef { left: 17.984%; width: 20.853%; top: 16.130%; height: 3.863%; }
.demo-en .demo-tab-mom { left: 40.233%; width: 16.202%; top: 16.130%; height: 3.863%; }
.demo-en .demo-tab-dad { left: 57.829%; width: 14.496%; top: 16.130%; height: 3.863%; }
.demo-en .demo-tab-salma { left: 73.721%; width: 18.682%; top: 16.130%; height: 3.863%; }
.demo-ar .demo-tab-youssef { left: 62.713%; width: 17.054%; top: 16.130%; height: 3.863%; }
.demo-ar .demo-tab-mom { left: 48.217%; width: 13.101%; top: 16.130%; height: 3.863%; }
.demo-ar .demo-tab-dad { left: 35.891%; width: 10.930%; top: 16.130%; height: 3.863%; }
.demo-ar .demo-tab-salma { left: 18.217%; width: 16.279%; top: 16.130%; height: 3.863%; }
