/* Aliz AJ — shared styles.
   Design follows the Vivid+Co guide: near-black field, warm white type, colour only in the imagery,
   thin rules instead of boxes, monumental statements with support text shifted right. */

@font-face {
  font-family: 'Stardom';
  src: url('fonts/Stardom-Regular.woff2') format('woff2'),
       url('fonts/Stardom-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #101010;
  --text: #fffdf9;
  --soft: rgba(255, 253, 249, 0.66);
  --faint: rgba(255, 253, 249, 0.42);
  --rule: rgba(255, 253, 249, 0.2);
  --cool: rgba(111, 135, 156, 0.6);
  --font-display: 'Stardom', 'Times New Roman', serif;
  --font-text: 'Switzer', 'DM Sans', Arial, sans-serif;
  --ease: cubic-bezier(0.52, 0.01, 0, 1);
  --gutter: clamp(24px, 2.667vw, 46px);
  --pause: clamp(110px, 12.5vw, 200px);
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol, dl, dd, dt, blockquote, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong { font-weight: 500; }

/* the central reading region: 1070px wide at desktop, about 185px in from each edge */
.field { width: min(100% - 48px, 1070px); margin-left: auto; margin-right: auto; }

/* ---------- type recipes ---------- */

.statement {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 7.3125vw, 120px);
  line-height: 1.01;
}

.heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.88vw, 62px);
  line-height: 1.125;
}

.lead {
  font-size: clamp(21px, 2.326vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.label {
  font-size: clamp(20px, 2.22vw, 34px);
  line-height: 1.05;
  text-transform: uppercase;
}

.small-label {
  font-size: clamp(14px, 1.167vw, 17px);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.caption { font-size: 15px; line-height: 1.3; letter-spacing: 0.01em; }
.soft { color: var(--soft); }

/* inline action: an underlined phrase, never a filled button */
.action { border-bottom: 1px solid currentColor; padding-bottom: 0.06em; transition: opacity 0.25s linear; }
.action:hover, .action:focus-visible { opacity: 0.62; }

.more {
  display: inline-block;
  font-size: clamp(14px, 1.167vw, 17px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: opacity 0.25s linear;
}

.more:hover, .more:focus-visible { opacity: 0.62; }

/* the second sentence of a headline starts its own line; it carries no colour of its own */
.statement em, .heading em { font-style: normal; }

/* ---------- navigation ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  padding: clamp(20px, 2.4vw, 36px) 5vw;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 170%;
  background: linear-gradient(to bottom, rgba(16, 16, 16, 0.92) 0, rgba(16, 16, 16, 0.6) 46%, rgba(16, 16, 16, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.logo { font-family: var(--font-display); font-size: 26px; line-height: 1; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(18px, 2.4vw, 38px);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a { transition: opacity 0.25s linear; }
.nav a:hover, .nav a:focus-visible { opacity: 0.62; }
.nav a[aria-current='page'] { border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.nav .nav__apply { border: 1px solid currentColor; padding: 10px 16px; }
.nav .nav__apply[aria-current='page'] { padding: 10px 16px; }

/* ---------- the stage: one picture behind the whole page ---------- */

.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* the clip's black drops out, so its light sits straight on the page */
.stage__canvas,
.stage__still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mix-blend-mode: screen;
}

.stage__still { object-fit: cover; opacity: 0.2; }

/* a soft ring of light at the edges; the reading centre stays dark */
.halo {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(46% 44% at 6% 30%, rgba(54, 92, 150, 0.2), transparent 70%),
    radial-gradient(40% 46% at 98% 64%, rgba(86, 72, 160, 0.16), transparent 70%),
    radial-gradient(36% 30% at 62% 104%, rgba(60, 130, 160, 0.12), transparent 70%);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .site-footer { position: relative; z-index: 1; }

/* artwork may reach past the reading region, but never makes the page scroll sideways */
main { overflow-x: clip; }

/* ---------- line-by-line reveals ---------- */

.line {
  display: block;
  overflow: hidden;
  padding: 0.04em 0.1em 0.16em 0;
  margin: -0.04em -0.1em -0.16em 0;
}

.line__inner {
  display: block;
  transform: translateY(118%);
  transition: transform 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms + var(--base, 0ms));
}

.is-in .line__inner,
.is-ready .cue.is-live .line__inner { transform: none; }

.no-anim .line__inner { transition: none; }

.reveal-fade { opacity: 0; transition: opacity 0.6s linear; }
.is-ready .reveal-fade { opacity: 1; }
.is-ready .reveal-fade--2 { transition-delay: 0.5s; }
.is-ready .reveal-fade--3 { transition-delay: 0.8s; }

[data-inview]:not([data-lines]) { opacity: 0; transition: opacity 0.6s linear; }
[data-inview]:not([data-lines]).is-in { opacity: 1; }

/* ---------- pinned scenes (Home) ---------- */

.scene { position: relative; height: var(--len, 400vh); }

.scene__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.cue {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cue.is-live a { pointer-events: auto; }

/* words that sit over the picture get a soft dark edge so they stay readable */
.cue .statement, .cue .lead, .cue .caption, .cue .small-label { text-shadow: 0 0 26px rgba(16, 16, 16, 0.7), 0 0 4px rgba(16, 16, 16, 0.5); }

/* opening: the headline starts a column in; the support starts at the middle */
.cue--open { padding-top: clamp(70px, 9vh, 110px); }

.open__eyebrow { margin: 0 0 clamp(14px, 2.6vh, 28px) 12.5%; }

.open__title {
  margin-left: 12.5%;
  font-size: clamp(40px, min(7.3125vw, 10.2vh), 120px);
}

.open__support {
  margin: clamp(26px, 5.2vh, 59px) 0 0 50%;
  width: min(603px, 46vw);
}

.open__support .lead { font-size: clamp(19px, min(2.326vw, 3.5vh), 36px); }
.open__for { margin-top: clamp(14px, 2.4vh, 24px); }
.open__links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: clamp(18px, 3vh, 34px); }

/* point of view */
.cue--view .small-label { margin-bottom: clamp(18px, 3vh, 30px); }
.cue--support { justify-content: flex-end; padding-bottom: clamp(70px, 15vh, 170px); }
.support { margin-left: 50%; width: min(516px, 46vw); }
.support p { margin-bottom: 30px; }
.support em { font-style: normal; }

/* closing */
.close__title { font-size: clamp(38px, 5.7vw, 94px); max-width: 9em; }

/* Home's closing: the figure stays in the middle and pushes all the way in.
   Then the picture fades back and the words come in over it, large and centred. */
.cue--close { justify-content: center; align-items: center; text-align: center; }
.cue--close .close__title { max-width: 10em; }
.cue--close .close__lead { margin-top: clamp(22px, 3vw, 44px); max-width: 17em; }
.close-pair {
  display: grid;
  grid-template-columns: minmax(0, 701px) minmax(0, 331px);
  justify-content: space-between;
  gap: var(--gutter);
  align-items: end;
}

/* ---------- flow sections (Home) ---------- */

.band { padding-top: var(--pause); padding-bottom: var(--pause); }
.band + .band { padding-top: 0; }
.band__head { margin-bottom: clamp(48px, 5.5vw, 79px); }
.band__head .small-label { margin-bottom: clamp(18px, 2vw, 30px); }
.band__note { margin: clamp(28px, 3vw, 44px) 0 0 50%; width: min(516px, 46vw); }
.band__more { margin-top: clamp(36px, 4vw, 56px); }

/* the four steps: open modules with a rule underneath, no card */
.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 4.4vw, 64px) var(--gutter);
}

.module { padding-bottom: clamp(32px, 3.9vw, 56px); border-bottom: 1px solid var(--rule); }
.module__head { display: flex; gap: 16px; align-items: baseline; margin-bottom: 18px; }
.module__no { color: var(--faint); }
.module__ask { max-width: 22em; }
.module__price { margin-top: 18px; color: var(--soft); }

/* results: tall open rows, each with a result, what it came from, and who */
.ledger { border-top: 1px solid var(--cool); }

.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 16px var(--gutter);
  align-items: start;
  padding: clamp(34px, 4.4vw, 62px) 0;
  border-bottom: 1px solid var(--cool);
}

