:root {
  color-scheme: light dark;
  --paper: #f4efe6;
  --paper-soft: #ebe3d5;
  --ink: #171615;
  --ink-muted: #5f5a52;
  --line: rgba(23, 22, 21, 0.18);
  --accent: #cf332c;
  --blue: #2156c8;
  --yellow: #f0c84f;
  --teal: #0b7669;
  --panel: rgba(244, 239, 230, 0.82);
  --radius: 2px;
  --shadow: 0 24px 60px rgba(23, 22, 21, 0.14);
  --font-sans: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191817;
    --paper-soft: #24211d;
    --ink: #f3eee6;
    --ink-muted: #b8afa4;
    --line: rgba(243, 238, 230, 0.18);
    --accent: #ef5148;
    --blue: #6b8cff;
    --yellow: #f2d268;
    --teal: #38b7a5;
    --panel: rgba(25, 24, 23, 0.82);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  }

  .ip-list li:nth-child(1),
  .ip-list li:nth-child(2),
  .ip-list li:nth-child(4) {
    color: #171615;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 94%, rgba(207, 51, 44, 0.12) 94% 100%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  z-index: 4;
  opacity: 0.28;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(207, 51, 44, 0.16) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 20%, rgba(33, 86, 200, 0.13) 0 1px, transparent 1.5px);
  background-size: 12px 12px, 18px 18px;
  mix-blend-mode: multiply;
}

body::after {
  z-index: 5;
  opacity: 0.1;
  background-image: linear-gradient(rgba(23, 22, 21, 0.9) 1px, transparent 1px);
  background-size: 100% 6px;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.nav-cta,
.button,
.text-button,
.dialog-close {
  font-weight: 700;
  letter-spacing: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: inline-block;
  width: 14px;
  height: 28px;
  background:
    linear-gradient(var(--accent) 0 33%, var(--yellow) 33% 66%, var(--blue) 66% 100%);
  box-shadow: 5px 5px 0 var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  min-width: 74px;
  margin-left: clamp(18px, 3vw, 34px);
  padding: 9px 16px;
  color: var(--paper);
  text-align: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(380px, 32vw, 560px);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
  min-height: min(820px, calc(100dvh - 72px));
  padding: clamp(40px, 5vw, 70px) clamp(16px, 4vw, 56px);
}

.hero-copy {
  align-self: start;
  max-width: 720px;
  padding-top: clamp(108px, 13vh, 150px);
}

.kicker {
  margin: 0 0 24px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(3.15rem, 7vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-subcopy {
  max-width: 520px;
  margin-bottom: 32px;
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-actions,
.contact-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:active,
.nav-cta:active,
.text-button:active,
.dialog-close:active {
  transform: translateY(1px);
}

.button-primary {
  color: var(--paper);
  background: var(--ink);
}

.button-primary:hover {
  color: var(--ink);
  background: var(--yellow);
}

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

.button-secondary:hover {
  background: rgba(207, 51, 44, 0.14);
}

.hero-poster {
  position: relative;
  align-self: center;
  justify-self: end;
  width: auto;
  max-width: 100%;
  height: clamp(560px, 66dvh, 680px);
  aspect-ratio: 1440 / 1840;
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.hero-poster::before {
  position: absolute;
  inset: 6% -5% -5% 8%;
  z-index: -1;
  background: var(--ink);
  content: "";
}

.hero-poster img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1440 / 1840;
  object-fit: cover;
  border-radius: var(--radius);
}

.ip-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1.22fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 5vw, 58px) clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(240, 200, 79, 0.2), transparent 52%),
    var(--paper);
}

.ip-strip-copy h2 {
  max-width: 12ch;
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.8vw, 4.1rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.ip-strip-copy p {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
}

.ip-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ip-list li {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 14px 16px;
  overflow-wrap: break-word;
  font-size: clamp(1.08rem, 2.1vw, 2.05rem);
  font-weight: 800;
  line-height: 0.94;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
}

.ip-list li:nth-child(1) {
  color: #fff7e8;
  background:
    radial-gradient(circle, rgba(23, 22, 21, 0.22) 0 1px, transparent 1.2px),
    var(--accent);
  background-size: 8px 8px, auto;
}

.ip-list li:nth-child(2) {
  color: #fff7e8;
  background:
    radial-gradient(circle, rgba(23, 22, 21, 0.2) 0 1px, transparent 1.2px),
    var(--blue);
  background-size: 8px 8px, auto;
}

.ip-list li:nth-child(3) {
  color: #171615;
  background:
    radial-gradient(circle, rgba(23, 22, 21, 0.18) 0 1px, transparent 1.2px),
    var(--yellow);
  background-size: 8px 8px, auto;
}

.ip-list li:nth-child(4) {
  color: #fff7e8;
  background:
    radial-gradient(circle, rgba(23, 22, 21, 0.2) 0 1px, transparent 1.2px),
    var(--teal);
  background-size: 8px 8px, auto;
}

.ip-list li:nth-child(5) {
  color: var(--ink);
  background:
    radial-gradient(circle, rgba(207, 51, 44, 0.2) 0 1px, transparent 1.2px),
    var(--paper);
  background-size: 8px 8px, auto;
}

.ip-list li:nth-child(6) {
  color: var(--paper);
  background:
    radial-gradient(circle, rgba(244, 239, 230, 0.2) 0 1px, transparent 1.2px),
    var(--ink);
  background-size: 8px 8px, auto;
}

.work-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  mix-blend-mode: multiply;
}

.work-card::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(23, 22, 21, 0.52) 0 1px, transparent 1.2px);
  background-size: 7px 7px;
  content: "";
  mix-blend-mode: overlay;
  opacity: 0.42;
}

