/* Shared design system: nav, buttons, footer, cards, focus states.
   Used by the homepage and all four service pages. Filename is
   version-suffixed so it can be cached long-term (see nginx.conf) and
   invalidated by bumping the suffix when it changes. */
:root {
  --emerald: #126F4A;
  --forest: #0F2F24;
  --deep: #071B15;
  --ink: #151A17;
  --soft-ink: #3E4742;
  --ivory: #F7F5EF;
  --warm: #EFE9DC;
  --paper: #FFFFFF;
  --fern: #E8F1EA;
  /* Darkened from the original #7A957D (~3.3:1 on cream, fails WCAG AA for
     normal text) to meet 4.5:1 for small/normal text while staying on-brand. */
  --sage: #5A725E;
  --olive: #4B5A39;
  --stone: #D8D6CE;
  --clay: #A06A43;
  --bluegray: #526D7A;
  --line: rgba(15, 47, 36, .15);
  --shadow: 0 22px 70px rgba(15, 47, 36, .14);
  --hard-shadow: 12px 12px 0 rgba(18, 111, 74, .13);
  --radius-xl: 38px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica Neue, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
strong { color: var(--forest); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--forest);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus { left: 12px; }

h1, h2, h3 { margin: 0; color: var(--forest); }
h3 { font-size: 1rem; line-height: 1.3; letter-spacing: -.01em; }

.card {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(216,214,206,.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--emerald);
  font-family: "IBM Plex Mono", monospace;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--emerald); }

