:root {
  /*
    Theme variables centralize the visual system. If you change --color-sage
    here, every accent border, highlight, and active navigation state updates
    across all pages without editing each component separately.
  */
  --color-ivory: #f7f1e7;
  --color-paper: #fffaf1;
  --color-charcoal: #20221f;
  --color-muted: #6f746b;
  --color-sage: #6f806f;
  --color-sage-dark: #425343;
  --color-gold: #b7955b;
  --color-stone: #ded3c0;
  --color-line: rgba(32, 34, 31, 0.13);
  --shadow-soft: 0 24px 70px rgba(32, 34, 31, 0.12);
  --radius-large: 28px;
  --radius-medium: 18px;
  --space-page: clamp(1rem, 4vw, 3rem);
  --max-width: 1180px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-charcoal);
  background:
    radial-gradient(circle at top left, rgba(183, 149, 91, 0.18), transparent 30rem),
    linear-gradient(180deg, var(--color-ivory), #f1eadf);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

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

/*
  Shared page shell: this keeps all major sections aligned to the same max width.
  The clamp() spacing makes the site comfortable on phones while expanding on
  desktops without creating oversized margins.
*/
.section-shell {
  width: min(var(--max-width), calc(100% - (var(--space-page) * 2)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max-width), calc(100% - (var(--space-page) * 2)));
  margin: 1rem auto 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 250, 241, 0.88);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(32, 34, 31, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  color: var(--color-paper);
  background: var(--color-charcoal);
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--color-muted);
  font-size: 0.72rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.6rem 0.9rem;
  color: var(--color-muted);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-charcoal);
  background: rgba(111, 128, 111, 0.16);
}

.nav-toggle {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  min-height: calc(100vh - 8rem);
  padding-block: clamp(4rem, 10vw, 7rem);
}

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

h1,
h2 {
  font-family: var(--font-display);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 1.25rem;
  font-size: clamp(3.25rem, 8vw, 7.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.eyebrow {
  color: var(--color-sage-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-lede,
.page-hero p,
.contact-copy p {
  max-width: 690px;
  color: var(--color-muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/*
  Homepage hero entrance: the first impression should feel intentional before
  the user scrolls. Each direct hero text group uses the same keyframes, while
  the delay values create the requested 80ms stagger: eyebrow, title, lede,
  then buttons. This is CSS-only, so no JavaScript is needed for the entrance.
*/
.hero-copy .eyebrow,
.hero-copy h1,
.hero-copy .hero-lede,
.hero-copy .hero-actions {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 680ms cubic-bezier(0.2, 0.72, 0.22, 1) forwards;
}

.hero-copy .eyebrow {
  animation-delay: 0ms;
}

.hero-copy h1 {
  animation-delay: 80ms;
}

.hero-copy .hero-lede {
  animation-delay: 160ms;
}

.hero-copy .hero-actions {
  animation-delay: 240ms;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*
  Reusable buttons: the same classes appear on Home and Services. That keeps
  calls-to-action visually consistent and makes future changes cheap.
*/
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: var(--color-paper);
  background: var(--color-charcoal);
  box-shadow: 0 16px 34px rgba(32, 34, 31, 0.18);
}

.button.secondary {
  color: var(--color-charcoal);
  border-color: var(--color-line);
  background: rgba(255, 250, 241, 0.62);
}

.button.ghost {
  color: var(--color-sage-dark);
  border-color: rgba(111, 128, 111, 0.32);
  background: rgba(111, 128, 111, 0.1);
}

.hero-panel,
.contact-card,
.service-card,
.metric-card {
  border: 1px solid var(--color-line);
  background: rgba(255, 250, 241, 0.72);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-large);
}

.panel-label,
.service-number {
  color: var(--color-gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-panel h2 {
  margin-block: 1rem;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
}

/*
  Metric layout: auto-fit creates as many columns as will comfortably fit.
  This avoids custom breakpoint logic for each card count.
*/
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.metric-card {
  min-height: 165px;
  padding: 1.35rem;
  border-radius: var(--radius-medium);
}

.metric-card strong {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1;
}

.metric-card span {
  color: var(--color-muted);
  font-weight: 600;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--color-line);
}

.narrative {
  color: var(--color-muted);
  font-size: 1.05rem;
}

.page-hero,
.contact-hero {
  padding-block: clamp(4rem, 10vw, 7rem);
}

.page-hero h1,
.contact-copy h1 {
  font-size: clamp(3rem, 7vw, 6.3rem);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.service-card {
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: var(--radius-large);
}

.service-card h2 {
  margin-block: 1rem;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
}

.service-card p {
  color: var(--color-muted);
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(3rem, 8vw, 6rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-paper);
  background: var(--color-sage-dark);
  border-radius: var(--radius-large);
}

.cta-band .eyebrow {
  color: #efe0c4;
}

.cta-band h2 {
  margin-bottom: 0;
}

.cta-band .button.primary {
  color: var(--color-charcoal);
  background: var(--color-paper);
}

.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.contact-stack {
  display: grid;
  gap: 1rem;
}

.contact-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-large);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 1.4rem);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-large);
  background: rgba(255, 250, 241, 0.72);
  box-shadow: var(--shadow-soft);
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
}

.contact-form label span {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  color: var(--color-charcoal);
  background: rgba(247, 241, 231, 0.72);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(111, 128, 111, 0.22);
  border-color: var(--color-sage);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
}

.form-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.5rem;
  margin-bottom: 0;
  color: var(--color-sage-dark);
  font-weight: 700;
}

.form-status.is-success {
  color: #23704a;
}

.status-check {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #ffffff;
  background: #23704a;
  border-radius: 50%;
  font-size: 0.85rem;
  line-height: 1;
}

.contact-link {
  display: grid;
  gap: 0.2rem;
  padding: 1.15rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: rgba(247, 241, 231, 0.68);
}

.contact-link span {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-link strong {
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max-width), calc(100% - (var(--space-page) * 2)));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-line);
}

.site-footer a {
  color: var(--color-charcoal);
  font-weight: 800;
}

/*
  Scroll reveal state: JavaScript adds .is-visible when a section enters the
  viewport. Without JavaScript, content still exists in the HTML; this only
  adds a light visual transition for browsers that run the script.
*/
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    border-radius: 24px;
  }

  .nav-toggle {
    display: inline-grid;
    gap: 0.35rem;
    width: 2.55rem;
    height: 2.55rem;
    place-content: center;
    border: 1px solid var(--color-line);
    border-radius: 50%;
    background: var(--color-paper);
  }

  .nav-toggle span:not(.sr-only) {
    width: 1.05rem;
    height: 2px;
    background: var(--color-charcoal);
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: none;
    width: min(15rem, calc(100vw - 2rem));
    padding: 0.7rem;
    background: var(--color-paper);
    border: 1px solid var(--color-line);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
  }

  .site-nav.is-open {
    display: grid;
  }

  .hero,
  .split-section,
  .contact-hero,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .cta-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand small {
    display: none;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  .hero-copy .eyebrow,
  .hero-copy h1,
  .hero-copy .hero-lede,
  .hero-copy .hero-actions {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