.ledger__num { font-family: var(--font-display); font-size: clamp(40px, 4.6vw, 72px); line-height: 1; }
.ledger__what { margin-top: 12px; color: var(--soft); }
.ledger__from { padding-top: 0.5em; }
.ledger__who { padding-top: 0.62em; }
.ledger__who span { display: block; margin-top: 6px; color: var(--soft); }

/* what they say */
.voices { border-top: 1px solid var(--rule); }

.voice {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 16px var(--gutter);
  padding: clamp(30px, 3.6vw, 52px) 0;
  border-bottom: 1px solid var(--rule);
}

.voice blockquote { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.25; letter-spacing: -0.01em; }
.voice figcaption span { display: block; margin-top: 6px; color: var(--soft); }

/* the road so far */
.road {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 343px);
  gap: var(--gutter);
  align-items: end;
}

.road__body { margin-top: clamp(28px, 3vw, 44px); max-width: 30em; }
.road .more { margin-top: clamp(28px, 3vw, 44px); }

.frame {
  display: grid;
  place-items: center;
  aspect-ratio: 343 / 406;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 15px;
  text-align: center;
  color: var(--faint);
}

.frame--wide { aspect-ratio: 21 / 9; }

/* a small Apply that follows the visitor on phones, where the top menu does not stay put */
.apply-dock { display: none; }

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 34px;
  padding-bottom: clamp(60px, 9.7vw, 140px);
  border-top: 1px solid var(--rule);
  color: var(--soft);
}

/* ---------- narrow screens ---------- */

@media (max-width: 860px) {
  .site-header { position: absolute; padding: 20px 24px; }
  .apply-dock {
    display: block;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 30;
    padding: 11px 16px;
    border: 1px solid currentColor;
    background: rgba(16, 16, 16, 0.74);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .site-header::before { display: none; }
  .nav { font-size: 11px; gap: 8px 16px; }
  .nav .nav__apply, .nav .nav__apply[aria-current='page'] { padding: 7px 11px; }

  .cue--open { justify-content: flex-end; padding: 0 0 34px; }
  .open__eyebrow { margin: 0 0 14px; }
  .open__title { margin-left: 0; font-size: clamp(36px, 10.2vw, 60px); }
  .open__support { margin: 18px 0 0; width: 100%; }
  .open__support .lead { font-size: 18px; }

  .support, .band__note { margin-left: 0; width: 100%; }
  .cue--support { padding-bottom: 60px; }
  .close-pair { grid-template-columns: 1fr; align-items: start; }
  .cue--close .close__title { font-size: clamp(36px, 10.2vw, 60px); }
  .cue--close .close__lead { font-size: 19px; }

  .modules { grid-template-columns: 1fr; }
  .ledger__row, .voice, .road { grid-template-columns: 1fr; }
  .ledger__from, .ledger__who { padding-top: 0; }
  .frame { max-width: 343px; }
}

@media (prefers-reduced-motion: reduce) {
  .line__inner { transform: none; transition: none; }
  .reveal-fade, [data-inview]:not([data-lines]) { opacity: 1; transition: none; }
}
