/* ==========================================================================
   BoomtownRat
   Road-case stencil on true black. Hazard yellow is reserved for things that
   are live: the detonation, the buttons, the slots still waiting on footage.
   ========================================================================== */

:root {
  --black:  #000000;
  --soot:   #171614;   /* raised surfaces */
  --line:   #2c2a26;   /* rules, borders */
  --paper:  #ede8df;   /* primary text */
  --ash:    #908a81;   /* secondary text */
  --hazard: #ffd000;   /* the live colour */
  --flash:  #fff4b8;   /* detonation core */

  --display: "Big Shoulders Stencil", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(96px, 14vw, 200px);

  /* type scale, roughly a 1.333 ratio off an 18px base */
  --t-sm: 0.875rem;
  --t-base: 1.125rem;
  --t-md: 1.5rem;
  --t-lg: 2rem;
  --t-display: clamp(4rem, 12vw, 11.5rem);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: var(--body);
  font-size: var(--t-base);
  font-variation-settings: "wdth" 100;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--hazard);
  outline-offset: 3px;
}

::selection { background: var(--hazard); color: var(--black); }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--hazard);
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.display {
  font-family: var(--display);
  font-weight: 900;
  font-size: var(--t-display);
  line-height: 0.84;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  padding: 12px 20px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}
.btn-hazard { background: var(--hazard); color: var(--black); }
.btn-hazard:hover { background: var(--flash); }
.btn-hazard:active { transform: scale(0.97); }
.btn-big { padding: 20px 32px; font-size: var(--t-md); }

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px var(--gutter);
  transition: background-color 240ms ease, backdrop-filter 240ms ease;
}
.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark span {
  margin-left: 4px;
  padding: 3px 6px 2px;
  border-radius: 3px;
  background: var(--hazard);
  color: var(--black);
}

.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  padding-block: 6px;
  background: linear-gradient(var(--hazard), var(--hazard)) left bottom / 0 2px no-repeat;
  transition: background-size 220ms ease;
}
.nav-links a:hover { background-size: 100% 2px; }

@media (max-width: 720px) {
  .nav { gap: 16px; padding-block: 14px; }
  .nav nav { display: none; }
  .nav-cta { margin-left: auto; padding: 10px 14px; font-size: 0.875rem; }
  .wordmark { font-size: 1.5rem; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  cursor: crosshair;
  touch-action: pan-y;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* the box the particle word is fitted into */
.hero-stage {
  position: absolute;
  top: 104px;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

/* real text: shown when there's no JS or motion is reduced, invisible (but still read aloud) once particles take over */
.hero-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 19vw;
  line-height: 0.8;
  text-transform: uppercase;
  color: var(--paper);
}
.hero-title span { display: block; }
.blast-on .hero-title { opacity: 0; }

.hero-foot {
  position: absolute;
  z-index: 2;
  top: 104px;
  left: var(--gutter);
  width: min(40ch, 46vw);
  display: grid;
  gap: 16px;
  pointer-events: none;
}

/* the rat on the dynamite. main.js fits it beside RAT; these values are the no-JS fallback */
.hero-rat {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  width: 42vw;
  pointer-events: none;
}
.js .hero-rat { opacity: 0; transition: opacity 500ms ease; }
.js .hero-rat.is-loaded { opacity: 1; }
.hero-rat img { display: block; width: 100%; height: auto; }
.hero.is-shaking .hero-rat img { animation: lit 900ms ease-out; }
@keyframes lit {
  from { filter: brightness(2.1) saturate(1.3); }
}

/* the lit fuse keeps burning */
.hero-spark {
  position: absolute;
  left: 88.5%;
  top: 69%;
  width: 22%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 120, 0.5), rgba(255, 122, 26, 0.16) 38%, transparent 68%);
  mix-blend-mode: screen;
  animation: fuse 1.3s linear infinite;
}
@keyframes fuse {
  0%   { opacity: 0.65; scale: 1; }
  12%  { opacity: 1;    scale: 1.1; }
  25%  { opacity: 0.55; scale: 0.94; }
  41%  { opacity: 0.9;  scale: 1.06; }
  58%  { opacity: 0.6;  scale: 0.98; }
  73%  { opacity: 1;    scale: 1.12; }
  88%  { opacity: 0.7;  scale: 1; }
  100% { opacity: 0.65; scale: 1; }
}

.hero-lede {
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  font-variation-settings: "wdth" 90;
  line-height: 1.35;
  text-wrap: pretty;
}
.hero-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-sm);
  color: var(--ash);
}
.hero-hint[hidden] { display: none; }
.hint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hazard);
}

.hero.is-shaking { animation: shake 380ms cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translate(-1px, 1px); }
  20%, 80% { transform: translate(3px, -2px); }
  30%, 50%, 70% { transform: translate(-5px, 3px); }
  40%, 60% { transform: translate(5px, -3px); }
}

@media (max-aspect-ratio: 23/20) {
  /* portrait: word stacks into three lines, copy sits underneath */
  .hero-stage { bottom: 190px; }
  .hero-foot { top: auto; bottom: 32px; right: var(--gutter); width: auto; max-width: 42ch; }
  .hero-title { font-size: 36vw; }
  .hero-rat { left: var(--gutter); right: var(--gutter); bottom: 190px; width: auto; }
}

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */
.work,
.services,
.process,
.contact {
  padding: var(--section) var(--gutter) 0;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 34ch);
  align-items: end;
  gap: 24px 48px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-note {
  color: var(--ash);
  text-wrap: pretty;
}
@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Work
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px) clamp(16px, 2vw, 28px);
}
.card:first-child { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; }
}

