/* ==========================================================================
   Imperial Environmental Services — Design 2 · Premium Minimal
   "Clean air, made quiet."
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bone: #F5F3EE;
  --paper: #FBFAF7;
  --line: #E2DED5;
  --line-strong: #CFCAC0;
  --ink: #121614;
  --ink-2: #2A302D;
  --stone: #62675F;          /* 5.1:1 on bone */
  --stone-light: #8C918A;    /* decorative only */
  --spruce: #1F3A36;
  --spruce-deep: #172C29;
  --spruce-soft: #2C4B46;
  --on-spruce: #ECEAE3;
  --on-spruce-dim: #A9B5B0;  /* 6.2:1 on spruce */
  --teal: #2B6A6F;           /* logo blades only */
  --im-drop: #6FAE45;        /* leaf: logo drop only */

  --f-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --fs-hero: clamp(3.3rem, 1.2rem + 7.4vw, 10.4rem);
  --fs-h1: clamp(2.9rem, 1.3rem + 5.2vw, 7.6rem);
  --fs-h2: clamp(2.1rem, 1.25rem + 3.1vw, 4.6rem);
  --fs-h3: clamp(1.45rem, 1.15rem + 1vw, 2.15rem);
  --fs-statement: clamp(1.7rem, 1rem + 2.75vw, 4.1rem);
  --fs-lead: clamp(1.08rem, 1rem + .35vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: .9rem;
  --fs-label: .74rem;

  --gutter: clamp(20px, 5.2vw, 104px);
  --maxw: 1680px;
  --gap: clamp(16px, 2vw, 32px);
  --section: clamp(96px, 7vw + 56px, 200px);
  --radius: clamp(14px, 1.4vw, 24px);
  --radius-sm: 12px;
  --header-h: 84px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-ui: .32s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:where(h1, h2, h3, h4) { font-weight: inherit; }

html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--spruce); color: var(--on-spruce); }

:focus-visible {
  outline: 2px solid var(--spruce);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--on-spruce); }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 300;
  background: var(--spruce); color: var(--on-spruce);
  padding: 10px 16px; border-radius: 999px; font-size: var(--fs-small);
  transition: top var(--t-ui) var(--ease);
}
.skip-link:focus { top: 16px; }

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

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .6); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Type ---------- */
.display, .h1, .h2, .h3 {
  font-family: var(--f-display);
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}
.display { font-size: var(--fs-hero); line-height: .93; letter-spacing: -.045em; }
.h1 { font-size: var(--fs-h1); line-height: .95; letter-spacing: -.042em; }
.h2 { font-size: var(--fs-h2); line-height: 1; letter-spacing: -.035em; }
.h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -.022em; }
.serif {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  font-size: 1.06em;
}
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.muted { color: var(--stone); }
.small { font-size: var(--fs-small); }
.label {
  font-family: var(--f-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: var(--fs-label); font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--stone);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow--both::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.prose p + p { margin-top: 1em; }
.prose { color: var(--ink-2); text-wrap: pretty; }

/* Section header: number + label + rule */
.sec-head {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 5vw, 80px);
}
.sec-head__num { font-family: var(--f-display); font-size: var(--fs-label); font-weight: 500; color: var(--ink); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.sec-head__label { font-size: var(--fs-label); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); }
.sec-head__aside { margin-left: auto; }

/* Link with drawn underline */
.ulink {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size .5s var(--ease);
  padding-bottom: 2px;
}
.ulink:hover, .ulink:focus-visible { background-size: 100% 1px; }
.ulink--static { background-size: 100% 1px; }
.ulink--static:hover { background-position: 100% 100%; animation: ulink-redraw .7s var(--ease); }
@keyframes ulink-redraw { 0% { background-size: 100% 1px; background-position: 100% 100%; } 45% { background-size: 0 1px; background-position: 100% 100%; } 46% { background-position: 0 100%; } 100% { background-size: 100% 1px; background-position: 0 100%; } }

