/* server/public/landing/site.css - The Kalimat website: landing page and the privacy, terms and account pages.
   "Night Courtyard" like the app (src/ui/theme.ts): deep teal ink, lamplight gold, ivory parchment. */
:root {
  --ink: #07161A;
  --bg: #0B1D22;
  --raised: #10262C;
  --surface: #153038;
  --surface-hi: #1C3D46;
  --line: rgba(246, 238, 220, 0.09);
  --line-strong: rgba(246, 238, 220, 0.16);
  --gold: #E9B949;
  --gold-bright: #F7D27A;
  --gold-deep: #B98A24;
  --gold-soft: rgba(233, 185, 73, 0.14);
  --emerald: #3DBE8B;
  --emerald-soft: rgba(61, 190, 139, 0.14);
  --sky: #72B8DB;
  --rose: #E8766B;
  --ivory: #F6EEDC;
  --muted: #9DB5B1;
  --faint: #63807C;
  --on-gold: #241A05;
  --radius: 24px;
  --display: 'Baloo Bhaijaan 2', 'Readex Pro', system-ui, sans-serif;
  --body: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arabic: 'Amiri', 'Noto Naskh Arabic', serif;
  /* An eight-pointed star lattice (khātam), drawn in gold at low opacity. */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23E9B949' stroke-opacity='.08' stroke-width='1.3'%3E%3Crect x='24' y='24' width='72' height='72'/%3E%3Crect x='24' y='24' width='72' height='72' transform='rotate(45 60 60)'/%3E%3Ccircle cx='60' cy='60' r='15'/%3E%3Cpath d='M0 0L22 22M120 0L98 22M0 120L22 98M120 120L98 98M60 0V9M60 120V111M0 60H9M120 60H111'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ivory); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.ar { font-family: var(--arabic); font-weight: 700; direction: rtl; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--on-gold); padding: 8px 14px; border-radius: 99px; z-index: 50; }
.skip:focus { left: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 22, 26, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ivory); text-decoration: none; font: 600 18px var(--body); letter-spacing: 0.14em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ivory); }
.top .play.small { margin-left: 8px; }
@media (max-width: 760px) { .nav { display: none; } .top .play.small { margin-left: auto; } }

/* Store buttons (App Store and Google Play) */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .stores { justify-content: center; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; transition: transform .15s ease, box-shadow .15s ease; }
.badge img { height: 54px; width: auto; }
.badge:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.badge:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (max-width: 420px) { .badge img { height: 48px; } }
.play {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--gold); color: var(--on-gold);
  border-radius: 999px; padding: 12px 24px 12px 18px;
  text-decoration: none; font-weight: 600; line-height: 1.15;
  box-shadow: 0 10px 30px rgba(233, 185, 73, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
  transition: transform .15s ease, box-shadow .15s ease;
}
.play:hover { color: var(--on-gold); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(233, 185, 73, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.15); }
.play svg { width: 26px; height: 26px; flex: none; }
.play small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.play span { font-size: 19px; }
.play.small { padding: 8px 16px 8px 12px; gap: 8px; box-shadow: none; }
.play.small svg { width: 18px; height: 18px; }
.play.small span { font-size: 14px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: var(--pattern) center top / 120px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 60% 20%, #000 20%, transparent 75%);
}
.hero::after {
  content: ''; position: absolute; width: 900px; height: 900px; right: -260px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 74, 82, 0.9), rgba(11, 29, 34, 0) 65%);
  z-index: -1;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow { font: 600 13px var(--body); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6.2vw, 68px); }
h1 em { font-style: normal; color: var(--gold-bright); }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin: 18px 0 28px; max-width: 34em; }
.hero-logo { width: 84px; height: 84px; margin-bottom: 22px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .4)); }
.promises { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.promises li { display: flex; align-items: center; gap: 8px; }
.promises svg { width: 18px; height: 18px; color: var(--emerald); flex: none; }

/* Phones */
.phones { position: relative; height: 620px; }
.phone {
  position: absolute; width: 270px; aspect-ratio: 360 / 780;
  border-radius: 38px; padding: 9px; background: #050D10;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1.5px rgba(247, 217, 140, .35), inset 0 0 0 1.5px rgba(255, 255, 255, .06);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 30px; }
.phones .phone:nth-child(1) { left: 6%; top: 40px; transform: rotate(-6deg); }
.phones .phone:nth-child(2) { right: 4%; top: 0; transform: rotate(4deg); z-index: 1; }
.phones .halo { position: absolute; inset: 10% 5%; border-radius: 50%; background: radial-gradient(circle, rgba(233, 185, 73, .28), transparent 65%); filter: blur(30px); }

@media (max-width: 900px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .phones { height: 480px; max-width: 440px; width: 100%; margin: 0 auto; }
  .phone { width: 205px; border-radius: 30px; padding: 7px; }
  .phone img { border-radius: 24px; }
}
@media (max-width: 420px) {
  .phones { height: 400px; }
  .phone { width: 170px; }
  .play span { font-size: 17px; }
}

/* Facts strip */
.facts { border-block: 1px solid var(--line); background: var(--raised); }
.facts ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.facts li { text-align: center; }
.facts b { display: block; font: 800 30px/1.1 var(--display); color: var(--gold-bright); }
.facts span { color: var(--muted); font-size: 14px; }
@media (max-width: 700px) { .facts ul { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
section { padding: 84px 0; position: relative; }
.section-head { max-width: 680px; margin: 0 0 44px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
h2 { font-size: clamp(32px, 4.4vw, 48px); }
.section-head p { color: var(--muted); font-size: 18px; margin: 14px 0 0; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 36px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature .text { max-width: 500px; }
.feature.flip .shot { order: 2; }
.feature h3 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 14px; }
.feature p { color: var(--muted); margin: 0 0 14px; }
.feature .ar-word { font-size: 44px; color: var(--gold); line-height: 1.2; margin: 0 0 6px; text-align: left; }
.shot { position: relative; display: flex; justify-content: center; }
.shot::before { content: ''; position: absolute; width: 80%; aspect-ratio: 1; top: 10%; border-radius: 50%; background: radial-gradient(circle, rgba(61, 190, 139, .18), transparent 65%); filter: blur(20px); }
.shot.gold::before { background: radial-gradient(circle, rgba(233, 185, 73, .22), transparent 65%); }
.shot .phone { position: relative; width: 290px; }
.shot .pair { display: flex; gap: 18px; position: relative; }
.shot .pair .phone { width: 230px; }
.shot .pair .phone:last-child { margin-top: 48px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ivory); }
.ticks svg { width: 20px; height: 20px; margin-top: 3px; color: var(--gold); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--ivory); }
.chip .ar { color: var(--gold); margin-left: 6px; font-size: 16px; }
@media (max-width: 860px) {
  section { padding: 60px 0; }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .shot { order: 0; }
  .shot .phone { width: 250px; }
  .shot .pair .phone { width: 46%; min-width: 0; }
  .shot .pair { width: 100%; max-width: 440px; justify-content: center; }
}

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--raised));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.card h3 { font-size: 22px; margin: 16px 0 8px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }
.icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold-bright); border: 1px solid rgba(233, 185, 73, .25);
}
.icon.em { background: var(--emerald-soft); color: var(--emerald); border-color: rgba(61, 190, 139, .25); }
.icon svg { width: 26px; height: 26px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } .card { padding: 22px; } }