.mono-label { font-family: "IBM Plex Mono", monospace; font-size: .78rem; font-weight: 700; color: var(--emerald); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .018em;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 14px 30px rgba(18,111,74,.24); }
.btn-primary:hover { background: var(--forest); box-shadow: 0 18px 40px rgba(15,47,36,.27); }
.btn-secondary { background: rgba(255,255,255,.5); color: var(--forest); border-color: rgba(15,47,36,.20); }
.btn-secondary:hover { border-color: var(--emerald); color: var(--emerald); background: #fff; }
.btn-dark { background: var(--forest); color: #fff; }
.btn-light { background: #fff; color: var(--forest); font-weight: 900; }
.btn-light:hover { background: var(--fern); transform: translateY(-2px); }

section { padding: 78px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.section-head p { max-width: 640px; margin: 0; color: var(--soft-ink); font-size: 1.02rem; }

/* --- Nav (shared markup across all pages) --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(247, 245, 239, .86);
  border-bottom: 1px solid rgba(216, 214, 206, .78);
}
.nav-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo-mark, .nav-logo { display: flex; align-items: center; min-width: 210px; z-index: 55; }
.logo-mark img, .nav-logo img { width: 220px; height: auto; }

.nav-links { display: flex; align-items: center; gap: 22px; font-size: .82rem; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; color: var(--soft-ink); }
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--emerald); transition: right .18s ease; }
.nav-links a:hover { color: var(--emerald); }
.nav-links a:hover::after { right: 0; }
.nav-links .nav-cta { background: var(--emerald); color: #fff; padding: 9px 16px; border-radius: 999px; }
.nav-links .nav-cta:hover { background: var(--forest); }
.nav-links .nav-cta::after { display: none; }

.mobile-toggle { display: none; width: 46px; height: 46px; border-radius: 999px; border: 1px solid rgba(15,47,36,.18); background: rgba(255,255,255,.65); color: var(--forest); align-items: center; justify-content: center; cursor: pointer; z-index: 55; }
.mobile-toggle span, .mobile-toggle span::before, .mobile-toggle span::after { display: block; width: 19px; height: 2px; background: currentColor; position: relative; transition: transform .18s ease, opacity .18s ease; }
.mobile-toggle span::before, .mobile-toggle span::after { content: ""; position: absolute; left: 0; }
.mobile-toggle span::before { top: -7px; }
.mobile-toggle span::after { top: 7px; }
.mobile-toggle[aria-expanded="true"] span { background: transparent; }
.mobile-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); background: var(--forest); }
.mobile-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); background: var(--forest); }

/* Services disclosure: a real <button> toggles .is-open on click, and native
   button semantics mean Enter/Space already fire that same click for
   keyboard users — no :focus-within needed. (An earlier version used
   :focus-within as a belt-and-suspenders opener, but that fights the
   Escape-to-close behavior: closing moves focus back to the trigger
   button, which re-satisfies :focus-within and reopens the menu right
   after JS closed it. classList is the single source of truth instead.) */
.nav-item-services { position: relative; display: flex; align-items: center; }
.nav-item-services > button.nav-services-label {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.nav-item-services > button.nav-services-label:hover { color: var(--emerald); }
.nav-services-caret { font-size: .65em; margin-left: 3px; opacity: .7; }
.nav-services-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(216,214,206,.92);
  border-radius: 16px;
  padding: 8px;
  min-width: 240px;
  box-shadow: 0 16px 44px rgba(15,47,36,.14);
  z-index: 100;
}
.nav-services-menu.is-open { display: block; }
.nav-services-menu a { display: block; padding: 10px 14px; border-radius: 10px; font-size: .8rem; font-weight: 700; color: var(--soft-ink); text-transform: none; letter-spacing: .02em; white-space: nowrap; }
.nav-services-menu a:hover { background: var(--fern); color: var(--emerald); }
.nav-services-menu .nav-services-overview { color: var(--emerald); border-bottom: 1px solid var(--stone); border-radius: 10px 10px 0 0; margin-bottom: 4px; padding-bottom: 12px; }

/* --- Footer --- */
footer { padding: 42px 0; color: var(--soft-ink); font-size: .9rem; }
.footer-inner { border-top: 1px solid var(--stone); padding-top: 24px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-inner a { color: var(--emerald); font-weight: 800; }
.footer-link-btn { background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--emerald); font-weight: 800; cursor: pointer; }
.footer-link-btn:hover { text-decoration: underline; }
.footer-socials { display: flex; gap: 14px; align-items: center; }
.footer-socials a { color: var(--sage); transition: color .15s; display: flex; align-items: center; min-width: 24px; min-height: 24px; justify-content: center; }
.footer-socials a:hover { color: var(--emerald); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .post-card, .focus-card, .portfolio-card { transition: none; }
}

@media (max-width: 860px) {
  .mobile-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 0 0 auto 0;
    min-height: 100vh;
    padding: 112px 28px 34px;
    display: grid;
    align-content: start;
    gap: 0;
    background: rgba(247,245,239,.98);
    transform: translateY(-105%);
    transition: transform .22s ease;
    border-bottom: 1px solid var(--stone);
    z-index: 50;
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links a { padding: 18px 0; border-bottom: 1px solid rgba(15,47,36,.10); font-size: 1.05rem; }
  .nav-links a::after { display: none; }
  .nav-links .nav-cta { background: none; color: var(--soft-ink); padding: 18px 0; border-radius: 0; }
  body.nav-open { overflow: hidden; }
  .nav-item-services { flex-direction: column; align-items: flex-start; width: 100%; border-bottom: 1px solid rgba(15,47,36,.10); }
  .nav-item-services > button.nav-services-label { padding: 18px 0; font-size: 1.05rem; width: 100%; justify-content: space-between; }
  .nav-services-menu, .nav-services-menu.is-open { display: block; position: static; transform: none; box-shadow: none; border: none; border-radius: 0; padding: 0 0 8px 16px; min-width: auto; background: transparent; width: 100%; }
  .nav-services-menu a { padding: 11px 0; border-bottom: 1px solid rgba(15,47,36,.07); font-size: .92rem; color: var(--sage); white-space: normal; text-transform: none; }
  .nav-services-menu .nav-services-overview { border-bottom-color: rgba(15,47,36,.07); }
}
