:root {
  color-scheme: dark;
  --bg: #22160b;
  --bg-2: #22160b;
  --fg: #e8d9b8;
  --muted: rgba(232, 217, 184, 0.66);
  --line: rgba(232, 217, 184, 0.16);
  --line-strong: rgba(232, 217, 184, 0.34);
  --accent: #9faf98;
  --shadow: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

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

.site {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  transition: background 0.5s ease, color 0.5s ease;
}

.site.light {
  color-scheme: light;
  --bg: #e8d9b8;
  --bg-2: #dccaa4;
  --fg: #2c1e14;
  --muted: rgba(44, 30, 20, 0.66);
  --line: rgba(44, 30, 20, 0.18);
  --line-strong: rgba(44, 30, 20, 0.34);
  --shadow: rgba(44, 30, 20, 0.16);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 64px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: transform 0.4s ease, background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-color: var(--line);
  backdrop-filter: blur(14px) saturate(120%);
}

.site-header.is-hidden {
  transform: translateY(-101%);
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}

.brand-name,
.footer-brand {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-tagline {
  margin-top: 6px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0;
}

.main-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0;
}

.main-nav a,
.footer-links a {
  text-decoration: none;
  color: var(--fg);
  opacity: 0.88;
}

.theme-toggle,
.contact-pill,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0 18px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.contact-pill,
.button.primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.main-nav .contact-pill {
  color: var(--bg);
  opacity: 1;
}

.button.secondary {
  background: transparent;
  color: var(--fg);
}

.section-pad {
  position: relative;
  z-index: 2;
  padding: 112px 64px;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding-top: 140px;
  padding-bottom: 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 72px;
  align-items: center;
}

.kicker,
.section-meta {
  margin: 0;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0;
}

.hero-copy .kicker {
  margin-bottom: 30px;
}

.hero-title,
.contact h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 96px;
  font-weight: 400;
  line-height: 0.96;
}

.hero-title span,
.about h2 span,
.contact h2 span {
  font-style: italic;
}

.hero-body {
  max-width: 44ch;
  margin: 32px 0 40px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.media-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-2);
  box-shadow: 0 24px 70px var(--shadow);
  cursor: none;
}

.hero-media {
  aspect-ratio: 16 / 10;
}

.featured-work {
  aspect-ratio: 21 / 9;
  margin-bottom: 18px;
}

.work-card {
  aspect-ratio: 4 / 3;
}

.media-frame video,
.media-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame video {
  filter: saturate(0.9) contrast(1.04);
}

.media-placeholder {
  background:
    radial-gradient(circle at 72% 18%, rgba(159, 175, 152, 0.18), transparent 35%),
    radial-gradient(circle at 18% 80%, rgba(232, 217, 184, 0.1), transparent 34%),
    repeating-linear-gradient(118deg, var(--line) 0 1px, transparent 1px 28px),
    var(--bg-2);
}

.diagonal-b {
  background:
    radial-gradient(circle at 30% 30%, rgba(159, 175, 152, 0.16), transparent 36%),
    repeating-linear-gradient(126deg, var(--line) 0 1px, transparent 1px 30px),
    var(--bg-2);
}

.diagonal-c {
  background:
    radial-gradient(circle at 55% 65%, rgba(232, 217, 184, 0.1), transparent 34%),
    repeating-linear-gradient(92deg, var(--line) 0 1px, transparent 1px 25px),
    var(--bg-2);
}

.media-frame figcaption,
.media-footer {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 11px;
}

.media-frame figcaption {
  top: 18px;
}

.media-footer {
  bottom: 18px;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(2px);
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid var(--fg);
}

.play-cursor {
  position: fixed;
  z-index: 30;
  left: 0;
  top: 0;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%) scale(0.7);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.play-cursor.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10px;
}

.scroll-cue span {
  width: 1px;
  height: 34px;
  background: var(--line-strong);
}

.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}

.marquee div {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 54px;
  animation: marquee 34s linear infinite;
  color: var(--muted);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 30px;
  white-space: nowrap;
}

.marquee i {
  opacity: 0.5;
  font-style: normal;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 54px;
}

