:root {
  --bg: #f4f2ec;
  --bg-header: rgba(244, 242, 236, 0.92);
  --surface: #fff;
  --text: #1c1d1b;
  --muted: #5d6158;
  --accent: #2f9e2f;
  --accent-logo: #32cd32;
  --border: #e2dfd6;
  --radius: 10px;
  --header-h: 4.75rem;
  --header-h-top: 6.15rem;
  --logo-h: 2rem;
  --logo-h-top: 2.7rem;
  --max: 70rem;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img.pcb-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 52% 38%;
  pointer-events: none;
  user-select: none;
  opacity: 0.18;
  filter: grayscale(1) invert(1) contrast(0.52) brightness(1.18) blur(0.9px);
  mix-blend-mode: multiply;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #247a24;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h-top);
  border-bottom: 1px solid var(--border);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-anchor: none;
  transition: height 0.22s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h-top);
  gap: 1rem;
  transition: height 0.22s ease;
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.logo img {
  display: block;
  width: auto;
  height: var(--logo-h-top);
  transition: height 0.22s ease;
}

html.is-scrolled .site-header,
html.is-scrolled .header-inner {
  height: var(--header-h);
}

html.is-scrolled .logo img {
  height: var(--logo-h);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav a:hover {
  color: var(--text);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  padding: clamp(1.75rem, 4.5vw, 3.25rem) 0 clamp(3rem, 6vw, 4.75rem);
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1.1rem;
  max-width: 14em;
  font-size: clamp(2rem, 5.4vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 1.85rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.lede p {
  margin: 0;
}

.lede p + p {
  margin-top: 0.9rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: #cfcabb;
  color: var(--text);
}

.services,
.projects,
.process,
.contact {
  scroll-margin-top: calc(var(--header-h) + 0.6rem);
}

.services {
  padding: 0 0 4.25rem;
}

.section-label {
  margin: 0 0 1.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.card {
  padding: 1.45rem 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card-index {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.services-note {
  margin: 1.25rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.projects {
  padding: 0 0 3.5rem;
}

.projects-title {
  margin: 0 0 1.35rem;
  max-width: 22rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.projects .card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-card {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: #cfcabb;
}

.project-card.is-active,
.project-card.is-active:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.project-visual {
  width: 100%;
  margin: 3.5rem 0 0;
}

.project-visual img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  object-position: 50% 45%;
  background: #eceae4;
  transition: opacity 0.35s ease;
}

.project-visual img.is-switching {
  opacity: 0;
}

.process {
  padding: 4.25rem 0 4.25rem;
}

.process-title {
  margin: 0 0 0.85rem;
  max-width: 20rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.process-intro {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.process-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.process-gallery figure {
  margin: 0;
  overflow: hidden;
  padding: 1.45rem 1.4rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.process-gallery img {
  display: block;
  width: 100%;
  height: 14rem;
  object-fit: contain;
  object-position: 50% 50%;
  border-radius: 6px;
  background: #f7f6f2;
}

.process-gallery figcaption {
  padding: 0.7rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.process-note {
  margin: 1.15rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.visual {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

.visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.visual figcaption {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.projects .visual {
  width: 100%;
  margin: 3.5rem 0 0;
}

.contact {
  padding: 4.25rem 0 3.75rem;
}

.contact-head {
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.contact-head .section-label {
  margin-bottom: 0.7rem;
}

.contact h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.contact-intro {
  margin: 0;
  color: var(--muted);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-item {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  padding: 1.35rem 1.4rem;
  color: var(--text);
  text-decoration: none;
}

.contact-item + .contact-item {
  border-top: 1px solid var(--border);
}

.contact-item:hover {
  color: var(--text);
  background: #faf9f6;
}

.contact-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 8px;
  background: var(--bg);
  color: var(--accent);
}

.contact-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.contact-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-value {
  display: block;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 1.2rem 0 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem 1.5rem;
}

@media (max-width: 779px) {
  .services,
  .projects,
  .process,
  .contact {
    scroll-margin-top: 6.5rem;
  }

  .site-header {
    height: auto;
  }

  .header-inner {
    height: auto;
    padding: 1.05rem 0 0.9rem;
    flex-wrap: wrap;
    align-items: center;
    transition: padding 0.22s ease;
  }

  html.is-scrolled .site-header,
  html.is-scrolled .header-inner {
    height: auto;
  }

  html.is-scrolled .header-inner {
    padding: 0.85rem 0 0.75rem;
  }

  .nav {
    width: 100%;
    padding-top: 0.2rem;
  }
}

@media (min-width: 780px) {
  :root {
    --logo-h: 2.55rem;
    --logo-h-top: 3.45rem;
  }

  .nav {
    gap: 1.25rem;
  }

  .nav a {
    font-size: 0.98rem;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .process-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .process-gallery img {
    height: 16.5rem;
  }

  .contact-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-item + .contact-item {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .project-card,
  .project-visual img,
  .site-header,
  .header-inner,
  .logo img {
    transition: none;
  }
}
