/* ============================================================================
   The Buraaq Association · page styles
   Tokens first, then chrome, then one block per chapter.
   ========================================================================== */
:root {
  --ink-0:   #12100d;   /* off-black, warm */
  --ink-1:   #1c1813;   /* raised on ink */
  --paper:   #f3eee4;
  --paper-2: #e9e2d4;
  --bone:    #f4efe6;
  --orange:  #f7941d;   /* brand orange, from the portfolio */
  --orange-deep: #9a4d00; /* orange as text on paper: 5.3:1 */

  --sc-canvas:     var(--ink-0);
  --sc-surface:    var(--ink-1);
  --sc-ink:        var(--bone);
  --sc-ink-soft:   #c4b8a8;
  --sc-accent:     var(--orange);
  --sc-accent-ink: var(--ink-0);
  --sc-shadow-color: 30 40% 4%;

  --sc-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --sc-font-text:    "Archivo", system-ui, sans-serif;
  --sc-font-mono:    "Archivo", system-ui, sans-serif;

  --bar-h: 68px;
  --r: 10px;
}

/* --------------------------------------------------------------- base -- */
html { scroll-padding-top: var(--bar-h); }
body { font-variation-settings: "wdth" 100; }
h1, h2, h3 { font-family: var(--sc-font-display); font-weight: 700; margin: 0; }
p { margin: 0; }
em { font-style: italic; font-weight: 500; }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--orange); color: var(--ink-0); padding: .6rem 1rem; border-radius: var(--r);
  font-weight: 700; text-decoration: none;
}
.skip:focus-visible { top: 1rem; }

.display { font-family: var(--sc-font-display); font-weight: 700; line-height: 1; letter-spacing: -0.025em; text-wrap: balance; font-optical-sizing: auto; }
.display--lg { font-size: clamp(2.5rem, 1.6rem + 4vw, 5.4rem); }
.display--sm { font-size: clamp(1.4rem, 1.2rem + .8vw, 2rem); letter-spacing: -0.015em; line-height: 1.08; }
.lede { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.45rem); line-height: 1.45; max-width: 40ch; text-wrap: pretty; }
.body { max-width: 62ch; color: var(--sc-ink-soft); text-wrap: pretty; }
.body--strong { color: var(--sc-ink); }
.folio {
  font-stretch: 72%; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  font-size: var(--sc-t-sm); display: inline-flex; align-items: center; gap: .7rem;
}
.folio::before { content: ""; width: 6px; height: 1.6em; background: var(--orange); }

/* buttons: one radius, one family */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem; border-radius: var(--r);
  font-weight: 700; font-stretch: 85%; text-transform: uppercase; letter-spacing: .06em;
  font-size: var(--sc-t-sm); text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out);
  box-shadow: var(--sc-e1);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--accent { background: var(--orange); color: var(--ink-0); }
.btn--ink { background: var(--ink-0); color: var(--bone); }
@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: #ffa53a; box-shadow: var(--sc-e2); }
  .btn--ink:hover { background: #2a241c; box-shadow: var(--sc-e2); }
}
.link-arrow {
  font-weight: 600; text-decoration: none; display: inline-flex; gap: .5rem; align-items: center;
  padding-block: .6rem; border-bottom: 1px solid currentColor;
}
.link-arrow::after { content: "→"; transition: transform 160ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover::after { transform: translateX(4px); } }

/* offset orange block behind media: the portfolio's own device */
.offset { position: relative; margin: 0; isolation: isolate; }
.offset::before {
  content: ""; position: absolute; z-index: -1; background: var(--orange);
  inset: 1.4rem -1.4rem -1.4rem 1.4rem;
}
.offset--tl::before { inset: -1.4rem 1.4rem 1.4rem -1.4rem; }
.offset img { width: 100%; height: auto; box-shadow: var(--sc-e2); }

