/* Qasma website — tokens mirror Qasma/Design/Theme.swift */
:root {
  --bg: #F6F5F1;
  --bg-alt: #EFEDE7;
  --surface: #FFFFFF;
  --surface-muted: #EBE8E2;
  --ink: #111114;
  --ink-2: #5E5E66;
  --ink-3: #9A98A0;
  --hairline: #E4E0D9;
  --accent: #4B3FE0;
  --accent-soft: #E9E7FF;
  --positive: #0F8A58;
  --brand: linear-gradient(135deg, #FF9A5A 0%, #F2386B 48%, #8E1F9C 100%);
  --glow-1: rgba(242, 56, 107, .16);
  --glow-2: rgba(75, 63, 224, .14);
  --radius: 24px;
  --shadow: 0 1px 2px rgba(17, 17, 20, .04), 0 10px 30px -14px rgba(17, 17, 20, .14);
  --device-shadow: 0 50px 80px -40px rgba(40, 20, 70, .45), 0 18px 36px -24px rgba(17, 17, 20, .35);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-ar: -apple-system, "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0C;
    --bg-alt: #111114;
    --surface: #161619;
    --surface-muted: #222226;
    --ink: #F4F4F6;
    --ink-2: #A3A3AD;
    --ink-3: #6A6A74;
    --hairline: #26262C;
    --accent: #8B82FF;
    --accent-soft: #25224A;
    --positive: #3DD68C;
    --glow-1: rgba(242, 56, 107, .22);
    --glow-2: rgba(139, 130, 255, .18);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
    --device-shadow: 0 50px 80px -40px rgba(0, 0, 0, .9), 0 18px 36px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.025em; font-weight: 700; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav-links a { color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 6px 12px; border-radius: 999px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { background: var(--surface-muted); }
.lang-toggle {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.4;
  color: var(--ink); background: transparent; border: 1px solid var(--hairline);
  border-radius: 999px; padding: 5px 13px; margin-inline-start: 8px;
}
.lang-toggle:hover { background: var(--surface-muted); }
@media (max-width: 640px) { .nav-links a.hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 24px; border-radius: 14px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn[aria-disabled="true"]:hover { transform: none; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--surface); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn .stack { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.btn .stack small { font-size: 11px; font-weight: 500; opacity: .75; }
.btn .stack span { font-size: 18px; font-weight: 600; }

/* Device frames */
.device {
  position: relative; width: 100%; border-radius: 17% / 7.8%;
  padding: 3.2%; background: #0d0d10;
  box-shadow: inset 0 0 0 1.5px #3a3a40, var(--device-shadow);
}
.device img { width: 100%; height: auto; border-radius: 14.5% / 6.7%; background: #F3F1EC; }
.device.ipad { border-radius: 4.2% / 3.2%; padding: 2.4%; }
.device.ipad img { border-radius: 2.4% / 1.8%; }

/* Hero */
.hero { position: relative; padding: 88px 0 0; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 900px; z-index: -1;
  background:
    radial-gradient(40% 50% at 30% 40%, var(--glow-1), transparent 70%),
    radial-gradient(40% 50% at 72% 45%, var(--glow-2), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  border: 1px solid var(--hairline); background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-radius: 999px; padding: 5px 14px 5px 6px; margin-bottom: 26px;
}
html[dir="rtl"] .eyebrow { padding: 5px 6px 5px 14px; }
.eyebrow img { width: 22px; height: 22px; border-radius: 6px; }
.hero h1 { font-size: clamp(42px, 7vw, 80px); font-weight: 800; }
.grad-text { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-2); margin: 22px auto 34px; max-width: 580px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.fine { font-size: 14px; color: var(--ink-3); margin-top: 18px; }

.stage {
  display: flex; justify-content: center; align-items: flex-start;
  margin: 64px auto 0; max-width: 900px; height: clamp(420px, 56vw, 560px); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
          mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.stage .device { flex: none; }
.stage .center { width: 300px; z-index: 2; }
.stage .side { width: 262px; margin-top: 70px; opacity: .96; }
.stage .side.start { margin-inline-end: -40px; transform: rotate(-4deg); }
.stage .side.end { margin-inline-start: -40px; transform: rotate(4deg); }
html[dir="rtl"] .stage .side.start { transform: rotate(4deg); }
html[dir="rtl"] .stage .side.end { transform: rotate(-4deg); }
@media (max-width: 760px) {
  .hero { padding-top: 52px; }
  .stage { margin-top: 44px; height: 460px; }
  .stage .side { display: none; }
  .stage .center { width: 260px; }
}

/* Trust strip */
.trust { border-block: 1px solid var(--hairline); background: var(--bg); padding: 22px 0; }
.trust ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; }
.trust li { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.trust svg { width: 18px; height: 18px; color: var(--ink); flex: none; }

/* Sections */
section { padding: 96px 0; }
@media (max-width: 760px) { section { padding: 64px 0; } }
.kicker { display: inline-block; font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 14px; letter-spacing: .02em; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2, .showcase h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; }
.section-head p { color: var(--ink-2); margin-top: 14px; font-size: 19px; }

/* Showcase rows */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.showcase + .showcase { margin-top: 120px; }
.showcase .copy p { color: var(--ink-2); font-size: 19px; margin-top: 16px; max-width: 470px; }
.showcase .copy ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.showcase .copy li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.showcase .copy li svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 2px; }
.showcase .visual {
  position: relative; display: grid; place-items: center; padding: 56px 24px 0;
  border-radius: 32px; overflow: hidden; height: 560px; align-items: start;
  background: var(--bg-alt);
}
.showcase .visual::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 30%, var(--glow-1), transparent 70%);
}
.showcase .visual.cool::before { background: radial-gradient(60% 50% at 50% 30%, var(--glow-2), transparent 70%); }
.showcase .visual .device { width: 290px; }
.showcase.flip .visual { order: -1; }
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; gap: 36px; }
  .showcase + .showcase { margin-top: 80px; }
  .showcase.flip .visual { order: 0; }
  .showcase .visual { height: 480px; padding-top: 40px; }
  .showcase .visual .device { width: 250px; }
}

/* iPad insights */
.tablet { background: var(--bg-alt); overflow: hidden; }
.tablet .frame { max-width: 860px; margin: 0 auto; height: clamp(360px, 60vw, 640px); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
          mask-image: linear-gradient(to bottom, #000 75%, transparent); }
.pro-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--brand); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px;
}

/* Privacy band */
.band {
  background: #111114; color: #F4F4F6; border-radius: 32px; padding: 56px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.band::before { content: ""; position: absolute; inset: auto -20% -60% auto; width: 520px; height: 520px;
  background: radial-gradient(closest-side, rgba(139, 130, 255, .28), transparent); }
.band > * { position: relative; }
.band h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.band p { color: #B4B4BE; margin-top: 14px; font-size: 18px; }
.band .more { display: inline-block; margin-top: 22px; color: #fff; font-weight: 600; }
.band ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: #2A2A30; border-radius: 18px; overflow: hidden; }
.band li { display: flex; gap: 12px; align-items: center; font-weight: 500; background: #18181C; padding: 16px 18px; }
.band li svg { width: 20px; height: 20px; flex: none; color: #3DD68C; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 36px 22px; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
@media (max-width: 680px) { .pricing { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--hairline) 60%, transparent);
}
.plan { position: relative; }
.plan h3 { font-size: 20px; font-weight: 700; color: var(--ink-2); }
.plan .price { font-size: 44px; font-weight: 800; margin: 8px 0 0; letter-spacing: -0.03em; }
.plan .price span { font-size: 16px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; border-top: 1px solid var(--hairline); padding-top: 24px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { width: 20px; height: 20px; flex: none; color: var(--positive); margin-top: 3px; }
.plan.pro { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand) border-box; }
.plan .tag { position: absolute; top: 30px; inset-inline-end: 28px; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 999px; padding: 4px 12px; }

/* Final CTA */
.final { text-align: center; }
.final .app-icon { width: 104px; height: 104px; border-radius: 24px; margin: 0 auto 28px; box-shadow: 0 20px 44px -18px rgba(242, 56, 107, .65); }
.final .cta-row { margin-top: 32px; }

/* Documents (privacy / terms / support) */
.doc { padding: 64px 0 24px; }
.doc-head { margin-bottom: 36px; }
.doc-head h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; }
.doc-head .updated { color: var(--ink-3); font-size: 15px; margin-top: 10px; }
.doc-head .intro { color: var(--ink-2); margin-top: 18px; font-size: 19px; }
.doc .section { padding: 26px 0; border-top: 1px solid var(--hairline); }
.doc .section h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.doc .section p { color: var(--ink-2); }
.doc .section p + p { margin-top: 10px; }

.contact-card { display: flex; gap: 20px 28px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.contact-card h2 { font-size: 20px; font-weight: 700; }
.contact-card p { color: var(--ink-2); margin-top: 4px; }
.contact-card > div { flex: 1 1 280px; }

.faq-group { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 44px 0 6px; }
html[lang="ar"] .faq-group { text-transform: none; letter-spacing: 0; font-size: 15px; }
details { border-bottom: 1px solid var(--hairline); }
details summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 17px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 24px; font-weight: 300; color: var(--ink-3); transition: transform .2s; line-height: 1; }
details[open] summary::after { transform: rotate(45deg); }
details .answer { padding: 0 0 22px; color: var(--ink-2); }
details .answer p + p { margin-top: 8px; }

/* Footer */
footer { padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; border-top: 1px solid var(--hairline); padding-top: 28px; }
footer .brand { font-size: 15px; }
footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; margin-inline-start: auto; }
footer a { color: var(--ink-2); }

html[dir="rtl"] .flip-x { transform: scaleX(-1); }
