/* Hourglass website, 1.2 identity ("middle" direction): Deep Charcoal,
   Electric Violet, Acid Lime; violet sky, outlined cards, one coloured hero
   card per section. Layout guided by unslop (Damir Sokolovsky, CC BY 4.0).
   Shared with the legal pages (build-legal.ts). */
:root {
  --bg: #18181c;
  --deep: #131316;
  --card: #1f1f24;
  --raised: #27272d;
  --text: #ededf0;
  --text2: #a3a3ab;
  --muted: #85858d;
  --violet: #723bfa;
  --ink: #b79cff;
  --lime: #b9f500;
  --sky: #34206e;
  --hero-a: #6a35f0;
  --hero-b: #2c1a66;
  --line: rgba(237, 237, 240, 0.08);
  --outline: rgba(114, 59, 250, 0.32);
  --chip: rgba(114, 59, 250, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --arabic: "Noto Sans Arabic", "Geist", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--bg) linear-gradient(180deg, var(--sky) 0, rgba(24, 24, 28, 0) 900px) no-repeat;
  overflow-x: hidden;
}
[dir="rtl"] body, [lang="ar"] body { font-family: var(--arabic); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease); border-bottom: 1px solid transparent; }
.nav.solid, .nav.scrolled { background: rgba(24, 24, 28, 0.94); border-bottom-color: var(--line); }
.nav-in { max-width: 1248px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.brand.small { font-size: 15px; font-weight: 500; gap: 10px; }
.links { display: flex; gap: 32px; }
.links a { color: var(--text2); font-size: 15px; transition: color 0.15s var(--ease); }
.links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang { color: var(--text2); font-size: 15px; padding: 6px 4px; }
.lang:hover { color: var(--text); }
.btn-grad { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--violet); color: #fff; font-size: 15px; font-weight: 500; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); transition: background-color 0.15s var(--ease); }
.btn-grad:hover { background: #6430f0; }

/* ---------- type ---------- */
h1 { font-size: 72px; line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; }
h2 { font-size: 48px; line-height: 1.12; font-weight: 500; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 500; }
[lang="ar"] h1, [lang="ar"] h2 { letter-spacing: 0; line-height: 1.3; }
.lead { font-size: 20px; line-height: 1.5; color: var(--text2); max-width: 500px; }
.sub { font-size: 18px; line-height: 1.55; color: var(--text2); max-width: 640px; }
.kicker { color: var(--ink); font-size: 15px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--text2); font-size: 15px; }
.live-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--lime); flex: none; }
.muted { color: var(--muted); font-size: 13px; }
.muted2 { color: var(--text2); font-size: 13px; }

