/* ==========================================================================
   Khalida Jarrar — site styles
   Palette drawn from tatreez embroidery, olive groves and West Bank stone.
   ========================================================================== */

:root {
  --ink: #14130f;
  --ink-2: #2a2822;
  --stone: #f4efe6;
  --stone-2: #ebe3d5;
  --paper: #fbf8f2;
  --muted: #6d675b;
  --line: #d9cfbd;
  --red: #a3221c;
  --red-deep: #7a1611;
  --olive: #4c5a34;
  --olive-soft: #8a9a6a;
  --gold: #c9a45c;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
blockquote { margin: 0; }
::selection { background: var(--red); color: var(--paper); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.eyebrow {
  font: 600 12px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 18px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(34px, 5vw, 58px); max-width: 16ch; }

section { padding: clamp(72px, 10vw, 140px) var(--gutter); }
section > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }

/* Tatreez band — a cross-stitch border rendered in CSS */
.tatreez-band {
  height: 22px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cg fill='%23a3221c'%3E%3Cpath d='M22 1l10 10-10 10-10-10z' fill-opacity='.9'/%3E%3Cpath d='M22 7l4 4-4 4-4-4z' fill='%23fbf8f2'/%3E%3Cpath d='M0 9h4v4H0zM40 9h4v4h-4zM6 3h3v3H6zM6 16h3v3H6zM35 3h3v3h-3zM35 16h3v3h-3z'/%3E%3C/g%3E%3C/svg%3E") repeat-x center / 44px 22px;
  max-width: none;
}
.tatreez-band.light { opacity: .9; filter: brightness(1.15); }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), color .4s var(--ease);
  color: var(--ink);
}
.site-header.scrolled { background: rgba(251, 248, 242, .92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.nav {
  max-width: var(--wrap); margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 12px; }
.brand-en { font: 500 18px/1 var(--serif); letter-spacing: .01em; }
.brand-ar { font: 400 20px/1 var(--arabic); color: var(--red); }
.nav-links { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: .02em;
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--red);
  transition: right .35s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 1.5px; background: currentColor; margin: 6px 0; transition: transform .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding-top: 120px; padding-bottom: 96px;
  background:
    radial-gradient(1200px 600px at 85% 20%, rgba(201, 164, 92, .16), transparent 60%),
    linear-gradient(180deg, var(--stone) 0%, var(--paper) 100%);
  max-width: none;
}
.hero > .hero-text { margin-left: max(0px, calc((100vw - var(--wrap)) / 2 - var(--gutter))); margin-right: 0; max-width: 600px; }
.hero > .hero-figure { margin: 0; max-width: none; }
.hero h1 { font-size: clamp(64px, 10vw, 148px); font-weight: 300; line-height: .9; letter-spacing: -.035em; }
.h1-line { display: block; overflow: hidden; }
.h1-line:last-child { font-style: italic; color: var(--red); padding-left: .35em; }
.hero-ar { font: 400 clamp(30px, 3.6vw, 46px)/1.3 var(--arabic); color: var(--olive); margin: 14px 0 6px; text-align: left; }
.hero-roles { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-roles i { color: var(--red); font-style: normal; padding: 0 6px; }
.hero-quote { margin: 34px 0 40px; padding-left: 22px; border-left: 2px solid var(--red); }
.hero-quote p { font: italic 300 clamp(22px, 2.3vw, 30px)/1.3 var(--serif); margin: 0 0 10px; }
.hero-quote cite { font-style: normal; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; font-size: 14px; font-weight: 600; letter-spacing: .04em; text-decoration: none;
  border-radius: var(--radius); transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--red); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.hero-figure { position: relative; }
.hero-frame {
  position: relative; overflow: hidden;
  border-radius: 2px 0 0 2px;
  aspect-ratio: 5 / 4;
  box-shadow: 0 40px 80px -30px rgba(20, 19, 15, .45);
}
.hero-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgba(20, 19, 15, .35));
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.06); animation: settle 2.4s var(--ease) forwards; }
.hero-figure::before {
  content: ""; position: absolute; left: -22px; top: 22px; bottom: -22px; width: 22px;
  background: var(--red);
}
.hero-figure figcaption { font-size: 11px; letter-spacing: .08em; color: var(--muted); margin-top: 12px; text-transform: uppercase; }
.hero > .tatreez-band { position: absolute; left: 0; right: 0; bottom: 0; }
@keyframes settle { to { transform: scale(1); } }