.work-section,
.method-section,
.contact-section {
  padding: clamp(76px, 10vw, 132px) clamp(16px, 4vw, 56px);
}

.section-head {
  max-width: 660px;
  margin-bottom: clamp(28px, 5vw, 56px);
}

.section-head h2,
.method-copy h2,
.contact-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.section-head p,
.method-copy p,
.contact-panel p {
  max-width: 580px;
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(340px, auto);
  gap: clamp(14px, 2vw, 24px);
}

.work-card {
  position: relative;
  display: grid;
  grid-column: span 2;
  min-height: 470px;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.work-card-large {
  grid-column: span 4;
}

.work-card-wide {
  grid-column: span 4;
  min-height: 380px;
}

.work-card-full {
  grid-column: span 6;
  min-height: 430px;
}

.work-card.poster-missing {
  background:
    radial-gradient(circle at 18% 22%, rgba(207, 51, 44, 0.55) 0 16%, transparent 17%),
    radial-gradient(circle at 72% 42%, rgba(33, 86, 200, 0.48) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--ink), #34302a);
}

.work-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.25);
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card img.image-missing {
  opacity: 0;
}

.work-card:nth-child(1)::before {
  background: rgba(207, 51, 44, 0.52);
}

.work-card:nth-child(2)::before {
  background: rgba(33, 86, 200, 0.54);
}

.work-card:nth-child(3)::before {
  background: rgba(240, 200, 79, 0.58);
}

.work-card:nth-child(4)::before {
  background: rgba(15, 138, 122, 0.52);
}

.work-card:nth-child(5)::before {
  background: rgba(207, 51, 44, 0.34);
}

.work-card-copy {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: end;
  gap: 10px;
  min-height: 100%;
  padding: clamp(18px, 3vw, 34px);
  background: linear-gradient(180deg, transparent 18%, rgba(23, 22, 21, 0.82) 100%);
}

