:root {
  color-scheme: light;
  font-family:
    Avenir, "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #1c2521;
  background: #fffefc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #1c2521;
  --soft-ink: #46564f;
  --muted: #6e7b75;
  --paper: #fffefc;
  --paper-warm: #f6faf8;
  --surface: #ffffff;
  --accent: #427b6f;
  --brand: #5e8f81;
  --accent-deep: #244f46;
  --accent-soft: #dcece8;
  --line: rgba(28, 37, 33, 0.14);
  --line-strong: rgba(66, 123, 111, 0.34);
  --shadow: 0 22px 70px rgba(23, 43, 37, 0.12);
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px clamp(22px, 5vw, 72px);
  background: rgba(255, 254, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  color: var(--brand);
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.brand-divider {
  font-weight: 200;
  opacity: 0.6;
}

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

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--accent-deep);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  position: absolute;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.menu-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.menu-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
}

.hero,
.about-section,
.feature-section,
.portfolio-section,
.contact-section {
  width: min(var(--max), calc(100% - clamp(36px, 8vw, 120px)));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(390px, 0.62fr) minmax(0, 0.88fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(42px, 5vw, 64px) 0 clamp(48px, 6vw, 70px);
}

.hero-copy {
  max-width: 560px;
}

.hero h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  letter-spacing: -0.015em;
}

.hero h1 {
  font-size: clamp(2.1rem, 3.7vw, 3.15rem);
  line-height: 1.02;
}

.hero p {
  margin: 24px 0 0;
  color: var(--soft-ink);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.68;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0 22px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-deep);
}

