/* Envision Business Advisory — design system
   Built from design/*.dc.html. Spacing scale and hairline mechanics follow the
   approved canvas: 15px gutters, 12px content offset from any rule, 1px rules,
   vertical rhythm 168 / 112 / 60. */

:root {
  /* colour */
  --ink: #141416;
  --cream: #EDEBE6;
  --sand: #E3DED2;
  --white: #FFFFFF;
  --navy: #0B4E72;
  --navy-deep: #083A56;
  --navy-ink: #06304A;   /* hero only, gradients out to --navy */
  --grey: #ECECEA;
  --gold: #B59410;

  /* grid */
  --gutter: 15px;
  --gap: 16px;
  --offset: 12px;          /* content sits this far off a rule */

  /* rhythm */
  --sect-open: 168px;
  --sect: 112px;
  --sect-tight: 60px;

  /* type */
  --display: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;   /* headings only */
  --body: 'DM Sans', Helvetica, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (max-width: 900px) {
  :root { --sect-open: 104px; --sect: 72px; --sect-tight: 40px; --gap: 12px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: var(--cream); padding: 12px 20px;
  font-family: var(--mono); font-size: 12px;
}
.skip:focus { left: 15px; top: 15px; }

/* ---------- primitives ---------- */

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.5;
}

.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .9;
}

.g12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* hairlines */
.rule-l { border-left: 1px solid currentColor; padding-left: var(--offset); }

/* vertical hairline drawn on a grid line; inset from the section edge */
.vline {
  position: absolute;
  width: 1px;
  background: currentColor;
  opacity: .8;
  transform-origin: 50% 0;
  transform: scaleY(0);
  animation: draw 1.1s cubic-bezier(.77, 0, .18, 1) .3s forwards;
  pointer-events: none;
}
@keyframes draw { to { transform: scaleY(1); } }

/* underline-on-hover link */
.ulink {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .3s var(--ease);
  padding-bottom: 2px;
}
.ulink:hover, .ulink:focus-visible { background-size: 100% 1px; }

/* pill button with a wipe fill */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 32px;
  border-radius: 999px;
  border: 1px solid currentColor;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: transparent;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  transform: scale(0);
  transform-origin: 100% 100%;
  transition: transform .4s cubic-bezier(.77, 0, .18, 1);
}
.btn:hover::before, .btn:focus-visible::before { transform: scale(1); }
.btn > span { position: relative; transition: color .3s; }

.btn--light { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.btn--light > span { color: var(--navy); }
.btn--light::before { background: var(--navy); }
.btn--light:hover > span { color: var(--cream); }

.btn--dark { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.btn--dark > span { color: var(--cream); }
/* blue buttons deepen on hover instead of inverting to cream */
.btn--dark::before { background: var(--navy-ink); }
.btn--dark:hover, .btn--dark:focus-visible { border-color: var(--navy-ink); }
.btn--dark:hover > span, .btn--dark:focus-visible > span { color: var(--cream); }

/* halftone image treatment */
.dither {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}
.dither picture { display: block; width: 100%; height: 100%; }
.dither img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.25) brightness(1.05);
  mix-blend-mode: luminosity;
  opacity: .9;
  position: relative;
  transition: transform 1.2s var(--ease), filter .8s ease;
}
.dither::after {
  content: "";
  position: absolute;
  /* oversized so a transform can drift it without exposing an edge — animating
     background-position repainted the whole layer every frame */
  inset: -60px;
  background-image: radial-gradient(circle, rgba(237,235,230,.55) .9px, transparent 1.5px);
  background-size: 5px 5px;
  mix-blend-mode: overlay;
  pointer-events: none;
  will-change: transform;
  animation: dots 14s linear infinite;
}
@keyframes dots { to { transform: translate3d(40px, 60px, 0); } }

