/* Shared base for the app pages. Each page sets its identity through the variables on <body class="t-…">. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .85em; direction: ltr; unicode-bidi: embed; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { padding-top: 0; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); margin-bottom: .6em; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; padding: 8px 14px; background: var(--accent); color: var(--on-accent); border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.top nav { display: flex; gap: 18px; font-size: .95rem; }
.top nav a { color: inherit; opacity: .8; text-decoration: none; }
.top nav a:hover { opacity: 1; }
@media (max-width: 640px) { .top nav { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 16px;
  font: inherit; font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; border: 0;
  background: var(--btn-bg); color: var(--on-accent);
  box-shadow: 0 10px 30px -12px var(--glow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px var(--glow); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-ghost { background: transparent; color: inherit; border: 1.5px solid var(--line); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; border-color: var(--accent); }
.dl-meta { font-size: .88rem; color: var(--muted); margin-top: 12px; }
.dl-meta code { font-size: .78rem; word-break: break-all; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 28px 0 72px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding-bottom: 48px; } }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); margin-bottom: .2em; }
.hero .lead { margin-bottom: 1.6em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.qr { display: none; align-items: center; gap: 14px; margin-top: 22px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; width: fit-content; }
.qr img { width: 92px; height: 92px; background: #fff; padding: 6px; border-radius: 10px; }
.qr p { margin: 0; font-size: .9rem; color: var(--muted); max-width: 15em; line-height: 1.6; }
@media (min-width: 900px) and (hover: hover) { .qr { display: flex; } }

/* Phones: side, centre, side (the centre one in front) */
.phones { display: flex; justify-content: center; align-items: center; padding: 12px 0 8px; }
.phone {
  flex: none; position: relative; width: clamp(150px, 19vw, 236px); aspect-ratio: 9 / 20;
  border-radius: 34px; padding: 8px; background: var(--frame);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55), inset 0 0 0 1.5px rgba(255,255,255,.08);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 27px; }
.phone.side { transform: scale(.86) rotate(var(--tilt)); margin-inline: -34px; z-index: 1; filter: saturate(.9); }
.phone.side:first-child { --tilt: 5deg; }
.phone.side:last-child { --tilt: -5deg; }
.phone.main { z-index: 2; }
@media (max-width: 480px) {
  .phone { width: 42vw; border-radius: 26px; padding: 6px; }
  .phone img { border-radius: 21px; }
  .phone.side { margin-inline: -18vw; }
}

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.card .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-soft, rgba(127,127,127,.12)); color: var(--accent); }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }

/* Gallery */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 18px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { border-radius: 24px; border: 1px solid var(--line); aspect-ratio: 9 / 20; object-fit: cover; object-position: top; width: 100%; }
.gallery figcaption { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 8px; }

/* Steps */
.steps { counter-reset: s; display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; position: relative; padding: 18px 20px; padding-inline-start: 70px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 18px; top: 16px; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: .96rem; }

/* Unnumbered variant */
.steps.plain li { padding-inline-start: 20px; }
.steps.plain li::before { display: none; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Table */
.table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); font-size: .97rem; }
.table th, .table td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); }

/* Final CTA + footer */
.final { text-align: center; padding: clamp(48px, 8vw, 88px) 24px; border-radius: 32px; background: var(--final-bg); color: var(--final-ink); }
.final .lead { margin-inline: auto; color: inherit; opacity: .8; }
.foot { padding: 36px 0 48px; font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
.foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