.button-secondary {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--accent-deep);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero-media {
  position: relative;
  min-height: 360px;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10.6;
  background: var(--paper-warm);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media figcaption {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  gap: 5px;
  max-width: min(360px, calc(100% - 36px));
  padding: 14px 16px;
  background: rgba(255, 254, 252, 0.92);
  color: var(--ink);
  font-size: clamp(0.82rem, 1vw, 0.94rem);
  line-height: 1.35;
  backdrop-filter: blur(12px);
}

.hero-media figcaption span {
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.about-section,
.feature-section,
.portfolio-section,
.contact-section {
  padding: clamp(56px, 7.5vw, 96px) 0;
  border-top: 1px solid var(--line);
}

.section-kicker {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.about-section {
  text-align: center;
}

.about-grid {
  display: grid;
  justify-items: center;
  gap: clamp(14px, 2vw, 20px);
  max-width: 820px;
  margin: 0 auto;
}

h2 {
  font-size: clamp(1.7rem, 2.9vw, 2.55rem);
  line-height: 1.06;
}

.about-copy {
  display: grid;
  gap: 22px;
  max-width: 60ch;
  margin: 0 auto;
}

.about-copy p,
.feature-header p,
.feature-panel p,
.section-heading p,
.project-card p,
.contact-copy p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 1rem;
  line-height: 1.68;
}

.feature-section {
  width: 100%;
  max-width: none;
  padding-right: clamp(18px, 4vw, 72px);
  padding-left: clamp(18px, 4vw, 72px);
  background: var(--paper-warm);
}

.feature-header,
.feature-viewer,
.section-heading {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.feature-header,
.section-heading {
  display: block;
}

.feature-intro {
  margin-top: clamp(18px, 2.2vw, 26px);
  max-width: 100%;
}

.feature-intro .text-link {
  margin-top: clamp(16px, 1.8vw, 22px);
}

.feature-section--alt {
  background: var(--paper);
}

.feature-viewer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: clamp(34px, 5vw, 64px);
  background: var(--line);
  border: 1px solid var(--line);
}

.feature-viewer--reverse {
  grid-template-columns: 1fr;
}

.feature-viewer--reverse .feature-panel {
  order: 0;
}

.feature-viewer--single {
  grid-template-columns: 1fr;
}

.feature-viewer--single .feature-image {
  min-height: 0;
}

.feature-viewer--single .feature-image img {
  object-position: center 42%;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 20px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.page-head {
  width: min(var(--max), calc(100% - clamp(36px, 8vw, 120px)));
  margin: 0 auto;
  padding: clamp(54px, 7vw, 100px) 0 clamp(22px, 3vw, 38px);
}

.page-head h1 {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  letter-spacing: -0.015em;
  font-size: clamp(2.1rem, 3.6vw, 3.15rem);
  line-height: 1.03;
}

.page-head p {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--soft-ink);
  font-size: 1.02rem;
  line-height: 1.7;
}

.cta-band {
  width: min(var(--max), calc(100% - clamp(36px, 8vw, 120px)));
  margin: 0 auto;
  padding: clamp(64px, 8vw, 112px) 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.cta-band .section-kicker {
  margin-bottom: 10px;
}

.cta-band h2 {
  margin: 0 0 26px;
}

.feature-image {
  margin: 0;
  background: var(--surface);
}

.feature-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.feature-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(18px, 3vw, 30px);
  background: var(--surface);
}

.project-meta {
  display: grid;
  gap: 9px;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.feature-panel h3 {
  margin: 0;
  max-width: 410px;
  color: var(--ink);
  font-size: clamp(1.35rem, 1.9vw, 1.85rem);
  font-weight: 300;
  line-height: 1.14;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 0;
}

.thumb {
  height: 88px;
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  opacity: 0.72;
  transition:
    border-color 180ms ease,
    opacity 180ms ease;
}

.thumb:hover,
.thumb:focus-visible,
.thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-section {
  width: 100%;
  max-width: none;
  padding-right: clamp(18px, 4vw, 72px);
  padding-left: clamp(18px, 4vw, 72px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1px;
  width: min(var(--max), 100%);
  margin: clamp(34px, 5vw, 64px) auto 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.project-card {
  display: block;
  align-self: start;
  min-height: 0;
  background: var(--surface);
}

.project-card-large {
  grid-column: span 2;
}

.project-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-card div {
  display: block;
  padding: clamp(16px, 2.1vw, 22px);
}

.project-card span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.12rem, 1.5vw, 1.4rem);
  font-weight: 300;
  line-height: 1.18;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(320px, 0.56fr);
  gap: clamp(38px, 7vw, 96px);
  align-items: start;
  padding-bottom: clamp(64px, 7.5vw, 100px);
}

.contact-copy h2 {
  max-width: 620px;
}

.contact-copy p {
  max-width: 580px;
  margin-top: 28px;
}

address {
  display: grid;
  gap: 8px;
  margin-top: 34px;
  color: var(--soft-ink);
  font-style: normal;
  line-height: 1.5;
}

address a {
  color: var(--accent-deep);
}

address a:hover,
address a:focus-visible {
  color: var(--accent);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  background: var(--paper-warm);
}

.contact-form .full,
.contact-form .button,
.contact-form .form-status {
  grid-column: 1 / -1;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--soft-ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(66, 123, 111, 0.22);
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 123, 111, 0.13);
}

.contact-form textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .feature-header,
  .feature-viewer,
  .section-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 360px;
  }

  .feature-panel {
    align-content: start;
  }

  .feature-viewer--reverse .feature-panel {
    order: 0;
  }

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

  .project-card-large {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 18px 22px;
  }

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

  .brand {
    font-size: clamp(0.92rem, 3.4vw, 1.1rem);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    top: 74px;
    display: grid;
    align-content: start;
    gap: 0;
    padding: 18px 22px;
    background: rgba(255, 254, 252, 0.98);
    border-top: 1px solid var(--line);
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 220ms ease;
    visibility: hidden;
  }

  .nav-links.is-open {
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
  }

  .nav-links a {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.18rem;
  }

  .hero,
  .about-section,
  .contact-section {
    width: min(var(--max), calc(100% - 36px));
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 2.7rem);
  }

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

  .hero-media {
    aspect-ratio: 4 / 3.35;
  }

  .feature-section,
  .portfolio-section {
    padding-right: 18px;
    padding-left: 18px;
  }

  .thumb {
    height: 70px;
  }

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

  .project-card,
  .project-card-large {
    grid-column: auto;
  }

  .project-card {
    display: block;
  }

  .project-card img {
    height: auto;
  }
}

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