/* rise-in for display lines */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .14em; margin-bottom: -.14em; }
.w > span { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); }
.in .w > span, .w.in > span { transform: translateY(0); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.spin { animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .vline { transform: none; }
  .w > span { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- header ---------- */

.site-head {
  position: absolute;
  top: var(--gutter); left: var(--gutter); right: var(--gutter);
  z-index: 20;
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
}

.brand {
  display: flex; align-items: center; gap: 14px;
  color: var(--cream);
  height: 34px;
}
.brand img { width: 26px; height: 26px; opacity: .95; }
.brand span { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: -.02em; }

.head-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.nav-toggle {
  height: 34px; padding: 0 34px;
  border-radius: 999px;
  border: 0;
  background: var(--cream); color: var(--navy);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
}

.mail-btn {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease);
}
.mail-btn:hover { transform: translateY(-2px); }
.mail-btn svg { stroke: var(--ink); }

/* full-screen nav panel */
.main-nav {
  position: fixed; inset: 0; z-index: 30;
  background: var(--navy); color: var(--cream);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--sect) var(--gutter);
  gap: 8px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s cubic-bezier(.77, 0, .18, 1);
  visibility: hidden;
}
.main-nav.open { clip-path: inset(0 0 0 0); visibility: visible; }
.main-nav a {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.05;
  font-size: clamp(40px, 8vw, 96px);
  width: max-content;
}
.main-nav a:hover { color: var(--gold); }
.nav-close {
  position: absolute; top: var(--gutter); right: var(--gutter);
  height: 34px; padding: 0 28px;
  border-radius: 999px; border: 1px solid var(--cream);
  background: transparent; color: var(--cream);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  height: 100svh;
  max-height: 1000px;
  background: var(--navy-ink);
  color: var(--cream);
}
/* fades the deep hero out into the band blue beneath it */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(11,78,114,0) 0%, var(--navy) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero .dither {
  position: absolute; inset: 0 0 0 40%;
  background: var(--navy-ink);
  /* mask the WHOLE layer (photo + dot texture) so it fades out instead of
     ending at a box edge. Widening the box to hide that seam is what made
     the portrait scale up under object-fit: cover. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
}
.hero .dither::before {
  content: "";
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(6,48,74,.85) 0%, rgba(6,48,74,.45) 30%, transparent 62%);
}
.hero-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(6,48,74,.90) 0%, rgba(6,48,74,.62) 48%, rgba(6,48,74,.30) 100%);
}
.hero:hover .dither picture { display: block; width: 100%; height: 100%; }
.dither img { transform: scale(1.04) translateX(-1.5%); filter: grayscale(1) contrast(1.45) brightness(1.12); }

.hero-title {
  position: absolute; left: var(--gutter); bottom: 56px; z-index: 3;
  width: min(60%, 860px);
  display: flex; flex-direction: column; gap: 10px;
}
.hero-support {
  max-width: 560px; opacity: .85; margin-top: 18px;
}
.hero-title .btn { margin-top: 26px; }
.hero-eyebrow { color: var(--gold); }
.hero-name {
  font-size: clamp(28px, 4.3vw, 58px);
  line-height: 1.06;
  letter-spacing: -.035em;
  text-wrap: balance;
  color: var(--cream);
}
.hero-creds {
  position: absolute; right: var(--gutter); bottom: 40px; z-index: 3;
  text-align: right; opacity: .85;
}
.hero .vline { color: rgba(237,235,230,.5); z-index: 2; }

@media (max-width: 900px) {
  .hero .dither { inset: 0; }
  .hero .dither::before { background: linear-gradient(180deg, rgba(11,78,114,.7), rgba(11,78,114,.9)); }
  /* stacked, the DOM order puts the h1 last — name first is the right read */
  .hero { display: flex; flex-direction: column; }
  .hero-title { order: 1; }
  .hero-creds { order: 3; }
  .hero .dither, .hero-veil { order: 0; }
  .hero { min-height: 640px; height: auto; max-height: none; padding: 140px 0 40px; }
  .hero-title { position: static; padding: 0 var(--gutter); gap: 18px; }
  .hero-creds { position: static; text-align: left; padding: 40px var(--gutter) 0; }
  .hero .vline { display: none; }
}

/* ---------- sections ---------- */

.sect { position: relative; padding-top: var(--sect); padding-bottom: var(--sect); }
.sect--open { padding-top: var(--sect-open); }
.sect--tight { padding-top: var(--sect-tight); }
.sect--cream { background: var(--cream); }
.sect--white { background: var(--white); }
.sect--navy  { background: var(--navy); color: var(--cream); }

.statement {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -.03em;
  font-weight: 400;
  text-wrap: pretty;
}
.lead {
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.25;
  letter-spacing: -.02em;
  text-wrap: pretty;
}
.big {
  font-size: clamp(44px, 10vw, 152px);
}

/* split display title */
.split-title { align-items: start; }
.split-title > *:first-child { grid-column: 1 / span 6; text-align: center; }
.split-title > *:last-child { grid-column: 7 / span 6; padding-left: 32px; }
@media (max-width: 900px) {
  .split-title > *:first-child, .split-title > *:last-child { grid-column: 1 / -1; padding-left: 0; text-align: left; }
}

/* services accordion */
.acc { border-top: 1px solid var(--navy); color: var(--navy); }
.acc-row { border-bottom: 1px solid var(--navy); }
.acc-head {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 34px 0 34px 32px;
  font-family: var(--display);
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: -.02em;
  color: inherit;
  background: none; border: 0; cursor: pointer;
  text-align: left;
}
.acc-head span { transition: transform .3s ease; }
.acc-head:hover span { transform: translateX(8px); }
.acc-head svg { flex: none; transition: transform .4s var(--ease); }
.acc-row[data-open="true"] .acc-head svg { transform: rotate(45deg); }
.acc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.acc-row[data-open="true"] .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-copy {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap);
  padding: 12px 0 32px 32px;
}
.acc-copy > div {
  grid-column: 4 / span 3;
  border-left: 1px solid var(--navy);
  padding-left: var(--offset);
  display: flex; flex-direction: column; gap: 26px;
}
@media (max-width: 900px) { .acc-copy > div { grid-column: 1 / -1; } }

