@font-face {
  font-family: "Inter Tight";
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* webfont fallback for the hero — Macs and iPhones render the real
   Avenir Next Condensed locally and never download this */
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #f4f1ec;
  --ink: #111111;
  --mute: #6b6660;
  --line: #d9d3ca;
  --accent: #c2410c;
  --sans: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151310;
    --ink: #ece9e4;
    --mute: #a39d94;
    --line: #2e2a25;
    --accent: #e8693a;
  }
}

:root[data-theme="dark"] {
  --bg: #151310;
  --ink: #ece9e4;
  --mute: #a39d94;
  --line: #2e2a25;
  --accent: #e8693a;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-head,
main > section,
footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2rem);
}

/* ---------- header ---------- */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.75rem;
}

.site-head .wordmark,
.site-head nav a {
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.site-head nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-head nav a {
  color: var(--mute);
  transition: color 0.15s ease;
}

.site-head nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mute);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--accent);
}

/* ---------- shared section anatomy ---------- */

.marker {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

main > section {
  padding-block: clamp(4rem, 10vh, 6.5rem);
  scroll-margin-top: 2rem;
}

main > section + section {
  border-top: 1px solid var(--line);
}

h2 {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

h2 .marker {
  margin-right: 1rem;
  text-transform: none;
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(5rem, 16vh, 9rem);
}

.hero .marker {
  margin-bottom: 2.5rem;
}

h1 {
  font-family: "Avenir Next Condensed", "Barlow Condensed", var(--sans);
  font-size: clamp(4rem, 15vw, 9rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.h1-accent {
  color: var(--accent);
}

.hero .role {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mute);
  margin-top: 1.75rem;
}

.hero .lede {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 3.5rem;
}

.hero .lede span {
  color: var(--mute);
}

/* ---------- film ---------- */

.section-intro {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  max-width: 26em;
  margin-bottom: 3.5rem;
}

.credits {
  list-style: none;
  padding: 0;
}

.credits li {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--line);
}

.credits li:first-child {
  border-top: 1px solid var(--line);
}

.credits .yr,
.credits .part {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mute);
}

.credits .title {
  font-weight: 500;
}

.credits .part {
  text-align: right;
}

.more {
  margin-top: 2rem;
}

.more a,
.elsewhere a {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mute);
  transition: color 0.15s ease;
}

.more a:hover,
.elsewhere a:hover {
  color: var(--accent);
}

/* ---------- systems / contact ---------- */

.statement {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  max-width: 24em;
}

.body-copy {
  margin-top: 1.5rem;
  max-width: 36em;
  color: var(--mute);
}

.punch {
  margin-top: 1.5rem;
  color: var(--accent);
}

/* ---------- notes ---------- */

.notes-list {
  list-style: none;
  padding: 0;
}

.notes-list li {
  border-bottom: 1px solid var(--line);
}

.notes-list li:first-child {
  border-top: 1px solid var(--line);
}

.notes-list a {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.875rem;
}

.notes-list .src,
.notes-list .yr {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mute);
}

.notes-list .title {
  font-weight: 500;
}

.notes-list a:hover .title {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

/* ---------- contact ---------- */

.email-row {
  margin-top: 3rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

.email {
  font-size: clamp(1.125rem, 2.5vw, 1.3125rem);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.15s ease;
}

.email:hover {
  text-decoration-color: var(--accent);
}

.copy {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--mute);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.copy:hover,
.copy.did-copy {
  color: var(--accent);
}

.elsewhere {
  margin-top: 2rem;
  display: flex;
  gap: 1.25rem;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
}

footer p {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--mute);
}

/* ---------- load reveal ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* transform-only: the h1 is the LCP element and must stay painted from the
   first frame, or Chrome records no contentful paint for the whole page */
@keyframes rise-solid {
  from {
    transform: translateY(14px);
  }
  to {
    transform: none;
  }
}

.reveal {
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero .marker.reveal {
  animation-delay: 120ms;
}

.hero .role.reveal {
  animation-delay: 230ms;
}

.hero .lede.reveal {
  animation-delay: 340ms;
}

.reveal-solid {
  animation: rise-solid 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal-solid {
    animation: none;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 600px) {
  .credits li,
  .notes-list a {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title title"
      "yr part";
    row-gap: 0.25rem;
  }

  .credits .title,
  .notes-list .title {
    grid-area: title;
  }

  .credits .yr,
  .notes-list .src {
    grid-area: yr;
  }

  .credits .part,
  .notes-list .yr {
    grid-area: part;
  }
}
