/* ==========================================================================
   BLUE SUN STRATEGIES — Design System
   --------------------------------------------------------------------------
   Brand colours live in :root — beige is #EEE0C8, blue is sampled from the
   logo ink. Logo assets live in assets/img/ — see the README for what each
   file is and where it's used.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* ---- Palette ----
     --cream is the brand beige. --blue-700 is sampled from the logo ink.
     Everything else is derived from those two. */
  --white:        #FFFFFF;
  --cream:        #EEE0C8;   /* brand beige */
  --cream-deep:   #E3D2B2;
  --sand:         #D3BE99;   /* hairlines / borders */

  --blue-900:     #072F55;   /* deep aegean — headings, dark sections */
  --blue-700:     #0B5091;   /* = logo blue. primary actions */
  --blue-500:     #17639F;   /* accent, eyebrows, links */
  --blue-200:     #9CBFDC;
  --blue-50:      #E8F0F8;

  --ink:          #13212E;
  --ink-soft:     #46586A;

  /* Mediterranean accents — used only by the audit score dials, where a
     three-band good/fair/poor signal is needed alongside the blues. */
  --ochre:        #96702A;
  --clay:         #A0442A;

  /* ---- Typography ---- */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --fs-display:   clamp(2.85rem, 6.2vw, 5.25rem);
  --fs-h1:        clamp(2.35rem, 4.8vw, 3.75rem);
  --fs-h2:        clamp(1.95rem, 3.6vw, 3rem);
  --fs-h3:        clamp(1.3rem, 1.9vw, 1.6rem);
  --fs-lede:      clamp(1.05rem, 1.4vw, 1.25rem);
  --fs-body:      1rem;
  --fs-small:     0.875rem;
  --fs-eyebrow:   0.75rem;

  /* ---- Space & shape ---- */
  --gutter:       clamp(1.25rem, 4vw, 3rem);
  --max:          1220px;
  --max-narrow:   760px;
  --section:      clamp(4.5rem, 9vw, 8.5rem);

  --r-sm:  6px;
  --r-md:  14px;
  --r-lg:  24px;
  --r-pill: 999px;
  --arch:  50vw 50vw var(--r-md) var(--r-md);   /* the signature arch */

  --shadow-sm: 0 1px 2px rgba(7, 47, 85, .05), 0 6px 18px rgba(7, 47, 85, .05);
  --shadow-md: 0 2px 4px rgba(7, 47, 85, .05), 0 18px 46px rgba(7, 47, 85, .09);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --nav-h: 78px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--blue-900);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }

::selection { background: var(--blue-200); color: var(--blue-900); }

:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--blue-900); color: var(--white);
  padding: .75rem 1.25rem; border-radius: var(--r-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Available to screen readers, absent from the visual layout. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--max-narrow); }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }
.section--deep  { background: var(--blue-900); color: rgba(255,255,255,.78); }
.section--deep h1,
.section--deep h2,
.section--deep h3 { color: var(--white); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.stack > * + * { margin-top: 1.25rem; }

/* --------------------------------------------------------------------------
   4. Type helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: .55;
}
.eyebrow--center { justify-content: center; }
/* On any dark band the accent blue is unreadable — lift it to the pale tint. */
.section--deep .eyebrow,
.cta .eyebrow { color: var(--blue-200); }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}
.section--deep .lede { color: rgba(255,255,255,.72); }

.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--blue-900);
  margin: 0 0 1.5rem;
}
.display em {
  font-style: italic;
  color: var(--blue-500);
}

.center { text-align: center; }
.center .lede { margin-inline: auto; }

.rule {
  height: 1px;
  border: 0;
  background: var(--sand);
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .95rem 1.85rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--blue-900); color: var(--white); }
.btn--primary:hover { background: var(--blue-700); }

.btn--ghost {
  background: transparent;
  color: var(--blue-900);
  border-color: var(--sand);
}
.btn--ghost:hover { border-color: var(--blue-900); background: var(--white); }

.btn--light { background: var(--white); color: var(--blue-900); }
.btn--light:hover { background: var(--blue-50); }

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.35);
}
.btn--outline-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  align-items: center;
}

/* Inline arrow link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--blue-700);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .25s var(--ease), gap .25s var(--ease);
}
.link-arrow:hover { border-color: currentColor; gap: .85rem; }
.link-arrow svg { flex: none; }
.section--deep .link-arrow { color: var(--blue-200); }

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(238, 224, 200, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--sand);
}

.header__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* --- Logo: sun mark (image) + typographic wordmark --- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--blue-900);
  flex: none;
}
.logo__mark {
  width: 36px;
  height: 36px;
  flex: none;
  transition: transform .8s var(--ease);
}
/* the sun turns slowly on hover — 12 rays, so 30deg lands ray-on-ray */
.logo:hover .logo__mark { transform: rotate(30deg); }
.logo__type {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo__name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: .01em;
}
.logo__sub {
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .28rem;
}

