/* ============================================================
   Gibreen — shared stylesheet
   One file for every page, English and Arabic.
   Palette and type inherited from the original one-page site.
   RTL rules live beside their LTR counterparts so the Arabic
   mirror needs no stylesheet of its own.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #06091A;
  --bg-surface: #0C1029;
  --bg-card: #111533;
  --text: #F5F7FA;
  --text-dim: #8891A8;
  --text-mid: #A8B0C1;
  --text-faint: #4A5068;
  --amber: #D4A574;
  --amber-dark: #B8895C;
  --purple: #7C3AED;
  --purple-dim: rgba(124, 58, 237, 0.15);
  --border: #1E2340;
  --glow-amber: rgba(212, 165, 116, 0.12);
  --glow-purple: rgba(124, 58, 237, 0.08);
  --red: #E0635A;
  --green: #6FBF8B;
  --measure: 68ch;
  --wrap: 1000px;
}

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Arabic mirror: same stylesheet, different face stack */
[lang="ar"] body, body[dir="rtl"] {
  font-family: 'Rubik', 'Noto Naskh Arabic', system-ui, sans-serif;
}

img, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--amber); text-underline-offset: 0.22em; }
a:hover { color: #E8C9A0; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--amber); color: var(--bg);
  padding: 0.75rem 1.25rem; font-weight: 600; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── BACKGROUND ─────────────────────────────────────────── */
.grid-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.grid-bg::before {
  content: ''; position: absolute; inset: -1px;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black 20%, transparent 100%);
  opacity: 0.4;
}
.orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; }
.orb-1 { width: 400px; height: 400px; background: rgba(124, 58, 237, 0.08); top: 14%; left: -5%; }
.orb-2 { width: 350px; height: 350px; background: rgba(212, 165, 116, 0.06); top: 62%; right: -8%; }

.content { position: relative; z-index: 1; }

/* ── HEADER / NAV ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 9, 26, 0.86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(30, 35, 64, 0.8);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.logo {
  font-family: 'Rubik', system-ui, sans-serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--text); text-decoration: none; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo span { color: var(--amber); }
.logo:hover { color: var(--text); }

.nav-toggle {
  margin-inline-start: auto;
  display: none;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
  padding: 0.45rem 0.7rem; cursor: pointer; font: inherit; font-size: 0.85rem;
}

.nav-menu {
  margin-inline-start: auto;
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
}
.nav-menu a {
  font-size: 0.87rem; font-weight: 500;
  color: var(--text-mid); text-decoration: none;
  padding: 0.4rem 0.6rem; border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-menu a[aria-current="page"] { color: var(--amber); }
.nav-sep { width: 1px; height: 20px; background: var(--border); margin: 0 0.35rem; }
.nav-lang { font-size: 0.9rem; }
.nav-cta {
  font-size: 0.85rem; font-weight: 600;
  color: var(--amber) !important; text-decoration: none;
  padding: 0.5rem 1.1rem !important;
  border: 1px solid rgba(212, 165, 116, 0.45);
  border-radius: 6px;
  transition: all 0.25s ease;
}
.nav-cta:hover { background: var(--amber); color: var(--bg) !important; }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1.25rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.7rem 0.25rem; border-bottom: 1px solid rgba(30,35,64,0.7); }
  .nav-sep { display: none; }
  .nav-cta { margin-top: 0.9rem; text-align: center; border-bottom: 1px solid rgba(212,165,116,0.45) !important; }
}

/* ── TYPE ───────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Rubik', system-ui, sans-serif; letter-spacing: -0.03em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.6rem; }
h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }

p { color: var(--text-mid); margin-bottom: 1.15rem; max-width: var(--measure); }
p strong, li strong { color: var(--text); font-weight: 600; }
p:last-child { margin-bottom: 0; }

.accent {
  background: linear-gradient(135deg, var(--amber) 0%, #E8C9A0 50%, var(--amber) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--amber);
}

.lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--text-mid); line-height: 1.7; }

.section-label {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--amber); margin-bottom: 1rem;
}

/* ── LAYOUT ─────────────────────────────────────────────── */
main { display: block; }
.section { padding: 4.5rem 1.5rem; max-width: var(--wrap); margin: 0 auto; }
.section--tight { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section--surface { max-width: none; background: var(--bg-surface); border-block: 1px solid var(--border); }
.section--surface > .inner { max-width: var(--wrap); margin: 0 auto; }

.page-hero { padding: 4rem 1.5rem 2.5rem; max-width: var(--wrap); margin: 0 auto; }
.page-hero h1 { margin-bottom: 1.25rem; max-width: 20ch; }
.page-hero .lede { max-width: var(--measure); }

.divider { max-width: var(--wrap); margin: 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent); }

ul, ol { color: var(--text-mid); padding-inline-start: 1.3rem; margin-bottom: 1.15rem; max-width: var(--measure); }
li { margin-bottom: 0.55rem; }
li::marker { color: var(--amber); }

.list-plain { list-style: none; padding-inline-start: 0; }

