/* Nayfaat web — the app's own palette and faces. */

:root {
  --paper: #EFEBE4;
  --surface: #E4E0D8;
  --line: rgba(22, 48, 53, 0.14);
  --ink: #163035;
  --ink-2: #3A5C60;
  --ink-3: #6E8583;
  --ember: #C46237;
  --ember-text: #974C2A;
  --on-ink: #E4E0D8;
  --hero-scrim: linear-gradient(180deg, rgba(22,48,53,0.10) 0%, rgba(22,48,53,0.25) 45%, rgba(22,48,53,0.88) 100%);

  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --ui: 'Albert Sans', -apple-system, system-ui, 'Segoe UI', sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10211F;
    --surface: #173033;
    --line: rgba(228, 224, 216, 0.14);
    --ink: #E9E5DD;
    --ink-2: #B7C3C0;
    --ink-3: #87989A;
    --ember: #D5774E;
    --ember-text: #E0916B;
    --on-ink: #E4E0D8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10211F;
  --surface: #173033;
  --line: rgba(228, 224, 216, 0.14);
  --ink: #E9E5DD;
  --ink-2: #B7C3C0;
  --ink-3: #87989A;
  --ember: #D5774E;
  --ember-text: #E0916B;
  --on-ink: #E4E0D8;
  color-scheme: dark;
}

:lang(ar) {
  --display: 'Tajawal', system-ui, sans-serif;
  --ui: 'Tajawal', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}
