/* ===== Design Tokens ===== */
:root {
  /* Color — one green, gold reserved for eyebrow accents only */
  --emerald: #0d8659;
  --emerald-deep: #0a5c42;
  --gold: #b8894f;
  --ink: #171c24;
  --muted: #5b6270;
  --paper: #faf9f7;
  --surface: #ffffff;
  --line: rgba(23, 28, 36, 0.1);
  --line-soft: rgba(23, 28, 36, 0.06);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape & depth — flat surfaces, hairlines, one soft shadow */
  --radius: 6px;
  --shadow-soft: 0 10px 30px rgba(23, 28, 36, 0.06);
  --shadow-lift: 0 18px 44px rgba(23, 28, 36, 0.1);

  /* Layout */
  --gutter: max(1.25rem, calc((100vw - 1120px) / 2));
  --header-h: 4.5rem;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ===== Navigation ===== */
.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.site-header.scrolled {
  background: rgba(250, 249, 247, 0.92);
  border-bottom-color: var(--line-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  height: var(--header-h);
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 2.4rem;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  flex: 1;
  height: var(--header-h);
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--header-h);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 200ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--emerald);
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 1.35rem;
  left: 0;
  height: 1.5px;
  content: "";
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: all 220ms ease;
}

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

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

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

/* ===== Main Content ===== */
main {
  position: relative;
  z-index: 1;
}

/* ===== Typography ===== */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
}

h1 {
  max-width: 16ch;
  font-size: clamp(2.6rem, 5.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--emerald);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-text,
.contact-panel p,
.service-card p,
.work-tile p,
.split-copy p,
.showcase-item p,
.contact-aside li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

strong {
  color: var(--ink);
  font-weight: 650;
}

/* ===== Buttons & Links ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  min-width: 10rem;
  padding: 0 1.5rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

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

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

.button.primary:hover {
  background: var(--emerald-deep);
  box-shadow: var(--shadow-soft);
}

.button.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.button.ghost:hover {
  border-color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  border-bottom: 1.5px solid var(--emerald);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  transition: color 200ms ease;
}

.text-link:hover {
  color: var(--emerald);
}

/* ===== Footer ===== */
.site-footer {
  margin-top: var(--space-5);
  padding: var(--space-5) var(--gutter) var(--space-4);
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 26rem;
}

.footer-col span {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col a,
.footer-col p {
  display: block;
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 200ms ease;
}

.footer-col a:hover {
  color: var(--emerald);
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ===== Scroll Reveal (single site-wide motion) ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 650ms ease,
    transform 750ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0ms);
}

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

/* ===== Responsive Navigation ===== */
@media (max-width: 980px) {
  .site-header {
    padding: 0 1rem;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 4.25rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line-soft);
    gap: 0;
    height: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
    z-index: 999;
  }

  .nav-links.active {
    max-height: 500px;
  }

  .nav-links a {
    padding: 1rem;
    height: auto;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav-links a::after {
    display: none;
  }

  .brand-mark {
    width: 2rem;
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .footer-meta {
    flex-direction: column;
    gap: 0.4rem;
  }
}

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