/* tilted cards */
.card {
  background: var(--grey);
  color: var(--navy);
  padding: 28px 40px 44px;
  max-width: 460px;
  box-shadow: 0 18px 44px rgba(11,78,114,.08);
  transition: transform .5s var(--ease);
}
.card:hover { transform: translateY(-4px) rotate(0deg) !important; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; font-size: clamp(21px, 2.3vw, 30px); letter-spacing: -.02em; }
.card hr { border: 0; height: 1px; background: var(--gold); margin: 14px 0 22px; }
.card .mono { font-size: 11px; max-width: 300px; }

/* ---------- contact form ---------- */

.form-grid { border-top: 1px solid var(--navy); }
.field { display: flex; flex-direction: column; gap: 10px; padding: 22px 0; border-bottom: 1px solid var(--navy); }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.field label i { font-style: normal; opacity: .55; }
.field input, .field textarea {
  border: 0; background: transparent;
  font-family: var(--body); font-size: 20px; letter-spacing: -.02em; color: var(--ink);
  padding: 0; width: 100%;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; }
.field:focus-within { border-bottom-color: var(--gold); }
.hp { position: absolute; left: -9999px; }
.form-status { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; min-height: 1.5em; }
.form-status.err { color: #A4341C; }
.form-status.ok { color: var(--gold); }

/* ---------- footer ---------- */

.site-foot {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--cream);
  padding: 40px var(--gutter) 32px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap);
  min-height: 520px;
  align-content: start;
}
.foot-mark {
  position: absolute; left: 100px; bottom: -160px;
  width: 560px; height: 560px;
  opacity: .92;
  pointer-events: none;
}
.site-foot ul, .site-foot .foot-col { position: relative; z-index: 2; }
.foot-col { border-left: 1px solid rgba(237,235,230,.4); padding-left: var(--offset); display: flex; flex-direction: column; gap: 6px; }
.foot-nav { grid-column: 7 / span 3; }
.foot-contact { grid-column: 10 / span 3; }
.foot-legal { grid-column: 7 / span 6; align-self: end; margin-top: 200px; display: flex; flex-direction: column; gap: 6px; opacity: .85; font-size: 10px; position: relative; z-index: 2; }

@media (max-width: 900px) {
  .foot-mark { left: -80px; bottom: -220px; width: 420px; height: 420px; opacity: .5; }
  .foot-nav, .foot-contact, .foot-legal { grid-column: 1 / -1; }
  .foot-legal { margin-top: 60px; }
  .site-foot { min-height: 0; gap: 32px; }
}

/* ---------- services list (Services artboard) ---------- */