.work-card-copy p {
  margin-bottom: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.work-card-copy h3 {
  max-width: min(12ch, 100%);
  margin-bottom: 0;
  font-size: clamp(2rem, 4.4vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.work-card:hover img {
  transform: scale(1.04);
  filter: grayscale(0.35) contrast(1.35);
}

.text-button {
  justify-self: start;
  margin-top: 8px;
  padding: 8px 12px;
  color: var(--paper);
  font: inherit;
  background: rgba(23, 22, 21, 0.2);
  border: 1px solid rgba(244, 239, 230, 0.7);
  border-radius: var(--radius);
  cursor: pointer;
}

.marquee-band {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--accent);
}

.marquee-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: clamp(32px, 7vw, 96px);
  padding: 18px 0;
  color: var(--paper);
  font-size: clamp(1.8rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.method-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
}

.method-copy {
  position: sticky;
  top: 112px;
}

.method-list {
  display: grid;
  gap: 16px;
}

.method-item {
  display: grid;
  grid-template-columns: minmax(92px, 0.28fr) minmax(0, 1fr);
  gap: 24px;
  padding: clamp(18px, 3vw, 32px) 0;
  border-top: 1px solid var(--line);
}

.method-item:last-child {
  border-bottom: 1px solid var(--line);
}

.method-item span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.method-item p {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.16;
}

.contact-section {
  padding-top: 0;
}

.contact-panel {
  justify-content: space-between;
  gap: clamp(20px, 5vw, 60px);
  padding: clamp(24px, 5vw, 58px);
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(207, 51, 44, 0.38), transparent 42%),
    var(--ink);
  border-radius: var(--radius);
}

.contact-panel h2,
.contact-panel p {
  margin-bottom: 0;
}

.contact-panel p {
  color: rgba(244, 239, 230, 0.78);
}

.contact-panel .button-primary {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(16px, 4vw, 56px);
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  font-weight: 700;
}

.work-dialog {
  width: min(1120px, calc(100vw - 28px));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 28px 120px rgba(0, 0, 0, 0.35);
}

.work-dialog::backdrop {
  background: rgba(23, 22, 21, 0.64);
  backdrop-filter: blur(5px);
}

.dialog-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 8px 12px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.dialog-media {
  position: relative;
  min-height: min(64vw, 660px);
  background: var(--ink);
}

.dialog-media video,
.dialog-media img,
.dialog-media iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.dialog-media iframe {
  border: 0;
}

.dialog-media video[hidden],
.dialog-media img[hidden],
.dialog-media iframe[hidden],
.dialog-drive-link[hidden] {
  display: none;
}

.dialog-empty {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100% - 32px));
  margin: 0;
  padding: 10px 12px;
  color: var(--paper);
  background: rgba(23, 22, 21, 0.84);
  border-radius: var(--radius);
}

.dialog-copy {
  display: grid;
  align-content: end;
  gap: 14px;
  padding: clamp(22px, 4vw, 44px);
}

#dialog-type {
  margin-bottom: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

#dialog-title {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  line-height: 0.96;
}

#dialog-description {
  margin-bottom: 0;
  color: var(--ink-muted);
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .marquee-track {
    animation: marquee 30s linear infinite;
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--paper);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .work-dialog::backdrop {
    backdrop-filter: none;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 980px) {
  .hero,
  .ip-strip,
  .method-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-poster {
    width: min(100%, 640px);
    max-width: 680px;
    height: auto;
  }

  .method-copy {
    position: static;
  }

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

  .work-card,
  .work-card-large,
  .work-card-wide,
  .work-card-full {
    grid-column: span 1;
  }

  .dialog-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 66px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    margin-left: 12px;
  }

  .hero {
    padding-top: 30px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 5rem);
  }

  .hero-poster {
    width: 100%;
    max-width: 100%;
    transform: rotate(-1deg);
  }

  .hero-poster::before {
    right: 0;
    bottom: 0;
  }

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

  .ip-list li {
    min-height: 68px;
    font-size: clamp(1.2rem, 7vw, 2rem);
  }

  .work-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .work-card,
  .work-card-large,
  .work-card-wide,
  .work-card-full {
    min-height: 430px;
  }

  .method-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact-panel {
    align-items: flex-start;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .brand span:last-child {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-cta {
    min-width: 66px;
    padding-inline: 12px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ip-list {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

}
