/* wrong.rodeo — site styles
   Palette: cold metal, ink, one vermilion. No warm neutrals anywhere. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-var.woff2") format("woff2-variations"),
       url("../fonts/bricolage-grotesque-latin-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-var.woff2") format("woff2-variations"),
       url("../fonts/instrument-sans-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-stretch: 85% 100%;
  font-display: swap;
}
/* metric-matched fallbacks keep the layout still while the fonts arrive */
@font-face { font-family: "Display Fallback"; src: local("Arial Narrow"), local("ArialNarrow"), local("Arial"), local("Helvetica"); size-adjust: 92%; ascent-override: 96%; descent-override: 26%; }
@font-face { font-family: "Text Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 101%; ascent-override: 92%; descent-override: 24%; }

:root {
  --metal: #D8E1E7;
  --metal-hi: #EEF3F6;
  --metal-lo: #C4CFD7;
  --ink: #101418;
  --ink-2: #36414B;
  --ink-3: #4A5661;
  --red: #F04424;
  --white: #FFFFFF;
  --on-ink: #D8E1E7;
  --on-ink-2: #A3B1BC;

  --display: "Bricolage Grotesque", "Display Fallback", "Arial Narrow", sans-serif;
  --text: "Instrument Sans", "Text Fallback", system-ui, sans-serif;

  --gutter: clamp(20px, 4.4vw, 80px);
  --max: 1760px;
}

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

html {
  background: var(--ink);            /* overscroll below the footer stays dark, never paper */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--metal);
  /* brushed aluminium: a broad cool sheen plus very fine horizontal grain */
  background-image:
    radial-gradient(90% 60% at 80% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .0) 0, rgba(255, 255, 255, .0) 60%, rgba(16, 20, 24, .035) 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .10) 0 1px, rgba(255, 255, 255, 0) 1px 3px, rgba(16, 20, 24, .022) 3px 4px, rgba(255, 255, 255, 0) 4px 7px);
  font: 400 1.0625rem/1.55 var(--text);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: var(--white); }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 6px; box-shadow: 0 0 0 7px rgba(240, 68, 36, .55); }
.later :focus-visible, .footer :focus-visible { outline-color: var(--red); box-shadow: none; }
.inspect:focus-visible { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 0 0 7px rgba(240, 68, 36, .55); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: 12px; z-index: 10;
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--metal); font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------------ wordmark */
.wordmark {
  display: inline-flex; align-items: baseline;
  font-family: var(--display);
  font-weight: 760;
  font-stretch: 82%;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -.012em;
  text-decoration: none;
  padding: 12px 0;
}
.wordmark__screw {
  width: .29em; height: .29em;
  margin: 0 .055em 0 .06em;
  align-self: baseline;
  transform: translateY(.015em);
  overflow: visible;
}
.wordmark__logo {
  width: 1em; height: 1em;
  margin-right: .3em;
  align-self: center;
  flex: none;
  transform: translateY(.02em);
}
.wordmark__screw circle { fill: var(--red); }

/* ------------------------------------------------------------------ masthead */
.masthead {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(14px, 2vw, 26px) var(--gutter) 0;
}
.masthead__nav { display: flex; gap: clamp(8px, 2.2vw, 36px); }
.masthead__nav a {
  white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 4px;
  font-weight: 560; font-size: 1rem; text-decoration: none;
  background: linear-gradient(var(--ink), var(--ink)) left calc(100% - 12px) / 0 1.5px no-repeat;
  transition: background-size .25s ease;
}
.masthead__nav a:hover { background-size: 100% 1.5px; }

/* ------------------------------------------------------------------ hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
  column-gap: clamp(16px, 2.5vw, 48px);
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(56px, 7vw, 120px);
}
.hero__text { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-width: 0; }
.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 80%;
  font-size: clamp(3rem, 8.6vw, 10.4rem);
  line-height: .86;
  letter-spacing: -.012em;
  font-optical-sizing: auto;
}
.hero__line { display: block; }
.hero__line--step { padding-left: .62em; }
.hero__lede {
  margin: 0; max-width: 31em;
  font-size: clamp(1.0625rem, .35vw + .95rem, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  padding-bottom: 6px;
}

/* ------------------------------------------------------------------ instrument */
.instrument { margin: 0; min-width: 0; container-type: inline-size; align-self: start; }
.instrument__frame { position: relative; }
.instrument__stage { position: relative; aspect-ratio: 900 / 800; }
.instrument__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; }
.instrument__svg text { font-family: var(--display); }

