/* ── Fonts (self-hosted, see /fonts/LICENSE.txt) ─────────── */
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ── Design tokens ───────────────────────────────────────── */
:root {
  /* Colour */
  --bg: #0B0A09;          /* house: near-black, slightly warm */
  --surface: #141210;     /* stage */
  --surface-2: #1C1916;   /* riser */
  --line: #2A2622;
  --text: #EDE8E0;        /* paper, 16.2:1 on bg */
  --text-2: #BDB5A9;      /* body copy, 9.7:1 */
  --muted: #8F877C;       /* ash, 5.6:1 */
  --tungsten: #E8A04A;    /* 3200K accent, 9.0:1 */
  --tungsten-hi: #F2B972;
  --daylight: #BFD4E6;    /* 5600K, lighting section only */
  --bg-cool: #090A0B;

  /* Type */
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing */
  --gutter: 16px;
  --section: 96px;
  --gap: 24px;

  /* Motion: slow, like a light fade */
  --fade: 900ms;
  --ease: cubic-bezier(0.45, 0, 0.25, 1);
}

@media (min-width: 720px) {
  :root { --gutter: 40px; --section: 128px; --gap: 32px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 96px; --section: 160px; }
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--tungsten); }
a:hover { color: var(--tungsten-hi); }
:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 3px; }
::selection { background: var(--tungsten); color: var(--bg); }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; padding: 10px 16px; background: var(--tungsten); color: var(--bg); }
.skip:focus { left: 8px; }

/* ── Type ────────────────────────────────────────────────── */
.cue, .meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.cue a { color: inherit; text-decoration: none; }
.cue a:hover { color: var(--text); }
.cue.cool { color: var(--daylight); }
@media (min-width: 720px) { .cue { font-size: 13px; } }

.h1, .h2, .h3, .hero-title, .card-title, .service-name, .next-title {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(48px, 8vw, 104px); line-height: 0.96; letter-spacing: -0.02em; }
.h2 { font-size: clamp(40px, 5.5vw, 72px); line-height: 1; letter-spacing: -0.015em; }
.h2-sm { font-size: clamp(34px, 4vw, 56px); line-height: 1.04; }
.h3 { font-size: clamp(30px, 3vw, 44px); line-height: 1.05; }
.lede, .body { margin: 0; color: var(--text-2); max-width: 36em; }
.lede { font-size: 17px; }
.body { font-size: 17px; line-height: 1.65; }
@media (min-width: 720px) { .lede { font-size: 18px; } .body { font-size: 18px; } }