.svc {
  border-top: 1px solid var(--navy);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap);
  padding: 40px 0 48px;
}
.svc:last-child { border-bottom: 1px solid var(--navy); }
.svc-no { grid-column: 1 / span 1; color: var(--navy); }
.svc-main { grid-column: 2 / span 5; color: var(--navy); }
.svc-main h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.03em; line-height: 1;
}
.svc-main .lbl { display: inline-block; transition: transform .3s var(--ease); }
.svc:hover .lbl { transform: translateX(8px); }
.svc-main p { font-size: 17px; line-height: 1.55; color: var(--ink); max-width: 520px; margin-top: 16px; }
.svc ul {
  grid-column: 8 / span 5;
  display: flex; flex-direction: column; gap: 8px;
}
.svc li {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy); padding-left: 18px; position: relative;
}
.svc li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 1px; background: var(--gold); }

@media (max-width: 900px) {
  .svc { grid-template-columns: 1fr; gap: 20px; }
  .svc-no, .svc-main, .svc ul { grid-column: 1 / -1; }
}

/* ---------- page head band ---------- */

.pagehead {
  background: var(--navy); color: var(--cream);
  padding: var(--sect-open) var(--gutter) var(--sect-tight);
  display: flex; flex-direction: column; gap: 48px;
}
.pagehead .display { font-size: clamp(40px, 8.6vw, 124px); }
.pagehead .sub {
  font-size: clamp(19px, 1.9vw, 28px); line-height: 1.3; letter-spacing: -.02em;
  max-width: 900px; opacity: .92; text-wrap: pretty;
}

/* prose (privacy) */
.prose h2 { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; color: var(--navy); margin-top: 48px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 17px; line-height: 1.6; max-width: 640px; margin-top: 14px; }

/* ---------- statement band with a scroll-driven staircase (OCI pattern) ---------- */

/* Reproduction of OCI's Stairs component (verified from their bundle):
     gsap.from(stairs, {scaleX:0, transformOrigin:"left",
       stagger:{each:.1, from:"end"},
       scrollTrigger:{start:"bottom bottom", end:"bottom 30%", scrub:true}})
   THREE bars, pinned to the section's BOTTOM edge, 140px tall, spanning the
   left half of the grid at 1/3, 2/3 and 3/3 width. They are a stepped edge
   into the next section — they never cover the copy, which is why theirs
   stays readable. Widest sits lowest and moves first. */