/* ── HOME HERO ──────────────────────────────────────────── */
.hero {
  padding: 5.5rem 1.5rem 4rem;
  max-width: var(--wrap); margin: 0 auto;
  text-align: center;
}
.hero h1 { margin: 0 auto 1.5rem; max-width: 15ch; }
.hero .lede { margin: 0 auto 2.25rem; max-width: 60ch; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--amber);
  padding: 0.4rem 1.1rem;
  border: 1px solid rgba(212, 165, 116, 0.25);
  border-radius: 100px;
  background: rgba(212, 165, 116, 0.06);
  margin-bottom: 2rem;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  color: var(--bg);
  background: linear-gradient(135deg, #D4A574 0%, #C49563 100%);
  padding: 0.9rem 2rem; border-radius: 10px;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { color: var(--bg); transform: translateY(-2px); box-shadow: 0 10px 34px rgba(212,165,116,0.28); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }

.btn-ghost {
  background: transparent; color: var(--amber);
  border: 1px solid rgba(212,165,116,0.4);
}
.btn-ghost:hover { color: var(--bg); background: var(--amber); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.btn-row--start { justify-content: flex-start; }

/* ── CARDS ──────────────────────────────────────────────── */
.grid { display: grid; gap: 1.1rem; margin-top: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: rgba(212,165,116,0.22); transform: translateY(-2px); }
.card p { font-size: 0.94rem; color: var(--text-dim); margin-bottom: 0; }
.card p + p { margin-top: 0.8rem; }
.card .num {
  font-family: 'Rubik', sans-serif; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.16em; color: var(--amber); display: block; margin-bottom: 0.7rem;
}
.card h3 a { text-decoration: none; }

/* ── CALLOUTS ───────────────────────────────────────────── */
.callout {
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--amber);
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  max-width: var(--measure);
}
.callout p { margin-bottom: 0.7rem; }
.callout p:last-child { margin-bottom: 0; }
.callout--purple { border-inline-start-color: var(--purple); }
.callout--quiet { border-inline-start-color: var(--border); }
.callout h3 { color: var(--text); }

blockquote {
  border-inline-start: 3px solid var(--purple);
  padding-inline-start: 1.25rem;
  margin: 2rem 0; max-width: var(--measure);
  color: var(--text-mid); font-size: 1.06rem;
}
blockquote cite { display: block; margin-top: 0.7rem; font-size: 0.85rem; color: var(--text-dim); font-style: normal; }

/* ── TABLES ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px; }
caption { text-align: start; padding: 1rem 1.1rem 0; color: var(--text-dim); font-size: 0.85rem; }
th, td { padding: 0.85rem 1.1rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th {
  font-family: 'Rubik', sans-serif; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--amber);
  background: var(--bg-surface);
}
tbody tr:last-child td { border-bottom: none; }
td { color: var(--text-mid); }
tbody th { color: var(--text); font-weight: 600; }

/* ── TIMELINE (engagement weeks) ────────────────────────── */
.timeline { list-style: none; padding: 0; margin: 2.5rem 0 0; max-width: none; }
.timeline > li {
  position: relative;
  padding-inline-start: 2.25rem;
  padding-bottom: 2rem;
  margin-bottom: 0;
}
.timeline > li::before {
  content: ''; position: absolute; inset-inline-start: 0.42rem; top: 0.55rem; bottom: -0.4rem;
  width: 1px; background: var(--border);
}
.timeline > li:last-child::before { display: none; }
.timeline > li::after {
  content: ''; position: absolute; inset-inline-start: 0; top: 0.45rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--amber);
}
.timeline .week {
  font-family: 'Rubik', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber);
  display: block; margin-bottom: 0.35rem;
}
.timeline h3 { margin-bottom: 0.5rem; }
.timeline p { font-size: 0.96rem; }

/* ── DO / DON'T ─────────────────────────────────────────── */
.stance { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, 1fr); margin-top: 2rem; }
@media (max-width: 820px) { .stance { grid-template-columns: 1fr; } }
.stance > div { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.6rem; }
.stance h3 { display: flex; align-items: center; gap: 0.5rem; }
.stance ul { margin-bottom: 0; font-size: 0.94rem; }
.stance .yes h3 { color: var(--green); }
.stance .no h3 { color: var(--red); }
.stance .yes li::marker { color: var(--green); }
.stance .no li::marker { color: var(--red); }

/* ── FIGURE / DIAGRAM ───────────────────────────────────── */
figure { margin: 2.5rem 0; }
figure svg { display: block; width: 100%; height: auto; }
.figure-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  overflow-x: auto;
}
figcaption { font-size: 0.86rem; color: var(--text-dim); margin-top: 0.9rem; max-width: var(--measure); }