.arrow-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-small); font-weight: 500;
}
.arrow-link svg { width: 16px; height: 16px; transition: transform .45s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--spruce); --fg: var(--on-spruce); --bd: var(--spruce);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--bd);
  font-size: .95rem; font-weight: 500; letter-spacing: -.005em;
  white-space: nowrap;
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease);
  will-change: transform;
}
.btn:hover { --bg: var(--spruce-deep); box-shadow: 0 10px 30px -12px rgba(23, 44, 41, .55); }
.btn svg { width: 16px; height: 16px; transition: transform .45s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-strong); }
.btn--ghost:hover { --bg: var(--paper); --bd: var(--ink); box-shadow: none; }
.btn--light { --bg: var(--on-spruce); --fg: var(--spruce-deep); --bd: var(--on-spruce); }
.btn--light:hover { --bg: #fff; box-shadow: 0 10px 30px -12px rgba(0,0,0,.4); }
.btn--outline-light { --bg: transparent; --fg: var(--on-spruce); --bd: rgba(236, 234, 227, .35); }
.btn--outline-light:hover { --bg: rgba(236,234,227,.08); --bd: var(--on-spruce); box-shadow: none; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .875rem; }
.btn__inner { display: inline-flex; align-items: center; gap: 12px; pointer-events: none; }

/* ---------- Brand mark + wordmark ---------- */
.mark { width: auto; height: 100%; color: var(--teal); }
.on-dark .mark { color: var(--on-spruce); }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink);
}
.brand__mark { height: 40px; width: 27px; flex: none; }
.brand__word { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--f-display); font-weight: 600; font-size: 1.32rem; letter-spacing: -.035em;
}
.brand__sub {
  margin-top: 5px;
  font-size: .565rem; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; color: var(--stone);
}
.on-dark .brand { color: var(--on-spruce); }
.on-dark .brand__sub { color: var(--on-spruce-dim); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background-color .5s var(--ease), border-color .5s var(--ease), transform .6s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(245, 243, 238, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.header.is-hidden { transform: translateY(-100%); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.header .brand { margin-right: auto; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2vw, 34px); }
.nav__link {
  position: relative; font-size: .92rem; color: var(--stone); padding: 6px 0;
  transition: color var(--t-ui) var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.header__phone { font-size: .92rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.header__actions { display: flex; align-items: center; gap: 22px; }

.menu-btn {
  display: none;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  position: relative;
  transition: border-color var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease);
}
.menu-btn span {
  position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--ink); border-radius: 2px;
  transition: transform .5s var(--ease), opacity .3s var(--ease);
}
.menu-btn span:nth-child(1) { top: 18px; }
.menu-btn span:nth-child(2) { top: 26px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* Mobile menu */
.mnav {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bone);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease), visibility 0s linear .8s;
}
.menu-open .mnav { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .8s var(--ease), visibility 0s; }
.mnav__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.mnav__list a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  font-family: var(--f-display); font-size: clamp(1.9rem, 8vw, 2.6rem); letter-spacing: -.035em; line-height: 1.05; font-weight: 500;
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.mnav__list a small { font-family: var(--f-body); font-size: .72rem; letter-spacing: .1em; color: var(--stone); font-weight: 500; }
.mnav__list a[aria-current="page"] { color: var(--spruce); }
.menu-open .mnav__list a { opacity: 1; transform: none; }
.menu-open .mnav__list li:nth-child(1) a { transition-delay: .12s; }
.menu-open .mnav__list li:nth-child(2) a { transition-delay: .17s; }
.menu-open .mnav__list li:nth-child(3) a { transition-delay: .22s; }
.menu-open .mnav__list li:nth-child(4) a { transition-delay: .27s; }
.menu-open .mnav__list li:nth-child(5) a { transition-delay: .32s; }
.mnav__foot { margin-top: auto; display: grid; gap: 14px; padding-top: 28px; }
.mnav__foot .btn { width: 100%; }
.mnav__meta { display: flex; justify-content: space-between; font-size: var(--fs-small); color: var(--stone); }

@media (max-width: 1180px) {
  .header__phone { display: none; }
}
@media (max-width: 980px) {
  .nav, .header__actions .btn { display: none; }
  .menu-btn { display: block; }
  :root { --header-h: 72px; }
}
@media (min-width: 981px) { .mnav { display: none; } }


/* ---------- Media frames ---------- */
.frame {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
  isolation: isolate;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--parallax img { height: 116%; margin-top: -8%; will-change: transform; }
.figcap {
  display: flex; gap: 12px; align-items: baseline;
  margin-top: 14px; font-size: .8rem; color: var(--stone);
}
.figcap b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ---------- Custom cursor (desktop, over media) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none;
  width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%;
  background: rgba(251, 250, 247, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink);
  display: grid; place-items: center;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  transform: scale(0); opacity: 0;
  transition: transform .5s var(--ease), opacity .35s var(--ease);
  box-shadow: 0 10px 40px -16px rgba(18, 22, 20, .4);
}
.cursor.is-on { transform: scale(1); opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ==========================================================================
   HOME
   ========================================================================== */
.hero {
  padding-top: calc(var(--header-h) + clamp(32px, 6vw, 96px));
  padding-bottom: clamp(56px, 6vw, 110px);
}
.hero__grid { align-items: end; row-gap: 48px; }
.hero__copy { grid-column: 1 / span 6; padding-bottom: clamp(0px, 2vw, 32px); }
.hero__eyebrow { margin-bottom: clamp(24px, 3vw, 40px); }
.hero__title { margin-bottom: clamp(28px, 3vw, 44px); }
.hero__title .line-mask { padding-bottom: .06em; margin-bottom: -.06em; }
.hero__lead { margin-bottom: clamp(32px, 3vw, 48px); max-width: 30em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media { grid-column: 7 / -1; }
/* desktop: the photo runs off the right edge of the page for presence */
@media (min-width: 981px) {
  .hero__media { margin-right: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--maxw) - 2 * var(--gutter)) / 2))); }
  .hero__frame { border-radius: var(--radius) 0 0 var(--radius); height: clamp(460px, calc(100svh - var(--header-h) - 150px), 920px); }
}
.hero__frame { aspect-ratio: auto; box-shadow: 0 40px 80px -48px rgba(18, 22, 20, .45); }
.hero__img { transform-origin: 50% 60%; }
.hero__haze {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(90% 70% at 30% 25%, rgba(255, 244, 222, .92), rgba(240, 226, 200, .78) 55%, rgba(222, 206, 178, .72));
  mix-blend-mode: normal;
  opacity: 0;
}
.hero__dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.js.motion .hero__img { filter: blur(26px) saturate(.45) brightness(1.14); transform: scale(1.16); }
.js.motion .hero__haze { opacity: 1; }
.hero__meta {
  margin-top: clamp(56px, 6vw, 96px);
  display: flex; flex-wrap: wrap; gap: 12px 40px; align-items: center;
  padding-top: 22px; border-top: 1px solid var(--line);
  font-size: var(--fs-small); color: var(--stone);
}
.hero__meta li { display: flex; align-items: center; gap: 10px; }
.hero__meta li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--spruce); opacity: .7; }
.hero__meta .scroll-cue { margin-left: auto; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue::before { display: none; }
.scroll-cue__line { width: 1px; height: 34px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue__line::after {
  content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--ink);
  animation: cue 2.4s var(--ease-io) infinite;
}
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(260%); } }

.line-mask { display: block; overflow: clip; }

/* caption confirms the clearance once the air has cleared */
.hero__cap { align-items: center; }
.hero__cap-sep { width: 18px; height: 1px; background: var(--line-strong); }
.hero__status { display: inline-flex; align-items: center; gap: 7px; color: var(--stone); }
.hero__status-dot { width: 6px; height: 6px; border-radius: 50%; background: #B9A57E; animation: status-blink 1.1s ease-in-out infinite; }
@keyframes status-blink { 50% { opacity: .25; } }
.hero__check { width: 15px; height: 15px; color: var(--spruce); display: none; }
.hero__check circle { fill: rgba(31, 58, 54, .1); }
.hero__check path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12; stroke-dashoffset: 12; transition: stroke-dashoffset .7s var(--ease) .15s; }
.hero__status-text::after { content: 'testing…'; }
.hero.is-clear .hero__status-dot, .no-js .hero__status-dot { display: none; }
.hero.is-clear .hero__check, .no-js .hero__check { display: block; }
.hero.is-clear .hero__check path, .no-js .hero__check path { stroke-dashoffset: 0; }
.hero.is-clear .hero__status { color: var(--spruce); font-weight: 500; }
.hero.is-clear .hero__status-text::after, .no-js .hero__status-text::after { content: 'passed'; }