.stair {
  --p: 0;
  position: relative;
  border-top: 1px solid rgba(237,235,230,.28);
  background: var(--navy);
  color: var(--cream);
  padding: 80px var(--gutter) 112px;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.stair-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding-top: 40px;
}
.stair-copy .statement {
  /* OCI sets this paragraph at lg:fs-46 — at 74px it collided with the top
     stair, because the stairs occupy a fixed 420px at the section's bottom */
  font-size: clamp(26px, 3.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -.03em;
  max-width: 1180px;
}
.stair-notes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.stair-notes p {
  grid-column: span 3;
  border-left: 1px solid rgba(237,235,230,.4);
  padding-left: var(--offset);
  opacity: .9;
}
.stair-notes p:first-child { grid-column: 7 / span 3; }

.stairs {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  pointer-events: none;
}
.stairs span {
  grid-column: 1 / 7;
  height: 140px;
  background: var(--cream);
  margin-left: calc(var(--gutter) * -1);
  transform-origin: left;
  will-change: transform;
}
/* stagger "from: end": the bottom (widest) bar leads, the top one trails */
.stairs span:nth-child(1) { width: calc(33.3333% + var(--gutter)); transform: scaleX(clamp(0, calc((var(--p) - 0.286) / 0.714), 1)); }
.stairs span:nth-child(2) { width: calc(66.6666% + var(--gutter)); transform: scaleX(clamp(0, calc((var(--p) - 0.143) / 0.714), 1)); }
.stairs span:nth-child(3) { width: calc(100% + var(--gutter));     transform: scaleX(clamp(0, calc((var(--p) - 0.000) / 0.714), 1)); }

@media (prefers-reduced-motion: reduce) {
  .stairs span { transform: none; }
}

.stair-meta {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between;
  color: var(--cream);
  padding-bottom: 0;
}

@media (max-width: 900px) {
  .stair-copy { gap: 48px; }
  .stair-notes p, .stair-notes p:first-child { grid-column: 1 / -1; }
  .stair { min-height: 0; }
  .stairs { position: relative; top: auto; height: 160px; margin-top: var(--sect); }
}

/* stats bar under the staircase */
.stats {
  background: var(--navy); color: var(--cream);
  padding: 28px var(--gutter);
  overflow: hidden;
}
.stats-track {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
}
.stats-track > div { border-left: 1px solid rgba(237,235,230,.4); padding-left: var(--offset); }
.stats-dupe { display: none; }
.stats-track b { display: block; font-size: clamp(20px, 2.1vw, 30px); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.stats-track .mono { font-size: 10px; opacity: .8; margin-top: 4px; }

/* ---------- testimonial carousel ---------- */

.quotes { position: relative; }
.quote {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .9s var(--ease);
  pointer-events: none;
  display: flex; flex-direction: column; gap: 28px;
}
.quote[data-active="true"] { opacity: 1; pointer-events: auto; position: relative; }
.quote blockquote { margin: 0; }
.quote-dots { display: flex; gap: 8px; margin-top: 44px; }
.quote-dots button {
  width: 28px; height: 2px; padding: 0; border: 0; cursor: pointer;
  background: var(--navy); opacity: .25;
  transition: opacity .3s ease;
}
.quote-dots button[aria-current="true"] { opacity: 1; }

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

picture { display: contents; }
.dither picture { display: block; }

/* ---------- mobile: collapse the 12-column grid ----------
   Sections place children with INLINE grid-column values, which outrank any
   media query — so the override has to be !important or nothing moves. */
@media (max-width: 900px) {
  .g12 { grid-template-columns: 1fr; row-gap: 32px; }
  .g12 > * { grid-column: 1 / -1 !important; }

  /* decorative rules are positioned at desktop percentages; they mean nothing
     once the grid is one column */
  .sect > .vline, .hero .vline { display: none; }

  .card { max-width: 100%; transform: none !important; }
  .card:hover { transform: translateY(-4px) !important; }

  .quotes { padding-left: var(--offset); }
  .quote { position: relative; }
  .quote:not([data-active="true"]) { display: none; }

  .stair { min-height: 0; padding: 56px var(--gutter) 180px; }
  .stairs span { height: 90px; }
  .stair-copy { gap: 40px; padding-top: 24px; }

  .pagehead { gap: 28px; }
  .prose p { max-width: none; }
  .site-head { gap: 8px; }
  .brand span { display: none; }
  .brand { padding: 0 12px; }
}

@media (max-width: 480px) {
  .brand img { width: 22px; height: 22px; }
  .nav-toggle { padding: 0 16px; font-size: 10px; }
  .mail-btn { width: 40px; height: 40px; }
  .btn { padding: 0 24px; }
  .svc li { font-size: 10px; }
}

/* portrait caption: two spans side by side collide once the column narrows */
@media (max-width: 900px) {
  .figcap { flex-direction: column !important; gap: 4px !important; }
  .figcap span:last-child { opacity: .75; }
}

@media (max-width: 900px) {
  .acc-head { padding-left: 0; }
  .acc-copy { padding-left: 0; }
  .acc + .btn, .btn--dark { margin-left: 0 !important; }
}

/* Desktop controls sit at 34-36px per the design. Touch devices need a 44px
   minimum hit area, so restore it there without changing the visual height. */
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-toggle, .nav-close { min-height: 44px; }
  .mail-btn { width: 44px; height: 44px; }
}

/* ---------- intro loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  animation: loaderDone 0s linear 2.5s forwards;
}
@keyframes loaderDone { to { visibility: hidden; } }

/* the curtain: five columns that lift away, left to right */
.loader-cols {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.loader-cols span {
  display: block;
  background: var(--navy-ink);
  transform: translateY(0);
  animation: curtain .9s cubic-bezier(.77, 0, .18, 1) forwards;
}
.loader-cols span:nth-child(1) { animation-delay: 1.60s; }
.loader-cols span:nth-child(2) { animation-delay: 1.68s; }
.loader-cols span:nth-child(3) { animation-delay: 1.76s; }
.loader-cols span:nth-child(4) { animation-delay: 1.84s; }
.loader-cols span:nth-child(5) { animation-delay: 1.92s; }
@keyframes curtain { to { transform: translateY(-101%); } }

.loader-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 0 var(--gutter);
  animation: loaderOut .5s ease 1.45s forwards;
}
@keyframes loaderOut { to { opacity: 0; transform: translateY(-14px); } }

.loader-mark {
  width: 96px; height: 96px;
  opacity: 0;
  animation: markIn .7s ease .05s forwards, spin 2.6s linear .05s infinite;
}
@keyframes markIn { to { opacity: 1; } }

.loader-name {
  color: var(--cream);
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.03em;
  font-size: clamp(24px, 3.4vw, 40px);
  opacity: 0;
  transform: translateY(12px);
  animation: wordsIn .7s cubic-bezier(.16, 1, .3, 1) .70s forwards;
}
.loader-tag {
  color: var(--gold);
  opacity: 0;
  transform: translateY(12px);
  animation: wordsIn .7s cubic-bezier(.16, 1, .3, 1) .88s forwards;
}
@keyframes wordsIn { to { opacity: 1; transform: none; } }

/* seen it once already this session, or motion is unwelcome: never show it */
:root.no-loader .loader { display: none; }
@media (prefers-reduced-motion: reduce) { .loader { display: none; } }

/* ---------- mobile: sizes tuned for the desktop grid ---------- */
@media (max-width: 900px) {
  /* the services mark is 300px against a 390px screen */

  /* the step caption is indented 120px to clear a desktop vertical rule that
     no longer exists here */
  .sect--white .mono.rule-l { margin-left: 0 !important; }

  /* card stack gaps are sized for a tall desktop column */
  .sect--white .g12 > div { gap: 32px !important; padding-top: 0 !important; }

  /* the loader mark and the contact-page mark can come down too */
  .loader-mark { width: 72px; height: 72px; }
}

/* testimonial meta row: label and marker on one line, on the section's gutter */
.testi-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 0 var(--gutter);
}