/* ---------------------------------------------------------- chapters -- */
.chapter { padding-block: var(--sc-section); position: relative; z-index: 4; }
.chapter--paper  { background: var(--paper);  --sc-ink: #1a1611; --sc-ink-soft: #564b3f; color: var(--sc-ink); }
.chapter--orange { background: var(--orange); --sc-ink: #14100b; --sc-ink-soft: #3a2a17; color: var(--sc-ink); }
.chapter--ink    { background: var(--ink-0);  --sc-ink: var(--bone); --sc-ink-soft: #c4b8a8; color: var(--sc-ink); }
.chapter--paper ::selection { background: var(--ink-0); color: var(--bone); }
.chapter--orange :focus-visible, .contact :focus-visible { outline-color: var(--ink-0); }

.chapter__head { margin-bottom: clamp(2.5rem, 6vw, 5rem); display: grid; gap: 1.25rem; }
.chapter__head--split { grid-template-columns: 1.4fr 1fr; align-items: end; gap: 2rem 4rem; }
@media (max-width: 860px) { .chapter__head--split { grid-template-columns: 1fr; } }

/* ============================================================ CHROME -- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 70; height: var(--bar-h);
  display: flex; align-items: center; gap: 1.5rem;
  padding-inline: clamp(1rem, 2.6vw, 2.5rem);
  color: var(--bone);
  transition: background-color 240ms var(--sc-ease-out), box-shadow 240ms var(--sc-ease-out);
}
.bar.is-solid { background: color-mix(in oklab, var(--ink-0) 96%, transparent); box-shadow: 0 1px 0 color-mix(in oklab, var(--bone) 10%, transparent), var(--sc-e1); }
.bar__mark { display: flex; align-items: center; gap: .75rem; text-decoration: none; flex: none; }
.bar__mark img { width: 46px; height: auto; }
.bar__mark span { font-family: var(--sc-font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; line-height: 1.05; max-width: 9.5em; }
.bar__nav { margin-left: auto; }
.bar__nav ul { display: flex; gap: clamp(.6rem, 1.4vw, 1.6rem); list-style: none; margin: 0; padding: 0; }
.bar__nav a {
  position: relative; display: block; padding: .55rem 0; text-decoration: none;
  font-stretch: 78%; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: .8rem;
  color: color-mix(in oklab, var(--bone) 80%, transparent);
  transition: color 160ms var(--sc-ease-out);
}
.bar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px; background: var(--orange);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 260ms var(--sc-ease-out);
}
.bar__nav a.is-current { color: var(--bone); }
.bar__nav a.is-current::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .bar__nav a:hover { color: var(--bone); } }
.btn--bar { background: var(--orange); color: var(--ink-0); min-height: 40px; padding: 0 1.05rem; font-size: .78rem; }
.btn--bar.is-current { box-shadow: 0 0 0 2px var(--bone); }
.bar__menu {
  display: none; margin-left: auto; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .9rem;
  background: transparent; border: 1px solid color-mix(in oklab, var(--bone) 30%, transparent); border-radius: var(--r);
  font-weight: 700; font-stretch: 80%; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; cursor: pointer;
}
.bar__menu-lines { width: 18px; height: 10px; border-block: 2px solid currentColor; transition: transform 200ms var(--sc-ease-out); }
.bar__menu[aria-expanded="true"] .bar__menu-lines { transform: scaleY(.3); }

.drawer {
  position: fixed; inset: var(--bar-h) 0 0 0; z-index: 69; background: var(--ink-0); color: var(--bone);
  padding: 1.5rem clamp(1.25rem, 5vw, 3rem) 3rem; overflow-y: auto;
}
.drawer ol { list-style: none; margin: 0; padding: 0; }
.drawer li + li { border-top: 1px solid color-mix(in oklab, var(--bone) 12%, transparent); }
.drawer a {
  display: block; padding: 1rem 0; text-decoration: none;
  font-family: var(--sc-font-display); font-weight: 700; font-size: clamp(1.6rem, 6vw, 2.4rem); letter-spacing: -0.02em;
}
.drawer a:last-of-type { color: var(--orange); }
.drawer:not([hidden]) li { animation: drawerIn 420ms var(--sc-ease-out) both; }
.drawer li:nth-child(2) { animation-delay: 30ms; } .drawer li:nth-child(3) { animation-delay: 60ms; }
.drawer li:nth-child(4) { animation-delay: 90ms; } .drawer li:nth-child(5) { animation-delay: 120ms; }
.drawer li:nth-child(6) { animation-delay: 150ms; } .drawer li:nth-child(7) { animation-delay: 180ms; }
.drawer li:nth-child(8) { animation-delay: 210ms; }
@keyframes drawerIn { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1240px) {
  .bar__nav, .btn--bar { display: none; }
  .bar__menu { display: inline-flex; }
}

/* ============================================================== HERO --
   Two timelines.
   Intro (on load, once): the gate halves fly in and lock, the glow blooms,
   light sweeps the crest, the headline rises line by line.
   Scroll (--g, 0..1 from the act progress): the crest rushes toward the
   viewer while its halves part, and the photo opens through a soft window.
   --px/--py are pointer offsets (-1..1) written by site.js on fine pointers. */
.hero__stage {
  background: var(--ink-0);
  --g: clamp(0, calc((var(--sc-p, 0) - 0.04) / 0.52), 1);
  --r: calc(var(--g) * (0.35 + var(--g) * 0.65) * 150vmax);
  --ch: min(64vh, 44vw);                   /* crest height */
  --cw: calc(var(--ch) * 1.145);            /* crest width (1319/1152) */
  --cx: calc(100% - 7vw - var(--cw) / 2);   /* crest centre */
  --cy: 50%;
  perspective: 1400px;
}
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(30vmax 30vmax at var(--cx) var(--cy), color-mix(in oklab, var(--orange) 26%, transparent), transparent 70%),
    radial-gradient(70vmax 50vmax at var(--cx) 110%, color-mix(in oklab, #7a3b05 30%, transparent), transparent 70%);
  transform: translate3d(calc(var(--px, 0) * 8px), calc(var(--py, 0) * 8px), 0);
  opacity: calc(1 - var(--g) * 0.6);
}
.hero__iris {
  position: absolute; inset: 0; z-index: 1;
  opacity: clamp(0, calc(var(--g) * 30), 1);
  -webkit-mask-image: radial-gradient(circle at var(--cx) var(--cy), #000 calc(var(--r) - 14vmax), transparent var(--r));
          mask-image: radial-gradient(circle at var(--cx) var(--cy), #000 calc(var(--r) - 14vmax), transparent var(--r));
}
.hero__iris img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  transform: scale(calc(1.4 - var(--g) * 0.32));
  filter: brightness(calc(0.7 + var(--g) * 0.3)) saturate(.95);
}
.hero__iris-scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--g);
  background: linear-gradient(to top, color-mix(in oklab, var(--ink-0) 92%, transparent) 0%, color-mix(in oklab, var(--ink-0) 62%, transparent) 26%, transparent 55%);
}
.hero__embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

.hero__crest {
  position: absolute; z-index: 3;
  height: var(--ch); width: var(--cw);
  left: calc(var(--cx) - var(--cw) / 2); top: calc(var(--cy) - var(--ch) / 2);
  transform-style: preserve-3d;
  transform: translate3d(calc(var(--px, 0) * 14px), calc(var(--py, 0) * 12px), 0) rotateY(calc(var(--px, 0) * 6deg)) rotateX(calc(var(--py, 0) * -4deg));
}
.hero__fly {
  position: absolute; inset: 0; display: flex; transform-style: preserve-3d;
  transform: scale(calc(1 + var(--g) * var(--g) * 1.5));
}
.gate { width: 50%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.gate img { width: 100%; height: 100%; object-fit: contain; max-width: none; }
.hero .gate--r { margin-left: -1px; }
.hero .gate--l { transform-origin: 0% 50%; transform: translate3d(calc(var(--g) * -88%), 0, 0) rotateY(calc(var(--g) * 64deg)); opacity: clamp(0, calc(1 - var(--g) * 1.7), 1); }
.hero .gate--r { transform-origin: 100% 50%; transform: translate3d(calc(var(--g) * 88%), 0, 0) rotateY(calc(var(--g) * -64deg)); opacity: clamp(0, calc(1 - var(--g) * 1.7), 1); }
.hero .gate img { filter: drop-shadow(0 22px 34px rgba(0,0,0,.45)); }

/* The whole crest sits on top of the halves at rest, so the closed crest has
   no seam. It hands over to the halves the moment the gates start to move. */
.crest__whole { position: absolute; inset: 0; opacity: clamp(0, calc(1 - var(--g) * 40), 1); }
.crest__whole img { width: 100%; height: 100%; object-fit: contain; max-width: none; }
.crest__shine {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: url("assets/crest-orange.png") center / contain no-repeat;
          mask: url("assets/crest-orange.png") center / contain no-repeat;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 240, 214, .9) 50%, transparent 60%) 0 0 / 300% 100% no-repeat;
  background-position: 120% 0;
}

.hero__block { position: absolute; z-index: 5; background: var(--orange); pointer-events: none; }
.hero__block--a {
  width: clamp(10px, 1vw, 16px); height: 38vh; right: 3vw; top: 14vh;
  transform: translate3d(calc(var(--px, 0) * 22px), calc(var(--py, 0) * 18px + var(--sc-p, 0) * -48vh), 0);
}
.hero__block--b {
  width: clamp(9rem, 22vw, 22rem); height: clamp(3rem, 7vh, 4.6rem); left: 0; bottom: 0;
  transform: translate3d(calc(var(--px, 0) * -18px), calc(var(--py, 0) * 10px + var(--sc-p, 0) * 30vh), 0);
}

.hero__copy {
  position: absolute; z-index: 6; left: var(--sc-gutter); bottom: clamp(3rem, 10vh, 7rem);
  max-width: min(44rem, 52vw);
}
.hero__title {
  font-size: clamp(3.2rem, 1.4rem + 7.2vw, 8.6rem); line-height: .92; letter-spacing: -0.035em;
  font-weight: 750; font-variation-settings: "opsz" 144;
  transform-origin: 0 100%;
  transform: translate3d(0, calc(var(--sc-p, 0) * -8vh), 0) scale(calc(1 - var(--sc-p, 0) * 0.12));
}
.hero__title .ln { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero__title .ln > span { display: inline-block; }
.hero__lede { margin-top: 1.5rem; max-width: 34ch; font-size: var(--sc-t-lg); line-height: 1.45; color: #e6dccd; }
.hero__ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; }
.hero__beat {
  position: absolute; z-index: 6; left: var(--sc-gutter); right: var(--sc-gutter); bottom: clamp(3rem, 10vh, 7rem);
}
.hero__beat-line {
  font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.8rem, 1rem + 3vw, 3.6rem);
  line-height: 1.06; letter-spacing: -0.02em; max-width: 22ch; text-wrap: balance;
}

/* --- intro: hidden until assets are ready, then one choreographed entrance */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.is-ready) :is(.hero__glow, .gate img, .crest__whole img, .hero__title .ln > span, .hero__lede, .hero__ctas, .hero__block) { opacity: 0; }
  .is-ready .hero__glow { animation: glowIn 1800ms var(--sc-ease-out) both; }
  .is-ready .hero .gate--l img { animation: gateInL 1300ms cubic-bezier(.16, 1, .3, 1) 150ms both; }
  .is-ready .hero .gate--r img { animation: gateInR 1300ms cubic-bezier(.16, 1, .3, 1) 150ms both; }
  .is-ready .crest__whole img { animation: wholeIn 1ms linear 1420ms both, lock 700ms var(--sc-ease-out) 1420ms; }
  .is-ready .crest__shine { animation: shine 1500ms cubic-bezier(.45, 0, .2, 1) 1500ms both, shineLoop 8000ms cubic-bezier(.45, 0, .2, 1) 4000ms infinite; }
  .is-ready .hero__title .ln > span { animation: lineUp 1000ms cubic-bezier(.16, 1, .3, 1) both; }
  .is-ready .hero__title .ln:nth-child(1) > span { animation-delay: 650ms; }
  .is-ready .hero__title .ln:nth-child(2) > span { animation-delay: 780ms; }
  .is-ready .hero__lede { animation: fadeUp 800ms var(--sc-ease-out) 1050ms both; }
  .is-ready .hero__ctas { animation: fadeUp 800ms var(--sc-ease-out) 1180ms both; }
  .is-ready .hero__block--a { animation: blockIn 1200ms cubic-bezier(.16, 1, .3, 1) 400ms both; }
  .is-ready .hero__block--b { animation: blockIn 1200ms cubic-bezier(.16, 1, .3, 1) 500ms both; }
}
@keyframes glowIn { from { opacity: 0; } }
@keyframes gateInL { from { opacity: 0; transform: translate3d(-55%, 0, 0) rotateY(70deg); } }
@keyframes gateInR { from { opacity: 0; transform: translate3d(55%, 0, 0) rotateY(-70deg); } }
@keyframes wholeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lock { 0% { transform: scale(1); } 30% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes shine { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@keyframes shineLoop { 0%, 80% { background-position: 120% 0; } 100% { background-position: -20% 0; } }
@keyframes lineUp { from { transform: translate3d(0, 105%, 0); } }
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
@keyframes blockIn { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

@media (max-width: 860px) {
  .hero__stage { --ch: min(42vh, 74vw); --cx: 50%; --cy: calc(var(--bar-h) + var(--ch) / 2 + 3vh); }
  .hero__copy { max-width: none; right: var(--sc-gutter); bottom: clamp(2rem, 6vh, 4rem); }
  .hero__title { font-size: clamp(2.8rem, 13vw, 4.4rem); }
  .hero__lede { font-size: 1.05rem; margin-top: 1rem; }
  .hero__ctas { margin-top: 1.25rem; }
  .hero__block--a { display: none; }
  .hero__block--b { width: 40vw; height: 2.2rem; }
}
@media (max-height: 620px) and (max-width: 860px) {
  .hero__stage { --ch: min(34vh, 60vw); }
  .hero__lede { display: none; }
}

/* ============================================================= ABOUT -- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.motto { font-family: var(--sc-font-display); font-size: var(--sc-t-xl); line-height: 1.2; letter-spacing: -0.01em; }
.motto strong { font-weight: 700; }
.about__photo { margin-right: 1.4rem; }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem clamp(2rem, 6vw, 6rem); margin-top: clamp(5rem, 10vw, 9rem); }
.vm__item { border-top: 2px solid var(--sc-ink); padding-top: 1.25rem; display: grid; gap: .9rem; }
.timeline {
  list-style: none; padding: 0; margin: clamp(4rem, 8vw, 7rem) 0 0; position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.timeline__rule { position: absolute; left: 0; right: 0; top: .55rem; height: 3px; background: var(--orange); }
.timeline__item { padding-top: 2.25rem; position: relative; display: grid; gap: .35rem; }
.timeline__item::before { content: ""; position: absolute; top: 0; left: 0; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink-0); }
.timeline__year { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-2xl); line-height: 1; letter-spacing: -0.02em; }
.timeline__item strong { font-stretch: 80%; text-transform: uppercase; letter-spacing: .08em; font-size: var(--sc-t-sm); color: var(--orange-deep); }
.timeline__item > span:last-child { color: var(--sc-ink-soft); max-width: 30ch; }
@media (max-width: 860px) {
  .about__grid, .vm { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 1.5rem; padding-left: 2.2rem; }
  .timeline__rule { left: .5rem; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .timeline__item { padding-top: 0; }
  .timeline__item::before { left: -2.2rem; top: .4rem; }
}

/* =========================================================== DOMAINS -- */
.domains__list { border-top: 2px solid var(--sc-ink); }
.domain { border-bottom: 2px solid var(--sc-ink); }
.domain summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 1rem 2rem;
  padding: clamp(.9rem, 1.6vw, 1.4rem) 0;
}
.domain summary::-webkit-details-marker { display: none; }
.domain summary::after {
  content: ""; width: 1.1rem; height: 1.1rem; align-self: center; flex: none;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 260ms var(--sc-ease-out);
}
.domain[open] summary::after { transform: rotate(45deg); }
.domain__name {
  font-family: var(--sc-font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  font-size: clamp(1.75rem, 1rem + 3.4vw, 4.4rem);
  transition: transform 260ms var(--sc-ease-out);
}
.domain__tag { font-stretch: 80%; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); text-align: right; }
@media (hover: hover) and (pointer: fine) {
  .domain summary:hover .domain__name { transform: translateX(.6rem); }
}
.domain[open] .domain__name { font-style: italic; font-weight: 600; }
.domain__body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 2rem 4rem; align-items: start;
  padding: .25rem 0 clamp(1.5rem, 3vw, 2.5rem);
}
.domain__body p { font-size: var(--sc-t-lg); line-height: 1.5; max-width: 46ch; text-wrap: pretty; }
.domain__body img { width: 100%; height: auto; max-height: 18rem; object-fit: cover; box-shadow: 10px 10px 0 var(--ink-0); background: var(--paper); }
.domain__body img.is-logo { width: auto; max-width: 12rem; max-height: 12rem; object-fit: contain; }
.domain[open] .domain__body { animation: domainIn 420ms var(--sc-ease-out); }
@keyframes domainIn { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 860px) {
  .domain summary { grid-template-columns: 1fr auto; }
  .domain__tag { grid-column: 1; grid-row: 2; text-align: left; }
  .domain summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .domain__body { grid-template-columns: 1fr; }
  .domain__body img { box-shadow: 6px 6px 0 var(--ink-0); }
}

/* ======================================================= FELLOWSHIPS -- */
.fellows { position: relative; z-index: 4; }
.fellows__stage { background: var(--ink-0); display: flex; align-items: center; }
.fellows__rail { gap: clamp(1rem, 2vw, 1.75rem); padding-inline: var(--sc-gutter); align-items: stretch; padding-top: var(--bar-h); }
.fellows__lead { flex: 0 0 clamp(18rem, 34vw, 32rem); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; padding-right: 2rem; }
.fcard {
  flex: 0 0 clamp(17rem, 27vw, 24rem); display: flex; flex-direction: column; gap: 1rem;
  background: var(--ink-1); border-radius: var(--r); padding: 1rem 1rem 1.5rem;
  box-shadow: var(--sc-edge), var(--sc-e2);
  max-height: calc(100svh - var(--bar-h) - 3rem);
}
.fcard img { width: 100%; height: clamp(8rem, 22vh, 13rem); object-fit: cover; border-radius: calc(var(--r) - 4px); }
.fcard img.is-tall { object-position: 50% 45%; }
.fcard h3 { font-size: var(--sc-t-xl); letter-spacing: -0.02em; line-height: 1; padding-inline: .25rem; }
.fcard > p { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); line-height: 1.55; padding-inline: .25rem; }
.fcard--type { background: var(--orange); color: var(--ink-0); justify-content: flex-end; padding: 1.5rem; box-shadow: var(--sc-e2); }
.fcard--type h3 { font-size: var(--sc-t-2xl); padding: 0; }
.fcard--type > p { color: #2b1d0c; padding: 0; font-size: var(--sc-t-base); }
.fcard--type .facts { border-color: color-mix(in oklab, var(--ink-0) 30%, transparent); padding-inline: 0; }
.fcard--type .facts dt { color: #3a2a17; }
.facts { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin: 0; padding: .75rem .25rem; border-block: 1px solid var(--sc-hairline); }
.facts div { display: grid; }
.facts dt { font-stretch: 78%; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--sc-ink-soft); }
.facts dd { margin: 0; font-family: var(--sc-font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fcard--photo .facts dd { color: var(--orange); }
.fellows__end { flex: 0 0 clamp(16rem, 26vw, 24rem); display: flex; align-items: center; padding-left: 1rem; }
.fellows__end strong { color: var(--orange); }
@media (prefers-reduced-motion: no-preference) {
  .fellows__rail > .fcard { opacity: clamp(.55, calc(var(--sc-p, 0) * 6), 1); }
}
@media (prefers-reduced-motion: reduce) {
  .fellows__rail { flex-wrap: nowrap; }
}

/* ========================================================== PROJECTS --
   The peak. site.js writes --k (0..1) per bar and the number. */
.trees { position: relative; z-index: 4; }
.trees__stage {
  background: var(--ink-0);
  display: grid; grid-template-columns: 1fr 1.15fr; grid-template-rows: 1fr auto;
  align-items: center; gap: 1rem clamp(2rem, 6vw, 6rem);
  padding: calc(var(--bar-h) + 2rem) var(--sc-gutter) clamp(2rem, 6vh, 4rem);
}
.trees__quiet {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--sc-gutter);
  font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1.7rem, 1rem + 2.8vw, 3.4rem); line-height: 1.12; letter-spacing: -0.02em;
  text-wrap: balance; z-index: 2;
}
.trees__quiet strong { color: var(--orange); font-weight: 700; font-style: italic; }
.trees__count { grid-column: 1; grid-row: 1; }
.trees__num {
  font-family: var(--sc-font-display); font-weight: 800; color: var(--orange);
  font-size: clamp(3.6rem, 1rem + 9vw, 11rem); line-height: .9; letter-spacing: -0.045em;
  font-variation-settings: "opsz" 144; font-variant-numeric: tabular-nums lining-nums;
}
.trees__label { margin-top: 1rem; font-size: var(--sc-t-xl); font-family: var(--sc-font-display); font-weight: 500; }
.trees__label span { color: var(--sc-ink-soft); font-style: italic; }
.trees__chart {
  grid-column: 2; grid-row: 1; list-style: none; margin: 0; padding: 0;
  height: min(54vh, 34rem); display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(.4rem, 1.2vw, 1rem);
  align-items: end; border-bottom: 2px solid color-mix(in oklab, var(--bone) 40%, transparent);
}
.trees__chart li { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.trees__chart .tbar {
  display: block; width: 100%; height: calc(var(--v) * 100%); background: var(--orange); border-radius: 4px 4px 0 0;
  transform-origin: 50% 100%; transform: scaleY(var(--k, 0));
  opacity: calc(.35 + var(--k, 0) * .65);
}
.trees__chart .when {
  position: absolute; top: 100%; left: 0; right: 0; text-align: center; padding-top: .6rem;
  font-stretch: 78%; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: .78rem; color: var(--sc-ink-soft);
}
.trees__chart li.is-on .when { color: var(--bone); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trees__coda {
  grid-column: 1 / -1; grid-row: 2; margin-top: 2.5rem;
  font-size: var(--sc-t-lg); max-width: 48ch; color: var(--bone);
}
.trees__coda strong { color: var(--orange); }
@media (max-width: 860px) {
  .trees__stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding-top: calc(var(--bar-h) + 1.5rem); }
  .trees__count { grid-row: 1; }
  .trees__chart { grid-column: 1; grid-row: 2; height: min(34vh, 18rem); align-self: end; }
  .trees__coda { grid-row: 3; margin-top: 2.6rem; font-size: 1.05rem; }
}

.projects { padding-top: clamp(4rem, 8vw, 7rem); }
.projects__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 4vw, 4rem); }
.proj { grid-column: span 6; display: grid; gap: 1rem; align-content: start; }
.proj--wide { grid-column: 1 / span 7; }
.proj--wide.proj--flip { grid-column: 6 / span 7; }
.proj:nth-child(2) { grid-column: 9 / span 4; align-self: end; }
.proj:nth-child(3) { grid-column: 1 / span 4; }
.proj figure { margin-bottom: 1.5rem; }
.big-num { font-family: var(--sc-font-display); font-weight: 800; font-size: clamp(3rem, 2rem + 4vw, 5.5rem); line-height: .9; letter-spacing: -0.04em; color: var(--orange); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .projects__grid { grid-template-columns: 1fr; }
  .proj, .proj--wide, .proj--wide.proj--flip, .proj:nth-child(2), .proj:nth-child(3) { grid-column: 1; }
  .offset::before { inset: .9rem -.9rem -.9rem .9rem; }
  .offset--tl::before { inset: -.9rem .9rem .9rem -.9rem; }
  .proj figure, .about__photo { margin-inline: .9rem; }
}