/* ---------- shared pieces ---------- */
.card { background: var(--card); border: 1px solid var(--outline); border-radius: 16px; padding: 24px; }
.hero-card { color: #fff; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.1); background: linear-gradient(150deg, var(--hero-a) 0%, var(--hero-b) 100%); }
.tile { width: 36px; height: 36px; border-radius: 10px; background: var(--chip); color: var(--ink); display: inline-grid; place-items: center; flex: none; }
.tile.sm { width: 28px; height: 28px; border-radius: 8px; }
.tile svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile.sm svg { width: 14px; height: 14px; stroke-width: 2; }
.phone { flex: none; border-radius: 52px; padding: 8px; background: #0e0e10; border: 2px solid #3a3a42; }
.phone img { border-radius: 44px; width: 100%; aspect-ratio: 340 / 737; object-fit: cover; }
.phone-hero { width: 340px; }
.phone-side { width: 300px; }

.stores { display: flex; gap: 12px; flex-wrap: wrap; }
/* Both store buttons share one size, side by side or stacked. */
.store { display: inline-flex; align-items: center; gap: 10px; height: 56px; min-width: 196px; padding: 0 20px 0 18px; border-radius: 12px; border: 1px solid transparent; }
.store span { display: flex; flex-direction: column; line-height: 1.2; text-align: start; }
.store small { font-size: 11px; }
.store b { font-size: 17px; font-weight: 600; }
.store-apple { background: #fff; color: #18181c; transition: opacity 0.15s var(--ease); }
.store-apple small { color: #3a3a42; }
.store-apple:hover { opacity: 0.9; }
.store-soon { background: rgba(237, 237, 240, 0.06); border: 1px solid rgba(237, 237, 240, 0.1); color: var(--muted); cursor: default; }
.store-soon b { color: var(--text2); font-weight: 500; }

/* ---------- hero ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 80px; padding-top: 64px; padding-bottom: 32px; }
.hero-text { display: flex; flex-direction: column; gap: 24px; max-width: 580px; }
.facts { color: var(--muted); font-size: 14px; }

/* ---------- sections ---------- */
.sec { padding-top: 112px; display: flex; flex-direction: column; gap: 40px; }
.sec.last { padding-bottom: 112px; }
.head { display: flex; flex-direction: column; gap: 12px; }

.how-row { display: flex; align-items: center; gap: 64px; }
.steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; }
.steps .card { display: flex; flex-direction: column; gap: 10px; }
.num { font-family: var(--mono); color: var(--ink); font-size: 13px; }
.steps p, .stages > p, .trio p { color: var(--text2); font-size: 15px; }

.feat-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.hero-card.lock { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.hero-card.lock h3 { font-size: 24px; }
.hero-card.lock > p { color: rgba(255, 255, 255, 0.8); font-size: 15px; max-width: 520px; }
.live { margin-top: 12px; background: rgba(14, 14, 16, 0.82); border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.live-top, .live-mid { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-mid { align-items: flex-end; }
.live-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text2); font-size: 14px; }
.live-time { font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fastline { position: relative; height: 6px; border-radius: 3px; background: rgba(237, 237, 240, 0.12); }
.fastline .fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 3px; background: var(--lime); }
.fastline .mark { position: absolute; top: -4px; width: 2px; height: 14px; border-radius: 1px; background: #0e0e10; }
.stages { display: flex; flex-direction: column; gap: 14px; }
.stages h3 { font-size: 22px; }
.stages ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.stages li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(237, 237, 240, 0.04); font-size: 15px; }
.stages li .mono { font-size: 13px; color: var(--muted); }
.stages li.on { background: var(--chip); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px rgba(183, 156, 255, 0.6); }
.stages li.on .mono { color: var(--ink); }
.more { list-style: none; padding: 8px 24px; }
.more li { display: grid; grid-template-columns: 36px 280px 1fr; gap: 16px; align-items: center; padding: 16px 0; font-size: 15px; }
.more li + li { border-top: 1px solid var(--line); }
.more b { font-weight: 500; font-size: 16px; }
.more li > span:last-child { color: var(--text2); }

.ramadan { padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 64px; }
.r-text { display: flex; flex-direction: column; gap: 14px; max-width: 540px; }
.r-text h2 { font-size: 44px; }
.r-text > p { color: rgba(255, 255, 255, 0.8); font-size: 17px; }
.r-eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; }
.r-eyebrow svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.times { width: 420px; flex: none; background: rgba(14, 14, 16, 0.35); border-radius: 16px; }
.times div { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-size: 15px; }
.times div + div { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.times dd { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.times .until dd { color: var(--lime); font-size: 22px; }
.note { color: var(--muted); font-size: 13px; margin-top: -24px; }

.circles-row { display: flex; align-items: center; justify-content: space-between; gap: 96px; }
.circles-row > div:first-child { display: flex; flex-direction: column; gap: 24px; }
.points { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.points li { display: flex; gap: 12px; align-items: center; font-size: 16px; }

.circles-row.rev { flex-direction: row-reverse; }
/* Apple Watch: the watch's own screen (img/watch.webp) in a simple case
   with the Digital Crown and side button, like .phone for the iPhone. */
.watch { position: relative; flex: none; width: 260px; padding: 16px; border-radius: 56px; background: #1f1f23; border: 2px solid #3a3a42; }
/* The crown stays on the right in both languages, as on the real watch. */
.watch::before, .watch::after { content: ""; position: absolute; right: -9px; width: 8px; border-radius: 0 4px 4px 0; background: #2e2e34; border: 2px solid #3a3a42; border-left: 0; }
.watch::before { top: 72px; height: 48px; }
.watch::after { top: 140px; height: 60px; right: -6px; width: 5px; }
.watch img { border-radius: 36px; width: 100%; aspect-ratio: 410 / 502; object-fit: cover; background: #000; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trio .card { display: flex; flex-direction: column; gap: 12px; }

.faq { padding: 0; }
.faq details { padding: 20px 24px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; font-size: 17px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 20px; height: 20px; flex: none; background: var(--ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text2); font-size: 15px; margin-top: 10px; max-width: 900px; }

.cta { padding: 56px; border-color: rgba(114, 59, 250, 0.45); display: flex; flex-direction: column; gap: 20px; }
.cta h2 { font-size: 44px; max-width: 680px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 40px; }
.fine { color: var(--muted); font-size: 13px; font-weight: 400; margin-inline-start: 6px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--text2); font-size: 14px; }
.foot-links a:hover { color: var(--text); }

/* ---------- legal pages (build-legal.ts) ---------- */
.legal .legal-main { padding-top: 48px; padding-bottom: 96px; }
.doc-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.doc-head .eyebrow { color: var(--ink); }
.doc-head h1 { font-size: 48px; }
.updated { color: var(--muted); font-size: 14px; }
.doc-intro { color: var(--text2); font-size: 18px; }
.doc-body { display: grid; grid-template-columns: 240px 1fr; gap: 48px; margin-top: 48px; align-items: start; }
.toc { position: sticky; top: 96px; background: var(--card); border: 1px solid var(--outline); border-radius: 16px; padding: 20px; font-size: 14px; }
.toc p { color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.toc a { color: var(--text2); }
.toc a:hover { color: var(--text); }
.doc-text { display: flex; flex-direction: column; gap: 36px; max-width: 760px; }
.doc-sec h2 { font-size: 24px; letter-spacing: -0.01em; margin-bottom: 12px; scroll-margin-top: 96px; }
.doc-sec p, .doc-sec li { color: var(--text2); font-size: 16px; line-height: 1.65; }
.doc-sec p + p, .doc-sec ul, .doc-sec ol { margin-top: 12px; }
.doc-sec ul, .doc-sec ol { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc-sec a, .doc-intro a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-sec strong { color: var(--text); font-weight: 500; }

/* ---------- smaller screens ---------- */
@media (max-width: 1024px) {
  .links { display: none; }
  h1 { font-size: 56px; }
  .hero { gap: 48px; }
  .how-row, .circles-row { gap: 40px; }
  .more li { grid-template-columns: 36px 1fr; }
  .more li > span:last-child { grid-column: 2; margin-top: -10px; }
  .ramadan { flex-direction: column; align-items: stretch; }
  .times { width: 100%; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .nav-in { padding: 14px 20px; }
  h1 { font-size: 44px; line-height: 1.08; }
  h2, .r-text h2, .cta h2 { font-size: 32px; }
  .lead { font-size: 17px; }
  .sub { font-size: 16px; }
  .hero { flex-direction: column; align-items: stretch; gap: 40px; padding-top: 32px; }
  .phone-hero { width: 280px; align-self: center; }
  .phone-side { width: 260px; align-self: center; }
  .stores { flex-direction: column; align-items: flex-start; }
  .sec { padding-top: 72px; gap: 28px; }
  .sec.last { padding-bottom: 72px; }
  .how-row { flex-direction: column; align-items: stretch; }
  .steps { grid-template-columns: 1fr; }
  .feat-row, .trio { grid-template-columns: 1fr; }
  .circles-row { flex-direction: column; align-items: stretch; gap: 32px; }
  .circles-row.rev { flex-direction: column; }
  .watch { width: 220px; align-self: center; border-radius: 48px; padding: 14px; }
  .watch img { border-radius: 30px; }
  .ramadan, .cta { padding: 28px 24px; gap: 28px; }
  .hero-card.lock { padding: 24px; }
  .note { margin-top: -16px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .doc-body { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .doc-head h1 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