/* Parents */
.parents { background: var(--ink); }
.parents::before { content: ''; position: absolute; inset: 0; background: var(--pattern) center / 140px; opacity: .6; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); pointer-events: none; }
.parents .wrap { position: relative; }
.note { margin-top: 28px; padding: 18px 22px; border-radius: 18px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 15px; }

/* Gallery */
.gallery { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 20px 30px; margin: 0 -20px; scrollbar-width: thin; scrollbar-color: var(--surface-hi) transparent; }
.gallery figure { margin: 0; flex: none; width: 220px; scroll-snap-align: center; }
.gallery .phone { position: relative; width: 100%; border-radius: 30px; padding: 7px; }
.gallery .phone img { border-radius: 24px; }
.gallery figcaption { text-align: center; color: var(--muted); font-size: 14px; margin-top: 14px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 16px; font: 400 30px var(--body); color: var(--gold); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 22px; }

/* Final call */
.cta { text-align: center; }
.cta .box {
  border-radius: 32px; padding: 56px 24px; border: 1px solid rgba(233, 185, 73, .3);
  background: radial-gradient(ellipse 70% 90% at 50% 0%, rgba(233, 185, 73, .16), transparent 70%), var(--raised);
  position: relative; overflow: hidden;
}
.cta .box::before { content: ''; position: absolute; inset: 0; background: var(--pattern) center / 110px; opacity: .8; pointer-events: none; }
.cta .box > * { position: relative; }
.cta .box > img { width: 72px; margin: 0 auto 18px; }
.cta p { color: var(--muted); margin: 14px auto 26px; max-width: 520px; }
.cta .ar { font-size: 28px; color: var(--gold); margin-top: 26px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ivory); }

/* Legal pages */
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(34px, 5vw, 50px); margin-bottom: 10px; }
.doc .updated { color: var(--faint); margin: 0 0 30px; font-size: 15px; }
.doc h2 { font-size: 26px; margin: 42px 0 12px; }
.doc h3 { font-size: 20px; margin: 26px 0 8px; font-family: var(--body); font-weight: 600; }
.doc p, .doc li { color: #CFDCD8; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--raised); border: 1px solid var(--line); border-radius: 20px; padding: 18px 22px; margin: 0 0 16px; }
.doc .summary ul { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--gold-bright); font-weight: 600; white-space: nowrap; }
.doc td { color: #CFDCD8; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; background: var(--raised); border: 1px solid var(--line); border-radius: 16px; margin: 10px 0; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font-weight: 700; display: grid; place-items: center; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .play, .badge { transition: none; } }

/* Small phones: tighter type and spacing, so each section fits the screen without long scrolls */
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  .feature h3 { font-size: 25px; }
  .feature .ar-word { font-size: 34px; }
  .eyebrow { letter-spacing: .14em; font-size: 12px; }
  .lead, .section-head p { font-size: 16px; }
  section { padding: 44px 0; }
  .section-head { margin-bottom: 28px; }
  .feature { padding: 24px 0; gap: 24px; }
  .shot .phone { width: 210px; }
  .facts b { font-size: 24px; }
  .facts span { font-size: 13px; }
}

/* Nothing may make the page wider than the phone: grid and flex children can shrink, long words wrap, and the
   page itself never scrolls sideways (the screenshot gallery scrolls inside its own strip). */
html { overflow-x: hidden; }
html, body { max-width: 100%; }
.hero .wrap > *, .feature > *, .grid > *, .top .wrap > * { min-width: 0; }
h1, h2, h3, p, li { overflow-wrap: break-word; }
img { max-width: 100%; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: minmax(0, 1fr); } }
