/* ————————————————————————————————
   Faisal AlMutlaq — faisalalmutlaq.com
   Obsidian & desert gold
———————————————————————————————— */

:root {
  --bg: #0a0a0e;
  --bg-2: #0e0d12;
  --ink: #ece7dd;
  --ink-dim: #9b948a;
  --gold: #c9a24b;
  --gold-soft: rgba(201, 162, 75, 0.35);
  --hairline: rgba(236, 231, 221, 0.12);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--bg); }

em { font-style: italic; }

/* ——— Loader ——— */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity 0.9s var(--ease-out), visibility 0.9s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader__mark {
  font-family: var(--serif);
  font-size: 20px; letter-spacing: 0.35em; text-indent: 0.35em;
  color: var(--gold);
}
.loader__bar {
  width: 128px; height: 1px; background: var(--hairline);
  overflow: hidden;
}
.loader__bar span {
  display: block; height: 100%; width: 0%;
  background: var(--gold);
  transition: width 0.3s ease;
}

/* ——— Nav ——— */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 1s var(--ease-out) 0.2s, transform 1s var(--ease-out) 0.2s;
}
.nav.on { opacity: 1; transform: none; }
.nav.on.nav--hidden { opacity: 0; transform: translateY(-16px); pointer-events: none; }
.nav a { color: #fff; text-decoration: none; }
.nav__mark {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--serif);
  font-size: 17px; font-weight: 400; letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(10, 10, 14, 0.8);
}
.nav__name { white-space: nowrap; }
.nav__mark em {
  font-style: italic; font-weight: 500;
  color: var(--gold);
}
.nav__mono {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border: 1px solid var(--gold-soft);
  border-radius: 2px;
  transform: rotate(45deg);
  transition: transform 0.8s var(--ease-out), border-color 0.4s;
}
.nav__mono b {
  transform: rotate(-45deg);
  transition: transform 0.8s var(--ease-out);
  font-style: italic; font-weight: 500;
  font-size: 13px; line-height: 1;
  color: var(--gold);
  text-shadow: none;
}
.nav__mark:hover .nav__mono { transform: rotate(225deg); border-color: var(--gold); }
.nav__mark:hover .nav__mono b { transform: rotate(-225deg); }
.nav__stroke {
  width: 1px; height: 18px;
  background: linear-gradient(to bottom, transparent, var(--gold-soft), transparent);
}
.nav__links { display: flex; gap: clamp(16px, 3vw, 36px); mix-blend-mode: difference; }
.nav__links a {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.72; transition: opacity 0.3s;
}
.nav__links a:hover { opacity: 1; }
.nav__cta { border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 2px; }

/* ——— Hero ——— */
.hero { position: relative; height: 460vh; }
.hero__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
.hero__canvas, .hero__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__poster { display: none; }
.hero__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 52% at 50% 50%, rgba(10,10,14,0.42) 0%, rgba(10,10,14,0.18) 55%, transparent 78%),
    radial-gradient(ellipse at 50% 55%, transparent 42%, rgba(10,10,14,0.6) 100%),
    linear-gradient(to bottom, rgba(10,10,14,0.4), transparent 22%, transparent 72%, var(--bg) 100%);
  pointer-events: none;
}

.hero__stage {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
}
.hero__stage--2 { opacity: 0; }
.hero__stage h1, .hero__stage p {
  text-shadow:
    0 1px 3px rgba(10, 10, 14, 0.9),
    0 2px 28px rgba(10, 10, 14, 0.95),
    0 0 90px rgba(10, 10, 14, 0.85);
}
.hero__statement em { font-style: italic; color: #e3c67f; }
.hero__stage--2::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(96vw, 1200px);
  height: min(64vh, 560px);
  background: radial-gradient(closest-side, rgba(10,10,14,0.82), rgba(10,10,14,0.55) 55%, transparent 100%);
}
.hero__statement { position: relative; }

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(52px, 11vw, 148px);
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.hero__title em { font-weight: 400; color: var(--gold); }
.hero__title span { display: block; }
.hero__tag {
  margin-top: clamp(20px, 3.4vh, 34px);
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--ink-dim);
  letter-spacing: 0.01em;
}
.hero__statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1.16;
  max-width: 20ch;
}