@media (max-width: 980px) {
  .hero__copy, .hero__media { grid-column: 1 / -1; }
  .hero__frame { aspect-ratio: 4 / 4.2; }
  .hero__meta .scroll-cue { display: none; }
}

/* phones: tighter top so the photo peeks in on first load */
@media (max-width: 600px) {
  .hero { padding-top: calc(var(--header-h) + 22px); }
  .hero__eyebrow { display: none; }
  .hero__title { font-size: clamp(2.6rem, 12.4vw, 3.3rem); margin-bottom: 18px; }
  .hero__lead { font-size: 1rem; margin-bottom: 22px; }
  .hero__grid { row-gap: 32px; }
  .hero__ctas { flex-wrap: nowrap; align-items: center; gap: 16px; }
  .hero__ctas .btn { min-height: 48px; padding: 0 18px; font-size: .9rem; }
  .hero__ctas .btn svg { display: none; }
  .hero__ctas .btn--ghost { border: 0; padding: 0; min-height: 0; background: none; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line-strong); }
  .hero__ctas .btn--ghost:hover { background: none; }
}

/* Statement */
.statement__grid { row-gap: 32px; }
.statement__aside { grid-column: 1 / span 3; }
.statement__text {
  grid-column: 4 / -1;
  font-family: var(--f-display); font-weight: 500;
  font-size: var(--fs-statement); line-height: 1.08; letter-spacing: -.032em;
  text-wrap: pretty;
}
.statement__text .dim { color: var(--stone-light); }
.statement__foot { grid-column: 4 / -1; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin-top: clamp(32px, 4vw, 56px); }
@media (max-width: 980px) { .statement__aside, .statement__text, .statement__foot { grid-column: 1 / -1; } }

/* Services index */
.svc-index { margin-top: calc(clamp(40px, 5vw, 80px) * -1); }
.svc-row { border-bottom: 1px solid var(--line); position: relative; }
.svc-row__link {
  display: grid; grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr) 3rem; align-items: center; gap: var(--gap);
  padding: clamp(22px, 2.4vw, 38px) 0;
  transition: padding .7s var(--ease), color .4s var(--ease);
}
.svc-row__num { font-size: var(--fs-label); letter-spacing: .08em; color: var(--stone); font-variant-numeric: tabular-nums; }
.svc-row__name {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 4.8rem); line-height: 1; letter-spacing: -.04em;
  transition: transform .8s var(--ease), color .4s var(--ease);
}
.svc-row__desc { font-size: var(--fs-small); color: var(--stone); max-width: 30em; transition: color .4s var(--ease); }
.svc-row__arrow {
  justify-self: end; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong); display: grid; place-items: center; overflow: hidden;
  transition: background-color .45s var(--ease), border-color .45s var(--ease), color .45s var(--ease);
}
.svc-row__arrow svg { width: 16px; height: 16px; transition: transform .6s var(--ease); }
.svc-row__more { display: none; }
@media (hover: hover) and (pointer: fine) {
  .svc-index:hover .svc-row__name { color: var(--stone-light); }
  .svc-index:hover .svc-row:hover .svc-row__name { color: var(--ink); transform: translateX(clamp(12px, 1.6vw, 28px)); }
  .svc-row:hover .svc-row__arrow { background: var(--spruce); border-color: var(--spruce); color: var(--on-spruce); }
  .svc-row:hover .svc-row__arrow svg { animation: arrow-slide .6s var(--ease); }
  .svc-row:hover .svc-row__desc { color: var(--ink-2); }
}
@keyframes arrow-slide { 0% { transform: translateX(0); } 45% { transform: translateX(150%); } 46% { transform: translateX(-150%); } 100% { transform: translateX(0); } }

.svc-preview {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: clamp(240px, 22vw, 360px); aspect-ratio: 4 / 5;
  margin: calc(clamp(240px, 22vw, 360px) * -.625) 0 0 calc(clamp(240px, 22vw, 360px) * -.5);
  border-radius: var(--radius); overflow: hidden;
  opacity: 0; transform: scale(.86);
  box-shadow: 0 40px 80px -40px rgba(18, 22, 20, .5);
  visibility: hidden;
}
.svc-preview__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(100% 0 0 0); }
.svc-preview__img.is-active { clip-path: inset(0 0 0 0); z-index: 2; }
.svc-preview__img.is-leaving { z-index: 1; clip-path: inset(0 0 0 0); }
@media (hover: none), (pointer: coarse) { .svc-preview { display: none; } }