.card { display: grid; gap: 16px; }

.card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--soot);
  color: inherit;
  font: inherit;
  text-align: left;
}
button.card-media,
a.card-media { cursor: pointer; }

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.85);
  transition: transform 600ms cubic-bezier(.2,.7,.2,1), filter 300ms ease;
}
.card-media:hover img,
.card-media:focus-visible img {
  transform: scale(1.04);
  filter: saturate(1.05) brightness(1);
}

.play {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--hazard);
  display: grid;
  place-items: center;
  transition: transform 200ms ease;
}
.play::before {
  content: "";
  margin-left: 5px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--black);
}
.card:first-child .play { width: 104px; height: 104px; left: 32px; bottom: 32px; }
.card:first-child .play::before { border-width: 17px 0 17px 28px; margin-left: 7px; }
.card-media:hover .play { transform: scale(1.08); }

/* a slot waiting for footage: wrapped in hazard tape */
.card-media.is-empty {
  display: grid;
  place-items: center;
  border: 10px solid transparent;
  background:
    linear-gradient(var(--soot), var(--soot)) padding-box,
    repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--black) 14px 28px) border-box;
}
.empty-label {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  text-transform: uppercase;
  line-height: 1;
  color: var(--ash);
  text-align: center;
}
.card:first-child .empty-label { font-size: clamp(2.5rem, 7vw, 6rem); }

.card-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}
.card-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1;
  text-transform: uppercase;
}
.card:first-child .card-title { font-size: clamp(2.25rem, 4.4vw, 4rem); }
.card-meta { color: var(--ash); font-size: var(--t-sm); }

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.svc-list { border-top: 1px solid var(--line); }

.svc {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 36ch);
  align-items: center;
  gap: 12px 48px;
  padding: clamp(20px, 2.6vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  transition: color 280ms ease, padding 380ms cubic-bezier(.2,.7,.2,1);
}
/* the hazard wipe */
.svc::before {
  content: "";
  position: absolute;
  inset: -1px calc(var(--gutter) * -1);
  z-index: -1;
  background: var(--hazard);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 380ms cubic-bezier(.2,.7,.2,1);
}
.svc-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3rem, 8.4vw, 8rem);
  line-height: 0.86;
  text-transform: uppercase;
}
.svc-copy { color: var(--ash); transition: color 280ms ease; text-wrap: pretty; }

@media (hover: hover) {
  .svc:hover { color: var(--black); padding-left: clamp(8px, 1.6vw, 24px); }
  .svc:hover::before { transform: scaleY(1); }
  .svc:hover .svc-copy { color: var(--black); }
}
@media (max-width: 820px) {
  .svc { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px);
}
.step {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.step-num {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(6rem, 12vw, 11rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ash);
  margin-bottom: 16px;
}
.step h3 {
  font-size: var(--t-lg);
  font-weight: 700;
  font-variation-settings: "wdth" 110;
  line-height: 1.1;
}
.step p { color: var(--ash); max-width: 38ch; text-wrap: pretty; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 5vw, 80px) clamp(32px, 5vw, 96px);
}
.contact-title {
  grid-column: 1 / -1;
  font-size: clamp(5rem, 17vw, 17rem);
  color: var(--hazard);
}
.contact-body {
  display: grid;
  align-content: start;
  gap: 20px;
  position: sticky;
  top: 120px;
  align-self: start;
}
.contact-lede {
  font-size: var(--t-md);
  font-variation-settings: "wdth" 90;
  line-height: 1.35;
  max-width: 26ch;
  text-wrap: pretty;
}
.contact-direct { color: var(--ash); }
.contact-direct a {
  color: var(--paper);
  text-decoration-color: var(--hazard);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.contact-direct a:hover { color: var(--hazard); }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
  .contact-body { position: static; }
}

.brief { display: grid; gap: 36px; }
.brief fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.brief legend,
.field > span {
  display: block;
  margin-bottom: 14px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ash);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-block;
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}
.chip:hover span { border-color: var(--ash); }
.chip input:checked + span {
  background: var(--hazard);
  border-color: var(--hazard);
  color: var(--black);
}
.chip input:focus-visible + span {
  outline: 2px solid var(--hazard);
  outline-offset: 3px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}
.field { display: block; }
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 8px 0 12px;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 1.25rem;
  resize: vertical;
  transition: border-color 160ms ease;
}
.field textarea { line-height: 1.45; }
.field input::placeholder,
.field textarea::placeholder { color: #5d5952; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--hazard);
}

.brief-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.brief-note { color: var(--ash); font-size: var(--t-sm); }
.brief-note.is-error { color: var(--hazard); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  margin-top: var(--section);
  padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  font-size: var(--t-sm);
  color: var(--ash);
}
.footer-row a { color: var(--paper); text-decoration: none; }
.footer-row a:hover { color: var(--hazard); }
.socials { display: flex; gap: 24px; }

/* --------------------------------------------------------------------------
   Video player
   -------------------------------------------------------------------------- */
.player {
  width: min(1280px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  background: var(--black);
  color: var(--paper);
  overflow: visible;
}
.player::backdrop {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
}
.player-frame { aspect-ratio: 16 / 9; background: var(--soot); }
.player-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 0;
}
.player-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--t-lg);
  line-height: 1;
  text-transform: uppercase;
}
.player-close {
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.player-close:hover { border-color: var(--hazard); color: var(--hazard); }

.player[open] { animation: player-in 280ms cubic-bezier(.2,.7,.2,1); }
@keyframes player-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero { cursor: auto; }
}
