:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --paper-strong: #fffaf1;
  --ink: #1f2528;
  --muted: #5f676b;
  --line: rgba(31, 37, 40, 0.14);
  --graphite: #263238;
  --teal: #1d7f78;
  --teal-dark: #135c57;
  --coral: #d75f4f;
  --sun: #d39b2a;
  --mint: #dceee6;
  --blue: #496d93;
  --radius: 8px;
  --shadow: 0 20px 70px rgba(31, 37, 40, 0.16);
  --max-width: 1180px;
}

* {
  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;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.is-dialog-open {
  overflow: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px max(24px, calc((100vw - var(--max-width)) / 2));
  color: #fff;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(247, 244, 238, 0.94);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

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

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

.brand-text {
  white-space: nowrap;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a,
.header-action {
  border-radius: var(--radius);
  padding: 10px 13px;
  color: currentColor;
  font-weight: 700;
  font-size: 14px;
}

.main-nav a:hover,
.header-action:hover {
  background: rgba(255, 255, 255, 0.16);
}

.site-header.is-scrolled .main-nav a:hover,
.site-header.is-scrolled .header-action:hover {
  background: rgba(31, 37, 40, 0.07);
}

.header-action {
  border: 1px solid currentColor;
}

.hero {
  position: relative;
  min-height: 720px;
  height: 92svh;
  max-height: 820px;
  isolation: isolate;
  overflow: hidden;
}

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

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

.hero-overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(17, 21, 23, 0.8), rgba(17, 21, 23, 0.48) 44%, rgba(17, 21, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(31, 37, 40, 0.7), rgba(31, 37, 40, 0.02) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max-width), calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 84px;
  padding-bottom: 48px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f7b56c;
}

.hero h1 {
  width: min(760px, 100%);
  margin: 0;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy {
  width: min(640px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 18px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button-primary {
  background: var(--coral);
  color: #fff;
}

.button-primary:hover {
  background: #c84f42;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.48);
  color: #fff;
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-stats {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: auto 0 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-stats div {
  padding: 18px;
  background: rgba(17, 21, 23, 0.24);
}

.hero-stats dt {
  margin: 0 0 6px;
  color: #f7b56c;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.projects-section,
.services-section,
.process-section,
.contact-section {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 0.8fr);
  align-items: end;
  gap: 36px;
  margin-bottom: 30px;
}

.section-head h2,
.contact-copy h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-head p:not(.eyebrow),
.contact-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.project-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.filter-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.filter-button.is-active {
  background: var(--graphite);
  color: #fff;
}

.search-field {
  width: min(340px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-field input,
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  color: var(--ink);
  outline: none;
}

.search-field input {
  min-height: 46px;
  padding: 11px 13px;
}

.search-field input:focus,
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29, 127, 120, 0.16);
}

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

.project-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-strong);
  box-shadow: 0 10px 35px rgba(31, 37, 40, 0.08);
}

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--mint);
}

.project-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
    var(--media-bg, #dceee6);
}

.mock-window {
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(31, 37, 40, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fffaf1;
  box-shadow: 0 16px 42px rgba(31, 37, 40, 0.18);
}

.mock-bar {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: rgba(31, 37, 40, 0.08);
}

.mock-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.mock-bar span:nth-child(2) {
  background: var(--sun);
}

.mock-bar span:nth-child(3) {
  background: var(--teal);
}

.mock-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 12px;
  height: calc(100% - 26px);
  padding: 14px;
}

.mock-panel,
.mock-lines,
.mock-list {
  border-radius: 6px;
  background: rgba(31, 37, 40, 0.08);
}

.mock-panel {
  display: grid;
  grid-template-rows: 1fr 0.55fr;
  gap: 10px;
  padding: 12px;
}

.mock-panel::before,
.mock-panel::after,
.mock-lines::before,
.mock-lines::after,
.mock-list::before,
.mock-list::after {
  content: "";
  display: block;
  border-radius: 5px;
}

.mock-panel::before {
  background: var(--teal);
}

.mock-panel::after {
  background: rgba(29, 127, 120, 0.22);
}

.mock-lines {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.mock-lines::before {
  height: 38px;
  background: var(--graphite);
}

.mock-lines::after {
  height: 88px;
  background:
    linear-gradient(var(--coral), var(--coral)) 0 0 / 72% 10px no-repeat,
    linear-gradient(var(--sun), var(--sun)) 0 26px / 58% 10px no-repeat,
    linear-gradient(rgba(31, 37, 40, 0.18), rgba(31, 37, 40, 0.18)) 0 52px / 92% 10px no-repeat;
}

.mock-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
}

.mock-list::before {
  height: 46px;
  background: rgba(73, 109, 147, 0.84);
}

.mock-list::after {
  height: 92px;
  background:
    linear-gradient(rgba(31, 37, 40, 0.18), rgba(31, 37, 40, 0.18)) 0 0 / 100% 14px no-repeat,
    linear-gradient(rgba(31, 37, 40, 0.18), rgba(31, 37, 40, 0.18)) 0 28px / 86% 14px no-repeat,
    linear-gradient(rgba(31, 37, 40, 0.18), rgba(31, 37, 40, 0.18)) 0 56px / 94% 14px no-repeat;
}

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.project-type,
.project-year {
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.project-type {
  background: var(--mint);
  color: var(--teal-dark);
}

.project-year {
  background: rgba(211, 155, 42, 0.16);
  color: #745112;
}

.project-card h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.18;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag-list span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-card button {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid var(--graphite);
  border-radius: var(--radius);
  background: transparent;
  color: var(--graphite);
  font-weight: 900;
}

.project-card button:hover {
  background: var(--graphite);
  color: #fff;
}

.empty-state {
  margin: 22px 0 0;
  color: var(--muted);
}

.services-section {
  width: 100%;
  max-width: none;
  padding-right: max(24px, calc((100vw - var(--max-width)) / 2));
  padding-left: max(24px, calc((100vw - var(--max-width)) / 2));
  background: #eef5ef;
}

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

.service-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 250, 241, 0.72);
}

.service-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.service-card:nth-child(2) .service-number {
  background: var(--coral);
}

.service-card:nth-child(3) .service-number {
  background: var(--blue);
}

.service-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.service-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.service-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-weight: 700;
}