/* ===================================================== ONLINE EVENTS -- */
.online__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.online__screen { position: sticky; top: calc(var(--bar-h) + 6vh); }
.screen {
  position: relative; aspect-ratio: 4 / 3; background: var(--ink-0); border-radius: var(--r);
  border: 10px solid var(--ink-0); overflow: hidden; box-shadow: 14px 14px 0 var(--orange), var(--sc-e3);
}
.screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--ink-0);
  opacity: 0; transform: scale(1.04); transition: opacity 420ms var(--sc-ease-out), transform 620ms var(--sc-ease-out);
}
.screen img.is-on { opacity: 1; transform: none; }
.screen__caption {
  margin-top: 1.75rem; font-stretch: 80%; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: var(--sc-t-sm);
  display: flex; align-items: center; gap: .6rem;
}
.screen__caption::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: #d93a2b; animation: rec 1.6s ease-in-out infinite; }
@keyframes rec { 50% { opacity: .25; } }
.ev { padding-block: clamp(2rem, 5vh, 3rem); border-top: 1px solid var(--sc-hairline-strong); display: grid; gap: .8rem; min-height: 40vh; align-content: center; }
.ev__meta { font-stretch: 80%; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; font-size: var(--sc-t-sm); color: var(--orange-deep); }
.ev .display--sm { transition: transform 300ms var(--sc-ease-out); }
.ev.is-current .display--sm { transform: translateX(.5rem); }
.ev.is-current { border-top-color: var(--sc-ink); }
@media (max-width: 860px) {
  .online__grid { grid-template-columns: 1fr; }
  .online__screen { top: calc(var(--bar-h) + .5rem); z-index: 2; }
  .screen { aspect-ratio: 16 / 9; border-width: 6px; box-shadow: 8px 8px 0 var(--orange); }
  .screen__caption { display: none; }
  .online__list { position: relative; z-index: 1; }
  .ev { min-height: 0; }
}