.section-head h2,
.services h2,
.about h2,
.process h2 {
  margin: 18px 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 58px;
  font-weight: 400;
  line-height: 1;
}

.section-meta {
  text-align: right;
}

.work-caption {
  position: absolute;
  z-index: 2;
  left: 26px;
  right: 26px;
  bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.work-caption h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 54px;
  font-weight: 400;
  line-height: 0.96;
}

.work-caption p {
  margin: 0;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  text-align: right;
}

.work-caption.compact {
  left: 20px;
  right: 20px;
  bottom: 20px;
}

.work-caption.compact h3 {
  font-size: 34px;
}

.work-caption.compact p {
  font-size: 10px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.services {
  border-top: 1px solid var(--line);
}

.services-grid,
.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}

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

.service-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 26px 8px;
  border-top: 1px solid var(--line);
}

.service-row > span,
.process-card > span {
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 12px;
}

.service-row div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.service-row h3,
.process-card h3 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 34px;
  font-weight: 400;
}

.service-row p,
.about p,
.process-card p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.about {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.about h2 {
  margin-bottom: 26px;
  font-size: 48px;
  line-height: 1.08;
}

.about p + p {
  margin-top: 18px;
}

.stats-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stats-grid article,
.process-card {
  background: var(--bg);
  padding: 34px 28px;
}

.stats-grid strong {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 66px;
  font-weight: 400;
  line-height: 1;
}

.stats-grid span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 11px;
}

.process {
  border-top: 1px solid var(--line);
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
}

.process-card h3 {
  margin: 18px 0 14px;
  font-size: 30px;
}

.process-card p {
  margin-top: auto;
  font-size: 14px;
}

.contact {
  border-top: 1px solid var(--line);
}

.contact-grid {
  align-items: end;
}

.contact h2 {
  font-size: 104px;
}

.email-link {
  display: inline-block;
  margin-top: 36px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 30px;
  text-decoration: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form span {
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 11px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  background: transparent;
  color: var(--fg);
  padding: 10px 0;
  font-size: 16px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--line-strong);
}

.contact-form .button {
  align-self: flex-start;
  margin-top: 8px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 48px 64px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 11px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1100px) {
  .site-header,
  .section-pad,
  .site-footer {
    padding-left: 36px;
    padding-right: 36px;
  }

  .hero-grid,
  .services-grid,
  .about-grid,
  .contact-grid {
    gap: 48px;
  }

  .hero-title,
  .contact h2 {
    font-size: 72px;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .main-nav {
    max-width: 62vw;
    justify-content: flex-end;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .main-nav a:not(.contact-pill) {
    display: none;
  }

  .theme-toggle,
  .contact-pill,
  .button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 11px;
  }

  .hero {
    min-height: auto;
    padding-top: 132px;
  }

  .hero-grid,
  .services-grid,
  .about-grid,
  .contact-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-meta {
    text-align: left;
  }

  .featured-work {
    aspect-ratio: 16 / 10;
  }

  .service-row,
  .service-row div,
  .work-caption {
    display: block;
  }

  .service-row {
    grid-template-columns: 1fr;
  }

  .service-row h3,
  .work-caption p {
    margin-top: 10px;
    text-align: left;
  }

  .stats-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .scroll-cue,
  .play-cursor {
    display: none;
  }

  .media-frame {
    cursor: pointer;
  }
}

@media (max-width: 560px) {
  .site-header,
  .section-pad,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    max-width: 140px;
    font-size: 9px;
    line-height: 1.25;
  }

  .hero-title,
  .contact h2 {
    font-size: 50px;
  }

  .section-head h2,
  .services h2,
  .about h2,
  .process h2 {
    font-size: 38px;
  }

  .hero-body {
    font-size: 16px;
  }

  .media-frame figcaption,
  .media-footer {
    left: 14px;
    right: 14px;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
  }

  .work-caption h3 {
    font-size: 38px;
  }

  .work-caption.compact h3,
  .service-row h3,
  .process-card h3 {
    font-size: 28px;
  }

  .stats-grid strong {
    font-size: 54px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