@media (max-width: 980px) {
  .svc-row__link { grid-template-columns: 2.6rem minmax(0, 1fr) 46px; }
  .svc-row__desc { display: none; }
}
@media (hover: none), (pointer: coarse) {
  .svc-row__more {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .7s var(--ease);
  }
  .svc-row__more > div { overflow: hidden; }
  .svc-row__more-inner { display: grid; grid-template-columns: 112px 1fr; gap: 18px; padding: 0 0 26px; align-items: start; }
  .svc-row__more-inner img { width: 112px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
  .svc-row__more-inner p { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: 10px; }
  .svc-row.is-open .svc-row__more { grid-template-rows: 1fr; }
  .svc-row.is-open .svc-row__arrow { background: var(--spruce); color: var(--on-spruce); border-color: var(--spruce); }
  .svc-row.is-open .svc-row__arrow svg { transform: rotate(90deg); }
}

/* Trust row */
.trust { padding-block: calc(var(--section) * .7); }
.trust__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px) clamp(28px, 3vw, 44px) 0; }
.stat + .stat { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--line); }
.stat__value {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(2.6rem, 1.6rem + 3vw, 5.2rem); line-height: 1; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline;
}
.stat__value small { font-size: .42em; letter-spacing: -.02em; margin-left: .12em; color: var(--stone); }
.stat__label { margin-top: 14px; font-size: var(--fs-small); color: var(--stone); max-width: 16em; }
.trust__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; padding-top: 24px; align-items: center; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: .82rem; color: var(--ink-2); background: var(--paper);
}
.badge svg { width: 14px; height: 14px; color: var(--spruce); }
.serve { font-size: var(--fs-small); color: var(--stone); }
.serve b { color: var(--ink); font-weight: 500; }
@media (max-width: 760px) {
  .trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Process — stacked sticky cards */
.process__grid { align-items: start; }
.process__intro { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 40px); }
.process__intro .h2 { margin-bottom: 24px; }
.process__cards { grid-column: 6 / -1; display: grid; gap: 28px; }
.pcard {
  position: sticky;
  top: calc(var(--header-h) + 40px + var(--i, 0) * 16px);
  min-height: clamp(340px, 34vw, 460px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 44px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(20px, 3vw, 44px);
  transform-origin: 50% 0;
  box-shadow: 0 -18px 50px -38px rgba(18, 22, 20, .35);
  overflow: hidden;
}
.pcard__shade { position: absolute; inset: 0; background: var(--bone); opacity: 0; pointer-events: none; border-radius: inherit; }
.pcard__body { display: flex; flex-direction: column; }
.pcard__num { font-family: var(--f-display); font-size: clamp(3.2rem, 2rem + 4vw, 6.4rem); font-weight: 500; letter-spacing: -.05em; line-height: .9; color: var(--line-strong); }
.pcard__title { margin-top: auto; padding-top: 28px; }
.pcard__text { margin-top: 12px; color: var(--stone); font-size: var(--fs-small); max-width: 26em; }
.pcard__media { border-radius: calc(var(--radius) * .7); overflow: hidden; background: var(--line); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 980px) {
  .process__intro { grid-column: 1 / -1; position: static; margin-bottom: 40px; }
  .process__cards { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .pcard { grid-template-columns: 1fr; min-height: 0; top: calc(var(--header-h) + 16px + var(--i, 0) * 10px); }
  .pcard__media { aspect-ratio: 16 / 10; order: -1; }
  .pcard__num { font-size: 2.6rem; }
  .pcard__title { padding-top: 14px; }
}

/* Before / after */
.ba-section__grid { row-gap: 36px; align-items: end; }
.ba-section__copy { grid-column: 1 / span 4; }
.ba-section__copy .h2 { margin-bottom: 20px; }
.ba-section__media { grid-column: 5 / -1; }
.ba {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 10.5; background: var(--line);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: ew-resize;
  --pos: 50%;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag {
  position: absolute; top: 18px; z-index: 3;
  padding: 7px 12px; border-radius: 999px;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  background: rgba(251, 250, 247, .9); color: var(--ink);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity .3s var(--ease);
}
.ba__tag--before { left: 18px; }
.ba__tag--after { right: 18px; }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 4;
  width: 0; display: grid; place-items: center;
}
.ba__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -.5px; width: 1px; background: rgba(251, 250, 247, .95); box-shadow: 0 0 12px rgba(0,0,0,.25); }
.ba__knob {
  position: relative; width: 54px; height: 54px; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 8px 30px -8px rgba(18, 22, 20, .45);
  transition: transform .4s var(--ease), background-color .3s var(--ease);
  cursor: ew-resize;
}
.ba__knob svg { width: 12px; height: 12px; }
.ba__knob:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.ba.is-dragging .ba__knob, .ba__knob:hover { transform: scale(1.08); }
.ba-caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: .8rem; color: var(--stone); }
@media (max-width: 980px) { .ba-section__copy, .ba-section__media { grid-column: 1 / -1; } }
@media (max-width: 640px) { .ba { aspect-ratio: 4 / 3.6; } .ba__knob { width: 46px; height: 46px; } }

/* Testimonial */
.quote { text-align: center; }
.quote__mark { width: 30px; height: 45px; margin: 0 auto 36px; }
.quote__text {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.9rem, 1.1rem + 3.1vw, 4.4rem); line-height: 1.12; letter-spacing: -.015em;
  max-width: 22em; margin-inline: auto; text-wrap: balance;
}
.quote__by { margin-top: 36px; display: inline-flex; flex-direction: column; gap: 4px; font-size: var(--fs-small); }
.quote__by b { font-weight: 500; }
.quote__by span { color: var(--stone); }

/* CTA band */
.cta { padding-block: 0 clamp(20px, 2vw, 32px); }
.cta__card {
  position: relative; overflow: hidden;
  background: var(--spruce); color: var(--on-spruce);
  border-radius: calc(var(--radius) * 1.2);
  padding: clamp(48px, 7vw, 128px) clamp(24px, 6vw, 112px);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: end;
}
.cta__card .h1 { color: var(--on-spruce); font-size: clamp(2.6rem, 1.4rem + 4.4vw, 6.4rem); }
.cta__card .serif { color: var(--on-spruce); }
.cta__side { display: grid; gap: 22px; justify-items: start; }
.cta__side p { color: var(--on-spruce-dim); max-width: 26em; }
.cta__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.cta__ghost-mark {
  position: absolute; right: -3%; top: -18%; height: 150%; width: auto; opacity: .06; color: var(--on-spruce); pointer-events: none;
  --im-drop: var(--on-spruce);
}
@media (max-width: 860px) { .cta__card { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer {
  background: var(--spruce-deep); color: var(--on-spruce);
  padding: clamp(64px, 7vw, 120px) 0 32px;
  margin-top: 0;
}
.footer__top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 40px var(--gap); }
.footer .brand__mark { height: 52px; width: 35px; }
.footer .brand__name { font-size: 1.6rem; }
.footer__tag { margin-top: 24px; color: var(--on-spruce-dim); max-width: 22em; font-size: var(--fs-small); }
.footer h2 { font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase; color: var(--on-spruce-dim); font-weight: 500; margin-bottom: 18px; }
.footer__list { display: grid; gap: 10px; font-size: .95rem; }
.footer__list a { color: var(--on-spruce); }
.footer__list span { color: var(--on-spruce-dim); }
.footer__big {
  margin-top: clamp(56px, 7vw, 120px);
  display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid rgba(236, 234, 227, .14);
}
.footer__phone {
  font-family: var(--f-display); font-weight: 500; letter-spacing: -.04em; line-height: 1;
  font-size: clamp(2.2rem, 1.2rem + 4.4vw, 6rem); font-variant-numeric: tabular-nums;
}
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; padding-top: 24px; font-size: .8rem; color: var(--on-spruce-dim); }
@media (max-width: 860px) {
  .footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__brand, .footer__top > div:last-child { grid-column: 1 / -1; }
  .footer__list { overflow-wrap: anywhere; }
}

