/* TX Architecture — concept B ("Drawing Sheet")
   White ground, Carbon ink, Burgundy as the single accent.
   Jost (brand web fallback) set heavy and tight for display; JetBrains Mono for the title-block layer:
   drawing numbers, revisions, scales, metadata. */

:root {
  --paper: #ffffff;
  --ink: #171414;
  --ink-70: #464444;
  --ink-50: #767374;
  --ink-30: #a3a2a1;
  --line: rgba(23, 20, 20, .16);
  --line-strong: rgba(23, 20, 20, .5);
  --accent: #5b2f29;
  --wash: #f4f2ea;

  --sans: "Niveau Grotesk", "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --gutter: clamp(18px, 3.2vw, 56px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 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-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }


/* ---------- type ---------- */
.mono {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.mono.lc { text-transform: none; letter-spacing: 0; }
.pill {
  display: inline-block; padding: .28em .7em .3em; border: 1px solid var(--ink); border-radius: 999px;
  font-family: var(--mono); font-size: .66rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
}
.pill.accent { border-color: var(--accent); color: var(--accent); }
.giant {
  font-weight: 700;
  font-size: clamp(3.2rem, 10.4vw, 11.5rem);
  line-height: .9;
  letter-spacing: -.045em;
  margin: 0;
  text-wrap: balance;
}
.giant .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}
.giant .star { color: var(--accent); font-weight: 500; }
.h-xl { font-weight: 600; font-size: clamp(2.2rem, 5.2vw, 5.4rem); line-height: .98; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.h-l { font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.9rem); line-height: 1.08; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.h-m { font-weight: 500; font-size: clamp(1.25rem, 1.8vw, 1.7rem); line-height: 1.2; letter-spacing: -.015em; margin: 0; }
.p { margin: 0; max-width: 36em; }
.p + .p { margin-top: 1em; }
.muted { color: var(--ink-50); }

/* ---------- registration marks at block corners ---------- */
.reg { position: relative; }
.reg::before, .reg::after,
.reg > .reg-b::before, .reg > .reg-b::after {
  content: ""; position: absolute; width: 15px; height: 15px; pointer-events: none;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) center / 1px 100% no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat;
}
.reg::before { top: -8px; left: -8px; }
.reg::after { top: -8px; right: -8px; }
.reg > .reg-b::before { bottom: -8px; left: -8px; }
.reg > .reg-b::after { bottom: -8px; right: -8px; }
.reg-b { position: absolute; inset: 0; pointer-events: none; }

/* ---------- layout ---------- */
.wrap { padding-inline: var(--gutter); }
.block { padding-block: clamp(56px, 8vw, 128px); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.rule.strong { border-top-color: var(--ink); }
.cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.start-2 { grid-column-start: 2; }
.start-3 { grid-column-start: 3; }
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr 1fr; }
  .span-3, .span-4 { grid-column: span 2; }
  .start-2, .start-3 { grid-column-start: auto; }
}
@media (max-width: 560px) {
  .cols { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4 { grid-column: span 1; }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand img { height: 26px; width: auto; }
.brand .word { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; padding: .7em 1.1em; border: 1px solid var(--ink); border-radius: 999px; transition: background .3s, color .3s; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-cta .star { color: var(--accent); }
.nav-cta:hover .star { color: var(--paper); }
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease), opacity .25s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }
.nav.open .nav-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav.open .nav-toggle span:last-child { transform: translateY(-4.5px); }
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links { display: grid; gap: 14px; position: fixed; inset: 64px 0 0 0; padding: 32px var(--gutter); background: var(--paper); }
  .nav.open .nav-links a { font-family: var(--sans); font-size: 2.4rem; font-weight: 600; letter-spacing: -.03em; text-transform: none; }
}


