:root {
  --ink: #172b37;
  --ink-2: #294653;
  --muted: #53636b;
  --line: #dce1df;
  --paper: #fafbf8;
  --accent: #d4e9a5;
  --accent-ink: #47702c;
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 84px;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); overflow-x: hidden; }
h1, h2, h3, p { margin-top: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 6px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }

.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px 16px; background: #fff; z-index: 100; }
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: 12px; line-height: 1.6; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 24px;
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 0%, transparent);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.header.scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  transition: height .35s var(--ease);
}
.header.scrolled .header-inner { height: 64px; }

.wordmark {
  font-size: 36px; line-height: 1; font-weight: 650; letter-spacing: -.07em;
  display: inline-flex; align-items: baseline; gap: 5px;
  transition: font-size .35s var(--ease);
}
.header.scrolled .wordmark { font-size: 30px; }
.dot { width: 7px; height: 7px; background: #78954c; display: inline-block; transition: transform .5s var(--ease); }
.wordmark:hover .dot { transform: rotate(45deg) scale(1.15); }

.nav { display: flex; align-items: center; gap: 36px; font-size: 14px; }
.nav a { position: relative; padding: 6px 0; color: var(--muted); transition: color .2s; }
.nav a:not(.nav-cta):hover, .nav a:not(.nav-cta).active { color: var(--ink); }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav .nav-cta {
  color: var(--paper); background: var(--ink);
  padding: 10px 16px; border-radius: 999px;
  transition: background .2s;
}
.nav .nav-cta:hover { background: var(--ink-2); color: var(--paper); }
.nav .nav-cta span { display: inline-block; margin-left: 4px; transition: transform .3s var(--ease); }
.nav .nav-cta:hover span { transform: translate(2px, -2px); }

.progress { height: 2px; }
.progress span {
  display: block; height: 100%; background: var(--ink);
  transform-origin: left; transform: scaleX(var(--p, 0));
}

.menu-toggle {
  display: none; align-items: center; gap: 10px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: none; border: 0; padding: 8px 0; cursor: pointer;
}
.menu-icon, .menu-icon::before { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.menu-icon { position: relative; transform: translateY(-3px); }
.menu-icon::before { content: ""; position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { transform: translateY(0) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(-6px) rotate(-90deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vh, 104px) 0 clamp(64px, 10vh, 112px); border-bottom: 1px solid var(--line); }
.hero .eyebrow { color: var(--muted); }
h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 8.2vw, 120px);
  line-height: 1.02; letter-spacing: -.045em;
  margin: 0 0 clamp(36px, 6vh, 64px);
}
h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
h1 .line > span { display: inline-block; }
em { font-family: var(--serif); }
.mark { position: relative; z-index: 0; white-space: nowrap; }
.mark::after {
  content: ""; position: absolute; z-index: -1;
  left: -.04em; right: -.08em; bottom: .1em; height: .2em;
  background: var(--accent);
  transform-origin: left; transform: scaleX(1);
}
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; }
.hero-bottom p { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 460px; margin: 0; }

.button {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 28px;
  background: var(--ink); color: #fff;
  padding: 18px 22px; font-size: 15px; border-radius: 999px;
  transition: background .2s, transform .3s var(--ease);
}
.button span { font-size: 18px; transition: transform .3s var(--ease); }
.button:hover { background: var(--ink-2); }
.button:hover span { transform: translate(3px, -3px); }