/* ==========================================================================
   INNER PAGES — shared page head
   ========================================================================== */
.phead { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 140px)); padding-bottom: clamp(48px, 6vw, 96px); }
.phead__grid { row-gap: 32px; align-items: end; }
.phead__title { grid-column: 1 / span 8; }
.phead__title .eyebrow { margin-bottom: clamp(24px, 3vw, 40px); }
.phead__aside { grid-column: 9 / -1; padding-bottom: .6em; }
.phead__aside .lead { font-size: var(--fs-body); color: var(--stone); }
@media (max-width: 980px) { .phead__title, .phead__aside { grid-column: 1 / -1; } }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.expand { position: relative; height: 200vh; }
.expand__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.expand__frame {
  position: absolute; inset: 0;
  clip-path: inset(16% var(--gutter) 16% var(--gutter) round 24px);
  will-change: clip-path;
}
.expand__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); will-change: transform; }
.expand__cap {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 4vh; z-index: 2;
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  color: var(--ink);
}
.expand__cap p { font-family: var(--f-display); font-size: clamp(1.05rem, .85rem + .9vw, 1.9rem); letter-spacing: -.025em; line-height: 1.12; max-width: 24em; font-weight: 500; }
.expand__cap span { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.expand__top {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 5vh; z-index: 2;
  display: flex; justify-content: space-between; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--stone);
}
@media (max-width: 640px) { .expand__cap span { display: none; } }
.expand__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 18, 16, .55), rgba(12,18,16,0) 55%); opacity: 0; }
.no-motion .expand, .no-js .expand { height: auto; }
.no-motion .expand__sticky, .no-js .expand__sticky { position: relative; height: auto; display: block; padding-inline: var(--gutter); }
.no-motion .expand__frame, .no-js .expand__frame { position: relative; clip-path: none; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/8; }
.no-motion .expand__frame img, .no-js .expand__frame img { transform: none; }
.no-motion .expand__cap, .no-js .expand__cap { position: static; margin-top: 16px; color: var(--ink); }
.no-motion .expand__top, .no-js .expand__top { display: none; }

/* Pre-split headings stay hidden until SplitText has measured them */
.js.motion [data-split], .js.motion .hero__title { visibility: hidden; }

.svc-layout { align-items: start; }
.svc-toc {
  grid-column: 1 / span 3;
  position: sticky; top: calc(var(--header-h) + 40px);
}
.svc-toc__group + .svc-toc__group { margin-top: 26px; }
.svc-toc__group p { margin-bottom: 10px; }
.svc-toc a {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0; font-size: .95rem; color: var(--stone);
  transition: color var(--t-ui) var(--ease);
}
.svc-toc a::before { content: ""; width: 0; height: 1px; background: currentColor; transition: width .5s var(--ease); }
.svc-toc a:hover { color: var(--ink); }
.svc-toc a.is-active { color: var(--ink); }
.svc-toc a.is-active::before { width: 18px; }
.svc-main { grid-column: 4 / -1; }
.svc-group + .svc-group { margin-top: var(--section); }
.svc-group__head { display: flex; align-items: baseline; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: clamp(40px, 5vw, 72px); }
.svc {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.svc + .svc { margin-top: clamp(72px, 9vw, 160px); }
.svc__media { grid-column: 1 / span 5; }
.svc__media .frame { aspect-ratio: 4 / 4.6; }
.svc__body { grid-column: 6 / -1; align-self: center; }
.svc:nth-of-type(even) .svc__media { grid-column: 5 / -1; order: 2; }
.svc:nth-of-type(even) .svc__body { grid-column: 1 / span 4; }
.svc__num { margin-bottom: 18px; }
.svc__title { margin-bottom: 18px; }
.svc__lists { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.svc__lists h4 { font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase; color: var(--stone); font-weight: 500; margin-bottom: 14px; }
.ticks { display: grid; gap: 8px; font-size: .93rem; color: var(--ink-2); }
.ticks li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; width: 8px; height: 1px; background: var(--spruce); transform: translateY(-4px); }
.svc--wide { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.svc--wide .svc__media { grid-column: 1 / -1; order: 0; }
.svc--wide .svc__body { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--gap); }
.svc--wide .svc__intro { grid-column: 1 / span 4; }
.svc--wide .svc__lists { grid-column: 6 / -1; margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 1080px) {
  .svc-toc { display: none; }
  .svc-main { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .svc, .svc--wide .svc__body { grid-template-columns: 1fr; }
  .svc__media, .svc__body, .svc:nth-of-type(even) .svc__media, .svc:nth-of-type(even) .svc__body,
  .svc--wide .svc__intro, .svc--wide .svc__lists { grid-column: 1 / -1; order: 0; }
  .svc--wide .svc__lists { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
  .svc__media .frame { aspect-ratio: 4 / 3.4; }
  .svc__lists { grid-template-columns: 1fr; }
}

/* Process grid (services) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.step { padding: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 32px) clamp(28px, 3vw, 44px) 0; border-bottom: 1px solid var(--line); }
.step:not(:nth-child(3n+1)) { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--line); }
.step__num { font-size: var(--fs-label); letter-spacing: .08em; color: var(--stone); font-variant-numeric: tabular-nums; }
.step__title { margin: 40px 0 10px; }
.step p { color: var(--stone); font-size: var(--fs-small); max-width: 22em; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .step:nth-child(even) { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .step:nth-child(even) { padding-left: 0; border-left: 0; }
  .step__title { margin-top: 18px; }
}

.serve-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.serve-grid li { background: var(--bone); padding: clamp(22px, 2.4vw, 36px); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.serve-grid li span:first-child { font-family: var(--f-display); font-size: var(--fs-h3); letter-spacing: -.025em; font-weight: 500; line-height: 1.1; }
.serve-grid li span:last-child { font-size: var(--fs-label); color: var(--stone); letter-spacing: .08em; }
@media (max-width: 760px) { .serve-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .serve-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq__grid { align-items: start; row-gap: 40px; }
.faq__intro { grid-column: 1 / span 4; }
.faq__list { grid-column: 6 / -1; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; text-align: left;
  padding: 26px 0; font-family: var(--f-display); font-size: clamp(1.15rem, 1rem + .6vw, 1.55rem); letter-spacing: -.02em; font-weight: 500; line-height: 1.25;
}
.faq__icon { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; transition: background-color .4s var(--ease), border-color .4s var(--ease); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: currentColor; transition: transform .5s var(--ease); }
.faq__icon::after { transform: rotate(90deg); }
.faq__item.is-open .faq__icon { background: var(--spruce); border-color: var(--spruce); color: var(--on-spruce); }
.faq__item.is-open .faq__icon::after { transform: rotate(0deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.faq__a > div { overflow: hidden; }
.faq__a p { padding-bottom: 28px; color: var(--ink-2); max-width: 40em; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.no-js .faq__a { grid-template-rows: 1fr; }
@media (max-width: 980px) { .faq__intro, .faq__list { grid-column: 1 / -1; } }

/* ==========================================================================
   REGULATORY RESOURCES
   ========================================================================== */
.lib-tools {
  position: sticky; top: calc(var(--header-h) - 1px); z-index: 20;
  transition: top .6s var(--ease);
  background: rgba(245, 243, 238, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.lib-tools__inner { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; padding-block: 16px; }
.search {
  position: relative; flex: 1 1 320px; max-width: 520px;
}
.search svg { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--stone); pointer-events: none; }
.search input {
  width: 100%; height: 52px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper);
  padding: 0 48px 0 48px; font-size: .98rem;
  transition: border-color var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease);
}
.search input::placeholder { color: var(--stone); }
.search input:focus { outline: none; border-color: var(--spruce); box-shadow: 0 0 0 4px rgba(31, 58, 54, .1); }
.search__clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--stone);
  opacity: 0; pointer-events: none; transition: opacity var(--t-ui) var(--ease), background-color var(--t-ui);
}
.search__clear svg { position: static; transform: none; width: 14px; height: 14px; }
.search__clear:hover { background: var(--line); color: var(--ink); }
.search.has-value .search__clear { opacity: 1; pointer-events: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent;
  font-size: .9rem; color: var(--ink-2);
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--spruce); border-color: var(--spruce); color: var(--on-spruce); }
.chip__count { font-size: .74rem; opacity: .7; font-variant-numeric: tabular-nums; }
.lib-tools__count { margin-left: auto; font-size: var(--fs-small); color: var(--stone); font-variant-numeric: tabular-nums; }