/* Six links plus a button is a wide bar — the gap tightens to keep it on one
   line down to the 900px breakpoint, where it becomes a sheet anyway. */
.nav { display: flex; align-items: center; gap: clamp(.85rem, 1.7vw, 1.6rem); }

.nav__link {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 450;
  color: var(--ink);
  text-decoration: none;
  padding-block: .4rem;
  transition: color .2s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--blue-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--blue-700); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--blue-700); }

.header .btn { padding: .78rem 1.5rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--sand);
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--blue-900);
}
.nav-toggle__bars { display: block; width: 17px; height: 9px; position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute; left: 0;
  width: 100%; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after  { top: 7.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { top: 4px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--sand);
    padding: 1rem var(--gutter) 2rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__link {
    padding-block: 1rem;
    border-bottom: 1px solid var(--sand);
    font-size: 1.05rem;
  }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: 1.25rem; align-self: flex-start; }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 1rem clamp(4rem, 8vw, 7rem);
  background: var(--cream);
}

/* The hero's glow now comes from .hero__art::before, sitting directly behind
   the lockup, so the section itself stays flat and quiet. */

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero__meta {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--sand);
}
.hero__meta-label {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  text-align: center;
  margin-bottom: 1.15rem;
}

/* Three client names at a time, swapped one after another left to right —
   each slot fades out, changes, and fades back in on its own short delay, so
   the row turns over like a row of flaps rather than all at once. */
.client-rota {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  /* slots stretch to the tallest name in the row so a one-line name and a
     two-line one both sit centred in the same box */
  align-items: stretch;
}
.client-rota__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(.98rem, 1.15vw, 1.15rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blue-900);
  opacity: .62;
  /* must match FADE in main.js, or the text changes mid-fade */
  transition: opacity .21s var(--ease), transform .21s var(--ease);
  /* the longest name sets the line count, so the row never reflows mid-swap */
  min-height: 2.6em;
}
.client-rota__slot.is-swapping {
  opacity: 0;
  transform: translateY(-6px);
}

@media (max-width: 520px) {
  .client-rota { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .client-rota__slot:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .client-rota__slot { transition: none; }
}

/* The arch — signature shape */
.arch {
  position: relative;
  border-radius: var(--arch);
  overflow: hidden;
  background: var(--cream-deep);
}
.arch--tall { aspect-ratio: 3 / 4; }
.arch--wide { aspect-ratio: 4 / 3; }

/* real photography drops straight in — no inline styles needed */
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* --- Screenshots get a rounded rectangle, not an arch ---
   The arch's dome crops the top of a web page, which is the part that carries
   the nav and the headline. Anchoring to the top keeps that intact. */
.screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--sand);
  box-shadow: var(--shadow-md);
  background: var(--cream-deep);
}
.screen img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* flush inside a card, where the card already provides the edge */
.screen--flush { border: 0; border-radius: 0; box-shadow: none; }

/* Browser captures keep their own proportions — these are wide screenshots and
   cropping them to a fixed ratio clips the nav or the chat widget. */
.screen--shot { aspect-ratio: auto; }
.screen--shot img { height: auto; }

/* Two captures stacked as one case's artwork */
.screen-stack { display: grid; gap: clamp(.85rem, 1.8vw, 1.25rem); }

/* The lockup rides above the optical centre of the hero row, so the sun sits
   high in the viewport on first load rather than level with the headline. */
.hero__art {
  position: relative;
  align-self: start;
  margin-top: clamp(0rem, -3.5vw, -1.5rem);
}
.hero__art .arch { box-shadow: var(--shadow-md); }

/* --- Hero: the full logo lockup as the primary image ---
   The artwork's paper ground has been knocked out to transparency, so it needs
   no frame and no feathering — it simply sits on the page. */
.hero__lockup {
  position: relative;
  display: block;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  margin-top: 2rem;
  height: auto;
}

