:root {
  --ink: #0c0c0b;
  --paper: #f4f0e8;
  --paper-2: #e8dfd1;
  --muted: #766f63;
  --line: rgba(12, 12, 11, 0.16);
  --gold: #b98b52;
  --sage: #6d7c6f;
  --clay: #a25e47;
  --white: #fffaf1;
  --shadow: 0 28px 90px rgba(12, 12, 11, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  opacity: 0.035;
  background-image: radial-gradient(circle at 20% 10%, #000 0 1px, transparent 1px);
  background-size: 9px 9px;
}

.site-header {
  position: fixed;
  inset: 18px 18px auto;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 88px;
  padding: 0 20px;
  border: 1px solid rgba(42, 35, 24, 0.16);
  background-color: #f4efe4;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(232, 224, 207, 0.18)),
    url("../images/header-paper.png");
  background-size: auto, cover;
  background-position: center;
  color: #14110d;
  box-shadow: 0 18px 48px rgba(12, 11, 9, 0.12);
  backdrop-filter: blur(10px);
}

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

.brand-logo {
  display: block;
  width: auto;
  height: clamp(62px, 6vw, 78px);
  max-width: min(32vw, 340px);
  object-fit: contain;
}

.brand small,
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.main-nav {
  justify-self: end;
  display: flex;
  gap: 26px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.main-nav a {
  color: rgba(20, 17, 13, 0.72);
  transition: color 0.25s ease;
}

.main-nav a:hover {
  color: #9b6b2e;
}

.menu-button {
  display: none;
}

.panel {
  position: relative;
  padding: 120px clamp(20px, 5vw, 72px);
}

.hero {
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #050505;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-style: preserve-3d;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  transform: scale(1.04);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.9), rgba(5, 5, 5, 0.25) 54%, rgba(5, 5, 5, 0.72)),
    linear-gradient(0deg, rgba(5, 5, 5, 0.72), transparent 34%);
}

.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(255, 255, 255, 0.055) 10px);
  mix-blend-mode: overlay;
  opacity: 0.25;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: end;
  width: min(100%, 1480px);
  margin: 0 auto;
  padding-top: 140px;
}

.hero-copy h1,
.statement h2,
.section-head h2,
.contact h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.9;
}

.hero-copy h1 {
  max-width: 980px;
  margin-top: 18px;
  font-size: clamp(58px, 10vw, 156px);
}