/* ── DEFINITION LIST (concepts) ─────────────────────────── */
.defs { margin-top: 2rem; }
.defs > div {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
.defs > div:last-child { border-bottom: 1px solid var(--border); }
.defs dt {
  font-family: 'Rubik', sans-serif; font-size: 1.08rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.5rem;
}
.defs dt .alt { color: var(--text-dim); font-weight: 400; font-size: 0.9rem; margin-inline-start: 0.5rem; }
.defs dd { margin: 0; color: var(--text-mid); max-width: var(--measure); }
.defs dd + dd { margin-top: 0.7rem; }
.defs .sowhat { color: var(--amber); font-weight: 600; }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { margin-top: 2rem; max-width: var(--measure); }
.faq details {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card); margin-bottom: 0.8rem; padding: 0 1.25rem;
}
.faq summary {
  cursor: pointer; padding: 1.05rem 0; font-weight: 600; color: var(--text);
  font-family: 'Rubik', sans-serif; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--amber); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details > p, .faq details > ul { padding-bottom: 1.1rem; margin-bottom: 0; font-size: 0.96rem; }

/* ── PRICE BLOCKS ───────────────────────────────────────── */
.price-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, 1fr); margin-top: 2.5rem; align-items: stretch; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } }
.price {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.8rem; display: flex; flex-direction: column;
}
.price--lead { border-color: rgba(212,165,116,0.35); }
.price .kicker {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 0.9rem;
}
.price .amount {
  font-family: 'Rubik', sans-serif; font-size: 1.9rem; font-weight: 700;
  color: var(--text); line-height: 1.1; margin-bottom: 0.3rem;
}
.price .amount small { font-size: 0.95rem; font-weight: 500; color: var(--text-dim); }
.price .unit { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.2rem; }
.price ul { font-size: 0.92rem; margin-bottom: 0; }

/* ── BOOKING BAND (identical on every page) ─────────────── */
.book {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 4.5rem 1.5rem;
}
.book-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.book-inner p { margin-inline: auto; }
.book form {
  margin-top: 2rem; text-align: start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.75rem;
  display: grid; gap: 0.9rem;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--text-mid); }
.field input, .field textarea {
  font-family: inherit; font-size: 0.95rem;
  padding: 0.8rem 1rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus { border-color: var(--purple); outline-offset: 1px; }
.book .btn { justify-content: center; }
.form-note { font-size: 0.8rem; color: var(--text-dim); margin: 0; }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  background: var(--bg);
}
.footer-inner { max-width: var(--wrap); margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--amber); margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--text-mid); text-decoration: none; font-size: 0.9rem; }
.site-footer a:hover { color: var(--text); }
.site-footer .blurb { font-size: 0.9rem; color: var(--text-dim); margin-top: 0.8rem; max-width: 34ch; }
.footer-legal { max-width: var(--wrap); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-faint); }
.footer-legal p { color: var(--text-faint); font-size: 0.8rem; margin-bottom: 0.3rem; max-width: none; }

/* ── MOTION ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── PRINT ──────────────────────────────────────────────── */
@media print {
  .grid-bg, .orb, .site-header, .book { display: none; }
  body { background: #fff; color: #000; }
}

/* ── UTILITIES ──────────────────────────────────────────────────── */
.mt-lg { margin-top: 2rem; }
.mt-xl { margin-top: 2.5rem; }

/* ── FORM STATES ────────────────────────────────────────────────── */
.form-note--ok   { color: var(--green); font-weight: 600; }
.form-note--fail { color: var(--red); font-weight: 600; }
.form-note--fail a { color: var(--red); text-decoration: underline; }
.book button[disabled] { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

/* ── 404 ────────────────────────────────────────────────────────── */
.notfound { padding: 6rem 1.5rem 4rem; max-width: var(--wrap); margin: 0 auto; text-align: center; }
.notfound .code {
  font-family: 'Rubik', sans-serif; font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 700; color: var(--amber); line-height: 1; letter-spacing: -0.05em;
}
.notfound p { margin-inline: auto; }
.notfound .btn-row { margin-top: 2.25rem; }

/* ── RTL CORRECTIONS ────────────────────────────────────────────────
   Nearly everything above is already direction-agnostic because it uses
   logical properties (margin-inline-start, inset-inline-start, text-align:
   start). These are the handful of cases that are not.               */
[dir="rtl"] .accent { background: none; -webkit-text-fill-color: var(--amber); color: var(--amber); }
[dir="rtl"] .skip-link { left: auto; right: -9999px; border-radius: 0 0 0 8px; }
[dir="rtl"] .skip-link:focus { right: 0; }
[dir="rtl"] .section-label,
[dir="rtl"] .hero-badge,
[dir="rtl"] thead th,
[dir="rtl"] .price .kicker,
[dir="rtl"] .timeline .week,
[dir="rtl"] .card .num,
[dir="rtl"] .site-footer h2 { letter-spacing: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; line-height: 1.35; }
[dir="rtl"] .hero h1, [dir="rtl"] .page-hero h1 { max-width: 22ch; }
/* Latin runs inside Arabic prose keep their own direction. */
[dir="rtl"] code, [dir="rtl"] .alt { direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* Diagrams are read left-to-right in both languages; only the labels change. */
[dir="rtl"] figure svg { direction: ltr; }