/* warm halo behind the sun, so it reads as rising rather than pasted on */
.hero__art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  width: min(760px, 128%);
  aspect-ratio: 1;
  background: radial-gradient(circle,
      rgba(180, 208, 231, .42) 0%,
      rgba(232, 240, 248, .24) 42%,
      rgba(238, 224, 200, 0) 70%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  /* Lockup sits above the headline on small screens, so keep it modest —
     at full width it eats the whole first screen and buries the copy. */
  .hero__art {
    order: -1;
    max-width: 250px;
    margin-inline: auto;
    margin-top: 0;
    width: 100%;
  }
  .hero { /padding-block: 1.5rem clamp(3rem, 8vw, 5rem); }
  .hero__meta { margin-top: 2.25rem; }
}

/* --- Sun mark used as a corner watermark ---
   Recurs top-right on interior page headers and on the dark CTA band, which is
   where the brand signs itself without competing with the header lockup. */
.sun-corner {
  position: absolute;
  top: -22%;
  right: -5%;
  width: min(400px, 44vw);
  aspect-ratio: 1;
  background: url("../img/bluesun-mark.png") center / contain no-repeat;
  opacity: .09;
  pointer-events: none;
}
.sun-corner--light {
  background-image: url("../img/bluesun-mark-light.png");
  opacity: .07;
}

@media (max-width: 620px) {
  .sun-corner { top: -14%; right: -18%; width: 62vw; }
}

/* --------------------------------------------------------------------------
   8. Page header (interior pages)
   -------------------------------------------------------------------------- */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--sand);
}
/* The corner sun (.sun-corner) is the only ornament here — a radial wash on top
   of it turned the whole band muddy. */
.page-head__inner { position: relative; max-width: 760px; }
.page-head .lede { margin-top: .5rem; }

.crumbs {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--blue-700); }
.crumbs span { opacity: .5; margin-inline: .5rem; }

/* --------------------------------------------------------------------------
   9. Placeholder media  (swap for real <img> later)
   -------------------------------------------------------------------------- */
.ph {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 160px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(7, 47, 85, .035) 0 10px,
      rgba(7, 47, 85, 0) 10px 20px),
    linear-gradient(160deg, var(--blue-50), var(--cream-deep));
  display: grid;
  place-items: center;
}
.ph::after {
  content: attr(data-label);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-500);
  opacity: .75;
  text-align: center;
  padding: .5rem 1rem;
  border: 1px dashed rgba(28, 107, 176, .4);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .6);
}

/* --------------------------------------------------------------------------
   10. Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  display: flex;
  flex-direction: column;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
}
/* a max-content child (the tag band) would otherwise stretch the card */
.card, .card > * { min-width: 0; }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--ink-soft); font-size: .95rem; }
.card .link-arrow { margin-top: auto; padding-top: 1.5rem; }

.card__num {
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .1em;
  color: var(--blue-500);
  display: block;
  margin-bottom: 1.25rem;
}

.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  margin-bottom: 1.4rem;
  flex: none;
}

/* Service list rows (services page) */
.service-row {
  display: grid;
  grid-template-columns: 80px 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-block: clamp(2.25rem, 4vw, 3.5rem);
  border-top: 1px solid var(--sand);
}
.service-row:last-child { border-bottom: 1px solid var(--sand); }
.service-row__num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--blue-200);
}
.service-row h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.service-row__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: .7rem;
}
.service-row__list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
.service-row__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue-500);
  opacity: .6;
}
@media (max-width: 820px) {
  .service-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .service-row__num { font-size: 1.5rem; }
}

/* Compact feature tiles — the itemised service lists on the services page */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.9rem, 1.8vw, 1.35rem);
}
@media (max-width: 1000px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .feat-grid { grid-template-columns: 1fr; } }

.feat {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-md);
  padding: 1.15rem 1.3rem;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
@media (hover: hover) { .feat:hover { border-color: var(--blue-200); box-shadow: var(--shadow-sm); } }
.feat h4 {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--blue-900);
  margin: 0 0 .35rem;
}
.feat p { font-size: .85rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.feat-note {
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

/* --------------------------------------------------------------------------
   11. Reviews marquee (home)
   -------------------------------------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: .5rem 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  /* one long rope of reviews rather than two — twice the cards, so twice the
     duration keeps the drift at the same speed. Tag bands set their own. */
  animation: marquee 118s linear infinite;
}
.marquee__group {
  display: flex;
  gap: 1.25rem;
  flex: none;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - .625rem)); } /* half track + half gap */
}

/* second row drifts the other way */
.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 74s; }

.review {
  flex: none;
  width: min(420px, 78vw);
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.review__stars { display: flex; gap: .2rem; color: var(--blue-500); }
.review__quote {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.45;
  color: var(--blue-900);
  margin: 0;
}
.review__who {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-top: auto;
  padding-top: .25rem;
}
.review__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  border: 1px solid var(--sand);
}
.review__avatar .ph { min-height: 0; }
.review__avatar .ph::after { display: none; }
.review__name { font-weight: 550; font-size: .9rem; color: var(--ink); display: block; }
.review__role { font-size: .8rem; color: var(--ink-soft); display: block; }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* --------------------------------------------------------------------------
   11b. Free website audit
   -------------------------------------------------------------------------- */