.camera { transform: var(--cam-wide); }
.instrument[data-state="exploded"] .camera { transform: var(--cam-ex-wide); }

.led-glow { fill: #ff8466; opacity: 0; animation: led 5.5s linear infinite; }
@keyframes led {
  0%, 6%, 12%, 100% { opacity: 0; }
  3%, 9% { opacity: 1; }
}
.is-offscreen .led-glow { animation-play-state: paused; }

.leaders { opacity: var(--reveal, 0); }
.leaders polyline { fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linejoin: round; }
.leader-dot { fill: var(--red); stroke: var(--white); stroke-width: 1.6; }
.balloons { display: none; }
.balloon line { stroke: var(--ink); stroke-width: 1.4; }
.balloon circle:not(.leader-dot) { fill: var(--metal-hi); stroke: var(--ink); stroke-width: 1.6; }
.balloon text { font: 650 20px var(--text); text-anchor: middle; fill: var(--ink); }

.callouts {
  list-style: none; margin: 0; padding: 0;
  position: absolute; inset: 0; pointer-events: none;
  opacity: var(--reveal, 0);
  visibility: hidden;
}
.instrument[data-revealed] .callouts { visibility: visible; }
.callout {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  display: flex; gap: .55em; align-items: flex-start;
  font-size: clamp(12.5px, 1.95cqi, 16px);
  line-height: 1.32;
  color: var(--ink-2);
}
.callout strong { display: block; color: var(--ink); font-weight: 600; }
.callout--left { flex-direction: row-reverse; text-align: right; }
.callout__key, .discipline__key {
  flex: none;
  display: inline-grid; place-items: center;
  width: 1.75em; height: 1.75em; border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--metal-hi);
  color: var(--ink);
  font: 650 .86em/1 var(--text);
}

.instrument__bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px;
  margin-top: clamp(4px, 1vw, 14px);
}
.instrument__note { flex: 1 1 18em; max-width: 30em; font-size: .9375rem; line-height: 1.45; color: var(--ink-3); }

.inspect {
  display: inline-flex; align-items: center; gap: .75em;
  min-height: 52px; min-width: 9.6em;
  padding: 0 1.5em 0 1.15em;
  border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #232a31, var(--ink) 55%);
  color: var(--metal);
  font: 600 1.0625rem/1 var(--text);
  letter-spacing: .005em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 0 rgba(255, 255, 255, .7), 0 10px 22px -12px rgba(16, 20, 24, .75);
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.inspect[hidden] { display: none; }
.inspect:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 0 rgba(255, 255, 255, .7), 0 14px 26px -12px rgba(16, 20, 24, .8); }
.inspect:active { transform: translateY(1px); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .7); }
.inspect__lamp {
  width: 10px; height: 10px; border-radius: 50%;
  background: #4b2219;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 255, 255, .08);
  transition: background .3s ease, box-shadow .3s ease;
}
.instrument[data-state="exploded"] .inspect__lamp {
  background: var(--red);
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, .25), 0 0 0 2px rgba(255, 255, 255, .1), 0 0 10px 1px rgba(240, 68, 36, .65);
}