.header-hidden .lib-tools { top: 0; }
.lib { padding-bottom: var(--section); }
.lib__body { padding-top: clamp(48px, 6vw, 96px); }
.lib-cat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; }
.lib-cat + .lib-cat { margin-top: clamp(72px, 8vw, 140px); }
.lib-cat__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 120px); align-self: start; }
.lib-cat__head .h2 { margin: 14px 0 16px; }
.lib-cat__head p { color: var(--stone); font-size: var(--fs-small); max-width: 22em; }
.lib-cat__body { grid-column: 6 / -1; }
.lib-juris + .lib-juris { margin-top: clamp(40px, 4vw, 64px); }
.lib-juris__name {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink);
  font-family: var(--f-display); font-size: clamp(1.15rem, 1rem + .5vw, 1.45rem); letter-spacing: -.02em; font-weight: 500;
}
.lib-juris__name span { font-family: var(--f-body); font-size: var(--fs-label); letter-spacing: .1em; color: var(--stone); font-weight: 500; }
.ref { border-bottom: 1px solid var(--line); }
.ref a {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 22px 0;
  transition: padding .6s var(--ease);
}
.ref a::before {
  content: ""; position: absolute; inset: 0 calc(var(--gap) * -.75); border-radius: var(--radius-sm);
  background: var(--paper); opacity: 0; transform: scaleY(.85);
  transition: opacity .45s var(--ease), transform .6s var(--ease); z-index: -1;
}
.ref__title { font-size: 1.02rem; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.ref__title mark { background: rgba(31, 58, 54, .12); color: inherit; border-radius: 3px; padding: 0 2px; }
.ref__meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: .8rem; color: var(--stone); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; border: 1px solid var(--line-strong); font-size: .64rem; letter-spacing: .1em; font-weight: 600; color: var(--ink-2); }
.ref__go {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; overflow: hidden;
  transition: background-color .45s var(--ease), border-color .45s var(--ease), color .45s var(--ease);
}
.ref__go svg { width: 14px; height: 14px; transition: transform .6s var(--ease); }
.ref a:hover::before, .ref a:focus-visible::before { opacity: 1; transform: none; }
.ref a:hover .ref__go { background: var(--spruce); border-color: var(--spruce); color: var(--on-spruce); }
.ref a:hover .ref__go svg { animation: arrow-out .65s var(--ease); }
@keyframes arrow-out { 0% { transform: translate(0, 0); } 45% { transform: translate(140%, -140%); } 46% { transform: translate(-140%, 140%); } 100% { transform: translate(0, 0); } }
.ref[hidden], .lib-juris[hidden], .lib-cat[hidden] { display: none; }
.lib-empty { padding: 80px 0; text-align: center; color: var(--stone); }
.lib-empty .h3 { color: var(--ink); margin-bottom: 10px; }
.lib-note { margin-top: clamp(64px, 7vw, 120px); padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: .82rem; color: var(--stone); }
@media (max-width: 980px) {
  .lib-cat__head { grid-column: 1 / -1; position: static; }
  .lib-cat__body { grid-column: 1 / -1; }
  .lib-tools__count { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .lib-tools { position: static; }
  .search { flex-basis: 100%; max-width: none; }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.profile { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 110px)); }