/* ---------- hero ---------- */
.opener-wrap { padding-top: 0; }
.fig.bleed.opener .media { aspect-ratio: auto; width: auto; height: min(82svh, 980px); min-height: 420px; }
.fig.opener .cap { padding-top: 14px; }
.hero { padding-block: clamp(48px, 7vw, 120px) clamp(32px, 4vw, 64px); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(28px, 4vw, 56px); }
.hero-top .mono { max-width: 34em; line-height: 1.6; }
.hero .giant { position: relative; }
.hero .giant .line { display: block; overflow: hidden; line-height: .98; padding-bottom: .1em; margin-bottom: -.1em; }
.hero .giant .line > span { display: inline-block; transform: translateY(110%); animation: lineUp 1.1s var(--ease-out) forwards; }
.hero .giant .line:nth-child(2) > span { animation-delay: .1s; }
.hero .giant .line:nth-child(3) > span { animation-delay: .2s; }
.hero .giant .line:nth-child(4) > span { animation-delay: .3s; }
@keyframes lineUp { to { transform: none; } }
.hero-foot { display: flex; justify-content: flex-end; margin-top: clamp(28px, 4vw, 56px); }
.hero-foot .note { font-size: clamp(1rem, 1.3vw, 1.25rem); max-width: 30em; margin: 0; }
.hero-foot .note .star { color: var(--accent); }
.hero-foot .meta { text-align: right; display: grid; gap: 4px; }
@media (max-width: 760px) {
  .hero-top { flex-direction: column; align-items: flex-start; }
  .hero-foot { grid-template-columns: 1fr; }
  .hero-foot .meta { justify-self: start; text-align: left; }
}

/* ---------- figure: full-bleed media with a drawing-sheet caption ---------- */
.fig { position: relative; }
.fig .media { position: relative; overflow: hidden; background: var(--wash); aspect-ratio: 16 / 9; }
.fig .media > img, .fig .media > video { width: 100%; height: 100%; object-fit: cover; }
.fig.bleed .media { margin-inline: calc(-1 * var(--gutter)); aspect-ratio: 21 / 9; }
.fig.tall .media { aspect-ratio: 4 / 5; }
/* natural: the image sets its own height, no crop, no upscale beyond the column */
.fig.natural .media { aspect-ratio: auto; }
.fig.natural .media > img { height: auto; object-fit: contain; }
.fig.rounded .media { border-radius: 18px; }
.fig .cap { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; color: var(--ink-50); }
.fig .cap .mono { line-height: 1.6; }
.fig .cap .n { color: var(--ink); }
@media (max-width: 760px) { .fig.bleed .media { aspect-ratio: 4 / 3; } }

/* parallax drift on scroll (translateY set by JS) */
.drift > img, .drift > video { will-change: transform; transform: translateY(var(--drift, 0)) scale(1.08); }

/* film controls */
.film-ctl { position: absolute; right: 16px; bottom: 16px; z-index: 2; display: flex; gap: 8px; }
.film-ctl button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); color: #fff; background: rgba(23,20,20,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; }
.film-ctl svg { width: 12px; height: 12px; fill: currentColor; }
.film-ctl .ico-play { display: none; }
.film-ctl.paused .ico-play { display: block; }
.film-ctl.paused .ico-pause { display: none; }

/* ---------- statements ---------- */
.statements { display: grid; gap: 0; }
.statement { display: grid; grid-template-columns: 110px 1fr; gap: var(--gutter); padding-block: clamp(20px, 2.6vw, 36px); border-top: 1px solid var(--line); align-items: baseline; }
.statement:last-child { border-bottom: 1px solid var(--line); }
.statement .mono { padding-top: .6em; }
.statement .h-xl { transition: transform .6s var(--ease), color .4s; }
.statement:hover .h-xl { transform: translateX(10px); }
.statement .sub { margin: 10px 0 0; max-width: 30em; color: var(--ink-70); }
@media (max-width: 560px) { .statement { grid-template-columns: 1fr; gap: 6px; } }


/* ---------- work index ---------- */
.index-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 8px; }
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.index li { border-bottom: 1px solid var(--line); }
.index a {
  display: grid; grid-template-columns: 90px 1fr auto; gap: var(--gutter); align-items: baseline;
  padding-block: clamp(16px, 2.2vw, 30px);
  transition: padding-left .5s var(--ease);
}
.index a:hover { padding-left: 14px; }
.index .title { font-weight: 600; font-size: clamp(1.8rem, 4.6vw, 4.6rem); line-height: .95; letter-spacing: -.04em; }
.index .title .star { color: var(--accent); font-weight: 500; }
.index .tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-self: center; }
.index li.is-live .pill:first-child { border-color: var(--accent); color: var(--accent); }
.index .num { color: var(--ink-50); }
@media (max-width: 760px) {
  .index a { grid-template-columns: 1fr; gap: 8px; }
  .index .tags { justify-content: flex-start; }
}
/* floating preview that follows the cursor over the index */
.peek {
  position: fixed; z-index: 30; pointer-events: none;
  width: clamp(220px, 24vw, 420px); aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  background: var(--wash); opacity: 0; transform: translate(-50%, -50%) scale(.92);
  transition: opacity .35s var(--ease), transform .5s var(--ease);
  box-shadow: 0 30px 60px -20px rgba(23,20,20,.35);
}
.peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.peek img.show { opacity: 1; }
@media (hover: none) { .peek { display: none; } }