.hero__scrollcue {
  position: absolute; bottom: 34px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; text-indent: 0.3em;
  color: var(--ink-dim);
  transition: opacity 0.5s;
}
.hero__scrollline {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollcue 2.2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scrollcue {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}

/* reveal lines (entrance) */
.reveal-line {
  opacity: 0; transform: translateY(34px);
  transition: opacity 1.3s var(--ease-out), transform 1.3s var(--ease-out);
}
.reveal-line--d1 { transition-delay: 0.12s; }
.reveal-line--d2 { transition-delay: 0.26s; }
body.ready .reveal-line { opacity: 1; transform: none; }

/* ——— Manifesto ——— */
.manifesto {
  position: relative;
  padding: clamp(120px, 20vh, 220px) clamp(24px, 8vw, 120px);
  max-width: 1200px; margin: 0 auto;
}
.manifesto__kicker,
.xp__kicker, .focus__kicker, .contact__kicker {
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 34px;
}
.manifesto__text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 3.6vw, 48px);
  line-height: 1.32;
  max-width: 24ch;
}
.manifesto__text em { color: var(--gold); }
.manifesto__meta {
  display: flex; flex-wrap: wrap; gap: 16px clamp(32px, 5vw, 72px);
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 13px; color: var(--ink); letter-spacing: 0.16em;
  text-transform: uppercase;
}
.manifesto__meta em {
  font-family: var(--serif); font-style: italic;
  color: var(--gold);
  margin-right: 10px;
  letter-spacing: 0;
}

/* ——— Arc ——— */
.arc { position: relative; height: 520vh; }
.arc__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden;
}
.arc__canvas, .arc__poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.arc__poster { display: none; }
.arc__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(10,10,14,0.82) 0%, rgba(10,10,14,0.45) 46%, transparent 75%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%);
  pointer-events: none;
}

.arc__chapters { position: absolute; inset: 0; pointer-events: none; }
.arc__chapter {
  position: absolute;
  top: 50%; left: clamp(24px, 8vw, 120px);
  transform: translateY(calc(-50% + var(--drift, 0px)));
  max-width: 460px;
  opacity: 0;
}
.arc__num {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--gold);
  margin-bottom: 14px;
}
.arc__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1;
  margin-bottom: 22px;
}
.arc__body {
  font-family: var(--serif);
  font-size: clamp(16px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.92;
  max-width: 36ch;
  text-shadow: 0 1px 18px rgba(10, 10, 14, 0.8);
}

.arc__progress {
  position: absolute;
  right: clamp(20px, 4vw, 56px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
}
.arc__tick {
  width: 1px; height: 34px;
  background: var(--hairline);
  position: relative;
  overflow: hidden;
}
.arc__tick::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.6s var(--ease-out);
}
.arc__tick.on::after { transform: scaleY(1); }

/* ——— Experience ——— */
.xp {
  padding: clamp(120px, 18vh, 200px) clamp(24px, 8vw, 120px);
  max-width: 1200px; margin: 0 auto;
}
.xp__head { margin-bottom: clamp(60px, 9vh, 100px); }
.xp__title, .focus__title, .contact__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.14;
}
.xp__list { list-style: none; }
.xp__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 34px 0;
  border-top: 1px solid var(--hairline);
}
.xp__row:last-child { border-bottom: 1px solid var(--hairline); }
.xp__year {
  font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--gold);
  padding-top: 4px;
}
.xp__info h3 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.xp__sep { color: var(--gold); font-weight: 300; }
.xp__info p { font-size: 14.5px; color: var(--ink-dim); max-width: 60ch; }
.xp__edu {
  margin-top: 54px;
  display: grid; grid-template-columns: 130px 1fr; gap: 20px;
  font-size: 13.5px; color: var(--ink-dim);
}
.xp__edu-label {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); padding-top: 3px;
}

