:root {
  --ink: #0a0a0a;
  --paper: #faf9f6;
  --ink-70: rgba(10, 10, 10, 0.7);
  --ink-12: rgba(10, 10, 10, 0.12);
  --paper-70: rgba(250, 249, 246, 0.7);
  --paper-50: rgba(250, 249, 246, 0.5);
  --paper-12: rgba(250, 249, 246, 0.12);
  --paper-08: rgba(250, 249, 246, 0.08);

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: 760px; }
.container--form { max-width: 940px; }

/* ---------- Type ---------- */
.logo {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
}
.display em, .hero__title em { font-style: italic; }

.sub {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

/* ---------- Header ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 50;
  width: min(960px, calc(100% - 2 * 16px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  /* Hidden above the viewport until the form has been scrolled past */
  transform: translate(-50%, calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 1s var(--ease),
    opacity 0.7s var(--ease),
    background-color 0.45s var(--ease),
    border-color 0.45s var(--ease),
    color 0.45s var(--ease);
}
.nav.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
/* Over light sections: darker glass, light logo */
.nav[data-on="light"] {
  background: rgba(10, 10, 10, 0.62);
  border-color: rgba(250, 249, 246, 0.1);
  color: var(--paper);
}
/* Over dark sections: lighter glass, dark logo */
.nav[data-on="dark"] {
  background: rgba(250, 249, 246, 0.72);
  border-color: rgba(10, 10, 10, 0.08);
  color: var(--ink);
}
.nav__logo,
.nav__cta { transition: background-color 0.45s var(--ease), color 0.45s var(--ease); }
.nav__logo { font-size: 25px; line-height: 1; padding-left: 14px; }
.nav__cta { border-radius: 999px; }

.nav__cta {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.03em;
  padding: 10px 24px;
}
/* Button inverts on hover; the logo text alone swaps colour */
.nav[data-on="light"] .nav__logo { color: var(--paper); }
.nav[data-on="light"] .nav__logo:hover { color: var(--ink); }
.nav[data-on="light"] .nav__cta { background: var(--paper); color: var(--ink); }
.nav[data-on="light"] .nav__cta:hover { background: var(--ink); color: var(--paper); }
.nav[data-on="dark"] .nav__logo { color: var(--ink); }
.nav[data-on="dark"] .nav__logo:hover { color: var(--paper); }
.nav[data-on="dark"] .nav__cta { background: var(--ink); color: var(--paper); }
.nav[data-on="dark"] .nav__cta:hover { background: var(--paper); color: var(--ink); }

/* ---------- Hero (one screen, content grouped as a single block) ---------- */
.hero {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 0;
  display: flex;
  align-items: center; /* centres the block, so the space above and below it stays equal */
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px; /* headline baseline → box → VSL → button */
  text-align: center;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, min(7.6vw, 10.4vh), 90px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  /* The baseline sits 0.158em above the bottom of the line box; pulling the next
     element up by that amount makes the 32px gap start at the baseline. */
  margin-bottom: -0.158em;
}
@media (max-width: 899px) { .br-desk { display: none; } }

.hero__sub {
  display: inline-block;
  padding: 0.28em 0.7em 0.32em;
  background: var(--ink);
  color: var(--paper);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
}

.vsl-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}
.vsl {
  width: min(810px, 100%);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(10, 10, 10, 0.45), 0 0 0 1px var(--ink-12);
}
.vsl wistia-player { display: block; width: 100%; height: 100%; }

.btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 34px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.03em;
  line-height: 1;
  box-shadow: 0 14px 30px -14px rgba(10, 10, 10, 0.5);
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}
/* .reveal's transition (declared later) would otherwise replace this one and make the hover instant */
.btn.reveal {
  transition:
    background-color 0.45s var(--ease),
    color 0.45s var(--ease),
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn__label { font-size: 21px; }
.btn__arrow { display: inline-block; animation: bob 1.8s var(--ease) infinite; }

@keyframes bob {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

/* ---------- Application form ---------- */
.apply { padding-top: clamp(72px, 9vw, 120px); scroll-margin-top: 0; }
.apply__card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  padding: clamp(18px, 4vw, 44px) clamp(16px, 4vw, 48px);
  box-shadow: 0 40px 90px -50px rgba(250, 249, 246, 0.25);
}
.apply__card iframe { display: block; width: 100%; border: 0; }

.divider {
  width: min(1000px, calc(100% - 2 * var(--gutter)));
  height: 1px;
  margin: clamp(72px, 9vw, 120px) auto 0;
  background: linear-gradient(90deg, transparent, rgba(250, 249, 246, 0.3) 50%, transparent);
}

/* ---------- Steps ---------- */
.steps { padding: clamp(90px, 11vw, 150px) 0 clamp(120px, 13vw, 180px); }

.timeline {
  position: relative;
  list-style: none;
  margin: clamp(56px, 7vw, 96px) auto 0;
  padding: 0;
  max-width: 1000px;
  display: grid;
  grid-auto-rows: 1fr; /* every step gets the same height → equal gaps */
  row-gap: clamp(56px, 6.5vw, 96px);
}
/* Top/height are set in script.js so the line runs from step 1 to step 4 */
.timeline__track {
  position: absolute;
  top: 22px;
  height: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--paper-12);
}
.timeline__fill {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  background: var(--paper);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: start;
}