/* ---------- project sheet (Racketeer) ---------- */
.sheet-head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: end; margin-bottom: clamp(24px, 3vw, 40px); }
.sheet-head .meta { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; align-items: baseline; }
.sheet-head .meta dt { color: var(--ink-50); }
.sheet-head .meta dd { margin: 0; }
.sheet-body { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: clamp(24px, 3vw, 40px); align-items: start; }
.sheet-body .p { font-size: clamp(1.05rem, 1.4vw, 1.3rem); }
.team { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; }
.team li { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: var(--gutter); }
@media (max-width: 760px) { .sheet-head, .sheet-body, .pair { grid-template-columns: 1fr; } }


/* ---------- sectors: giant list ---------- */
.sectors { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.sectors li { display: grid; grid-template-columns: 90px 1fr 1fr; gap: var(--gutter); align-items: baseline; padding-block: clamp(14px, 1.8vw, 22px); border-bottom: 1px solid var(--line); }
.sectors .h-l { font-weight: 600; }
.sectors p { margin: 0; color: var(--ink-70); max-width: 30em; }
@media (max-width: 760px) { .sectors li { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: clamp(24px, 3vw, 40px); }
.person { border-top: 1px solid var(--ink); padding-top: 14px; }
.person .face {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; margin: 0 0 18px;
  filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease-out);
}
.person:hover .face { filter: none; }
.person .name { font-weight: 600; font-size: clamp(1.4rem, 2.2vw, 2.1rem); letter-spacing: -.03em; line-height: 1; margin: 8px 0 10px; }
.person .mono { color: var(--ink-50); }
.person p { margin: 12px 0 0; font-size: .95rem; color: var(--ink-70); }
@media (max-width: 700px) { .people { grid-template-columns: 1fr; } .person .face { max-width: 320px; } }

/* ---------- contact ---------- */
.contact .giant { font-size: clamp(2rem, 7.4vw, 8rem); }
.contact .mail { display: inline-block; position: relative; }
.contact .mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .06em; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.contact .mail:hover::after { transform: scaleX(1); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); margin-top: clamp(32px, 4vw, 56px); }
.contact-grid div { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 4px; align-content: start; }
.contact-grid .mono { color: var(--ink-50); margin-bottom: 6px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--ink); padding-block: 24px 40px; }

/* ---------- inverted closing block: contact + footer on carbon ---------- */
.inv {
  --paper: #171414; --ink: #fffff5; --ink-70: #d9d7cf; --ink-50: #a3a2a1; --ink-30: #767374;
  --line: rgba(255, 255, 245, .18); --line-strong: rgba(255, 255, 245, .5); --wash: #262222;
  background: var(--paper); color: var(--ink);
}
.footer.inv { border-top-color: var(--line); }
.inv .mail::after { background: var(--ink); }
.footer .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; color: var(--ink-50); }
.footer .brand img { height: 20px; }

/* ---------- entrance sequence ----------
   T arrives from the left, + from the right. The + is a true orthogonal cross with the X's
   stroke proportions and pointed ends, at the T's height. It duplicates:
   the copy slides right, turns back to 0° and grows to the X; the original shrinks to the
   small +. The X then spins in 3D while a word roll cycles the sectors, the strapline
   lands, and the whole sheet lifts off the top of the page.
   Units: 1em on .intro-mark = the 240-unit logo height, so every figure below maps
   straight onto tpx_monogram_*.svg (T 0–176, + centred 284 span 120, X 392–588). */
.intro {
  position: fixed; inset: 0; z-index: 100; background: var(--paper);
  display: grid; place-items: center; align-content: center; gap: clamp(26px, 3.4vw, 48px);
  overflow: hidden;
}
.intro.skip { display: none; }
.intro-stage { display: grid; justify-items: center; gap: clamp(18px, 2.4vw, 34px); }
.intro-mark {
  position: relative; font-size: clamp(84px, 14vw, 210px);
  width: 2.617em; height: 1em;
}
.intro-mark > * { position: absolute; top: 0; left: 0; height: 1em; }
.intro-mark .iT { width: .9em; opacity: 0; }
.intro-mark .plus { width: .983em; opacity: 0; transform-origin: 50% 50%; overflow: visible; fill: var(--ink); }
.intro-mark .iX { left: 1.634em; width: .983em; perspective: 5em; }
.intro-mark .xsvg { display: block; height: 100%; width: 100%; opacity: 0; transform-origin: 50% 50%; }