/* ---------------- Stats ---------------- */
.stats {
  background: var(--ink); color: var(--stone);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-top: 64px; padding-bottom: 64px;
  max-width: none;
}
.stats > .stat { max-width: none; margin: 0; padding: 8px 28px; border-left: 1px solid rgba(244, 239, 230, .14); }
.stats > .stat:first-child { border-left: 0; }
.stat-num { display: block; font: 300 clamp(44px, 5vw, 68px)/1 var(--serif); color: var(--gold); margin-bottom: 12px; }
.stat-label { font-size: 14px; line-height: 1.5; color: rgba(244, 239, 230, .72); display: block; max-width: 24ch; }

/* ---------------- Intro ---------------- */
.intro { padding-bottom: 0; }
.lede {
  font: 300 clamp(24px, 2.8vw, 38px)/1.4 var(--serif);
  max-width: 30ch; margin: 0 auto; max-width: 880px;
  text-wrap: pretty;
}
.lede::first-letter { float: left; font-size: 3.2em; line-height: .85; padding: 8px 14px 0 0; color: var(--red); font-weight: 400; }
.lede em { color: var(--olive); }

/* ---------------- Principles ---------------- */
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.principle {
  background: var(--paper); padding: 40px 34px 36px; position: relative;
  display: flex; flex-direction: column;
  transition: background .4s var(--ease);
}
.principle:hover { background: var(--stone); }
.principle::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--red);
  transition: width .6s var(--ease);
}
.principle:hover::before { width: 100%; }
.p-num { font: italic 400 15px/1 var(--serif); color: var(--red); margin-bottom: 28px; }
.principle h3 { font-size: 27px; margin-bottom: 16px; }
.principle p { font-size: 15.5px; color: var(--ink-2); }
.principle blockquote {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line);
  font: italic 400 17px/1.45 var(--serif); color: var(--olive);
}