.audit {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 940px) { .audit { grid-template-columns: 1fr; } }

/* Both modes ship in the markup; assets/js/audit.js sets data-mode on the
   section. `request` is the default, so the page still works with JS off and
   when no audit engine is configured. */
[data-audit] [data-audit-instant],
[data-audit] [data-audit-request] { display: none; }
[data-audit][data-mode="instant"] [data-audit-instant] { display: grid; }
[data-audit][data-mode="request"] [data-audit-request] { display: grid; }

/* the request panel has no states, so it reads top-down */
.audit-panel--static { justify-content: flex-start; }
.audit-static__list {
  list-style: none;
  counter-reset: audit-step;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}
.audit-static__list li {
  counter-increment: audit-step;
  position: relative;
  padding-left: 2.5rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.audit-static__list li::before {
  content: counter(audit-step, decimal-leading-zero);
  position: absolute;
  left: 0; top: .05em;
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--blue-500);
}
.audit-static__list span {
  display: block;
  font-size: 1rem;
  color: var(--blue-900);
  font-weight: 500;
  margin-bottom: .2rem;
}
.audit-static__foot {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand);
  font-size: .88rem;
  color: var(--ink-soft);
}

/* --- the URL form --- */
.audit-form { margin-top: 2rem; }
.audit-form__row {
  display: flex;
  gap: .75rem;
  align-items: stretch;
}
.audit-form__field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.audit-form__field input {
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-pill);
  padding: .95rem 1.25rem .95rem 2.9rem;
  width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.audit-form__field input::placeholder { color: #9AA7B2; }
.audit-form__field input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(23, 99, 159, .13);
}
.audit-form__field svg {
  position: absolute;
  left: 1.1rem; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}
.audit-form .btn { flex: none; white-space: nowrap; }
.audit-form__note {
  font-size: .78rem;
  color: var(--ink-soft);
  margin: .9rem 0 0;
}
.audit-form__error {
  font-size: .82rem;
  color: var(--clay);
  margin: .75rem 0 0;
  min-height: 1.2em;
}

@media (max-width: 560px) {
  .audit-form__row { flex-direction: column; }
  .audit-form .btn { width: 100%; }
}

/* --- what the audit checks --- */
.audit-checks {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: .65rem;
}
.audit-checks li {
  position: relative;
  padding-left: 1.75rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.audit-checks li::before {
  content: "";
  position: absolute;
  left: 0; top: .45em;
  width: 13px; height: 8px;
  border-left: 1.5px solid var(--blue-500);
  border-bottom: 1.5px solid var(--blue-500);
  transform: rotate(-45deg);
}

/* --- the results panel --- */
.audit-panel {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* one state visible at a time, driven by data-state on .audit-panel */
.audit-state { display: none; }
.audit-panel[data-state="idle"]    .audit-state--idle,
.audit-panel[data-state="loading"] .audit-state--loading,
.audit-panel[data-state="done"]    .audit-state--done,
.audit-panel[data-state="error"]   .audit-state--error { display: block; }

.audit-panel[data-state="done"] { justify-content: flex-start; }

/* idle */
.audit-state--idle { text-align: center; }
.audit-state--idle .audit-idle__mark {
  width: 86px; height: 86px;
  margin: 0 auto 1.5rem;
  background: url("../img/bluesun-mark.png") center / contain no-repeat;
  opacity: .16;
}
.audit-state--idle p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--blue-900);
  max-width: 30ch;
  margin-inline: auto;
}
.audit-state--idle span {
  display: block;
  font-family: var(--font-body);
  font-size: .84rem;
  color: var(--ink-soft);
  margin-top: .75rem;
}

/* loading */
.audit-state--loading { text-align: center; }
.audit-spinner {
  width: 62px; height: 62px;
  margin: 0 auto 1.5rem;
  background: url("../img/bluesun-mark.png") center / contain no-repeat;
  animation: audit-spin 3.6s linear infinite;
}
@keyframes audit-spin { to { transform: rotate(360deg); } }
.audit-state--loading p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--blue-900);
  margin: 0;
}
.audit-state--loading span {
  display: block;
  font-size: .84rem;
  color: var(--ink-soft);
  margin-top: .6rem;
}
@media (prefers-reduced-motion: reduce) {
  .audit-spinner { animation: none; opacity: .3; }
}