/* narrow frames: crop the drawing, label parts with balloons and a list */
@container (max-width: 599px) {
  .instrument__stage { aspect-ratio: 560 / 540; }
  .camera { transform: var(--cam-narrow); }
  .instrument[data-state="exploded"] .camera { transform: var(--cam-ex-narrow); }
  .leaders { display: none; }
  .instrument[data-state="exploded"] .balloons { display: inline; opacity: var(--reveal, 0); }
  .callouts {
    position: static; display: none;
    visibility: visible; pointer-events: auto;
    margin: 4px 0 18px;
    gap: 12px 18px;
    grid-template-columns: 1fr;
  }
  .instrument[data-state="exploded"] .callouts { display: grid; }
  .callout, .callout--left {
    position: static; width: auto; flex-direction: row; text-align: left;
    font-size: 1rem; line-height: 1.4;
  }
  .callout strong { display: inline; }
}
@container (min-width: 420px) and (max-width: 599px) {
  .callouts { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------------ capabilities */
.work {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 48px);
  padding: clamp(40px, 6vw, 96px) var(--gutter) clamp(88px, 11vw, 176px);
}
.work__intro { grid-column: 1 / span 4; align-self: start; position: sticky; top: 32px; }
.work__title span { display: inline-block; }
.work__title {
  margin: 0 0 .5em;
  font-family: var(--display); font-weight: 800; font-stretch: 78%;
  font-size: clamp(2.5rem, 4.4vw, 5rem); line-height: .9; letter-spacing: -.01em;
}
.work__intro p { margin: 0; max-width: 22em; color: var(--ink-2); font-size: 1.0625rem; }
.disciplines {
  grid-column: 6 / -1;
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(36px, 4.6vw, 72px);
}
.discipline {
  display: grid; grid-template-columns: clamp(92px, 9.6vw, 156px) minmax(0, 1fr);
  column-gap: clamp(20px, 2.8vw, 48px); align-items: center;
}
.detail { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.detail__bg { fill: var(--metal-lo); }
.detail__ring { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.discipline h3 {
  margin: 0 0 .32em;
  font-family: var(--display); font-weight: 760; font-stretch: 80%;
  font-size: clamp(1.75rem, 2.7vw, 3rem); line-height: 1; letter-spacing: -.005em;
  text-wrap: balance;
}
.discipline__figure { position: relative; }
.discipline__key { position: absolute; right: -2%; bottom: 2%; font-size: clamp(.9rem, 1vw, 1.05rem); }
.discipline p { margin: 0; max-width: 33em; color: var(--ink-2); font-size: clamp(1.0625rem, .25vw + 1rem, 1.1875rem); }

/* ------------------------------------------------------------------ later + footer (ink) */
.later, .footer { background: var(--ink); color: var(--on-ink); }
.later {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 48px);
  padding: clamp(80px, 11vw, 184px) max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))) clamp(64px, 8vw, 128px);
}
.later__title {
  grid-column: 1 / span 10; margin: 0;
  font-family: var(--display); font-weight: 800; font-stretch: 76%;
  font-size: clamp(2.6rem, 6.4vw, 7.6rem); line-height: .9; letter-spacing: -.012em;
  text-wrap: balance;
}
.later__body {
  grid-column: 7 / span 5; margin: clamp(28px, 4vw, 56px) 0 0;
  max-width: 30em; color: var(--on-ink-2);
  font-size: clamp(1.0625rem, .35vw + .95rem, 1.3rem); line-height: 1.5;
}

.footer {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px;
  padding: 28px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))) 36px;
  border-top: 1px solid rgba(216, 225, 231, .14);
  color: var(--on-ink-2);
  font-size: .9375rem;
}
.footer p { margin: 0; }
.footer__legal { margin-left: auto !important; }
.footer .wordmark { color: var(--on-ink); }
.wordmark--small { font-size: 1.3rem; }

/* ------------------------------------------------------------------ layout breakpoints */
@media (max-width: 1100px) {
  .work__intro { grid-column: 1 / span 5; }
  .disciplines { grid-column: 6 / -1; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .hero__text { gap: 22px; }
  .hero__title { font-size: clamp(2.9rem, 14.2vw, 7.2rem); }
  .work { row-gap: 48px; }
  .work__intro, .disciplines { grid-column: 1 / -1; position: static; }
  .later__title { grid-column: 1 / -1; }
  .later__body { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .masthead__nav a { font-size: .9375rem; }
  .wordmark { font-size: 1.4rem; }
  .discipline { align-items: start; grid-template-columns: 84px minmax(0, 1fr); column-gap: 18px; }
  .discipline h3 { font-size: 1.6rem; }
  .footer__legal { margin-left: 0 !important; width: 100%; }
}
@media (max-width: 389px) {
  :root { --gutter: 16px; }
  .masthead { gap: 10px; }
  .masthead__nav { gap: 10px; }
  .masthead__nav a { font-size: .8125rem; padding: 0 2px; }
  .wordmark { font-size: 1.2rem; }
  .wordmark__logo { margin-right: .24em; }
}

@media (prefers-reduced-motion: reduce) {
  .led-glow { animation: none; }
  .inspect, .inspect__lamp, .masthead__nav a { transition: none; }
}

@media print {
  body { background: #fff; }
  .inspect, .skip { display: none; }
}
