:root {
  --stone: #f4f1eb;
  --sage: #a8b5a2;
  --clay: #c48a6a;
  --ink: #363b44;
  --copy: #4f5660;
  --line: rgba(168, 181, 162, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  line-height: 1.65;
  position: relative;
}

.grid-overlay,
.grain-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
}

.grid-overlay {
  background-image: linear-gradient(to right, rgba(168, 181, 162, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 181, 162, 0.12) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px;
  background-position: center top;
  background-repeat: repeat, repeat;
  opacity: 0.32;
}

.grain-overlay {
  background-image: radial-gradient(circle at 1px 1px, rgba(54, 59, 68, 0.2) 0.6px, transparent 0.7px);
  background-size: 3px 3px;
  opacity: 0.08;
}

.container {
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto;
}

.narrow {
  width: min(840px, calc(100% - 3rem));
}

.section {
  padding: 8.5rem 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
  background: rgba(244, 241, 235, 0.9);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  text-decoration: none;
  color: var(--ink);
}

.brand-image {
  display: block;
  width: min(200px, 35.2vw);
  height: auto;
}

.site-nav {
  display: flex;
  justify-self: center;
  justify-content: center;
  gap: 2.5rem;
}

.site-nav a {
  color: var(--copy);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 2px;
  border: 1px solid transparent;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button-primary {
  background: var(--clay);
  color: #f8f2eb;
  border-color: rgba(196, 138, 106, 0.92);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #b67f61;
}

.header-cta {
  justify-self: end;
}

.button-secondary {
  background: transparent;
  border-color: rgba(196, 138, 106, 0.8);
  color: var(--ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(196, 138, 106, 0.1);
}

.hero {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding-top: 10.5rem;
  padding-bottom: 11rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  background: url("assets/hero-bg.svg") center top / min(1500px, 100%) auto no-repeat;
  opacity: 0.24;
  z-index: -1;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

.hero p {
  max-width: 780px;
  margin: 2rem auto 0;
  color: var(--copy);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  border-top: 1px solid rgba(168, 181, 162, 0.4);
  padding-top: 2rem;
}

.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.2;
  margin: 0 0 1.1rem;
}

h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.65rem;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
  color: var(--copy);
  font-size: 1.06rem;
}

.services-grid {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.services-grid article {
  border: 1px solid var(--line);
  padding: 2rem 1.4rem;
  background: rgba(244, 241, 235, 0.55);
}

.services-grid .service-featured {
  grid-column: 1 / -1;
}

.infrastructure ul {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.infrastructure li {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
  color: var(--copy);
}

.contact-inner {
  text-align: center;
}

.contact-inner p {
  margin: 0 auto 1.5rem;
  max-width: 600px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.mono-image {
  width: 104px;
  height: auto;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.footer-nav {
  display: flex;
  gap: 1.1rem;
}

.footer-nav a,
.footer-email {
  color: var(--copy);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-nav a:hover,
.footer-nav a:focus-visible,
.footer-email:hover,
.footer-email:focus-visible {
  color: var(--ink);
}

.footer-copy {
  margin: 0;
  color: var(--copy);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .section {
    padding: 6.5rem 0;
  }

  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.85rem;
    padding: 1rem 0;
  }

  .brand {
    justify-self: center;
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    gap: 1.5rem;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    align-items: flex-start;
  }
}