/* results header */
.audit-result__head {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--sand);
}
.audit-result__url {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--blue-900);
  overflow-wrap: anywhere;
}
.audit-result__meta {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* score dials */
.dials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
/* three dials without a PageSpeed key, four with one */
.dials[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) {
  .dials, .dials[data-count="3"] { grid-template-columns: repeat(2, 1fr); }
}

.audit-result__count {
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin: 1.35rem 0 0;
  text-align: center;
}

.dial { text-align: center; }
.dial__ring {
  position: relative;
  width: 78px; height: 78px;
  margin: 0 auto .7rem;
}
.dial__ring svg { transform: rotate(-90deg); }
.dial__track { fill: none; stroke: var(--blue-50); stroke-width: 6; }
.dial__value {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  /* r=34 -> circumference 213.6 */
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 1.1s var(--ease);
}
.dial__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--blue-900);
}
.dial__label {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
}
/* good / fair / poor bands */
.dial[data-band="good"] .dial__value { stroke: var(--blue-700); }
.dial[data-band="fair"] .dial__value { stroke: var(--ochre); }
.dial[data-band="poor"] .dial__value { stroke: var(--clay); }

/* findings list */
.audit-findings {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--sand);
  display: grid;
  gap: 1rem;
}
.audit-findings__title {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 1.75rem 0 0;
}
.audit-findings li { display: flex; gap: .75rem; align-items: flex-start; }
.audit-findings__dot {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-top: .55em;
  background: var(--clay);
}
.audit-findings li[data-band="fair"] .audit-findings__dot { background: var(--ochre); }
.audit-findings__text { font-size: .9rem; color: var(--ink); }
.audit-findings__text span {
  display: block;
  color: var(--ink-soft);
  font-size: .84rem;
  margin-top: .2rem;
}

.audit-result__foot {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand);
}
.audit-result__foot p {
  font-size: .88rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

/* error */
.audit-state--error p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--blue-900);
  margin: 0 0 .75rem;
}
.audit-state--error span {
  display: block;
  font-size: .88rem;
  color: var(--ink-soft);
  margin-bottom: 1.35rem;
}

/* --------------------------------------------------------------------------
   12. Logo strip
   -------------------------------------------------------------------------- */
.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 5vw, 4rem);
}
.logos__item {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .55;
  white-space: nowrap;
  transition: opacity .3s var(--ease);
}
.logos__item:hover { opacity: .9; }
.logos__caption {
  text-align: center;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2.25rem;
}

/* --------------------------------------------------------------------------
   13. Stats / split feature
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split--reverse .split__art { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__art { order: 0; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--sand);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stats__item {
  background: var(--cream);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.section--white .stats__item { background: var(--white); }
.stats__num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1;
  color: var(--blue-900);
  display: block;
}
.stats__label {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .75rem;
  display: block;
}
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   14. FAQ accordion
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--sand); }
.faq__item { border-bottom: 1px solid var(--sand); }

.faq__item > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.6rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.35;
  color: var(--blue-900);
  transition: color .2s var(--ease);
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary:hover { color: var(--blue-500); }

.faq__sign {
  flex: none;
  width: 28px; height: 28px;
  position: relative;
  border: 1px solid var(--sand);
  border-radius: 50%;
  margin-top: .2rem;
  transition: background-color .25s var(--ease), border-color .25s var(--ease),
              transform .35s var(--ease);
}
.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: var(--blue-700);
  transition: opacity .25s var(--ease), background-color .25s var(--ease);
}
.faq__sign::before { width: 11px; height: 1.5px; transform: translate(-50%, -50%); }
.faq__sign::after  { width: 1.5px; height: 11px; transform: translate(-50%, -50%); }

.faq__item[open] .faq__sign { background: var(--blue-900); border-color: var(--blue-900); transform: rotate(90deg); }
.faq__item[open] .faq__sign::before { background: var(--white); }
.faq__item[open] .faq__sign::after  { opacity: 0; }

.faq__answer {
  padding-bottom: 1.75rem;
  max-width: 68ch;
  color: var(--ink-soft);
}
.faq__item[open] .faq__answer { animation: fade-slide .4s var(--ease); }

@keyframes fade-slide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.faq-groups { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.faq-group__title {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   15. Case studies
   -------------------------------------------------------------------------- */
.case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.75rem, 5vw, 4.5rem);
}
/* Grid items default to min-width:auto, which lets the max-content tag band
   push the column — and the artwork — out of shape. */