/* ——— Focus ——— */
.focus {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.focus__media { position: absolute; inset: 0; }
.focus__video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.focus__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(10,10,14,0.9) 6%, rgba(10,10,14,0.55) 48%, rgba(10,10,14,0.18) 100%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 20%, transparent 80%, var(--bg) 100%);
}
.focus__content {
  position: relative;
  padding: clamp(120px, 16vh, 180px) clamp(24px, 8vw, 120px);
  max-width: 1200px; margin: 0 auto; width: 100%;
}
.focus__body {
  margin-top: 30px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink);
  opacity: 0.85;
  max-width: 46ch;
}
.focus__chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 44px;
  max-width: 560px;
}
.focus__chips li {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 9px 18px;
}

/* ——— Contact ——— */
.contact {
  position: relative;
  padding: clamp(130px, 20vh, 240px) clamp(24px, 8vw, 120px) 48px;
  max-width: 1200px; margin: 0 auto;
  text-align: center;
}
.contact__title { font-size: clamp(44px, 7.5vw, 104px); }
.contact__actions { margin-top: 52px; }
.contact__btn {
  display: inline-block;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  text-decoration: none;
  padding: 18px 44px;
  border-radius: 999px;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.contact__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px -12px var(--gold-soft);
}
.contact__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }
.contact__btn--ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
}
.contact__btn--ghost:hover {
  border-color: var(--gold);
  box-shadow: 0 18px 50px -18px var(--gold-soft);
}
.contact__foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px;
  margin-top: clamp(90px, 14vh, 150px);
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--ink-dim); letter-spacing: 0.06em;
}

/* ——— Scroll reveals ——— */
.reveal {
  opacity: 0; transform: translateY(44px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.xp__row.reveal:nth-child(2) { transition-delay: 0.08s; }
.xp__row.reveal:nth-child(3) { transition-delay: 0.16s; }
.xp__row.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ——— Mobile ——— */
@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .hero { height: 380vh; }
  .arc { height: 460vh; }
  .arc__chapter {
    left: 24px; right: 24px;
    top: auto; bottom: 10vh;
    transform: translateY(calc(var(--drift, 0px) * 0.3));
  }
  .arc__progress {
    top: auto; bottom: 10vh; right: 20px;
    transform: none;
  }
  .xp__row, .xp__edu { grid-template-columns: 1fr; gap: 6px; }
  .focus__shade {
    background: linear-gradient(to bottom, var(--bg) 0%, rgba(10,10,14,0.6) 40%, rgba(10,10,14,0.86) 100%);
  }
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  .hero, .arc { height: auto; }
  .hero__sticky, .arc__sticky { position: relative; height: 100svh; }
  .hero__canvas, .arc__canvas { display: none; }
  .hero__poster, .arc__poster { display: block; }
  .hero__stage--2, .hero__scrollcue { display: none; }
  .arc__chapters { position: relative; inset: auto; pointer-events: auto; }
  .arc__chapter {
    position: relative; top: auto; left: auto; bottom: auto;
    transform: none; opacity: 1;
    margin: 0 auto; max-width: 640px;
    padding: 64px 24px;
  }
  .arc__sticky { height: auto; min-height: 100svh; }
  .arc__poster { position: absolute; }
  .arc__progress { display: none; }
  .reveal, .reveal-line { opacity: 1; transform: none; transition: none; }
  .hero__scrollline { animation: none; }
  .focus__video { display: none; }
  .focus__media { background: url('../assets/posters/focus.jpg') center/cover no-repeat; }
  .contact__btn { transition: none; }
}