/* ---------- mobile: ticker, gold rules, no stairs ---------- */
@media (max-width: 900px) {
  /* the stacked steps read as stray blocks once the section narrows */
  .stairs { display: none; }
  .stair { padding-bottom: 56px; }

  /* the three facts scroll as one line instead of stacking */
  .stats-track {
    display: flex;
    grid-template-columns: none;
    width: max-content;
    gap: 0;
    animation: ticker 26s linear infinite;
  }
  .stats-track > div {
    flex: none;
    padding-left: var(--offset);
    padding-right: 40px;
    border-left-color: var(--gold);
  }
  .stats-dupe { display: block; }
  @keyframes ticker { to { transform: translateX(-50%); } }
  .stats:hover .stats-track { animation-play-state: paused; }

  .quotes { padding-left: var(--offset); }
}
@media (prefers-reduced-motion: reduce) {
  .stats-track { animation: none; }
}

/* ---------- mobile: a longer, softer entrance ---------- */
@media (max-width: 900px) {
  .reveal {
    transform: translateY(24px);
    transition: opacity .85s var(--ease), transform .85s var(--ease);
  }
  /* stagger within a group so text arrives in sequence, not all at once */
  .stair-notes p:nth-of-type(2) { transition-delay: .10s; }
  .acc-row:nth-child(2) .acc-head { transition-delay: .06s; }
  .acc-row:nth-child(3) .acc-head { transition-delay: .12s; }
  .acc-row:nth-child(4) .acc-head { transition-delay: .18s; }
  .svc-main { transition-delay: .06s; }
  .svc ul { transition-delay: .12s; }
  .quote .mono { transition-delay: .12s; }
  .field:nth-child(2) { transition-delay: .06s; }
  .field:nth-child(3) { transition-delay: .12s; }
  .field:nth-child(4) { transition-delay: .18s; }
  .prose h2 { transition-delay: .04s; }
  .foot-contact { transition-delay: .08s; }
  .foot-legal { transition-delay: .16s; }
  .hero-support { transition-delay: .10s; }
  .hero-title .btn { transition-delay: .20s; }
  .hero-creds { transition-delay: .28s; }
}
