:root {
  --paper: #f6f4ef;
  --paper-2: #efebe2;
  --card: #ffffff;
  --ink: #1d1c1a;
  --muted: #6e6a62;
  --line: #e2ded5;
  --accent: #2c4a78;
  --accent-ink: #ffffff;
  --accent-soft: #e3e9f3;
  --shadow: 0 1px 2px rgba(29, 28, 26, .06), 0 12px 32px -12px rgba(29, 28, 26, .18);
  --radius: 18px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --serif: "Noto Naskh Arabic", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131312;
    --paper-2: #1a1a18;
    --card: #1f1f1d;
    --ink: #ece9e2;
    --muted: #a19c92;
    --line: #2f2e2b;
    --accent: #9db6e2;
    --accent-ink: #10213b;
    --accent-soft: #233149;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -14px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { --serif: Georgia, "Times New Roman", serif; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 700 1.25rem/1 var(--font); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 9px; }
.brand.small { font-size: 1rem; }
.brand.small img { border-radius: 6px; }
.links { display: flex; gap: 22px; margin-inline-start: auto; }
.links a { color: var(--muted); font-weight: 500; }
.links a:hover { color: var(--ink); text-decoration: none; }
.lang-switch {
  font: 500 .9rem/1 var(--font); color: var(--ink);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer;
}
.lang-switch:hover { background: var(--paper-2); }
@media (max-width: 760px) { .links { display: none; } .lang-switch { margin-inline-start: auto; } }

/* Hero */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 4px 12px;
  background: var(--accent-soft); color: var(--accent); border-radius: 999px;
  font-weight: 600; font-size: .9rem;
}
h1 { font: 700 clamp(2.2rem, 4.6vw, 3.6rem)/1.25 var(--serif); margin: 0 0 18px; letter-spacing: -.01em; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font: 600 1rem/1 var(--font);
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px var(--accent); }
.btn.ghost { color: var(--ink); border-color: var(--line); background: var(--card); }
.btn.wide { width: 100%; margin-top: 18px; padding: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 26px 0 0; list-style: none; color: var(--muted); font-size: .95rem; }
.badges li::before { content: "✓"; color: #2e9e6b; font-weight: 700; margin-inline-end: 6px; }

.hero-art { position: relative; min-height: 440px; }
.device { background: #0e0e0d; box-shadow: var(--shadow); overflow: hidden; }
.device img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.device.laptop {
  position: absolute; inset-inline-end: 0; top: 10px; width: 92%; aspect-ratio: 16 / 10;
  border-radius: 14px; padding: 10px 10px 14px; border: 1px solid #2a2a28;
}
.device.laptop img { border-radius: 6px; }
.device.phone {
  position: absolute; inset-inline-start: 0; bottom: -10px; width: 34%; aspect-ratio: 9 / 19.5;
  border-radius: 30px; padding: 8px; border: 1px solid #2a2a28;
}
.device.phone img { border-radius: 23px; }
@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; aspect-ratio: 1.25; }
}