/* ---------------- Life ---------------- */
.life { background: var(--stone); }
.life-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 120px); }
.sticky { position: sticky; top: 120px; align-self: start; }
.olive { color: var(--olive); width: 90px; margin-top: 40px; }
.chapter { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.chapter:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.chapter h3 { font-size: 30px; margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.chapter h3::before { content: ""; width: 10px; height: 10px; background: var(--red); transform: rotate(45deg); flex: none; }
.chapter p { color: var(--ink-2); }
.chapter strong { font-weight: 600; color: var(--ink); }
.life-portrait { margin: 40px 0 0; max-width: 340px; position: relative; }
.life-portrait img { width: 100%; aspect-ratio: 437 / 480; object-fit: cover; filter: grayscale(.15) contrast(1.03); box-shadow: 18px 18px 0 var(--red); }
.life-portrait figcaption, .pf-credit { font-size: 11px; letter-spacing: .06em; color: var(--muted); margin-top: 30px; }
.life-portrait figcaption a, .pf-credit a { color: inherit; }

/* ---------------- Photo feature ---------------- */
.photo-feature { padding: 0; background: var(--ink); }
.photo-feature > figure { max-width: none; margin: 0; position: relative; }
.photo-feature img { width: 100%; height: min(86vh, 820px); object-fit: cover; object-position: 50% 45%; }
.photo-feature figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 120px var(--gutter) 40px;
  background: linear-gradient(transparent, rgba(20, 19, 15, .88));
  color: var(--stone);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 12px 32px;
}
.pf-date { font: italic 300 clamp(28px, 3.4vw, 44px)/1 var(--serif); color: var(--gold); }
.pf-text { font: 300 clamp(17px, 1.6vw, 21px)/1.45 var(--serif); max-width: 46ch; }
.pf-credit { margin: 0; color: rgba(244, 239, 230, .6); }

/* ---------------- Pull quote ---------------- */
.pull {
  background: var(--red-deep); color: var(--stone);
  text-align: center; position: relative; padding-top: 0;
  background-image: radial-gradient(800px 400px at 50% 120%, rgba(201, 164, 92, .25), transparent 70%);
}
.pull .tatreez-band {
  margin-bottom: clamp(72px, 10vw, 130px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cg fill='%23c9a45c'%3E%3Cpath d='M22 1l10 10-10 10-10-10z'/%3E%3Cpath d='M22 7l4 4-4 4-4-4z' fill='%237a1611'/%3E%3Cpath d='M0 9h4v4H0zM40 9h4v4h-4zM6 3h3v3H6zM6 16h3v3H6zM35 3h3v3h-3zM35 16h3v3h-3z'/%3E%3C/g%3E%3C/svg%3E");
}
.pull blockquote p { font: italic 300 clamp(32px, 5.4vw, 72px)/1.15 var(--serif); max-width: 20ch; margin: 0 auto 30px; text-wrap: balance; }
.pull cite { font-style: normal; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* ---------------- Timeline ---------------- */
.timeline { list-style: none; padding: 0; margin: 0 auto; position: relative; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 118px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 54px; padding: 0 0 40px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 113px; top: 9px; width: 11px; height: 11px;
  background: var(--paper); border: 1.5px solid var(--olive-soft); transform: rotate(45deg);
}
.timeline li.mark::before { background: var(--red); border-color: var(--red); }
.timeline li.free::before { background: var(--olive); border-color: var(--olive); width: 15px; height: 15px; left: 111px; top: 7px; }
.timeline time { font: 400 26px/1 var(--serif); text-align: right; color: var(--ink); }
.timeline li.mark time { color: var(--red); }
.timeline li.free time { color: var(--olive); font-style: italic; }
.timeline h3 { font-size: 21px; margin-bottom: 6px; }
.timeline p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ---------------- Defiance ---------------- */
.defiance { background: var(--ink); color: var(--stone); position: relative; overflow: hidden; }
.defiance::before {
  content: ""; position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--stone) 0 2px, transparent 2px 72px);
}
.defiance .eyebrow { color: var(--gold); }
.defiance-inner { position: relative; }
.defiance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 96px); }
.defiance p { color: rgba(244, 239, 230, .8); }
.defiance em { color: var(--stone); }
.defiance strong { color: var(--gold); font-weight: 500; }
.small-head { font-size: 13px; font-family: var(--sans); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.inline-quote {
  margin-top: 28px; padding: 26px 28px; background: rgba(244, 239, 230, .05); border-left: 2px solid var(--red);
  font: italic 300 21px/1.45 var(--serif); color: var(--stone);
}

/* ---------------- Suha ---------------- */
.suha { background: var(--stone-2); }
.suha-card { max-width: 760px; text-align: center; }
.suha .eyebrow { justify-content: center; }
.suha .eyebrow::before { display: none; }
.rose { width: 54px; height: 54px; color: var(--red); margin: 0 auto 20px; }
.suha h2 { font-size: clamp(34px, 4.6vw, 52px); margin-bottom: 26px; }
.suha h2 span { display: block; font: 400 14px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.suha p { color: var(--ink-2); font-size: 17px; }
.suha blockquote { font: italic 300 clamp(22px, 2.6vw, 30px)/1.4 var(--serif); color: var(--red-deep); margin-top: 30px; text-wrap: balance; }

/* ---------------- Voice carousel ---------------- */
.quote-carousel { position: relative; }
.quote-track { display: grid; min-height: 260px; }
.q { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); pointer-events: none; }
.q.is-active { opacity: 1; transform: none; pointer-events: auto; }
.q blockquote { font: 300 clamp(28px, 4.2vw, 54px)/1.2 var(--serif); max-width: 24ch; text-wrap: balance; }
.q figcaption { margin-top: 26px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.q-controls { display: flex; align-items: center; gap: 20px; margin-top: 44px; }
.q-btn {
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--ink); background: none; cursor: pointer;
  font-size: 18px; color: var(--ink); transition: background .3s, color .3s;
}
.q-btn:hover { background: var(--ink); color: var(--paper); }
.q-dots { display: flex; gap: 10px; }
.q-dots button { width: 26px; height: 3px; padding: 0; border: 0; background: var(--line); cursor: pointer; transition: background .3s, width .3s; }
.q-dots button[aria-selected="true"] { background: var(--red); width: 44px; }

/* ---------------- Sources ---------------- */
.sources { background: var(--stone); padding-top: clamp(64px, 8vw, 110px); }
.source-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 56px; }
.source-list li { break-inside: avoid; border-top: 1px solid var(--line); }
.source-list a {
  display: flex; justify-content: space-between; gap: 20px; padding: 16px 0;
  text-decoration: none; font-size: 15px; color: var(--ink-2); transition: color .25s, padding .25s var(--ease);
}
.source-list a::after { content: "↗"; color: var(--red); }
.source-list a:hover { color: var(--red); padding-left: 6px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: var(--stone); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-name { font: 400 24px/1 var(--serif); margin: 0 0 6px; }
.footer-ar { font: 400 22px/1 var(--arabic); color: var(--gold); margin: 0; text-align: left; }
.footer-email { font: 300 20px/1 var(--serif); color: var(--stone); text-decoration: none; border-bottom: 1px solid rgba(244, 239, 230, .3); padding-bottom: 4px; transition: color .25s, border-color .25s; }
.footer-email:hover { color: var(--gold); border-color: var(--gold); }
.to-top { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--gold); }