/* 1 · arrivals (T lands at .356em, + at 1.253em: the pair sits centred) */
.intro.play .iT { animation: tIn 1.1s var(--ease-out) .15s forwards, tSettle .8s var(--ease-out) 1.6s forwards; }
.intro.play .iP { animation: pIn 1.1s var(--ease-out) .3s forwards, pSettle .8s var(--ease-out) 1.7s forwards; }
@keyframes tIn { from { opacity: 0; transform: translateX(-48vw); } 40% { opacity: 1; } to { opacity: 1; transform: translateX(.356em); } }
@keyframes pIn {
  from { opacity: 0; transform: translateX(48vw) scale(.727); }
  40%  { opacity: 1; }
  to   { opacity: 1; transform: translateX(1.253em) scale(.727); }
}
/* 2 · split: T settles left, the original + settles into the lockup and shrinks to the small + */
@keyframes tSettle { from { transform: translateX(.356em); } to { transform: translateX(0); } }
@keyframes pSettle {
  from { transform: translateX(1.253em) scale(.727); }
  to   { transform: translateX(.775em) scale(.42); }
}
/* 3 · the duplicate slides right, turns 45° on the page and grows into the X, then the drawn X takes over */
.intro.play .iC {
  animation: cMove .65s var(--ease-out) 1.45s forwards,
             cRot .7s cubic-bezier(.65, 0, .35, 1) 2.1s forwards,
             cOut .3s linear 2.55s forwards;
}
@keyframes cMove {
  from { opacity: 1; transform: translateX(1.253em) scale(.727); }
  to   { opacity: 1; transform: translateX(1.634em) scale(.727); }
}
@keyframes cRot {
  from { transform: translateX(1.634em) rotate(0) scale(.727); }
  to   { transform: translateX(1.634em) rotate(45deg) scale(1); }
}
@keyframes cOut { to { opacity: 0; } }
/* 4 · the X turns in 3D while the sectors roll past */
.intro.play .xsvg {
  animation: xFade .3s linear 2.55s forwards,
             xSpin 2.4s cubic-bezier(.65, 0, .35, 1) 3.1s forwards;
}
@keyframes xFade { to { opacity: 1; } }
@keyframes xSpin { from { transform: rotateY(0); } to { transform: rotateY(720deg); } }
.intro-roll {
  height: 1.3em; overflow: hidden; opacity: 0;
  font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .2em;
  font-size: clamp(.78rem, 1.5vw, 1.3rem);
}
.intro-roll ul { list-style: none; margin: 0; padding: 0; }
.intro-roll li { height: 1.3em; line-height: 1.3em; text-align: center; padding-left: .2em; }
.intro.play .intro-roll { animation: lineIn .5s var(--ease-out) 3s forwards; }
.intro.play .intro-roll ul { animation: roll 2.4s cubic-bezier(.65, 0, .35, 1) 3.1s forwards; }
@keyframes roll {
  0%, 15%  { transform: translateY(0); }
  25%, 40% { transform: translateY(-1.3em); }
  50%, 65% { transform: translateY(-2.6em); }
  75%, 90% { transform: translateY(-3.9em); }
  100%     { transform: translateY(-5.2em); }
}
/* 5 · strapline, then the sheet lifts */
.intro-line {
  margin: 0; display: flex; gap: .6em; flex-wrap: wrap; justify-content: center; text-align: center;
  font-weight: 500; font-size: clamp(1rem, 1.6vw, 1.45rem); letter-spacing: -.01em; opacity: 0;
}
.intro-line .dot { color: var(--accent); }
.intro.play .intro-line { animation: lineIn 1s var(--ease-out) 5.7s forwards; }
@keyframes lineIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.intro.play { animation: curtain .95s cubic-bezier(.76, 0, .24, 1) 7.4s forwards; }
@keyframes curtain { to { transform: translateY(-100%); } }
.intro-skip { position: absolute; right: var(--gutter); bottom: 28px; color: var(--ink-50); opacity: 0; }
.intro.play .intro-skip { animation: lineIn .6s var(--ease-out) 1.6s forwards; }
.intro-skip:hover { color: var(--ink); }
body.intro-lock { overflow: hidden; }
@media (max-width: 560px) { .intro-line { flex-direction: column; gap: .2em; } .intro-line .dot { display: none; } }

/* ---------- reveals ---------- */
.rv { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.rv.pre { opacity: 0; transform: translateY(22px); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero .giant .line > span { transform: none; }
  .rv.pre { opacity: 1; transform: none; }
  .drift > img, .drift > video { transform: none; }
}