/* Sections */
.section { padding: 84px 0; }
.section.alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-title { font: 700 clamp(1.7rem, 3vw, 2.3rem)/1.3 var(--serif); margin: 0 0 8px; text-align: center; }
.section-lead { text-align: center; color: var(--muted); margin: 0 auto 44px; max-width: 36em; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature h3 { font-size: 1.12rem; margin: 14px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .98rem; }
.ico {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.ico svg { width: 24px; height: 24px; }

/* Screenshots */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 26px;
  overflow-x: auto; padding: 18px 4px 26px; scroll-snap-type: x mandatory; justify-content: safe center;
}
.shots figure { margin: 0; scroll-snap-align: center; }
.device.phone.small { position: static; width: 100%; aspect-ratio: 9 / 19.5; }
.shots figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* Downloads */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 0 auto; }
@media (max-width: 760px) { .downloads { grid-template-columns: 1fr; } }
.dl { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.dl.suggested { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dl-head { display: flex; gap: 16px; align-items: center; }
.dl-logo { width: 46px; height: 46px; flex: none; }
.dl h3 { margin: 0; font-size: 1.3rem; }
.dl .muted { margin: 2px 0 0; font-size: .95rem; }
.howto { margin-top: 18px; }
.alt-link { margin: 10px 0 0; font-size: .88rem; text-align: center; }
.alt-link a { color: var(--muted); text-decoration: underline; }
.howto summary, .qa summary { cursor: pointer; font-weight: 600; }
.howto ol { margin: 10px 0 0; padding-inline-start: 22px; color: var(--muted); font-size: .97rem; }
.howto li { margin-bottom: 6px; }

/* FAQ */
.qa { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 12px; }
.qa p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.foot { padding: 34px 0 44px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot nav { display: flex; gap: 20px; }
.foot .muted { margin: 0 0 0 auto; margin-inline-start: auto; margin-inline-end: 0; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feature { transition: none; }
}

/* Folio identity: ink-blue book, warm ivory paper. */
:root { --paper:#f8f4e9; --paper-2:#eeeadd; --card:#fffdf7; --ink:#233d63; --muted:#626d7a; --line:#dedfd9; --accent:#2d4c7d; --accent-ink:#fff; --accent-soft:#e7ecf3; --shadow:0 22px 50px -28px #233d6366; --radius:20px; }
::selection { background:#2d4c7d; color:#fff; }
:focus-visible { outline:3px solid #a97d35; outline-offset:5px; }
section[id], article[id] { scroll-margin-top:100px; }
button { font-family:inherit; }
.wrap { max-width:1240px; padding-inline:32px; }
.top { background:#f8f4e9ed; border-bottom:1px solid #2d4c7d15; }
.top-row { height:84px; gap:32px; }
.brand { font-family:Georgia,serif; font-size:29px; letter-spacing:-1px; }
.brand img { width:44px; height:44px; }
.links { gap:30px; font-size:15px; }
.links a { color:var(--ink); }
.links a:hover { color:#9b6c28; }
.lang-switch { padding:12px 18px; border-color:#2d4c7d35; border-radius:8px; }
.hero { padding:76px 0 64px; }
.hero-grid { grid-template-columns:1fr 1.05fr; gap:58px; }
.eyebrow { background:transparent; padding:0; border-radius:0; font-size:13px; display:flex; align-items:center; gap:10px; }
.eyebrow::before { content:''; width:7px; height:7px; border-radius:50%; background:#a97d35; box-shadow:0 0 0 5px #a97d3510; }
h1 { font-family:var(--font); font-size:clamp(2.5rem,4.1vw,3.6rem); line-height:1.5; letter-spacing:-1.5px; margin-bottom:22px; }
.lead { font-size:18px; line-height:1.95; max-width:480px; }
.btn { min-height:50px; border-radius:9px; padding:16px 25px; line-height:1.4; }
.btn.primary { box-shadow:0 8px 16px -10px #233d63; }
.btn.primary:hover { background:#203b65; }
.btn.ghost { background:transparent; border-color:#2d4c7d35; }
.badges { font-size:12px; gap:8px 16px; }
.badges li::before { color:var(--accent); }
.hero-art { min-height:430px; border-radius:50% 50% 24px 24px; background:radial-gradient(ellipse at center,#d8e0e9 0%,#e8e9e2 52%,#e8e9e200 72%); }
.hero-art::before { content:''; position:absolute; inset:12px 25px 10px; border:1px solid #2d4c7d1c; border-radius:50%; transform:rotate(-18deg); }
.device.laptop { top:70px; width:95%; transform:rotate(-3deg); box-shadow:0 26px 40px -18px #132d5266; border:4px solid #2e4059; background:#2e4059; padding:5px; }
.device.phone { bottom:0; inset-inline-start:-8px; width:31%; transform:rotate(5deg); border:3px solid #35465d; padding:4px; box-shadow:0 20px 30px -14px #132d5277; }
.art-label { position:absolute; inset-inline-end:20px; bottom:2px; font-size:12px; color:var(--accent); border-bottom:1px solid #a97d3580; padding-bottom:6px; }
.reading-strip { display:flex; justify-content:space-between; gap:24px; padding-block:25px; border-block:1px solid var(--line); font-size:14px; }
.strip-title { color:var(--muted); }
.section { padding:92px 0; }
.section-kicker { text-align:center; font-size:12px; color:#8b6837; font-weight:600; margin:0 0 14px; letter-spacing:.05em; }
.section-title { font-family:var(--font); font-size:clamp(1.8rem,3vw,2.45rem); line-height:1.6; margin-bottom:12px; }
.section-lead { font-size:16px; margin-bottom:42px; }
.features { gap:0; border-top:1px solid var(--line); }
.feature { border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; padding:32px 28px; }
.feature:hover { background:#fffdf780; box-shadow:none; transform:translateY(-3px); }
.feature .ico { color:var(--accent); background:var(--accent-soft); border-radius:12px; }
.feature h3 { font-size:18px; margin-top:18px; }
.feature p { font-size:15px; line-height:1.9; }
.features.is-collapsed .feature:nth-child(n+7) { display:none; }
.more-features { display:flex; margin:30px auto 0; cursor:pointer; font-size:14px; }
.section.alt { background:#eaeef2; border:0; }
.shots { grid-auto-columns:minmax(180px,205px); gap:27px; padding:14px 6px 25px; }
.device.phone.small { transform:none; border:2px solid #35465d; padding:5px; box-shadow:0 18px 28px -20px #132d5288; }
.shot-button { display:block; background:transparent; border:0; padding:0; width:100%; cursor:zoom-in; border-radius:30px; transition:transform .2s; }
.shot-button:hover { transform:translateY(-6px); }
.shots figcaption { font-size:13px; max-width:200px; margin:20px auto 0; line-height:1.8; }
.downloads { max-width:980px; gap:24px; }
.dl { padding:32px; border-color:#cdd5df; border-radius:18px; }
.dl.suggested { border-color:var(--accent); box-shadow:inset 0 4px 0 var(--accent); }
.dl .muted { font-size:13px; }
.howto { border-top:1px solid var(--line); padding-top:16px; font-size:14px; }
.howto ol { font-size:14px; }
#faq { background:var(--paper); padding-top:36px; }
.wrap.narrow { max-width:860px; }
.qa { background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:22px 4px; margin:0; }
.qa summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:24px; font-size:16px; }
.qa summary::-webkit-details-marker { display:none; }
.qa summary::after { content:'+'; font-family:system-ui; font-size:22px; font-weight:400; }
.qa[open] summary::after { content:'−'; }
.qa p { font-size:15px; padding-inline-end:32px; }
.foot { background:#243f68; color:#fff; padding:32px 0; }
.foot .brand,.foot a { color:#fff; }
.foot .muted { color:#c8d3e3; }
.foot nav { font-size:14px; }
.skip-link { position:fixed; top:-100px; inset-inline-start:20px; background:var(--accent); color:white; z-index:40; padding:12px; }
.skip-link:focus { top:10px; }
.menu-switch { display:none; }
.image-viewer { border:1px solid #ffffff40; background:#f8f4e9; border-radius:18px; padding:20px; max-width:90vw; max-height:92dvh; color:var(--ink); text-align:center; }
.image-viewer::backdrop { background:#14243be0; backdrop-filter:blur(7px); }
.image-viewer img { height:70dvh; width:auto; max-width:100%; object-fit:contain; margin:auto; }
.image-viewer p { margin:12px 0 0; font-size:14px; }
.viewer-close { display:block; margin:0 0 14px auto; padding:8px 16px; border:1px solid #bdc8d6; border-radius:8px; background:transparent; color:var(--ink); cursor:pointer; }
body.viewer-open { overflow:hidden; }
@media(min-width:961px) { .feature:not(:nth-child(3n)) { border-inline-end:1px solid var(--line); } }
@media(max-width:960px) { .hero-grid { gap:28px; } .hero-art { min-height:350px; } .hero { padding-top:45px; } .reading-strip { margin-inline:32px; flex-wrap:wrap; } }
@media(max-width:900px) { .hero-grid { grid-template-columns:1fr; } .hero-text { max-width:620px; } .hero-art { width:min(560px,100%); margin:0 auto; min-height:0; aspect-ratio:1.3; } }
@media(max-width:760px) {
  .wrap { padding-inline:22px; } .top-row { height:72px; gap:12px; flex-wrap:wrap; }
  .brand { font-size:25px; } .brand img { width:38px; height:38px; }
  .menu-switch { display:flex; align-items:center; gap:9px; margin-inline-start:auto; border:0; background:transparent; color:var(--ink); padding:10px 4px; cursor:pointer; }
  .lang-switch { margin:0; font-size:12px; padding:10px 12px; }
  .links { display:none; position:absolute; inset:72px 0 auto; background:var(--paper); padding:20px 24px; border-bottom:1px solid var(--line); box-shadow:0 12px 20px #233d6310; margin:0; justify-content:space-between; gap:15px; }
  .links.is-open { display:flex; } .links a { font-size:14px; }
  h1 { font-size:2.6rem; } .lead { font-size:16px; } .hero { padding:38px 0 42px; } .badges { margin-top:20px; }
  .art-label { font-size:10px; bottom:-8px; } .device.laptop { top:48px; }
  .reading-strip { margin-inline:22px; padding-inline:0; gap:14px; font-size:12px; } .strip-title { width:100%; }
  .section { padding:60px 0; } .feature { padding:26px 10px; } .dl { padding:24px; }
  .shots { justify-content:start; grid-auto-columns:190px; } .foot-row { gap:22px; } .foot .muted { width:100%; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; } }
/* Keep the caption clear of the device frames at every breakpoint. */
.art-label { top:4px; bottom:auto; }
@media(max-width:760px) { .art-label { top:0; bottom:auto; } }

/* Annotated study spread: keep all four notes visible without overlapping devices. */
.annotated-art .device.laptop { width:100%; top:54px; aspect-ratio:1549 / 1015; transform:rotate(-2deg); }
.annotated-art .device.laptop img { object-fit:contain; }
@media(max-width:900px) { .annotated-art { aspect-ratio:1.18; } }
@media(max-width:760px) { .annotated-art .device.laptop { top:38px; transform:rotate(-1deg); } }