/* ---------------- Reveal ---------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .principle-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .stats > .stat:nth-child(3) { border-left: 0; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; color: inherit; }
  .nav-links {
    position: fixed; inset: 64px 0 auto; flex-direction: column; gap: 0;
    background: var(--paper); padding: 8px var(--gutter) 24px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.25);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a::after { display: none; }
  .site-header.menu-open { background: var(--paper); }

  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 104px; min-height: 0; }
  .hero > .hero-text { margin: 0; }
  .hero > .hero-figure { order: -1; }
  .hero-figure::before { display: none; }
  .hero-frame { border-radius: var(--radius); aspect-ratio: 3 / 2; }

  .life-grid, .defiance-grid { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .olive { display: none; }
  .life-portrait { max-width: 280px; }
  .photo-feature img { height: auto; aspect-ratio: 3 / 2; }
  .photo-feature figcaption { position: static; background: var(--ink); padding: 24px var(--gutter) 32px; grid-template-columns: 1fr; }

  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; padding-left: 36px; }
  .timeline li::before { left: 1px; }
  .timeline li.free::before { left: -1px; }
  .timeline time { text-align: left; font-size: 22px; }

  .source-list { columns: 1; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .principle-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stats > .stat { border-left: 0; border-top: 1px solid rgba(244, 239, 230, .14); padding: 24px 0 0; }
  .stats > .stat:first-child { border-top: 0; padding-top: 0; }
  .principle { padding: 32px 24px; }
  .brand-ar { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------------- 404 ---------------- */
.not-found { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--stone); }
.not-found main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 48px var(--gutter); max-width: var(--wrap); width: 100%; margin: 0 auto; }
.not-found h1 { font-size: clamp(40px, 7vw, 88px); font-weight: 300; max-width: 14ch; margin-bottom: 12px; }
.nf-ar { font: 400 clamp(26px, 3vw, 36px)/1.3 var(--arabic); color: var(--red); margin-bottom: 36px; }
