/* Burtnett Media · direction C "Control Room" */
:root {
  --ground: #0b0c0d;
  --surface: #121416;
  --surface-2: #181b1e;
  --ink: #eceef0;
  --muted: #8b929a;
  --dim: #5d636a;
  --live: #7fbf8f;
  --soon: #d4a24c;

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace; /* taste-skill-ignore: mono status/tags approved in spec (direction C) */

  --gutter: clamp(16px, 3vw, 40px);
  --section: clamp(96px, 12vw, 200px);
  --display: clamp(2.6rem, 7.2vw, 7.6rem);
  --h2: clamp(2rem, 4.2vw, 4rem);
  --h3: clamp(1.35rem, 2vw, 1.85rem);
  --body: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  --small: 0.8125rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--body)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 4px; border-radius: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
::selection { background: var(--live); color: var(--ground); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: var(--ground);
}
.wordmark { font: 500 1rem/1 var(--mono); letter-spacing: -0.01em; }
.wordmark span { color: var(--dim); }
.nav nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav nav a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav nav a:hover { color: var(--ink); }

main > section { padding: var(--section) var(--gutter) 0; }
h2 { font-size: var(--h2); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }

/* 1 · Opening */
.hero {
  min-height: min(calc(100svh - 58px), 820px);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 64px;
  padding-top: clamp(48px, 9vh, 120px) !important;
  padding-bottom: clamp(32px, 5vh, 64px);
}
h1 {
  font-size: var(--display); font-weight: 600;
  letter-spacing: -0.045em; line-height: 0.95;
}
h1 span { display: block; color: var(--dim); }
.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 64px; align-items: end;
}
.lede { max-width: 34ch; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); line-height: 1.4; }
.readout {
  background: var(--surface);
  padding: 18px 22px;
  font: 400 var(--small)/1.7 var(--mono);
  color: var(--muted);
}
.readout .status { color: var(--ink); }
.dot { color: var(--live); animation: pulse 2.4s ease-in-out infinite; display: inline-block; }
.clock time { color: var(--ink); }

/* 2 · What we do */
.services { margin-top: clamp(48px, 6vw, 88px); }
.services li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 8px 32px; align-items: baseline;
  padding: clamp(20px, 2.4vw, 32px) 0;
}
.num { font: 400 var(--small)/1 var(--mono); color: var(--live); }
.services h3 { font-size: clamp(1.6rem, 3vw, 2.75rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.services p { color: var(--muted); max-width: 40ch; }

/* 3 · The portfolio */
#work { background: var(--surface); margin-top: var(--section); padding-bottom: var(--section); }
.group {
  margin: clamp(48px, 6vw, 80px) 0 16px;
  font-size: 1rem; font-weight: 500; color: var(--muted);
}
.logos { display: grid; gap: 4px; }
.logos-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.logos-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.logos a {
  position: relative;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 18px;
  height: 100%; min-height: clamp(180px, 16vw, 240px);
  padding: 32px 24px 24px;
  background: var(--surface-2);
  transition: background 0.3s var(--ease);
}
.logos a:focus-visible { outline-offset: -6px; }
.logos-2 a { min-height: clamp(150px, 13vw, 200px); }
.logos img {
  width: auto; max-width: 100%;
  height: clamp(72px, 7vw, 104px); object-fit: contain;
  opacity: 0.82;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.logos-2 img { height: clamp(40px, 4.4vw, 68px); }
.name { font-size: var(--small); color: var(--muted); text-align: center; transition: color 0.3s; }
.logos-6 .name { min-height: 2lh; }
.name::after { content: " ↗"; opacity: 0; transition: opacity 0.3s; }
.logos a:hover { background: #1e2226; }
.logos a:hover img { opacity: 1; transform: scale(1.04); }
.logos a:hover .name { color: var(--ink); }
.logos a:hover .name::after { opacity: 1; }

/* 4 · Systems */
.systems {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px);
  margin-top: clamp(48px, 6vw, 88px);
}
.systems article { padding: 28px; background: var(--surface); }
.tag { font: 400 var(--small)/1 var(--mono); color: var(--live); margin-bottom: 20px; }
.tag-soon { color: var(--soon); }
.tag span { display: inline-block; animation: pulse 2.4s ease-in-out infinite; }
.systems h3 { font-size: var(--h3); font-weight: 500; letter-spacing: -0.02em; margin-bottom: 12px; }
.systems p:last-child { color: var(--muted); max-width: 32ch; }

/* 5 · Contact */
#contact { padding-bottom: var(--section); }
.contact-line { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); color: var(--muted); margin-bottom: 20px; }
.email {
  display: inline-block;
  font-size: clamp(1.25rem, 6.4vw, 6.2rem); font-weight: 600;
  letter-spacing: -0.045em; line-height: 1;
  overflow-wrap: anywhere;
  position: relative;
  padding-bottom: 8px;
}
.email::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--live);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.email:hover::after, .email:focus-visible::after { transform: scaleX(1); }

/* 404 */
.notfound { padding: var(--section) var(--gutter); min-height: 60svh; }
.notfound h1 { margin-bottom: 32px; }
.notfound a { color: var(--live); }

/* Footer */
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--gutter) 32px;
  background: var(--surface);
  font-size: var(--small); color: var(--muted);
}

/* Motion */
@keyframes pulse { 50% { opacity: 0.35; } }
.js-reveal .rv {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease) var(--d, 0ms), transform 0.8s var(--ease) var(--d, 0ms);
}
.js-reveal .rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot, .tag span { animation: none; }
  .js-reveal .rv { opacity: 1; transform: none; transition: none; }
  .logos a:hover img { transform: none; }
}
@media print {
  .js-reveal .rv { opacity: 1; transform: none; transition: none; }
}

/* Tablet */
@media (max-width: 960px) {
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
  .readout { justify-self: start; }
  .logos-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .systems { grid-template-columns: minmax(0, 1fr); }
  .services li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .services p { grid-column: 2; }
}

/* Phone */
@media (max-width: 640px) {
  .nav nav a:not(:last-child) { display: none; }
  .hero { min-height: auto; gap: 48px; }
  .logos-2, .logos-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos-2 { grid-template-columns: minmax(0, 1fr); }
  .logos a { min-height: 150px; padding: 24px 16px 18px; }
  .logos img { height: 64px; }
  .logos-2 img { height: 44px; }
}
