:root {
  --bg: #f1ebe2;
  --fg: #1c1814;
  --muted: #6a6158;
  --subtle: #8a8176;
  --surface: #e6ddd1;
  --accent: #6b4f3a;
  --accent-fg: #f1ebe2;
  --border: color-mix(in oklab, #1c1814 14%, transparent);
  --overlay: color-mix(in oklab, #1c1814 46%, transparent);
  --paper: #f1ebe2;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --radius: 0.5rem;
  --max: 72rem;
  --text-xl: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.4vw, 3.25rem);
  --text-3xl: clamp(2.75rem, 1.4rem + 4vw, 5.25rem);
}

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

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

#work,
#approach,
#about,
#contact {
  scroll-margin-top: 4.5rem;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 500;
  margin: 0;
}

p {
  text-wrap: pretty;
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button:not(:disabled),
[role="button"]:not(:disabled) {
  cursor: pointer;
}

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

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 768px) {
  .wrap {
    width: min(100% - 4rem, var(--max));
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .wordmark {
    font-size: 1.25rem;
  }
}

.nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--fg);
}

.nav a:focus-visible,
.btn:focus-visible,
.link:focus-visible,
.wordmark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 0;
  border-radius: var(--radius);
  padding: 0.5rem 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--fg);
  color: var(--bg);
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.8;
}

.btn-disabled,
.btn:disabled {
  opacity: 0.38;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 0;
  padding: 0.5rem 0.875rem;
}

/* Hero
   Crop anchor: --hero-pos: x% y%;
   x is left/right, y is top/bottom.
   Optional --hero-pos-mobile for the phone crop.
   Set on .hero or .project-hero, e.g.
   style="--hero-pos: 62% 50%; --hero-pos-mobile: 80% 50%;" */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  min-height: 36rem;
  --hero-pos: 35% 45%;
}

.hero-img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-pos);
}

@media (max-width: 767px) {
  .hero-img {
    object-position: var(--hero-pos-mobile, var(--hero-pos));
  }
}

.hero-overlay {
  background: var(--overlay);
}

.hero-copy {
  position: relative;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  padding-block: 4rem;
}

@media (min-width: 768px) {
  .hero-copy {
    width: min(100% - 4rem, var(--max));
  }
}

.kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.hero .kicker {
  color: color-mix(in oklab, var(--paper) 80%, transparent);
}

.hero h1 {
  margin-top: 1rem;
  max-width: 48rem;
  font-size: var(--text-3xl);
  color: var(--paper);
}

.hero p {
  margin-top: 1.25rem;
  max-width: 36rem;
  color: color-mix(in oklab, var(--paper) 85%, transparent);
}

@media (min-width: 768px) {
  .hero p {
    font-size: 1.25rem;
  }
}

/* Work */
.section {
  padding-block: 4rem;
}

@media (min-width: 768px) {
  .section {
    padding-block: 6rem;
  }
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-head h2,
.band h2,
.about h2,
.contact h2 {
  font-size: var(--text-2xl);
}

.lede {
  max-width: 28rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.work-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.work-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}

.work-grid img.work-cover-top {
  object-position: 50% 0%;
}

.kind {
  margin-top: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--subtle);
}

.work-grid h3 {
  margin-top: 0.25rem;
  font-size: var(--text-xl);
}

.place,
.logline {
  font-size: 0.875rem;
  color: var(--muted);
}

.logline {
  margin-top: 0.75rem;
}

.work-grid .btn {
  margin-top: 1.25rem;
}

/* Approach */
.band {
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.principles {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .principles {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.principles .kicker {
  letter-spacing: 0.18em;
  color: var(--subtle);
}

.principles h3 {
  margin-top: 0.75rem;
  font-size: var(--text-xl);
}

.principles p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.notes {
  display: grid;
  gap: 2rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

@media (min-width: 768px) {
  .notes {
    grid-template-columns: 1fr 1fr;
  }
}

/* About */
.about-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 3rem;
  }

  .about-grid img {
    grid-column: span 5;
  }

  .about-copy {
    grid-column: span 7;
    padding-top: 1rem;
  }
}

.about-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: var(--radius);
}

.about .kicker {
  letter-spacing: 0.18em;
  color: var(--subtle);
}

.about h2 {
  margin-top: 0.75rem;
}

.about-copy .stack {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--muted);
}

.link {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border);
}

.about em {
  font-style: italic;
  color: var(--fg);
}

/* Contact */
.contact {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact .lede {
  margin-top: 1rem;
}

.hint {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--subtle);
}

form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.form-note {
  margin: 0;
  font-size: 0.875rem;
}

.form-note[hidden] {
  display: none;
}

.form-ok {
  color: var(--accent);
}

.form-bad {
  color: #8f3d32;
}

label {
  font-size: 0.875rem;
}

input,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  outline: none;
}

input {
  min-height: 2.75rem;
  padding-inline: 0.75rem;
}

textarea {
  padding: 0.75rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-block: 2.5rem;
}

@media (min-width: 768px) {
  .site-footer .wrap {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.site-footer .wordmark {
  font-size: 1.25rem;
}

.site-footer p + p {
  margin-top: 0.5rem;
  max-width: 24rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-cv {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Project page */
.project-hero {
  --hero-pos: 50% 50%;
}

.project-hero img {
  width: 100%;
  height: min(72vh, 40rem);
  object-fit: cover;
  object-position: var(--hero-pos);
}

@media (max-width: 767px) {
  .project-hero img {
    object-position: var(--hero-pos-mobile, var(--hero-pos));
  }
}

.crumb {
  font-size: 0.875rem;
  color: var(--muted);
}

.crumb a:hover,
.crumb a:focus-visible {
  color: var(--fg);
}

.project-kicker {
  margin-top: 2rem;
  letter-spacing: 0.18em;
  color: var(--subtle);
}

.project-title {
  margin-top: 0.75rem;
  font-size: var(--text-2xl);
}

.project-copy {
  margin-top: 1.5rem;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--muted);
}

.project-facts {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .project-facts {
    grid-template-columns: 1fr 1fr;
  }
}

.project-facts h2 {
  font-size: var(--text-xl);
}

.project-facts p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.credits {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .credits {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.credits dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--subtle);
}

.credits dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.film {
  margin-top: 3rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}

.film iframe,
.film video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.stills-head {
  margin-top: 4rem;
  font-size: var(--text-xl);
}

.stills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .stills {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .stills:has(> :nth-child(2):last-child) {
    grid-template-columns: 1fr 1fr;
  }
}

.stills img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