:lang(ar) body, body:lang(ar) { font-size: 18px; line-height: 1.75; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ── header ─────────────────────────────────────────── */
.site-head { position: relative; z-index: 2; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font: 500 22px/1 var(--display); letter-spacing: -0.01em; }
:lang(ar) .brand span { font-weight: 800; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font: 500 15px/1 var(--ui); }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav .lang { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--ink); }
.on-photo .nav a, .on-photo .brand { color: #F3EFE8; }
.on-photo .nav .lang { border-color: rgba(243, 239, 232, 0.4); color: #F3EFE8; }

/* ── hero ───────────────────────────────────────────── */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; flex-direction: column; color: #F3EFE8; margin-top: -78px; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: var(--hero-scrim); }
.hero .wrap { position: relative; z-index: 1; margin-top: auto; padding-block: 140px clamp(40px, 7vw, 80px); }
.eyebrow { font: 600 12.5px/1 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember-text); }
:lang(ar) .eyebrow { font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 700; }
.hero .eyebrow { color: #E7B79C; }
.hero h1 { font: 500 clamp(44px, 8vw, 92px)/1.0 var(--display); letter-spacing: -0.025em; margin-top: 18px; max-width: 12ch; text-wrap: balance; }
:lang(ar) .hero h1 { font-weight: 800; line-height: 1.2; letter-spacing: 0; max-width: 14ch; }
.hero p.lede { font-size: clamp(17px, 2vw, 20px); color: rgba(243, 239, 232, 0.86); max-width: 44ch; margin-top: 18px; }
.hero .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }
.price { font: 500 15px/1.3 var(--ui); color: rgba(243, 239, 232, 0.86); }
.price strong { font: 500 28px/1 var(--display); color: #F3EFE8; margin-inline-end: 4px; }
:lang(ar) .price strong { font-weight: 800; }

.store-badge { display: inline-flex; align-items: center; gap: 10px; background: #0B0B0B; color: #fff; border-radius: 12px; padding: 10px 18px 10px 14px; text-decoration: none; border: 1px solid rgba(255,255,255,0.18); }
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge small { display: block; font: 400 11px/1.1 var(--ui); opacity: 0.8; }
.store-badge b { display: block; font: 600 17px/1.15 var(--ui); }

/* ── facts ──────────────────────────────────────────── */
.facts { border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding-block: 28px; }
.fact { padding-inline: 14px; border-inline-start: 1px solid var(--line); }
.fact:first-child { border-inline-start: 0; padding-inline-start: 0; }
.fact b { display: block; font: 500 30px/1.1 var(--display); font-variant-numeric: tabular-nums; }
:lang(ar) .fact b { font-weight: 800; }
.fact span { font-size: 14px; color: var(--ink-2); }

/* ── sections ───────────────────────────────────────── */
section.block { padding-block: clamp(64px, 10vw, 120px); }
.section-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
h2 { font: 500 clamp(32px, 4.6vw, 52px)/1.05 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
:lang(ar) h2 { font-weight: 800; line-height: 1.3; letter-spacing: 0; }
.section-head p { color: var(--ink-2); font-size: 18px; }

.photos { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 12px; }
.photos figure { position: relative; overflow: hidden; border-radius: 18px; background: var(--surface); }
.photos figure:first-child { grid-row: span 2; }
.photos img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.photos figure:first-child img { aspect-ratio: auto; min-height: 100%; }
.photos figcaption { position: absolute; inset-inline-start: 14px; bottom: 12px; font: 500 13px/1 var(--ui); color: #fff; background: rgba(22,48,53,0.55); padding: 7px 10px; border-radius: 999px; backdrop-filter: blur(6px); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { border-top: 1px solid var(--ink); padding-top: 22px; display: grid; gap: 10px; align-content: start; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 500 14px/1 var(--ui); color: var(--ember-text); font-variant-numeric: tabular-nums; }
.step h3 { font: 500 24px/1.2 var(--display); letter-spacing: -0.01em; }
:lang(ar) .step h3 { font-weight: 700; }
.step p { color: var(--ink-2); font-size: 16px; }

.shots { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots img { width: 240px; flex: none; border-radius: 20px; scroll-snap-align: start; box-shadow: 0 10px 30px rgba(22,48,53,0.14); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: 18px; aspect-ratio: 4 / 3; object-fit: cover; }
.drive { margin-top: 26px; border-top: 1px solid var(--line); }
.drive div { display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.drive b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── documents (support, privacy, terms) ────────────── */
.doc { padding-block: clamp(40px, 7vw, 88px) clamp(64px, 9vw, 120px); }
.doc .wrap { max-width: 820px; }
.doc h1 { font: 500 clamp(40px, 6vw, 64px)/1.02 var(--display); letter-spacing: -0.025em; margin-top: 14px; text-wrap: balance; }
:lang(ar) .doc h1 { font-weight: 800; line-height: 1.25; letter-spacing: 0; }
.doc .meta { color: var(--ink-3); font-size: 15px; margin-top: 14px; }
.doc .intro { font-size: 19px; color: var(--ink-2); margin-top: 26px; max-width: 62ch; }
.doc h2 { font-size: clamp(24px, 3vw, 30px); margin-top: 52px; margin-bottom: 12px; }
.doc h3 { font: 600 17px/1.4 var(--ui); margin-top: 26px; margin-bottom: 6px; }
.doc p, .doc li { max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-inline-start: 1.2em; display: grid; gap: 8px; margin-top: 10px; }
.doc li::marker { color: var(--ember); }
.doc .toc { margin-top: 34px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 6px; font-size: 16px; }
.doc .toc a { color: var(--ink-2); text-decoration: none; }
.doc .toc a:hover { color: var(--ink); text-decoration: underline; }
.table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 16px; }
.table th, .table td { text-align: start; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; color: var(--ink-2); font-size: 14px; }
.table-wrap { overflow-x: auto; }
.contact-card { margin-top: 30px; padding: 24px; border-radius: 18px; background: var(--surface); display: grid; gap: 6px; }
.contact-card a { font: 500 22px/1.3 var(--display); color: var(--ember-text); text-decoration: none; word-break: break-word; }
:lang(ar) .contact-card a { font-weight: 700; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 18px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; color: var(--ember); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* ── footer ─────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-block: 34px; font-size: 15px; color: var(--ink-2); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 820px) {
  .facts .wrap { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .fact:nth-child(4) { border-inline-start: 0; padding-inline-start: 0; }
  .photos { grid-template-columns: 1fr 1fr; }
  .photos figure:first-child { grid-column: span 2; grid-row: auto; }
  .photos figure:first-child img { aspect-ratio: 16 / 10; }
  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav a:not(.lang) { display: none; }
  .facts .wrap { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
  .fact:nth-child(4) { border-inline-start: 1px solid var(--line); padding-inline-start: 14px; }
  .photos { grid-template-columns: 1fr; }
  .photos figure:first-child { grid-column: auto; }
  .shots img { width: 200px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