.profile__grid { row-gap: 40px; align-items: end; }
.profile__head { grid-column: 1 / span 7; padding-bottom: clamp(0px, 3vw, 48px); }
.profile__head .eyebrow { margin-bottom: clamp(24px, 3vw, 40px); }
.profile__name { margin-top: clamp(28px, 3vw, 44px); display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; max-width: 32em; }
.profile__name dt { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--stone); font-weight: 500; padding-top: 3px; }
.profile__name dd { font-size: .98rem; color: var(--ink); }
.field-ph { display: inline-block; padding: 1px 8px; border: 1px dashed var(--line-strong); border-radius: 6px; font-family: var(--f-display); font-weight: 500; letter-spacing: -.01em; }
.profile__portrait { grid-column: 8 / -1; }
.profile__portrait .frame { aspect-ratio: 3 / 4; }
@media (max-width: 980px) { .profile__head, .profile__portrait { grid-column: 1 / -1; } .profile__portrait .frame { aspect-ratio: 4 / 4.4; } }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 3vw, 48px);
  display: flex; flex-direction: column;
}
.tile__label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 3vw, 48px); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tile__label h2 { font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); font-weight: 500; }
.tile__label span { font-size: var(--fs-label); color: var(--stone); font-variant-numeric: tabular-nums; }
.tile--about { grid-column: 1 / span 7; }
.tile--about .h3 { margin-bottom: 20px; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem); }
.tile--creds { grid-column: 8 / -1; }
.creds { display: grid; }
.creds li { display: grid; grid-template-columns: 2.2rem 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.creds li:first-child { padding-top: 0; }
.creds li:last-child { border-bottom: 0; }
.creds b { font-weight: 500; display: block; }
.creds small { color: var(--stone); font-size: .82rem; }
.creds .n { font-size: var(--fs-label); color: var(--stone); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.tile--clock { grid-column: 1 / span 5; padding: 0; overflow: hidden; }
.tile--clock .frame { border-radius: 0; aspect-ratio: 16 / 11; }
.tile--clock .tile__in { padding: clamp(26px, 3vw, 44px); }
.tile--motto { grid-column: 6 / -1; background: var(--spruce); color: var(--on-spruce); border-color: var(--spruce); position: relative; overflow: hidden; }
.tile--motto .tile__label { border-color: rgba(236, 234, 227, .16); }
.tile--motto .tile__label h2 { color: var(--on-spruce); }
.tile--motto .tile__label span { color: var(--on-spruce-dim); }
.motto {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.1rem, 1.2rem + 3.3vw, 4.8rem); line-height: 1.04; letter-spacing: -.015em;
  text-wrap: balance;
}
.motto .w { display: inline-block; }
.tile--motto p.motto-note { margin-top: auto; padding-top: 36px; color: var(--on-spruce-dim); max-width: 34em; }
.tile--motto .cta__ghost-mark { top: auto; bottom: -30%; right: -6%; height: 120%; }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.value { padding-top: 22px; border-top: 1px solid var(--ink); }
.value h3 { margin: 26px 0 10px; }
.value p { color: var(--stone); font-size: var(--fs-small); max-width: 24em; }
@media (max-width: 980px) {
  .tile--about, .tile--creds, .tile--clock, .tile--motto { grid-column: 1 / -1; }
  .values { grid-template-columns: 1fr; }
  .value h3 { margin-top: 14px; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact__grid { align-items: start; row-gap: 40px; }
.form-card { grid-column: 1 / span 7; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3.4vw, 56px); position: relative; overflow: hidden; }
.contact__side { grid-column: 9 / -1; display: grid; gap: 28px; position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 1080px) { .form-card { grid-column: 1 / span 12; } .contact__side { grid-column: 1 / -1; position: static; grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .contact__side { grid-template-columns: minmax(0, 1fr); } }
.contact__side > * { min-width: 0; }

.fset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fset + .fset { margin-top: clamp(32px, 3vw, 44px); }
.fset__legend { display: flex; gap: 14px; align-items: baseline; padding: 0; margin-bottom: 18px; width: 100%; }
.fset__legend b { font-size: var(--fs-label); color: var(--stone); font-weight: 500; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.fset__legend span { font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); font-weight: 500; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.frow + .frow, .frow + .field, .field + .frow, .field + .field { margin-top: 14px; }
.frow > .field + .field { margin-top: 0; }
@media (max-width: 600px) { .frow { grid-template-columns: 1fr; } }

.field { position: relative; }
.field input, .field textarea {
  width: 100%; height: 62px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bone);
  padding: 24px 18px 8px; font-size: 1rem;
  transition: border-color var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease);
}
.field textarea { height: 150px; resize: vertical; padding-top: 30px; line-height: 1.5; }
.field label {
  position: absolute; left: 19px; top: 20px; font-size: 1rem; color: var(--stone);
  pointer-events: none; transform-origin: 0 0;
  transition: transform .45s var(--ease), color var(--t-ui) var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--spruce); background: var(--paper); box-shadow: 0 0 0 4px rgba(31, 58, 54, .08); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.76); color: var(--ink-2); }
.field .req { color: var(--spruce); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #A2412F; }
.field__err { display: block; font-size: .78rem; color: #9A3B2A; margin-top: 6px; min-height: 0; }
.field__err:empty { display: none; }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bone);
  font-size: .92rem; color: var(--ink-2);
  transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease), padding .4s var(--ease);
}
.choice span::before {
  content: ""; width: 0; height: 10px; overflow: hidden; margin-right: -8px;
  background: no-repeat center / 10px 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5.2l2.6 2.6L9 2.4' fill='none' stroke='%23ECEAE3' stroke-width='1.6'/%3E%3C/svg%3E");
  transition: width .35s var(--ease), margin .35s var(--ease);
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--spruce); border-color: var(--spruce); color: var(--on-spruce); }
.choice input:checked + span::before { width: 10px; margin-right: 0; }
.choice input:focus-visible + span { outline: 2px solid var(--spruce); outline-offset: 3px; }
.choice-err { font-size: .78rem; color: #9A3B2A; margin-top: 8px; }
.choice-err:empty { display: none; }

.drop-wrap { margin-top: 14px; }
.drop {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 18px; background: var(--bone); cursor: pointer;
  transition: border-color var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--spruce); background: var(--paper); }