.case > * { min-width: 0; }
.case:not(:last-child) { border-bottom: 1px solid var(--sand); }
.case:first-child { padding-top: 0; }
.case:last-child { padding-bottom: 0; }

/* The rows carry their own rhythm, so the wrapper only needs breathing room
   at the section seams. Clipping keeps the sideways reveal from ever pushing
   out a horizontal scrollbar mid-animation. */
.section--cases {
  padding-block: clamp(3.25rem, 6.5vw, 5.5rem);
  overflow-x: clip;
}

/* Each half arrives from the side it sits on. The art column is always first
   in the DOM but is re-ordered to the right on even rows, so the direction is
   keyed to the row, not to source order. */
.case:nth-child(odd)  > .case__art.reveal  { transform: translate(-3.5rem, 12px); }
.case:nth-child(odd)  > .case__body.reveal { transform: translate( 3.5rem, 12px); }
.case:nth-child(even) > .case__art.reveal  { transform: translate( 3.5rem, 12px); }
.case:nth-child(even) > .case__body.reveal { transform: translate(-3.5rem, 12px); }
.case > .reveal { transition-duration: .85s; }
/* has to out-specify the four offset rules above, hence the doubled class */
.case:nth-child(odd)  > .case__art.reveal.is-visible,
.case:nth-child(odd)  > .case__body.reveal.is-visible,
.case:nth-child(even) > .case__art.reveal.is-visible,
.case:nth-child(even) > .case__body.reveal.is-visible { transform: none; }

@media (max-width: 860px) {
  .case:nth-child(odd)  > .case__art.reveal,
  .case:nth-child(even) > .case__body.reveal { transform: translate(-1.75rem, 12px); }
  .case:nth-child(odd)  > .case__body.reveal,
  .case:nth-child(even) > .case__art.reveal  { transform: translate( 1.75rem, 12px); }
  .case:nth-child(odd)  > .case__art.reveal.is-visible,
  .case:nth-child(odd)  > .case__body.reveal.is-visible,
  .case:nth-child(even) > .case__art.reveal.is-visible,
  .case:nth-child(even) > .case__body.reveal.is-visible { transform: none; }
}
.case:nth-child(even) .case__art { order: 2; }
@media (max-width: 860px) {
  .case { grid-template-columns: 1fr; }
  .case:nth-child(even) .case__art { order: 0; }
}

/* A client wordmark heading a case teaser, in place of a screenshot. Each
   plate takes the client's own background so the mark reads as they intend. */
.case-logo {
  display: grid;
  place-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  min-height: clamp(148px, 16vw, 190px);
  border-bottom: 1px solid var(--sand);
}
.case-logo img {
  width: auto;
  height: auto;
  max-width: min(250px, 70%);
  max-height: 76px;
}
.case-logo--light { background: var(--cream-deep); }
.case-logo--dark  { background: #16181A; border-bottom-color: #16181A; }

/* Square client emblems need more height than a wide wordmark to carry the
   same optical weight in the plate. */
.case-logo--emblem img { max-width: 108px; max-height: 108px; }
.case-logo--dark-alt { background: #101110; border-bottom-color: #101110; }

/* --------------------------------------------------------------------------
   Case carousel (home) — runs the full width of the section rather than the
   text column, so the neighbouring cards bleed off the screen edges instead
   of being clipped by a container. Those bled halves are the controls: click
   the left one to go back, the right one to go on. The track is reordered
   after every step, so it never reaches a first or last card.
   -------------------------------------------------------------------------- */
.carousel {
  --cc-gap: clamp(1.25rem, 2.5vw, 2rem);
  --cc-across: 3;      /* card widths across the viewport */
  --cc-peek: .5;       /* how much of each neighbour is bled into frame */
  /* the resting offset, i.e. -(1 - peek) x cardWidth. Set in CSS as well as JS
     so the very first paint already shows both bled edges rather than a
     flush-left card that jumps once the script runs. */
  --cc-rest: calc(-0.5 * (100% - 3 * var(--cc-gap)) / 3);
  overflow-x: clip;
}
.carousel__viewport {
  /* The horizontal axis has to be clipped to hide the off-screen cards, but
     clipping the vertical axis too would cut the top off a card as it lifts
     on hover. `clip` on one axis (unlike `hidden`) lets the other stay
     visible without turning the box into a scroll container. */
  overflow: hidden;         /* fallback for browsers without `clip` */
  overflow: clip visible;
}
.carousel__track {
  display: flex;
  gap: var(--cc-gap);
  align-items: stretch;
  transform: translateX(var(--cc-rest));
  will-change: transform;
}
.carousel__item {
  flex: 0 0 calc((100% - var(--cc-across) * var(--cc-gap)) / var(--cc-across));
  /* a lifted card paints above its neighbours rather than under the next one */
  position: relative;
  /* the logo plate runs to the card's own edges, so the card carries no
     padding of its own — .card__body supplies it for the text instead */
  padding: 0;
  overflow: hidden;
}

.carousel__item:hover { z-index: 2; }

/* the bled halves read as controls: dimmed, and brightening on hover */
.carousel__item--peek {
  cursor: pointer;
  opacity: .5;
  transition: opacity .35s var(--ease);
}
@media (hover: hover) { .carousel__item--peek:hover { opacity: .8; } }
/* the inner link is inert while the card is acting as a control */
.carousel__item--peek a { pointer-events: none; }

@media (max-width: 860px) {
  .carousel { --cc-across: 2; --cc-peek: .5;
              --cc-rest: calc(-0.5 * (100% - 2 * var(--cc-gap)) / 2); }
}
/* On a phone, half-width neighbours would leave the real card at ~175px. Show
   one proper card instead, with just enough of each neighbour to tap. */
@media (max-width: 620px) {
  .carousel { --cc-across: 1.4; --cc-peek: .2;
              --cc-rest: calc(-0.8 * (100% - 1.4 * var(--cc-gap)) / 1.4); }
}

@media (prefers-reduced-motion: reduce) {
  .carousel__item--peek { transition: none; }
}

/* Card body — a flex column so the "read the case" link can be pushed to the
   bottom edge and sit level across cards of differing text length. */
.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
}

/* Pill tags — still used by the case teasers on the home page */
.case__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }

/* A case's services run as one continuous band rather than a wrapped row of
   pills. It reuses the .marquee component, so main.js clones the group for a
   seamless loop and reduced-motion turns it into a plain scroller. */
.tag-band {
  padding-block: .7rem;
  margin-bottom: 1.6rem;
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.tag-band .marquee__track { animation-duration: 30s; }
.tag-band__item {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue-500);
  white-space: nowrap;
}
/* the separator travels with the item, so the band reads evenly at any offset */
.tag-band__item::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--sand);
  flex: none;
}

/* "What we built" label above a case's deliverable list */
.case__built-label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin: 1.75rem 0 .9rem;
}
.tag {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--r-pill);
  padding: .35rem .8rem;
}

/* live-site link under a case */
.case__actions { margin-top: 1.9rem; }

/* client wordmark sitting under the screenshot */
.case__client-logo {
  width: clamp(120px, 34%, 190px);
  height: auto;
  margin: 1.5rem auto 0;
  opacity: .8;
}

.case__results {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sand);
}

/* caveat under a results row — quieter than body copy, deliberately */
.case__note {
  font-size: .8rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 1.1rem;
}
.case__result-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--blue-700);
  display: block;
}
.case__result-label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: .45rem;
  display: block;
}

/* --------------------------------------------------------------------------
   16. Team
   -------------------------------------------------------------------------- */
.person { display: flex; flex-direction: column; }
.person__photo {
  border-radius: var(--arch);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--cream-deep);
  margin-bottom: 1.35rem;
  border: 1px solid var(--sand);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }

.person__name { font-size: 1.35rem; margin-bottom: .25rem; }
.person__role {
  font-size: .72rem;
  /* long titles ("Assistant Director of Technology & AI Integrations") wrap to
     three lines in a four-up grid — tighter tracking keeps them readable */
  letter-spacing: .11em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: .9rem;
}
/* Reserve two lines so bios line up across a row. Pointless once the cards
   stack, where it just leaves a gap. */
@media (min-width: 621px) {
  .person__role { min-height: 3.2em; }
}
.person__bio { font-size: .92rem; color: var(--ink-soft); }
.person__links { display: flex; gap: .75rem; margin-top: 1.1rem; }
.person__links a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--sand);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.person__links a:hover { color: var(--white); background: var(--blue-900); border-color: var(--blue-900); }

/* --------------------------------------------------------------------------
   17. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* "What happens next" is a grid child in its own right, not nested in the
   details column, so that on a phone it can fall below the form while still
   sitting under the details on a wide screen. */
.contact-next { margin-top: clamp(2.5rem, 4vw, 3.25rem); }

@media (min-width: 901px) {
  .contact-details { grid-column: 1; grid-row: 1; }
  .contact-formcol { grid-column: 2; grid-row: 1 / span 2; }
  .contact-next    { grid-column: 1; grid-row: 2; margin-top: 0; }
}

/* Compact numbered steps — "what happens next", sat beside the contact form
   so the two columns finish at roughly the same height. */