.hero-text {
  max-width: 670px;
  margin: 28px 0 0;
  color: rgba(255, 250, 241, 0.76);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  padding: 0 22px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.button:hover {
  transform: translateY(-2px);
}

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

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

.button.primary:hover,
.hero .button.primary:hover {
  background: var(--gold);
  color: var(--white);
}

.button.ghost {
  border-color: rgba(255, 250, 241, 0.5);
  color: var(--white);
}

.button.ghost:hover {
  border-color: var(--gold);
  background: var(--gold);
}

.hero-console {
  border: 1px solid rgba(255, 250, 241, 0.24);
  background: rgba(255, 250, 241, 0.08);
  backdrop-filter: blur(16px);
}

.hero-console div {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-bottom: 1px solid rgba(255, 250, 241, 0.18);
}

.hero-console div:last-child {
  border-bottom: 0;
}

.metric {
  font-family: Georgia, serif;
  font-size: 48px;
  line-height: 1;
}

.hero-console small {
  color: rgba(255, 250, 241, 0.62);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scene-strip {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(100%, 1480px);
  margin: 48px auto 0;
}

.scene-dot,
.filter {
  min-height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 0 16px;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scene-dot {
  border-color: rgba(255, 250, 241, 0.28);
  color: rgba(255, 250, 241, 0.7);
}

.scene-dot.active,
.filter.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.statement {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 44px;
  border-bottom: 1px solid var(--line);
}

.statement h2,
.section-head h2,
.contact h2 {
  max-width: 960px;
  font-size: clamp(44px, 7vw, 104px);
}

.statement p:last-child,
.section-head p,
.contact-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.project-card {
  grid-column: span 4;
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #111;
  color: var(--white);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.project-card:nth-child(5n + 2) {
  grid-column: span 8;
}

.project-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s ease, filter 0.75s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
}

.project-card:hover img {
  transform: scale(1.07);
  filter: saturate(1.08);
}

.project-meta {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 24px;
}

.project-meta small {
  color: rgba(255, 250, 241, 0.66);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-meta h3 {
  max-width: 620px;
  margin: 10px 0 12px;
  font-family: Georgia, serif;
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 500;
  line-height: 0.95;
}

.project-meta p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 250, 241, 0.72);
  line-height: 1.6;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.service {
  min-height: 300px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service span,
.process-step strong {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.service h3 {
  margin: 68px 0 18px;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.service p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.process {
  background: var(--ink);
  color: var(--white);
}

.process .section-head p {
  color: rgba(255, 250, 241, 0.62);
}

.process-rail {
  display: grid;
  gap: 1px;
  background: rgba(255, 250, 241, 0.2);
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  min-height: 86px;
  padding: 0 24px;
  background: var(--ink);
}

.process-step span {
  font-family: Georgia, serif;
  font-size: clamp(28px, 4vw, 54px);
}

.contact {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  outline: none;
  padding: 15px 16px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185, 139, 82, 0.18);
}

.wide {
  grid-column: 1 / -1;
}

.trap {
  display: none;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--clay);
}

.form-status.success {
  color: var(--sage);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.94);
  color: var(--white);
}

.modal.open {
  display: grid;
}

.modal figure {
  width: 100vw;
  height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  padding: 58px 84px 0;
}

.modal img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.modal figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.modal figcaption strong {
  font-family: Georgia, serif;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 500;
}

.modal figcaption span,
.modal figcaption small {
  color: rgba(255, 250, 241, 0.62);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.modal-close,
.modal-nav {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  cursor: pointer;
  min-height: 46px;
  padding: 0 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modal-close {
  top: 18px;
  right: 18px;
}

.modal-nav {
  top: 50%;
  transform: translateY(-50%);
}

.modal-nav.prev {
  left: 18px;
}

.modal-nav.next {
  right: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    inset: 10px 10px auto;
    min-height: 74px;
  }

  .brand-logo {
    height: clamp(50px, 14vw, 58px);
    max-width: 58vw;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    position: absolute;
    inset: calc(100% + 8px) 0 auto;
    display: grid;
    gap: 0;
    border: 1px solid rgba(42, 35, 24, 0.14);
    background-color: #f4efe4;
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(232, 224, 207, 0.18)),
      url("../images/header-paper.png");
    background-size: auto, cover;
    background-position: center;
    box-shadow: 0 18px 42px rgba(12, 11, 9, 0.14);
    padding: 14px 20px 22px;
  }

  .main-nav.open a {
    padding: 14px 0;
  }

  .menu-button {
    display: grid;
    gap: 6px;
    border: 0;
    background: transparent;
    padding: 10px;
  }

  .menu-button span {
    width: 24px;
    height: 2px;
    background: #14110d;
  }

  .hero-grid,
  .statement,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-console {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-console div {
    border-bottom: 0;
    border-right: 1px solid rgba(255, 250, 241, 0.18);
  }

  .hero-console div:last-child {
    border-right: 0;
  }

  .project-card,
  .project-card:nth-child(5n + 2) {
    grid-column: span 6;
  }

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

@media (max-width: 640px) {
  .panel {
    padding: 88px 18px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 17vw, 76px);
  }

  .hero-console {
    grid-template-columns: 1fr;
  }

  .hero-console div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 250, 241, 0.18);
  }

  .portfolio-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card:nth-child(5n + 2),
  .wide {
    grid-column: 1;
  }

  .project-card {
    min-height: 360px;
  }

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

  .modal-nav {
    display: none;
  }

  .modal figure {
    padding: 58px 14px 0;
  }

  .modal figcaption {
    display: grid;
  }
}