.drop__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.drop__icon svg { width: 18px; height: 18px; }
.drop__text { font-size: .92rem; }
.drop__text small { display: block; color: var(--stone); font-size: .8rem; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.files li { font-size: .78rem; padding: 6px 10px; border-radius: 8px; background: var(--bone); border: 1px solid var(--line); }

.form-foot { margin-top: clamp(32px, 3vw, 44px); padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.form-foot p { font-size: .8rem; color: var(--stone); max-width: 30em; }
.btn.is-loading .btn__inner { opacity: 0; }
.btn__spinner { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(236,234,227,.35); border-top-color: var(--on-spruce); opacity: 0; animation: spin .8s linear infinite; }
.btn.is-loading .btn__spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.success {
  position: absolute; inset: 0; z-index: 3;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(28px, 5vw, 80px);
  visibility: hidden; opacity: 0;
}
.success.is-on { visibility: visible; opacity: 1; }
.success__mark { width: 58px; height: auto; margin-bottom: 40px; color: var(--teal); overflow: visible; }
.success__mark .im-blade, .success__mark .im-drop { transform-box: fill-box; }
.success .h2 { margin-bottom: 18px; }
.success p { color: var(--ink-2); max-width: 30em; }
.success__summary { margin: 28px 0 36px; display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: .9rem; }
.success__summary dt { color: var(--stone); }

.info { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 36px); }
.info__rows { display: grid; }
.info__row dd { min-width: 0; overflow-wrap: anywhere; }
.info__row { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; align-items: baseline; }
.info__row:first-child { padding-top: 0; }
.info__row:last-child { border-bottom: 0; padding-bottom: 0; }
.info__row dt { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--stone); font-weight: 500; }
.info__row dd a { font-weight: 500; }
.info__big { white-space: nowrap; font-family: var(--f-display); font-size: clamp(1.45rem, 1rem + 1vw, 2.1rem); letter-spacing: -.035em; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; display: inline-block; margin-bottom: 4px; }
.emergency { background: var(--spruce); color: var(--on-spruce); border-color: var(--spruce); display: grid; gap: 14px; }
.emergency .label { color: var(--on-spruce-dim); display: flex; align-items: center; gap: 10px; }
.emergency .label i { width: 7px; height: 7px; border-radius: 50%; background: var(--on-spruce); position: relative; }
.emergency .label i::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--on-spruce); opacity: 0; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.emergency p { color: var(--on-spruce-dim); font-size: .92rem; }
.emergency a { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: -.03em; font-weight: 500; }

.map-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 0; }
.map-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 10px 14px; }
.map-card__title { font-family: var(--f-display); font-weight: 500; letter-spacing: -.02em; font-size: 1.05rem; }
.map { position: relative; border-radius: calc(var(--radius) - 6px); overflow: hidden; aspect-ratio: 5 / 4; background: #E5ECEE; }
.map__svg { width: 100%; height: 100%; }
.map__water { fill: #E5ECEE; }
.map__waterline { fill: none; stroke: #D7E2E5; stroke-width: 7; stroke-linejoin: round; }
.map__waterline--far { stroke: #DEE7EA; stroke-width: 16; }
.map__land { fill: #FBFAF7; }
.map__area { fill: #3C6A62; fill-opacity: .17; transition: fill-opacity .45s var(--ease); }
.map__area.is-hot { fill-opacity: .45; }
.map__inner { fill: none; stroke: #D8D2C7; stroke-width: .7; stroke-linejoin: round; }
.map__coast { fill: none; stroke: #AFC0C4; stroke-width: .9; stroke-linejoin: round; }
.map__wlabel { font-family: var(--f-serif); font-style: italic; font-size: 13px; fill: #7C9196; letter-spacing: .06em; text-anchor: middle; }
.map__clabel { font-family: var(--f-body); font-size: 8.5px; letter-spacing: .28em; fill: #A7A79F; text-anchor: middle; }
.map__rlabel { font-family: var(--f-body); font-size: 10.5px; font-weight: 500; fill: #3E4541; text-anchor: middle; transition: fill .3s var(--ease); paint-order: stroke; stroke: rgba(248, 246, 241, .85); stroke-width: 3px; stroke-linejoin: round; }
.map__rlabel--pin { text-anchor: start; }
.map__rlabel.is-hot { fill: var(--spruce); }
.map__leader { fill: none; stroke: #3E4541; stroke-width: .8; }
.map__dot { fill: var(--spruce); }
.map__core { fill: var(--paper); }
.map__pulse { fill: none; stroke: var(--spruce); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: map-pulse 2.8s var(--ease) infinite; }
@keyframes map-pulse { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(2.2); opacity: 0; } }
.map__scale path { fill: none; stroke: #5F6862; stroke-width: 1; }
.map__scale text, .map__north text { font-family: var(--f-body); font-size: 9px; letter-spacing: .12em; fill: #5F6862; }
.map__north path { fill: var(--spruce); }
.areas { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 6px 4px; }
.areas li { font-size: .78rem; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); cursor: default; transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }
.areas li.is-hot { background: var(--spruce); border-color: var(--spruce); color: var(--on-spruce); }
.map-card__note { display: flex; align-items: center; gap: 8px; padding: 10px 6px 6px; font-size: .74rem; color: var(--stone); }
.map-card__swatch { flex: none; width: 12px; height: 12px; border-radius: 3px; background: rgba(60, 106, 98, .22); border: 1px solid rgba(60, 106, 98, .45); }

/* ---------- Utilities ---------- */
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .hero__img { filter: none !important; transform: none !important; }
  .js .hero__haze { opacity: 0 !important; }
  .hero__dust { display: none; }
  .pcard { position: relative; top: auto; }
}