.steps {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.steps li {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: .2rem;
}
.steps__num {
  font-family: var(--font-display);
  font-size: .9rem;
  line-height: 1.5;
  color: var(--blue-200);
}
.steps h3 {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--blue-900);
  margin: 0 0 .25rem;
}
.steps p {
  font-size: .875rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

.field { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.field label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-md);
  padding: .9rem 1.1rem;
  width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(28, 107, 176, .13);
}
.field input::placeholder,
.field textarea::placeholder { color: #A6B2BB; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.form-note {
  font-size: .78rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

.contact-detail {
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--sand);
}
.contact-detail:first-of-type { border-top: 1px solid var(--sand); }
.contact-detail__label {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue-500);
  display: block;
  margin-bottom: .45rem;
}
.contact-detail__value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--blue-900);
  text-decoration: none;
}
a.contact-detail__value:hover { color: var(--blue-500); }

/* Big CTA band above footer */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--blue-900);
  color: var(--white);
  padding-block: clamp(3.5rem, 7vw, 6rem);
}
.cta::before {
  content: "";
  position: absolute;
  bottom: -60%; left: 50%;
  transform: translateX(-50%);
  width: min(1000px, 130vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(28, 107, 176, .38) 0%, rgba(7, 47, 85, 0) 62%);
  pointer-events: none;
}
.cta__inner { position: relative; text-align: center; }
.cta h2 { color: var(--white); font-size: var(--fs-h2); }
.cta .lede { color: rgba(255,255,255,.72); margin-inline: auto; }
.cta .btn-row { justify-content: center; margin-top: 2rem; }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--blue-900);
  color: rgba(255,255,255,.6);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: var(--fs-small);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 3rem;
}
@media (max-width: 860px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__top { grid-template-columns: 1fr; } }

.footer .logo { color: var(--white); }
.footer .logo__sub { color: rgba(255,255,255,.5); }
.footer__blurb { margin-top: 1.25rem; max-width: 34ch; color: rgba(255,255,255,.6); }

.footer__title {
  font-family: var(--font-body);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  /* .45 read as decorative but failed AA at this size */
  color: rgba(255,255,255,.66);
  margin-bottom: 1.25rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer__list a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.footer__list a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .78rem;
  color: rgba(255,255,255,.66);
}
.footer__legal { display: flex; gap: 1.5rem; }
.footer__legal a { color: inherit; text-decoration: none; }
.footer__legal a:hover { color: var(--white); }

/* --------------------------------------------------------------------------
   19. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* the case halves set their offset at higher specificity, so unset it here
     too or the columns stay parked off to the side */
  .case:nth-child(odd)  > .case__art.reveal,
  .case:nth-child(odd)  > .case__body.reveal,
  .case:nth-child(even) > .case__art.reveal,
  .case:nth-child(even) > .case__body.reveal { transform: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   20. Mobile
   Touch-first corrections: type that stays legible, controls big enough to hit
   with a thumb, and form fields at 16px so iOS Safari does not zoom the page
   the moment one is focused.
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {

  /* iOS zooms into any field under 16px. Has to match the specificity of the
     .field rules above or it loses and the zoom comes back. */
  input, select, textarea,
  .field input, .field select, .field textarea,
  .audit-form__field input {
    font-size: 16px;
  }

  /* small caps labels were rendering at 10.9–11.5px */
  .tag-band__item { font-size: .78rem; letter-spacing: .12em; }
  .hero__meta-label,
  .case__built-label,
  .person__role,
  .field label,
  .contact-detail__label { font-size: .75rem; }
  .feat p, .card p { font-size: .95rem; }

  /* --- touch targets: 44px minimum ---
     Values are set from the measured line-heights, and .header .btn needs the
     more specific selector or its own 0.78rem padding wins. */
  .btn,
  .header .btn { padding-block: 1.05rem; }

  .link-arrow { padding-block: .7rem; }

  /* the breadcrumb "Home" link was a 15px-tall target */
  .crumbs a { display: inline-block; padding-block: .78rem; }

  .contact-detail__value { display: inline-block; padding-block: .5rem; }

  .footer__list a {
    display: inline-block;
    padding-block: .7rem;
  }
  .footer__legal a {
    display: inline-block;
    padding-block: .8rem;
  }
  .footer__list li { margin: 0; }

  .person__links a { width: 44px; height: 44px; }

  .logo { min-height: 44px; }

  .faq__item summary { padding-block: 1.1rem; }

  /* the carousel halves are controls, so give them a comfortable target */
  .carousel__item--peek { opacity: .6; }
}