.service-card li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sun);
}

.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-list li {
  min-width: 0;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
}

.process-list li:last-child {
  border-right: 0;
}

.process-list span {
  display: block;
  margin-bottom: 12px;
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 900;
}

.process-list p {
  margin: 0;
  color: var(--muted);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(320px, 0.72fr);
  gap: 52px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.contact-copy p:not(.eyebrow) {
  margin-top: 18px;
  font-size: 18px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.contact-links a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 13px;
  background: var(--paper-strong);
  font-weight: 800;
}

.contact-links a:hover {
  border-color: var(--teal);
}

.contact-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  min-height: 46px;
  padding: 11px 13px;
  resize: vertical;
}

.contact-form textarea {
  min-height: 130px;
}

.contact-form .button {
  width: 100%;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 900;
  color: var(--teal-dark);
}

.project-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(780px, calc(100% - 32px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.project-dialog::backdrop {
  background: rgba(18, 22, 24, 0.66);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.94);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.dialog-body {
  padding: 28px;
}

.dialog-body .project-media {
  margin: -28px -28px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.dialog-body h3 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.15;
}

.dialog-body p {
  color: var(--muted);
}

.dialog-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.dialog-details div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.dialog-details span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dialog-details strong {
  display: block;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .main-nav {
    display: none;
  }

  .hero h1 {
    font-size: 44px;
  }

  .section-head,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

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

  .process-list li:nth-child(2) {
    border-right: 0;
  }

  .process-list li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .site-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-height: 66px;
    padding: 14px 18px;
  }

  .brand-text {
    display: none;
  }

  .header-action {
    display: none;
  }

  .hero {
    min-height: 760px;
    height: auto;
  }

  .hero-content {
    width: calc(100% - 36px);
    justify-content: flex-start;
    padding-top: 118px;
  }

  .hero h1 {
    width: min(330px, 100%);
    font-size: 31px;
    line-height: 1.12;
    overflow-wrap: normal;
  }

  .hero-copy {
    width: min(330px, 100%);
    font-size: 17px;
    overflow-wrap: break-word;
  }

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

  .hero-actions {
    width: min(330px, 100%);
  }

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

  .hero-stats {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .projects-section,
  .services-section,
  .process-section,
  .contact-section {
    width: calc(100% - 36px);
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .services-section {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .section-head h2,
  .contact-copy h2 {
    font-size: 30px;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .filter-button {
    flex: 1;
    white-space: nowrap;
  }

  .search-field {
    width: 100%;
  }

  .projects-grid,
  .services-grid,
  .process-list,
  .dialog-details {
    grid-template-columns: 1fr;
  }

  .process-list li,
  .process-list li:nth-child(2),
  .process-list li:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .process-list li:last-child {
    border-bottom: 0;
  }

  .contact-form,
  .dialog-body {
    padding: 18px;
  }

  .dialog-body .project-media {
    margin: -18px -18px 20px;
  }

  .site-footer {
    width: calc(100% - 36px);
    flex-direction: column;
  }
}
