:root {
  --ink: #1c1c1c;
  --paper: #f4f0e8;
  --warm: #d9d9d9;
  --gold: #c2a47e;
  --wood: #70513a;
  --charcoal: #111111;
  --line: rgba(28, 28, 28, 0.14);
  --muted: rgba(28, 28, 28, 0.66);
  --white: #ffffff;
  --shadow: 0 18px 60px rgba(17, 21, 21, 0.18);
  font-family:
    Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  color: var(--white);
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(246, 241, 232, 0.92);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  color: var(--gold);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.92rem;
  font-weight: 650;
}

.main-nav a {
  opacity: 0.86;
}

.main-nav a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-image,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(9, 10, 9, 0.82) 0%, rgba(9, 10, 9, 0.52) 42%, rgba(9, 10, 9, 0.16) 100%),
    linear-gradient(0deg, rgba(9, 10, 9, 0.32), transparent 45%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 40px));
  margin-left: clamp(20px, 7vw, 96px);
  padding-top: 80px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--warm);
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 22px;
  font-size: clamp(3.5rem, 8vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(2.05rem, 4.8vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-copy {
  max-width: 610px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid currentColor;
  font-weight: 760;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.section,
.band,
.media-band,
.contact {
  padding: clamp(72px, 10vw, 132px) clamp(20px, 4vw, 56px);
}

.page-main {
  padding-top: 76px;
}

.section-heading {
  margin-bottom: clamp(32px, 5vw, 58px);
}

.section-grid,
.split,
.media-band,
.proof {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 7vw, 96px);
  align-items: start;
}

.intro {
  background: var(--white);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.24);
}

.intro p:last-child {
  max-width: 620px;
  margin-top: 42px;
  font-size: 1.18rem;
}

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

.service-card {
  min-height: 320px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.service-card span,
.timeline-item span {
  display: inline-block;
  margin-bottom: 60px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 850;
}

.service-card p {
  margin-bottom: 0;
}

.sticky-heading {
  position: sticky;
  top: 110px;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item span {
  margin-bottom: 0;
}

.timeline-item p {
  max-width: 620px;
  margin-bottom: 0;
}

.media-band {
  color: var(--white);
  background: var(--charcoal);
}

.media-band p {
  color: rgba(255, 255, 255, 0.72);
}

.media-band .eyebrow {
  color: var(--warm);
}

.portfolio {
  background: var(--paper);
}

.carousel-heading,
.portfolio-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
}

.carousel-heading p:last-child {
  max-width: 560px;
  margin-bottom: 8px;
}

.project-carousel {
  display: grid;
  grid-auto-columns: minmax(280px, 35vw);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding: 0 0 14px;
  scroll-snap-type: x proximity;
}

.carousel-card {
  position: relative;
  min-height: clamp(390px, 54vw, 560px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  scroll-snap-align: start;
  box-shadow: 0 14px 46px rgba(17, 17, 17, 0.16);
}

.carousel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18));
}

.carousel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.carousel-card:hover img {
  transform: scale(1.035);
}

.carousel-card span,
.carousel-card h3,
.carousel-card p {
  position: relative;
  z-index: 1;
  margin-inline: 22px;
}

.carousel-card span {
  width: fit-content;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.carousel-card h3 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 3vw, 2.45rem);
  line-height: 1;
}

.carousel-card p {
  max-width: 360px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  cursor: pointer;
}

.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.project-groups {
  display: grid;
  gap: clamp(52px, 8vw, 96px);
}

.project-group {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
}

.project-group[hidden] {
  display: none;
}

.project-group-heading {
  position: sticky;
  top: 104px;
}

.project-group-heading h3 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.18;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e8e0d2;
}

.project-card div {
  padding: 14px;
}

.project-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card h4 {
  margin: 0;
  font-size: 1rem;
}

.media-copy {
  max-width: 650px;
}

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

.media-list span,
.deliverables li {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.proof {
  background: var(--white);
}

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

.deliverables li {
  border-color: var(--line);
  background: var(--paper);
}

.estimate {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0)),
    var(--paper);
}

.estimate-page h1,
.gallery-page h1 {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 7.2rem);
  line-height: 0.92;
}

.estimate-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
}

.estimate-heading p:last-child {
  max-width: 520px;
  margin-bottom: 8px;
}

.estimate-form {
  display: grid;
  gap: 18px;
  max-width: 1180px;
}

.estimate-form fieldset {
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 36px rgba(17, 17, 17, 0.06);
}

.estimate-form legend {
  padding: 0 8px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.estimate-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.estimate-form input,
.estimate-form select,
.estimate-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(28, 28, 28, 0.2);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
}

.estimate-form textarea {
  min-height: 116px;
  margin-top: 16px;
  resize: vertical;
  line-height: 1.55;
}

.dynamic-fields {
  margin-top: 14px;
}

.estimate-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--charcoal);
  color: var(--white);
}

.estimate-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.estimate-footer a {
  color: var(--gold);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.gallery-page {
  background: var(--paper);
}

.gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(34px, 5vw, 62px);
}

.gallery-hero p:last-child {
  max-width: 520px;
  margin-bottom: 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e8e0d2;
}

.gallery-card div {
  padding: 16px;
}

.gallery-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-card h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button.dark,
.button.secondary.dark {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
}

.contact {
  background: var(--charcoal);
  color: var(--white);
}

.contact-inner {
  width: min(860px, 100%);
}

.contact p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.7);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.contact .button {
  margin-top: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(20px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.74);
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ai-chat {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 40;
  font-family: inherit;
}

.chat-launcher {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  box-shadow: var(--shadow);
  font: inherit;
  font-weight: 850;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #f9f5ed;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  color: var(--white);
  background: var(--charcoal);
}

.chat-header .eyebrow {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.66rem;
}

.chat-header h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.1;
}

.chat-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 1.3rem;
  cursor: pointer;
}

.chat-messages {
  display: flex;
  height: 320px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
}

.chat-message {
  max-width: 88%;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}

.chat-message.user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--white);
}

.ai-chat.is-loading .chat-messages::after {
  content: "Typing...";
  width: fit-content;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.84rem;
}

.chat-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 14px;
}

.chat-prompts button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.chat-form textarea {
  width: 100%;
  min-height: 42px;
  max-height: 130px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  font: inherit;
  line-height: 1.35;
}

.chat-form button {
  min-height: 42px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--gold);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.chat-form button:disabled {
  cursor: wait;
  opacity: 0.62;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    color: var(--ink);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

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

  .section-grid,
  .split,
  .media-band,
  .proof,
  .carousel-heading,
  .estimate-heading,
  .gallery-hero,
  .portfolio-heading,
  .project-group {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }

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

  .portfolio-filters {
    justify-content: flex-start;
  }

  .project-group-heading {
    position: static;
  }

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

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

  .project-carousel {
    grid-auto-columns: minmax(270px, 76vw);
  }

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

  .service-card {
    min-height: 240px;
  }

  .service-card span {
    margin-bottom: 36px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-inline: 16px;
  }

  .hero {
    min-height: 84svh;
  }

  .hero-image {
    object-position: 62% center;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-inline: 16px;
  }

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

  h2 {
    font-size: 2.2rem;
  }

  .hero-actions,
  .button,
  .media-list,
  .deliverables {
    width: 100%;
  }

  .button {
    min-width: 0;
  }

  .media-list,
  .deliverables,
  .form-grid,
  .gallery-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .estimate-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
  }

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

  .ai-chat {
    right: 12px;
    bottom: 12px;
  }

  .chat-panel {
    width: calc(100vw - 24px);
  }

  .chat-messages {
    height: min(320px, 52vh);
  }
}