/* ── Buttons & links ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--tungsten); color: var(--bg);
  font: 600 16px/1 var(--sans);
  border: 0; text-decoration: none; cursor: pointer;
  transition: background-color 600ms var(--ease);
}
.btn:hover { background: var(--tungsten-hi); color: var(--bg); }
.text-link {
  color: var(--text);
  text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--muted);
  transition: text-decoration-color 600ms var(--ease);
}
.text-link:hover { color: var(--text); text-decoration-color: var(--tungsten); }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid transparent;
  transition: background-color 800ms var(--ease), border-color 800ms var(--ease), backdrop-filter 800ms var(--ease);
}
.nav.scrolled {
  background: rgba(11, 10, 9, 0.72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: rgba(237, 232, 224, 0.06);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { font-family: var(--serif); font-size: 22px; color: var(--text); text-decoration: none; white-space: nowrap; }
.wordmark:hover { color: var(--text); }
.nav-links { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.nav-links a { color: var(--text); text-decoration: none; padding: 12px 0; transition: color 600ms var(--ease); }
.nav-links a:hover { color: var(--tungsten); }
@media (min-width: 720px) {
  .nav-inner { min-height: 76px; }
  .wordmark { font-size: 26px; }
  .nav-links { gap: 36px; font-size: 15px; }
}
@media (max-width: 400px) { .nav-links { gap: 12px; font-size: 13px; } .wordmark { font-size: 19px; } }

/* ── Hero: house to half ─────────────────────────────────── */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: min(92svh, 920px); margin-top: -64px; padding-top: 64px; }
@media (min-width: 720px) { .hero { margin-top: -76px; padding-top: 76px; } }
.hero-light {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 48% at 35% 46%, rgba(232,160,74,0.20), rgba(232,160,74,0.06) 45%, rgba(232,160,74,0) 72%);
}
.hero-beam {
  position: absolute; left: 10%; top: -10%; width: 60%; height: 85%; pointer-events: none;
  background: linear-gradient(rgba(232,160,74,0.10), rgba(232,160,74,0));
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
}
@media (min-width: 720px) {
  .hero-light { background: radial-gradient(ellipse 46% 52% at 32% 46%, rgba(232,160,74,0.20), rgba(232,160,74,0.06) 45%, rgba(232,160,74,0) 72%); }
  .hero-beam { left: 14%; width: 36%; height: 80%; clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
}
.hero-inner { position: relative; display: flex; flex-direction: column; gap: 24px; padding-block: 96px; }
.hero-title { font-size: clamp(48px, 8.4vw, 128px); line-height: 0.96; letter-spacing: -0.02em; max-width: 13em; }
.hero-sub { margin: 0; font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 8px; }
@media (min-width: 720px) { .hero-inner { gap: 36px; padding-block: 120px; } .hero-sub { font-size: 20px; } }

/* Quick enough that the page never feels like it's waiting: everything is readable by ~0.8s. */
.js .hero-light, .js .hero-beam { animation: houseUp 1100ms var(--ease) both; }
.js .hero-title { animation: textUp 900ms var(--ease) 80ms both; }
.js .hero-sub, .js .hero-actions, .js .hero .cue { animation: houseUp 700ms var(--ease) 150ms both; }
@keyframes houseUp { from { opacity: 0; } to { opacity: 1; } }
@keyframes textUp { from { color: #3A352F; } to { color: var(--text); } }

/* ── Sections ────────────────────────────────────────────── */
.section { padding-block: var(--section); }
#work { padding-top: 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; margin-bottom: 48px; }
.section-head > div { display: flex; flex-direction: column; gap: 14px; }
.section-head .lede { max-width: 24em; }
@media (min-width: 720px) { .section-head { margin-bottom: 72px; } }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--fade) var(--ease), transform var(--fade) var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ── Media & placeholders ────────────────────────────────── */
.media { width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.placeholder { position: relative; display: flex; align-items: flex-end; padding: 16px; }
.placeholder.tone-warm { background: radial-gradient(ellipse 60% 70% at 32% 22%, rgba(232,160,74,0.26), rgba(232,160,74,0) 70%), var(--surface); }
.placeholder.tone-cool { background: radial-gradient(ellipse 55% 65% at 45% 12%, rgba(191,212,230,0.40), rgba(191,212,230,0) 70%), #050607; }
.placeholder.tone-side { background: radial-gradient(ellipse 55% 60% at 16% 40%, rgba(232,160,74,0.42), rgba(232,160,74,0) 70%), #100E0C; }
.placeholder-label { position: relative; font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--bg); padding: 4px 8px; }

/* ── Q 01 Work grid ──────────────────────────────────────── */
.work-grid { display: grid; grid-template-columns: 1fr; gap: 72px; }
.card-link { display: flex; flex-direction: column; gap: 20px; color: var(--text); text-decoration: none; }
.card-link:hover { color: var(--text); }
.card-shot { height: clamp(260px, 62vw, 420px); overflow: hidden; }
.card-shot .media { transition: filter 900ms var(--ease), transform 1200ms var(--ease); filter: brightness(0.92); }
.card-link:hover .media, .card-link:focus-visible .media { filter: brightness(1.04) sepia(0.12) saturate(1.05); transform: scale(1.01); }
.card-text { display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: clamp(32px, 3vw, 40px); line-height: 1.05; }
.card-outcome { margin: 0; color: var(--text-2); max-width: 30em; }
.tags { margin: 4px 0 0; font-family: var(--mono); font-size: 12px; color: var(--tungsten); }
@media (min-width: 900px) {
  .work-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 96px var(--gap); }
  .card { grid-column: var(--span); margin-top: var(--drop); }
  .card-shot { height: var(--h); }
}

/* ── Q 02 Services ───────────────────────────────────────── */
.services { padding-top: 0; display: grid; gap: 32px; }
.services-head { display: flex; flex-direction: column; gap: 14px; }
.services-list { list-style: none; margin: 0; padding: 0; }
.service { display: grid; gap: 10px; padding: 26px 0; border-top: 1px solid var(--line); }
.service-name { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.1; }
.service-line { margin: 0; color: var(--text-2); }
@media (min-width: 900px) {
  .services { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .services-head { grid-column: 1 / 5; }
  .services-list { grid-column: 5 / 13; }
  .service { grid-template-columns: 5fr 6fr; gap: 32px; padding: 30px 0; }
}

/* ── Q 03 Lighting (cool) ────────────────────────────────── */
.lighting {
  padding-block: var(--section);
  background: radial-gradient(ellipse 70% 40% at 80% 6%, rgba(191,212,230,0.12), rgba(191,212,230,0) 70%), var(--bg-cool);
}
.lighting a { color: var(--daylight); }
.lighting :focus-visible { outline-color: var(--daylight); }
.lighting-head { display: grid; gap: 40px; }
.lighting-copy { display: flex; flex-direction: column; gap: 18px; }
.systems ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
@media (min-width: 900px) {
  .lighting-head { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; }
  .lighting-copy { grid-column: 1 / 8; }
  .systems { grid-column: 9 / 13; }
}
.strip {
  display: flex; gap: 12px; margin-top: 56px;
  padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.shot { flex: 0 0 min(80vw, var(--w)); margin: 0; display: flex; flex-direction: column; gap: 12px; scroll-snap-align: start; }
.shot .media { height: clamp(360px, 52vw, 520px); }
@media (min-width: 720px) { .strip { gap: 20px; margin-top: 72px; } .shot { flex-basis: var(--w); } }

/* ── Q 04 About ──────────────────────────────────────────── */
.about { display: grid; gap: 40px; }
.about-portrait { height: clamp(420px, 110vw, 640px); }
.about-copy { display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 900px) {
  .about { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
  .about-portrait { grid-column: 1 / 6; height: 640px; }
  .about-copy { grid-column: 7 / 12; }
}

/* ── Q 05 Contact ────────────────────────────────────────── */
.contact {
  border-top: 1px solid var(--surface-2);
  background: radial-gradient(ellipse 60% 50% at 20% 30%, rgba(232,160,74,0.12), rgba(232,160,74,0) 70%), var(--bg);
}
.contact-inner { display: grid; gap: 56px; padding-block: var(--section) 64px; }
.contact-copy { display: flex; flex-direction: column; gap: 24px; }
.contact-email { font-size: 20px; width: fit-content; }
.socials { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.socials a { color: var(--text); }
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 0;
  font: 16px/1.5 var(--sans);
  transition: border-color 600ms var(--ease);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--tungsten); }
.form .btn { align-self: flex-start; }
.form-status { margin: 0; min-height: 1.6em; font-size: 15px; color: var(--text-2); }
.form-status.ok { color: var(--tungsten); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (min-width: 900px) {
  .contact-inner { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .contact-copy { grid-column: 1 / 7; }
  .form { grid-column: 8 / 13; }
}

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 32px 48px; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ── Case study ──────────────────────────────────────────── */
.case-head { display: flex; flex-direction: column; gap: 24px; padding-block: 72px 48px; }
.case-title { max-width: 11em; }
.case-hero { max-width: 1440px; margin: 0 auto; height: clamp(300px, 56vw, 760px); }
.case-overview { display: grid; gap: 48px; padding-block: 72px; }
.facts { margin: 0; display: grid; grid-template-columns: 100px 1fr; gap: 14px 20px; font-family: var(--mono); font-size: 13px; align-content: start; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.case-story { display: flex; flex-direction: column; gap: 48px; }
.case-story section { display: flex; flex-direction: column; gap: 14px; }
.case-screens { display: flex; flex-direction: column; gap: 20px; padding-block: 24px 72px; }
.screens { display: grid; gap: 20px; }
.screen { height: clamp(260px, 60vw, 620px); }
.case-outcome { display: grid; gap: 40px; padding-block: 48px 96px; }
.case-outcome > div { display: flex; flex-direction: column; gap: 14px; }
.results { margin: 0; display: grid; gap: 24px; }
.result { padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.result-value { font-family: var(--serif); font-size: clamp(48px, 5vw, 64px); line-height: 1; }
.result-value.accent { color: var(--tungsten); }
.result dd { margin: 0; color: var(--text-2); font-size: 15px; }
.next {
  display: block; text-decoration: none; color: var(--text);
  border-top: 1px solid var(--surface-2);
  background: radial-gradient(ellipse 50% 70% at 75% 50%, rgba(232,160,74,0.10), rgba(232,160,74,0) 70%), var(--bg);
  transition: background-color 900ms var(--ease);
}
.next:hover { color: var(--text); background-color: #100E0C; }
.next-inner { display: flex; flex-direction: column; gap: 12px; padding-block: 96px; }
.next-title { font-size: clamp(44px, 7vw, 88px); line-height: 1; letter-spacing: -0.015em; }
.next-cta { color: var(--tungsten); }
@media (min-width: 900px) {
  .case-head { padding-block: 96px 64px; }
  .case-overview { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding-block: 96px; }
  .facts { grid-column: 1 / 5; grid-template-columns: 120px 1fr; }
  .case-story { grid-column: 6 / 12; gap: 56px; }
  .screens { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .screen { grid-column: span 4; height: 620px; }
  .screen.wide { grid-column: span 8; }
  .case-outcome { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .case-outcome > div { grid-column: 1 / 5; }
  .results { grid-column: 6 / 13; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
  .next-inner { padding-block: 120px; }
}

.notfound { display: flex; flex-direction: column; gap: 24px; padding-block: 160px; min-height: 60vh; }

/* ── Reduced motion: show the end state ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ── Sections that adapt to missing content ──────────────── */
.services.first { padding-top: var(--section); }
.systems { display: flex; flex-direction: column; gap: 4px; }
.systems ul + .cue { margin-top: 28px; }
.for-hire { margin: 4px 0 0; font-size: 17px; }
.for-hire a { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: rgba(191,212,230,0.4); }
@media (min-width: 900px) {
  .about.no-portrait .about-copy { grid-column: 1 / 9; }
}