/* ---------- Services ---------- */
.services { padding: clamp(72px, 11vh, 128px) 0; }
h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 4.2vw, 56px); line-height: 1.12; letter-spacing: -.03em;
  margin-bottom: 0;
}
.section-heading { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-bottom: 64px; }
.section-heading .eyebrow { padding-top: 12px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.service-grid article {
  position: relative; border-top: 1px solid var(--line); padding-top: 24px;
}
.service-grid article::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.service-grid article:hover::before { transform: scaleX(1); }
.service-number { font-size: 12px; color: var(--muted); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.service-grid h3 { font-size: 26px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; margin: 28px 0 16px; max-width: 12ch; }
.service-grid p { font-size: 16px; line-height: 1.7; color: var(--muted); margin-bottom: 24px; }
.service-grid .service-detail { font-size: 12px; color: var(--ink); margin: 0; letter-spacing: .02em; }

/* ---------- About ---------- */
.about { background: var(--ink); color: #f6f8f2; padding: clamp(80px, 12vh, 136px) 0; }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 120px); }
.about .eyebrow { color: var(--accent); }
.about h2 em { color: var(--accent); }
.about-copy { padding-top: 44px; }
.about-copy p { font-size: 16px; line-height: 1.8; color: #ced6d9; margin-bottom: 20px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy .large-copy { font-size: 23px; line-height: 1.45; letter-spacing: -.01em; color: #fff; margin-bottom: 28px; }

/* ---------- Contact ---------- */
.contact { padding: clamp(80px, 12vh, 136px) 0; }
.contact .eyebrow { color: var(--muted); }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 120px); align-items: end; }
.contact h2 { font-size: clamp(44px, 5.4vw, 76px); letter-spacing: -.04em; }
.contact-copy p { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 420px; margin-bottom: 28px; }
.email {
  position: relative; display: inline-flex; align-items: center; gap: 28px;
  font-size: clamp(20px, 2vw, 26px); letter-spacing: -.02em; padding-bottom: 10px;
}
.email::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform-origin: right; transition: transform .45s var(--ease);
}
.email:hover::after { transform: scaleX(0); transform-origin: right; }
.email span { transition: transform .3s var(--ease); }
.email:hover span { transform: translate(3px, -3px); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-top { display: flex; align-items: center; gap: 24px; }
.footer .wordmark { font-size: 28px; }
.footer-top p { font-size: 13px; color: var(--muted); margin: 0 auto 0 8px; }
.footer-link { font-size: 13px; }
.footer-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px;
  display: flex; justify-content: space-between; gap: 24px;
}
.footer-bottom p { font-size: 12px; line-height: 1.9; color: var(--muted); margin: 0; }
.footer-bottom p:last-child { text-align: right; }

/* ---------- Motion (only when JS is on and motion is welcome) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .load {
    opacity: 0; transform: translateY(24px);
    animation: rise .9s var(--ease) forwards;
    animation-delay: calc(var(--d, 0) * 110ms + 80ms);
  }
  .js h1 .line > .load { transform: translateY(105%); opacity: 1; animation-duration: 1.1s; }
  .js .mark::after { transform: scaleX(0); animation: grow .8s var(--ease) forwards 1s; }

  .js .reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: calc(var(--d, 0) * 120ms);
  }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes grow { to { transform: scaleX(1); } }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .wrap { width: calc(100% - 64px); }
  .section-heading { grid-template-columns: 1fr; gap: 0; margin-bottom: 48px; }
  .service-grid { grid-template-columns: 1fr; gap: 48px; }
  .service-grid h3 { max-width: none; margin-top: 20px; }
  .about-inner, .contact-row { grid-template-columns: 1fr; }
  .about-copy { padding-top: 0; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 32px; }
}

/* ---------- Phone ---------- */
@media (max-width: 680px) {
  :root { --header-h: 68px; }
  .wrap { width: calc(100% - 32px); }
  .wordmark { font-size: 30px; }
  .header.scrolled .header-inner { height: 60px; }
  .header.scrolled .wordmark { font-size: 27px; }

  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px;
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line), 0 20px 40px -24px rgba(23, 43, 55, .25);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav a { font-size: 22px; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .nav-cta { margin-top: 16px; text-align: center; font-size: 16px; padding: 16px; border: 0; color: var(--paper); }
  .header:has(.nav.open) { background: var(--paper); box-shadow: 0 1px 0 var(--line); }

  .hero { padding-top: 32px; }
  .hero .eyebrow { font-size: 11px; max-width: 30ch; }
  h1 { font-size: clamp(42px, 14vw, 72px); letter-spacing: -.04em; }
  .hero-bottom p { font-size: 17px; }
  .button { width: 100%; justify-content: space-between; }
  .service-grid h3 { font-size: 24px; }
  .about-copy .large-copy { font-size: 20px; }
  .email { font-size: 20px; gap: 16px; }

  .footer-top { flex-wrap: wrap; row-gap: 12px; }
  .footer-top p { order: 3; flex-basis: 100%; margin: 0; }
  .footer-link { margin-left: auto; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .footer-bottom p:last-child { text-align: left; }
}