.step__num {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 10px var(--ink);
}
.step__body { grid-row: 1; max-width: 440px; padding-top: 4px; }
.step--left .step__body { grid-column: 1; justify-self: end; text-align: right; }
.step--right .step__body { grid-column: 3; justify-self: start; }

.step .sub { font-size: clamp(26px, 2.6vw, 32px); }
.step p { margin-top: 12px; font-size: 19px; color: var(--paper-70); }

@media (max-width: 760px) {
  .timeline__track { left: 22px; transform: none; }
  .timeline { grid-auto-rows: auto; }
  .step { grid-template-columns: 44px 1fr; column-gap: 22px; }
  .step__num { grid-column: 1; }
  .step--left .step__body,
  .step--right .step__body { grid-column: 2; justify-self: start; text-align: left; }
}

/* ---------- Previous work ---------- */
.work {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(64px, 8vw, 104px) 0; /* equal top and bottom; the headline box is ignored */
  overflow-x: clip;
}
/* Headline box sits half on the black section, half on the white one */
.work__title {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  background: var(--paper);
  color: var(--ink);
  padding: 0.14em 0.42em 0.1em;
}

.work__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: end;
}
.about { align-self: start; }
.about__photo {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(10, 10, 10, 0.4);
}
.about__title {
  margin-top: 28px;
  font-weight: 600;
  letter-spacing: -0.045em;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.1;
}
.about__text {
  margin-top: 14px;
  font-size: 18px;
  color: var(--ink-70);
}
.about__text strong { font-weight: 400; color: var(--ink); }

/* Collage: positions mirror the reference layout (690 x 640 frame),
   scaled to 90% as one unit and pinned to the bottom-right corner */
.collage {
  position: relative;
  width: 90%;
  max-width: 621px;
  aspect-ratio: 690 / 640;
  justify-self: end;
  align-self: end;
}
.collage__fan {
  position: absolute;
  left: -15.5%;
  top: 17%;
  width: 91.4%;
  transform: rotate(-12.5deg);
  z-index: 2;
  filter: drop-shadow(0 18px 24px rgba(10, 10, 10, 0.16));
  pointer-events: none;
}
.media {
  position: absolute;
  object-fit: cover;
  background: #1a1a1a;
  border-radius: clamp(14px, 2.2vw, 20px);
  pointer-events: none;
  box-shadow:
    0 40px 70px -30px rgba(10, 10, 10, 0.45),
    0 14px 28px -14px rgba(10, 10, 10, 0.25),
    0 0 0 1px var(--ink-12);
}
.collage__vertical {
  left: 49.6%;
  top: 0;
  width: 50.4%;
  height: 96.9%;
  z-index: 1;
}
.collage__horizontal {
  left: 1.5%;
  top: 58%;
  width: 69.3%;
  aspect-ratio: 16 / 9;
  z-index: 3;
  box-shadow:
    0 30px 50px -30px rgba(10, 10, 10, 0.3),
    0 10px 20px -14px rgba(10, 10, 10, 0.16),
    0 0 0 1px var(--ink-12);
}

@media (max-width: 900px) {
  .work__grid { grid-template-columns: 1fr; }
}
/* Phones only: the fixed line breaks would wrap raggedly, so let the text flow */
@media (max-width: 520px) {
  .about__text br { display: none; }
  .collage { width: 92%; }
}

/* ---------- FAQ ---------- */
.faq { padding: clamp(100px, 12vw, 160px) 0 0; }
.faq__sub {
  margin-top: 14px;
  text-align: center;
  font-size: 20px;
  color: var(--paper-50);
}
.faq__list { margin-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--paper-12); }
.faq__item { border-bottom: 1px solid var(--paper-12); }
.faq__q {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 2px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(18px, 1.9vw, 21px);
  letter-spacing: -0.035em;
  line-height: 1.3;
}
.faq__q:focus-visible { outline: 1px solid var(--paper-50); outline-offset: 4px; border-radius: 6px; }
.faq__icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  transition: transform 0.4s var(--ease);
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 40px 26px 2px; font-size: 18px; color: var(--paper-70); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px; /* = gap between the last FAQ item and the icons */
}
.footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--paper-70);
  transition: color 0.25s, background-color 0.25s;
}
.footer__social a:hover { color: var(--paper); background: var(--paper-08); }
.footer__copy { position: relative; top: -8px; font-size: 15px; color: var(--paper-50); }

/* In normal flow under the copyright line. line-height 0.8 trims the empty space
   above the letters; the em-based margins cancel what's left so the visible
   letters sit 24px below the copyright and the full logo stays inside the footer. */
.footer__mark {
  position: relative;
  z-index: 0;
  margin-top: calc(24px - 0.208em);   /* 24px above the x-height ("me"), not the capitals */
  margin-bottom: -0.088em;            /* letters run slightly past the page bottom (cropped) */
  font-size: 21vw;
  line-height: 0.8;
  white-space: nowrap;
  color: var(--paper);
  opacity: 0.1;
  pointer-events: none;
  user-select: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn__arrow { animation: none; }
  .nav { transition: none; }
}