/* =================================================== PHYSICAL EVENTS -- */
.wall { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2vw, 1.75rem); align-items: start; }
.tile { margin: 0; display: grid; gap: .9rem; }
.tile__img { overflow: clip; border-radius: 4px; box-shadow: var(--sc-e2); }
.tile__img { aspect-ratio: var(--ar, 4 / 3); }
.tile__img img { width: 100%; height: 118%; object-fit: cover; margin-top: -9%; }
.tile figcaption { display: grid; gap: .1rem; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.tile figcaption strong { color: var(--bone); font-family: var(--sc-font-display); font-size: var(--sc-t-lg); font-weight: 700; letter-spacing: -0.01em; }
.tile--a { grid-column: 1 / span 7; --ar: 16 / 10; }
.tile--b { grid-column: 8 / span 5; --ar: 4 / 3; margin-top: 18vh; }
.tile--c { grid-column: 2 / span 4; --ar: 1; margin-top: -4vh; }
.tile--d { grid-column: 6 / span 3; --ar: 1; margin-top: 10vh; }
.tile--e { grid-column: 9 / span 4; --ar: 3 / 2; margin-top: 4vh; }
/* the parallax inner moves the img, not the frame */
.tile__img[data-sc-parallax] { overflow: clip; }
.roster { list-style: none; margin: clamp(7rem, 14vw, 12rem) 0 0; padding: 0; columns: 2; column-gap: clamp(2rem, 5vw, 5rem); }
.roster li { break-inside: avoid; display: grid; gap: .25rem; padding: 1.1rem 0; border-top: 1px solid var(--sc-hairline-strong); }
.roster strong { font-family: var(--sc-font-display); font-size: var(--sc-t-lg); letter-spacing: -0.01em; }
.roster span { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
@media (max-width: 860px) {
  .wall { grid-template-columns: repeat(6, 1fr); }
  .tile--a { grid-column: 1 / -1; }
  .tile--b { grid-column: 2 / -1; margin-top: 0; }
  .tile--c { grid-column: 1 / span 4; margin-top: 0; }
  .tile--d { grid-column: 3 / -1; margin-top: 0; }
  .tile--e { grid-column: 1 / -1; margin-top: 0; }
  .roster { columns: 1; }
}

/* ====================================================== PARTNERSHIPS -- */
.coy { display: grid; grid-template-columns: auto 1fr; gap: 2rem clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--paper-2); border-radius: var(--r); box-shadow: var(--sc-edge); }
.coy__logos { display: flex; gap: 1.25rem; }
.coy__logos img { width: clamp(4.5rem, 8vw, 7rem); height: auto; }
.coy > div:last-child { display: grid; gap: .8rem; }
@media (max-width: 640px) { .coy { grid-template-columns: 1fr; } }

.marquee { margin-block: clamp(4rem, 8vw, 7rem); display: grid; gap: 1.25rem; overflow: clip; }
.marquee__row { display: flex; gap: 1.25rem; width: max-content; will-change: transform; }
.marquee__row--a { transform: translate3d(calc(var(--sc-p, 0.5) * -38%), 0, 0); }
.marquee__row--b { transform: translate3d(calc(-38% + var(--sc-p, 0.5) * 38%), 0, 0); }
.uni {
  flex: none; width: clamp(5.5rem, 9vw, 8rem); aspect-ratio: 1; border-radius: 50%; background: #fffdf8;
  display: grid; place-items: center; padding: .9rem; box-shadow: var(--sc-e1), inset 0 0 0 1px rgba(0,0,0,.06);
}
.uni img { width: 100%; height: 100%; object-fit: contain; }
.mou { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 1.75rem; }
.mou li { display: grid; gap: .45rem; align-content: start; }
.mou img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; margin-bottom: .6rem; filter: grayscale(.25); transition: filter 220ms var(--sc-ease-out); }
.mou strong { font-family: var(--sc-font-display); font-size: var(--sc-t-lg); letter-spacing: -0.01em; line-height: 1.15; }
.mou span { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
@media (hover: hover) and (pointer: fine) { .mou li:hover img { filter: none; } }
@media (max-width: 1000px) { .mou { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .mou { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; } }

/* =========================================================== CONTACT --
   Flow act, last on the page. --c closes the crest as the plate arrives. */
.contact {
  position: relative; z-index: 4; overflow: clip;
  background: var(--orange); color: #14100b; --sc-ink: #14100b; --sc-ink-soft: #3a2a17;
  min-height: 100svh; padding: calc(var(--bar-h) + clamp(3rem, 8vh, 6rem)) 0 2rem;
  --c: clamp(0, calc((var(--sc-p, 0) - 0.04) * 2.6), 1);
}
.contact ::selection { background: var(--ink-0); color: var(--bone); }
.contact__crest {
  position: absolute; z-index: 0; pointer-events: none;
  height: min(76vh, 40vw); aspect-ratio: 1319 / 1152; right: -6vw; top: 50%; translate: 0 -50%;
  display: flex; perspective: 1600px; transform-style: preserve-3d;
}
.contact__crest .gate img { filter: brightness(0) opacity(.9); }
.contact .gate--l { transform-origin: 0% 50%; transform: translate3d(calc((1 - var(--c)) * -70%), 0, 0) rotateY(calc((1 - var(--c)) * 70deg)); opacity: calc(.15 + var(--c) * .85); }
.contact .gate--r { transform-origin: 100% 50%; transform: translate3d(calc((1 - var(--c)) * 70%), 0, 0) rotateY(calc((1 - var(--c)) * -70deg)); opacity: calc(.15 + var(--c) * .85); }
.contact__inner { position: relative; z-index: 1; display: grid; gap: 1.75rem; justify-items: start; }
.contact__inner > :not(.foot) { max-width: min(46rem, 56vw); }
.contact__title {
  font-size: clamp(3.2rem, 1.4rem + 7vw, 8rem); line-height: .92; letter-spacing: -0.035em; font-weight: 750;
  font-variation-settings: "opsz" 144;
}
.contact__lede { max-width: 32ch; }
.plate { margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, auto); gap: 1.5rem 3rem; }
.plate div { display: grid; gap: .2rem; border-top: 2px solid #14100b; padding-top: .8rem; }
.plate dt { font-stretch: 78%; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.plate dd { margin: 0; font-size: var(--sc-t-base); font-weight: 600; overflow-wrap: anywhere; }
.plate a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 240ms var(--sc-ease-out); padding-bottom: 2px; }
@media (hover: hover) and (pointer: fine) { .plate a:hover { background-size: 100% 2px; } }
.reach { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.reach a {
  display: grid; gap: .1rem; text-decoration: none; padding: .9rem 1.2rem; min-width: 13rem;
  background: var(--ink-0); color: var(--bone); border-radius: var(--r); box-shadow: var(--sc-e2);
  transition: transform 160ms var(--sc-ease-out);
}
.reach a:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) { .reach a:hover { transform: translateY(-2px); } }
.reach__num { font-family: var(--sc-font-display); font-weight: 800; font-size: 1.9rem; line-height: 1; color: var(--orange); font-variant-numeric: tabular-nums; }
.reach a span:last-child { font-size: var(--sc-t-sm); color: #d8ccbb; }
.foot { margin-top: clamp(3rem, 8vh, 5rem); width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid rgba(20,16,11,.35); font-size: var(--sc-t-sm); }
.foot a { font-weight: 700; }
@media (max-width: 860px) {
  .contact__crest { height: 40vh; right: -38vw; top: 22%; opacity: .16; }
  .contact__inner > :not(.foot) { max-width: none; }
  .plate { grid-template-columns: 1fr; }
}

/* ===================================================== reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  .hero__stage { --g: 0; }
  .hero__iris, .hero__iris-scrim, .hero__embers, .crest__shine { display: none; }
  .hero__title, .hero__crest, .hero__fly, .hero__block, .hero__glow { transform: none !important; }
  .hero__beat { display: none; }
  .contact { --c: 1; }
  .marquee__row--a, .marquee__row--b { transform: none; }
  .marquee { overflow-x: auto; }
  .trees__chart .tbar { transform: none; opacity: 1; }
  .trees__quiet { display: none; }
  .screen img { transition: opacity 200ms linear; transform: none; }
  .screen__caption::before { animation: none; }
}
