/* =============================================================================
   Agile Bespoke Solutions — shopfront
   Single stylesheet. No build step: what is written here is what ships.

   IMPORTANT: when you edit this file, bump the ?v=N on the <link> tag in every
   HTML file that loads it. It is served with a one-year immutable cache; without
   the bump, returning visitors keep the old stylesheet. See README.md.

   Colour, type, shadow and radius values are the Tailwind v4 defaults the
   reference app compiled to (oklch, not the v3 hex equivalents), so the
   rendered result matches the Next.js site rather than merely approximating it.

   Contents
     1  reset
     2  tokens        design system, all custom properties
     3  base          element defaults, focus, motion preferences
     4  layout        container, section rhythm
     5  components    in page order: nav, hero, buttons, who-we-are,
                      who-you-are, process, technologies, projects, services,
                      contact, footer, legal pages, service pages, pricing
                      page, 404
     6  utilities
   ========================================================================== */

@layer reset, tokens, base, layout, components, utilities;

/* == 1. reset ============================================================== */
@layer reset {
  *,
  *::before,
  *::after { box-sizing: border-box; }

  * { margin: 0; }

  img,
  svg,
  video,
  canvas { display: block; vertical-align: middle; }

  img,
  video { max-width: 100%; height: auto; }

  picture { display: contents; }

  input,
  button,
  textarea,
  select {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
  }

  button { background: none; border: 0; }

  ul[class],
  ol[class] { list-style: none; padding: 0; }

  a { color: inherit; }

  table { border-collapse: collapse; }

  fieldset { min-width: 0; padding: 0; border: 0; }

  legend { padding: 0; }

  /* Author `display` declarations below would otherwise beat the UA's
     [hidden] rule, so state this once and let every toggle rely on it. */
  [hidden] { display: none !important; }
}

/* == 2. tokens ============================================================= */
@layer tokens {
  :root {
    /* -- colour ---------------------------------------------------------- */
    --white:      #fff;

    --gray-50:    oklch(98.5% 0.002 247.839);
    --gray-100:   oklch(96.7% 0.003 264.542);
    --gray-200:   oklch(92.8% 0.006 264.531);
    --gray-300:   oklch(87.2% 0.010 258.338);
    --gray-400:   oklch(70.7% 0.022 261.325);
    --gray-500:   oklch(55.1% 0.027 264.364);
    --gray-600:   oklch(44.6% 0.030 256.802);
    --gray-700:   oklch(37.3% 0.034 259.733);
    --gray-800:   oklch(27.8% 0.033 256.848);
    --gray-900:   oklch(21.0% 0.034 264.665);

    --blue-50:    oklch(97.0% 0.014 254.604);
    --blue-100:   oklch(93.2% 0.032 255.585);
    --blue-200:   oklch(88.2% 0.059 254.128);
    --blue-400:   oklch(70.7% 0.165 254.624);
    --blue-500:   oklch(62.3% 0.214 259.815);
    --blue-600:   oklch(54.6% 0.245 262.881);
    --blue-700:   oklch(48.8% 0.243 264.376);
    --blue-800:   oklch(42.4% 0.199 265.638);

    --green-100:  oklch(96.2% 0.044 156.743);
    --green-400:  oklch(79.2% 0.209 151.711);
    --green-500:  oklch(72.3% 0.219 149.579);
    --green-600:  oklch(62.7% 0.194 149.214);
    --green-700:  oklch(52.7% 0.154 150.069);

    --red-100:    oklch(93.6% 0.032  17.717);
    --red-200:    oklch(88.5% 0.062  18.334);
    --red-400:    oklch(70.4% 0.191  22.216);
    --red-500:    oklch(63.7% 0.237  25.331);
    --red-800:    oklch(44.4% 0.177  26.899);

    /* The signature accent: the purple and the coral of the logo's arc, sampled
       from assets-src/brand/abs-logo.png, so hex rather than the oklch above.
       Only on the certainty promises: the Approval stage and Who We Are's card
       for it, the Pricing page's terms, and the fixed-price and ownership
       proofs. Never decoration. Text
       may be purple or sit on the purple (6.99:1 with white). The coral takes
       no text at all (2.38:1 with white). */
    --signature-from: #724889;
    --signature-to:   #f98970;

    /* semantic aliases — prefer these in components */
    --brand:            var(--blue-600);
    --brand-hover:      var(--blue-700);
    --surface:          var(--white);
    --surface-muted:    var(--gray-50);
    --surface-sunken:   var(--gray-100);
    --ink:              var(--gray-800);
    --ink-strong:       var(--gray-900);
    --ink-muted:        var(--gray-600);
    --ink-body:         var(--gray-700);
    --border-default:   var(--gray-300);
    --danger:           var(--red-500);

    /* -- type ------------------------------------------------------------ */
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Apple Color Emoji", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --text-sm:   0.875rem;  --leading-sm:   1.42857;
    --text-base: 1rem;      --leading-base: 1.5;
    --text-lg:   1.125rem;  --leading-lg:   1.55556;
    --text-xl:   1.25rem;   --leading-xl:   1.4;
    --text-2xl:  1.5rem;    --leading-2xl:  1.33333;
    --text-3xl:  1.875rem;  --leading-3xl:  1.2;
    --text-4xl:  2.25rem;   --leading-4xl:  1.11111;
    --text-5xl:  3rem;      --leading-5xl:  1;
    --text-6xl:  3.75rem;   --leading-6xl:  1;

    --weight-light:    300;
    --weight-normal:   400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;

    --leading-tight:   1.25;
    --leading-relaxed: 1.625;
    --tracking-wider:  0.05em;

    /* -- space ----------------------------------------------------------- */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* -- shape ----------------------------------------------------------- */
    --radius-sm:   0.25rem;
    --radius-md:   0.375rem;
    --radius-lg:   0.5rem;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* -- motion ---------------------------------------------------------- */
    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:      cubic-bezier(0, 0, 0.2, 1);
    --duration-fast: 0.15s;
    --duration:      0.3s;
    --duration-slow: 0.5s;

    /* -- layout ---------------------------------------------------------- */
    --container-max: 80rem;   /* max-w-7xl */
    --gutter:        var(--space-4);
    --nav-offset:    6rem;    /* pt-24 on <main>, and scroll-padding */
  }
}

/* == 3. base =============================================================== */
@layer base {
  /* The latin subset only — matching the reference app's Inter({subsets:['latin']}). */
  @font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                   U+FFFD;
  }

  html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-offset);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    margin: 0;
    background: var(--surface);
    color: #000;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3, h4, h5, h6 { font-weight: inherit; font-size: inherit; }

  a { text-decoration: none; }

  :focus-visible {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
    border-radius: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

/* == 4. layout ============================================================= */
@layer layout {
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  /* Every landing-page band. bg is set per section below. */
  .section { padding-block: var(--space-20); }

  .section__title {
    margin-bottom: var(--space-4);
    color: var(--ink);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-3xl);
    text-align: center;
    text-wrap: balance;
  }

  .section__lede {
    max-width: 48rem;
    margin-inline: auto;
    margin-bottom: var(--space-16);
    color: var(--ink-body);
    font-size: var(--text-2xl);
    font-weight: var(--weight-light);
    line-height: var(--leading-2xl);
    text-align: center;
    text-wrap: pretty;
  }

  .site-main { padding-top: var(--nav-offset); }
}

/* == 6. utilities ========================================================== */
@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  /* Invisible as well as off the page: overscrolling at the top of a page can
     reveal what sits above it. Opacity, so a keyboard can still reach it. */
  .skip-link {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    background: var(--brand);
    border-radius: var(--radius-md);
    color: var(--white);
    font-weight: var(--weight-medium);
    opacity: 0;
    transform: translateY(-200%);
    transition: transform var(--duration-fast) var(--ease);
  }

  .skip-link:focus {
    opacity: 1;
    transform: translateY(0);
  }
}

/* == 5. components ========================================================= */
@layer components {

  /* -- scroll reveal ------------------------------------------------------
     The reference app hides every `section > div` and fades it in on
     intersection. Here the hidden state is scoped to `.js`, so a script that
     never runs can never leave the page blank. */
  .js .reveal { opacity: 0; }
  .js .reveal.is-visible { animation: fade-in 0.8s var(--ease-out) forwards; }

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

  @media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; }
    .js .reveal.is-visible { animation: none; }
  }

  /* -- navbar ------------------------------------------------------------- */
  .site-nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 50;
    padding-block: var(--space-4);
    background: rgb(255 255 255 / 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: padding var(--duration) var(--ease),
                background-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
  }

  .site-nav[data-scrolled="true"] {
    padding-block: var(--space-2);
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--shadow-md);
  }

  .site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* The logo asset is a 1024x1024 canvas whose ink occupies a 780x281 region.
     Rendering it 200px wide with height:auto reproduces the reference app's
     geometry exactly (Tailwind's preflight overrides the height attribute the
     same way). The h-10 link is deliberately shorter than the image. The image
     takes no pointer events: it is a 200px square over a 40px link, and its
     transparent area would otherwise catch clicks below the bar. The link's
     own box stays the target. */
  .site-nav__logo {
    display: flex;
    align-items: center;
    height: 2.5rem;
  }

  .site-nav__logo img { width: 200px; pointer-events: none; }

  .site-nav__links { display: none; }

  .site-nav__link {
    color: var(--ink-body);
    transition: color var(--duration-fast) var(--ease);
  }

  .site-nav__link:hover { color: var(--brand); }

  /* Two classes, because .btn comes later and sets display. The icon takes the
     text's colour in the button and in the panel. */
  .site-nav .site-nav__whatsapp {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
  }

  /* The secondary button, cut to the logo's 2.5rem so it cannot heighten the
     bar: py-2 less the 1px border .btn--secondary adds. */
  .site-nav__links .site-nav__whatsapp {
    padding: calc(var(--space-2) - 1px) var(--space-4);
  }

  .site-nav__toggle {
    display: inline-flex;
    padding: 0;
    color: var(--ink-body);
    cursor: pointer;
  }

  .site-nav__panel {
    padding-block: var(--space-4);
    background: var(--white);
  }

  .site-nav__panel[hidden] { display: none; }

  .site-nav__panel-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  /* 72.5625rem is 1161px, measured: the 200px logo, 526px of seven links, the
     162px WhatsApp button, seven 32px gaps, the container's 32px of gutters and
     the 17px a classic scrollbar takes, which a media query's width includes.
     The panel covers everything below it. The row has no slack beside such a
     scrollbar, so nowrap keeps slightly wider text from folding a label. */
  @media (min-width: 72.5625rem) {
    .site-nav__links {
      display: flex;
      align-items: center;
      gap: var(--space-8);
      white-space: nowrap;
    }

    .site-nav__toggle,
    .site-nav__panel { display: none; }
  }

  /* -- hero --------------------------------------------------------------- */
  .hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
  }

  .hero__layer {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  /* Literal #e5e7eb, as written in the reference component's scoped styles. */
  .hero__grid {
    opacity: 1;
    background-image:
      linear-gradient(to right,  #e5e7eb 1px, transparent 1px),
      linear-gradient(to bottom, #e5e7eb 1px, transparent 1px);
    background-size: 60px 60px;
  }

  .hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
  }

  /* The bottom padding is the scroll arrow's offset, its height and a gap. On a
     phone, upright or on its side, the buttons reach the bottom of the hero, and
     the arrow, a link painted above them, would cover one and take its taps. The
     content fills the hero there too, so the top padding keeps the headline off
     the hero's edge. Both go only at a height where the centred content clears
     the arrow, at the top of its bounce: 43rem, measured from 320px to 1920px. */
  .hero__content {
    position: relative;
    z-index: 10;
    padding-block: var(--space-8) calc(var(--space-8) + 2.5rem + var(--space-4));
  }

  .hero__inner { max-width: 56rem; }

  .hero__title {
    margin-bottom: var(--space-6);
    color: var(--ink-strong);
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    text-wrap: balance;
  }

  .hero__title span { display: block; }
  .hero__title span:first-child { margin-bottom: var(--space-2); }
  /* The headline's second line is the fixed-price proof, so it wears the accent. */
  .hero__title span:last-child { color: var(--signature-from); }

  .hero__lede {
    max-width: 48rem;
    margin-bottom: var(--space-12);
    color: var(--ink-body);
    font-size: var(--text-xl);
    font-weight: var(--weight-light);
    line-height: var(--leading-xl);
    text-wrap: pretty;
  }

  /* The promise itself: the accent is a bar beside it and never behind its text. */
  .hero__promise {
    margin-top: var(--space-4);
    padding-inline-start: var(--space-4);
    background: linear-gradient(to bottom, var(--signature-from), var(--signature-to)) left / 4px 100% no-repeat;
    color: var(--ink);
    font-weight: var(--weight-normal);
  }

  .hero__actions {
    display: flex;
    flex-flow: column wrap;
    gap: var(--space-4);
  }

  .hero__scroll {
    position: absolute;
    inset-block-end: var(--space-8);
    inset-inline-start: 50%;
    z-index: 10;
    translate: -50% 0;
    color: var(--ink-muted);
    animation: bounce 1s infinite;
  }

  .hero__scroll a { display: block; }
  .hero__scroll svg { width: 2.5rem; height: 2.5rem; }

  /* Tailwind's bounce. It animates `transform`, while the centring above uses
     the `translate` property, so the two compose instead of fighting. */
  @keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50%      { transform: none;             animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
  }

  @media (min-width: 40rem) {
    .hero__actions { flex-direction: row; }
  }

  @media (min-width: 40rem) and (min-height: 43rem) {
    .hero__content { padding-block: 0; }
  }

  @media (min-width: 48rem) {
    .hero__title { font-size: var(--text-5xl); }
    .hero__lede  { font-size: var(--text-2xl); line-height: var(--leading-2xl); }
  }

  @media (min-width: 64rem) {
    .hero__title { font-size: var(--text-6xl); }
  }

  /* -- buttons ------------------------------------------------------------ */
  .btn {
    display: inline-block;
    border-radius: var(--radius-md);
    font-weight: var(--weight-medium);
    text-align: center;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease),
                color var(--duration-fast) var(--ease);
  }

  .btn--primary {
    background: var(--brand);
    color: var(--white);
  }

  .btn--primary:hover { background: var(--brand-hover); }

  .btn--secondary {
    background: var(--white);
    border: 1px solid var(--border-default);
    color: var(--ink);
  }

  .btn--secondary:hover { background: var(--surface-muted); }

  /* px-8 py-4, text-lg — the hero and services CTAs */
  .btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  /* px-6 py-3 — in-page actions */
  .btn--md { padding: var(--space-3) var(--space-6); }

  .btn--shadow-md { box-shadow: var(--shadow-md); }
  .btn--shadow-sm { box-shadow: var(--shadow-sm); }

  /* -- who we are --------------------------------------------------------- */
  .who-we-are { background: var(--surface-muted); }

  .value-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .value-card {
    padding: var(--space-6);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  /* Same disc as .feature__icon, one step larger: here it heads a card rather
     than sitting beside a line of text. */
  .value-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: var(--space-4);
    background: var(--blue-100);
    border-radius: var(--radius-full);
    color: var(--brand);
  }

  .value-card__title {
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-xl);
  }

  .value-card__text { color: var(--ink-muted); }

  /* The promises that wear the accent: the one the Approval stage keeps, the
     ownership proof, and the Pricing page's terms. */
  .value-card--approval,
  .value-card--ownership,
  .value-card--term {
    background:
      linear-gradient(to right, var(--signature-from), var(--signature-to)) top / 100% 4px no-repeat,
      var(--white);
  }

  .value-card--approval .value-card__icon,
  .value-card--ownership .value-card__icon { color: var(--signature-from); }

  .person { margin-top: var(--space-8); }

  /* 200px is what tools/generate-images.sh encodes at 1x and 2x. Do not change
     one without the other. */
  .person__photo {
    display: block;
    width: 12.5rem;
    margin-bottom: var(--space-4);
  }

  .person__photo img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
  }

  .person__name { margin-bottom: 0; }

  .person__role {
    margin-bottom: var(--space-3);
    color: var(--ink-muted);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    line-height: var(--leading-sm);
  }

  .person .value-card__text + .value-card__text { margin-top: var(--space-3); }

  .person__link {
    display: inline-block;
    margin-top: var(--space-3);
    color: var(--blue-700);
    font-weight: var(--weight-medium);
    text-decoration: underline;
  }

  .who-we-are__cta {
    margin-top: var(--space-12);
    text-align: center;
  }

  @media (min-width: 48rem) {
    .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .person {
      display: flex;
      align-items: flex-start;
      gap: var(--space-8);
    }

    .person__photo {
      flex: none;
      margin-bottom: 0;
    }

    .person__body { max-width: 65ch; }
  }

  @media (min-width: 64rem) {
    .value-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }

  /* -- who you are -------------------------------------------------------- */
  /* The third ground on the page. Who We Are above sits on --surface-muted and
     the process band below is white, so a tint that is neither keeps this
     section from fusing with either, and reads the two identity sections --
     "us", then "you" -- as a matched pair. */
  .who-you-are { background: var(--blue-50); }

  .criteria {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    max-width: 72rem;
    margin-inline: auto;
  }

  .criteria__item {
    padding: var(--space-6);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  /* Same disc as .value-card__icon, at the same size: the two sections are a
     pair and their cards have to read as the same object. */
  .criteria__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: var(--space-4);
    background: var(--blue-100);
    border-radius: var(--radius-full);
    color: var(--brand);
  }

  .criteria__title {
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-xl);
    text-wrap: balance;
  }

  .criteria__text {
    color: var(--ink-muted);
    line-height: var(--leading-relaxed);
    text-wrap: pretty;
  }

  .who-you-are__cta {
    margin-top: var(--space-12);
    text-align: center;
  }

  /* Two across, not the four .value-grid reaches: these bodies are twice the
     length of a value card's and a quarter column cuts the measure too narrow. */
  @media (min-width: 48rem) {
    .criteria { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* -- process table ------------------------------------------------------ */
  .process-section { background: var(--white); }

  /* The panel no longer carries its own heading -- the section h2 above it does
     that job -- so it needs a border to still read as one object on a white band. */
  .process {
    overflow: clip;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }

  /* The figure renders at every width, not just lg+. The sprint loop it draws is
     the one part of the process the copy alone cannot show, and the card layout
     below is what most visitors actually get. */
  .process__figure {
    max-width: 20rem;
    margin: var(--space-6) auto var(--space-4);
  }

  .process__figure img { width: 100%; height: auto; object-fit: contain; }

  .process__detail { border-top: 1px solid var(--gray-200); }

  .process__table-wrap { display: none; }

  /* Stage numbers come from a counter rather than the markup, so the table and
     the card stack cannot fall out of step with each other. */
  .process__cards { counter-reset: stage; }

  .process__cards > * + * { border-top: 1px solid var(--gray-200); }

  .process__card { padding: var(--space-6); }

  .process__card--sprint { box-shadow: inset 3px 0 0 var(--brand); }

  /* Both surfaces of the one stage. The table's only shows from 64rem. */
  .process__card--approval,
  .process__row--approval th {
    background: linear-gradient(to bottom, var(--signature-from), var(--signature-to)) left / 4px 100% no-repeat;
  }

  .process__card h3 {
    margin-bottom: var(--space-4);
    margin-left: var(--space-4);
    color: var(--ink);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-lg);
  }

  .process__card h3::before {
    counter-increment: stage;
    content: counter(stage) ". ";
    color: var(--brand);
  }

  .process__group {
    padding: var(--space-3) var(--space-6);
    background: var(--blue-50);
    color: var(--blue-700);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    line-height: var(--leading-sm);
  }

  .process__card-body > * + * { margin-top: var(--space-4); }

  .process__card h4 {
    margin-bottom: var(--space-2);
    color: var(--brand);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wider);
    line-height: var(--leading-sm);
    text-transform: uppercase;
  }

  .process__card p {
    color: var(--ink-body);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
  }

  .process__card strong { color: var(--ink); font-weight: var(--weight-semibold); }

  .process__card--approval h3::before,
  .process__card--approval h4,
  .process__card--approval strong { color: var(--signature-from); }

  .process__cta-note {
    max-width: 44ch;
    margin: var(--space-4) auto 0;
    color: var(--ink-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    text-wrap: pretty;
  }

  .process__cta {
    padding: var(--space-6);
    border-top: 1px solid var(--gray-200);
    text-align: center;
  }

  /* The contact form and the booking calendar side by side, stacked on a
     phone. Two ways into Stage 1: write, or pick a time. */
  .process__cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
  }

  @media (min-width: 64rem) {
    .process__cards { display: none; }

    .process__body {
      display: flex;
      gap: var(--space-8);
      padding: var(--space-6);
    }

    .process__figure {
      position: sticky;
      top: var(--nav-offset);
      flex: 0 0 30%;
      align-self: start;
      max-width: none;
      margin: 0;
    }

    /* min-width:0 so the table wrapper, not the flex item, does the scrolling. */
    .process__detail {
      flex: 1 1 auto;
      min-width: 0;
      border-top: 0;
    }

    .process__table-wrap { display: block; overflow-x: auto; }

    .process__table { width: 100%; counter-reset: stage; }

    .process__table thead { background: var(--surface-muted); }

    .process__table thead th {
      padding: var(--space-4) var(--space-6);
      color: var(--ink);
      font-size: var(--text-sm);
      font-weight: var(--weight-semibold);
      letter-spacing: var(--tracking-wider);
      line-height: var(--leading-sm);
      text-align: left;
      text-transform: uppercase;
    }

    .process__table thead th:first-child  { width: 26%; }
    .process__table thead th:nth-child(2) { width: 37%; }
    .process__table thead th:nth-child(3) { width: 37%; }

    .process__table tbody tr {
      transition: background-color 0.2s var(--ease);
    }

    .process__table tbody tr:hover { background: var(--surface-muted); }

    .process__table tbody tr + tr { border-top: 1px solid var(--gray-200); }

    .process__table td {
      padding: var(--space-6);
      color: var(--ink-body);
      line-height: var(--leading-relaxed);
    }

    .process__table td strong { color: var(--ink); font-weight: var(--weight-semibold); }

    /* The stage cell is a row header. The reference app used a plain <td> with a
       nested div carrying ml-4, hence the extra left padding. */
    .process__table tbody th {
      padding: var(--space-6);
      padding-left: calc(var(--space-6) + var(--space-4));
      color: var(--ink);
      font-weight: var(--weight-semibold);
      line-height: var(--leading-relaxed);
      text-align: left;
    }

    .process__table tbody th::before {
      counter-increment: stage;
      content: counter(stage) ". ";
      color: var(--brand);
    }

    /* Stages 4-7 are the repeating sprint. The accent goes on the row header
       rather than the <tr>, where border-left is unreliable. */
    .process__row--sprint th { box-shadow: inset 3px 0 0 var(--brand); }

    .process__table tbody .process__row--approval th::before,
    .process__row--approval td strong { color: var(--signature-from); }

    .process__group-row td {
      padding: var(--space-3) var(--space-6);
      background: var(--blue-50);
      color: var(--blue-700);
      font-size: var(--text-sm);
      font-weight: var(--weight-semibold);
      letter-spacing: var(--tracking-wider);
      line-height: var(--leading-sm);
    }

    .process__table tbody tr.process__group-row:hover { background: var(--blue-50); }

    .process__cta { padding: 0 var(--space-6) var(--space-6); border-top: 0; }
  }

  /* -- technologies ------------------------------------------------------- */
  .technologies { background: var(--surface-muted); }

  .technologies__lede {
    max-width: 56rem;
    margin-inline: auto;
    margin-bottom: var(--space-12);
    color: var(--ink-muted);
    font-size: var(--text-xl);
    line-height: var(--leading-xl);
    text-align: center;
    text-wrap: pretty;
  }

  .tech-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .tech-card {
    padding: var(--space-6);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--duration-fast) var(--ease);
  }

  .tech-card:hover { box-shadow: var(--shadow-lg); }

  /* `border-b` with no colour resolves to currentColor in Tailwind v4, and the
     heading is text-blue-600 — so the rule is blue, not grey. */
  .tech-card__title {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--brand);
    color: var(--brand);
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-2xl);
    text-align: center;
  }

  .tech-card__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
  }

  .tech-item__logo {
    width: 3rem;
    height: 3rem;
    margin-bottom: var(--space-2);
  }

  .tech-item__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .tech-item__name {
    color: var(--ink-body);
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
    text-align: center;
  }

  @media (min-width: 48rem) {
    .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  @media (min-width: 64rem) {
    .tech-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
}

@layer components {

  /* -- projects ----------------------------------------------------------- */
  .projects { background: var(--surface-muted); }

  .private-projects {
    padding: var(--space-8);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius-lg);
  }

  .private-projects__text {
    max-width: 42rem;
    margin-inline: auto;
    margin-bottom: var(--space-6);
    color: var(--ink-muted);
    font-size: var(--text-xl);
    line-height: var(--leading-xl);
  }

  .private-projects__panel {
    max-width: 42rem;
    margin-inline: auto;
    font-size: var(--text-xl);
    line-height: var(--leading-xl);
  }

  .private-projects__lead {
    margin-bottom: var(--space-3);
    color: var(--ink);
    font-weight: var(--weight-semibold);
  }

  .private-projects__panel ul {
    padding-left: 1.25rem;
    color: var(--ink-muted);
    list-style: disc;
  }

  .private-projects__panel li + li { margin-top: var(--space-2); }

  /* -- services ----------------------------------------------------------- */
  .services { background: var(--white); }

  .services__title { font-size: var(--text-4xl); line-height: var(--leading-4xl); }

  .services__lede { font-size: var(--text-xl); line-height: var(--leading-xl); }

  .services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    min-height: 100vh;   /* room for the sticky detail pane to travel */
  }

  .service-list > * + * { margin-top: var(--space-4); }

  /* An <h3> wrapping the <button> keeps the document outline the reference
     app had, while staying valid HTML (a heading may contain a button). */
  .service-item-heading {
    font: inherit;
    color: inherit;
  }

  /* A real <button> rather than the reference app's div[role=button]. */
  .service-item {
    display: block;
    width: 100%;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    text-align: left;
    cursor: pointer;
    transition: background-color var(--duration) var(--ease),
                border-color var(--duration) var(--ease);
  }

  .service-item:hover { background: var(--surface-muted); }

  /* border-left is inside the border-box, so the width is unchanged and the
     text shifts 4px — matching the reference app. */
  .service-item[aria-current="true"] {
    background: var(--blue-50);
    border-left: 4px solid var(--brand);
  }

  .service-item[aria-current="true"]:hover { background: var(--blue-50); }

  .service-item__title {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: var(--text-3xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-3xl);
  }

  .service-item__summary {
    display: block;
    color: var(--ink-muted);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  /* Beside the <h3>, not in it: a link cannot go inside the item's <button>,
     and the panes that could hold it are inert. Indented to the item's text,
     and drawn up to the item it belongs to. */
  .service-list > .service-item__link {
    display: inline-flex;
    align-items: center;
    margin-top: var(--space-2);
    margin-left: var(--space-6);
    color: var(--brand);
    font-weight: var(--weight-medium);
    transition: color var(--duration-fast) var(--ease);
  }

  .service-list > .service-item__link:hover { color: var(--blue-800); }

  .service-item__link svg { flex: none; margin-left: var(--space-2); }

  .service-list__spacer { height: 30vh; }

  .service-detail { align-self: start; }

  .service-detail__media {
    position: relative;
    height: 24rem;
    overflow: hidden;
    background: var(--surface-sunken);
    border-radius: var(--radius-lg);
  }

  .service-detail__media picture {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease);
  }

  .service-detail__media picture[data-active="true"] { z-index: 10; opacity: 1; }

  .service-detail__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .service-detail__body {
    position: relative;
    min-height: 250px;
    margin-top: var(--space-4);
    padding: var(--space-6);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }

  .service-detail__pane {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 0;
    padding: var(--space-6);
    opacity: 0;
    transition: opacity var(--duration-slow) var(--ease);
  }

  .service-detail__pane[data-active="true"] { z-index: 10; opacity: 1; }

  .service-detail__pane h4 {
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: var(--text-2xl);
    font-weight: var(--weight-medium);
    line-height: var(--leading-2xl);
  }

  .service-detail__pane p {
    color: var(--ink-body);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  @media (min-width: 48rem) {
    .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .service-list > * + * { margin-top: var(--space-8); }
  }

  @media (min-width: 64rem) {
    .services__grid { gap: var(--space-12); }

    .service-detail {
      position: sticky;
      top: var(--nav-offset);
    }
  }

  /* -- contact ------------------------------------------------------------ */
  .contact { background: var(--white); }

  /* No text colour class on this heading in the reference app, so it inherits
     the body colour: black, not gray-800 like every other section title. */
  .contact__title {
    color: #000;
    font-size: var(--text-4xl);
    line-height: var(--leading-4xl);
  }

  .contact__lede {
    max-width: 42rem;
    margin-bottom: var(--space-12);
    color: var(--ink-muted);
    font-size: var(--text-2xl);
    font-weight: var(--weight-normal);
    line-height: var(--leading-2xl);
  }

  .contact__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  @media (min-width: 48rem) {
    .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* form ------------------------------------------------------------------ */
  .contact-form > * + * { margin-top: var(--space-8); }

  /* The alert is the only conditionally-hidden direct child; without this the
     form would keep a 2rem gap above the legend when no error is showing. */
  .contact-form > .alert[hidden] + * { margin-top: 0; }

  .contact-form__legend {
    margin-bottom: var(--space-6);
    color: var(--ink);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-2xl);
  }

  .field__label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--ink-body);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  /* The reference app sets py-3 and no horizontal padding, and Tailwind's
     preflight zeroes the browser default — so text sits flush to the border.
     Reproduced deliberately; see QA-CHECKLIST.md. */
  .field__control {
    display: block;
    width: 100%;
    padding-block: var(--space-3);
    padding-inline: 0;
    background: var(--white);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: var(--text-base);
    line-height: var(--leading-base);
  }

  .field__control:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 2px var(--blue-200), var(--shadow-sm);
    outline: none;
  }

  .field__control[aria-invalid="true"] { border-color: var(--red-400); }

  .field__control[aria-invalid="true"]:focus {
    border-color: var(--red-500);
    box-shadow: 0 0 0 2px var(--red-200), var(--shadow-sm);
  }

  .field__error {
    margin-top: var(--space-2);
    color: var(--danger);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    line-height: var(--leading-sm);
  }

  .field__error[hidden] { display: none; }

  /* sm:text-sm in the reference app's Input primitive wins from 40rem up. */
  @media (min-width: 40rem) {
    .field__control { font-size: var(--text-sm); line-height: var(--leading-sm); }
  }

  .dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 8rem;
    background: var(--surface-muted);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease);
  }

  .dropzone:hover,
  .dropzone[data-dragover="true"] { background: var(--surface-sunken); }

  .dropzone[data-dragover="true"] { border-color: var(--brand); }

  .dropzone__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 1.25rem;
    padding-bottom: var(--space-6);
  }

  .dropzone__icon {
    width: var(--space-8);
    height: var(--space-8);
    margin-bottom: var(--space-2);
    color: var(--gray-500);
  }

  .dropzone__text {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--gray-500);
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
  }

  .dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
  }

  .dropzone:has(input:focus-visible) {
    outline: 2px solid var(--blue-600);
    outline-offset: 2px;
  }

  .checkbox-group__legend {
    margin-bottom: var(--space-6);
    color: var(--ink);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-lg);
  }

  .checkbox-group__options > * + * { margin-top: var(--space-3); }

  .checkbox { display: flex; align-items: center; }

  .checkbox input {
    width: var(--space-4);
    height: var(--space-4);
    accent-color: var(--brand);
    border-radius: var(--radius-sm);
  }

  .checkbox label {
    margin-left: var(--space-2);
    color: var(--ink-body);
  }

  /* verification ---------------------------------------------------------- */
  /* The Turnstile widget renders itself inside an iframe at a size Cloudflare
     controls, so there is nothing here to style but the panel it sits in. The
     panel keeps the tinted card the homebrew captcha had, so the form's rhythm
     is unchanged. */
  .verification {
    padding: var(--space-6);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
  }

  .verification__label {
    display: block;
    margin-bottom: var(--space-3);
    color: var(--ink-body);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    line-height: var(--leading-base);
  }

  .verification__required { color: var(--danger); }

  /* The widget is 300px wide and does not shrink. Reserving its height stops
     the form jumping when it finishes loading, and scrolling this one element
     beats a horizontal scrollbar on the whole page at the narrowest widths. */
  .cf-turnstile {
    min-height: 65px;
    overflow-x: auto;
  }

  /* submit ---------------------------------------------------------------- */
  .contact-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    background: var(--brand);
    border-radius: var(--radius-md);
    color: var(--white);
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease);
  }

  .contact-form__submit:hover { background: var(--brand-hover); }

  .contact-form__submit[data-state="blocked"] {
    display: inline-block;
    background: var(--gray-400);
    cursor: not-allowed;
  }

  .contact-form__submit[data-state="blocked"]:hover { background: var(--gray-400); }

  .contact-form__submit[data-state="sending"] {
    background: var(--blue-400);
    cursor: not-allowed;
  }

  .contact-form__spinner {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: -0.25rem;
    margin-right: var(--space-3);
    color: var(--white);
    animation: spin 1s linear infinite;
  }

  /* A faint ring under a bolder arc, which is what shows it turning. Here
     rather than on the shapes: style-src 'self' refuses style attributes. */
  .contact-form__spinner circle { opacity: 0.25; }
  .contact-form__spinner path { opacity: 0.75; }

  @keyframes spin { to { transform: rotate(360deg); } }

  .alert {
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    line-height: var(--leading-base);
  }

  .alert--destructive {
    background: var(--red-100);
    color: var(--red-800);
  }

  .alert[hidden] { display: none; }

  .contact-success {
    margin-bottom: var(--space-6);
    padding: var(--space-3) var(--space-4);
    background: var(--green-100);
    border: 1px solid var(--green-400);
    border-radius: var(--radius-sm);
    color: var(--green-700);
  }

  .contact-success[hidden] { display: none; }

  .contact-success__title { font-weight: var(--weight-bold); }

  .contact-success__reset {
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--green-500);
    border-radius: var(--radius-sm);
    color: var(--white);
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease);
  }

  .contact-success__reset:hover { background: var(--green-600); }

  /* stand-in --------------------------------------------------------------
     Which of the form and the stand-in displays is decided here, before
     first paint, from the class the inline script in <head> sets and the
     data-portal attribute site.js sets on #contact. Without JavaScript the
     form cannot send, so the stand-in shows. With it, the form shows until
     site.js reports the portal unavailable (docs/CICD-ROADMAP.md §3.8).
     Scoped like `.js .reveal`, so a page whose inline script in <head> never
     runs shows the stand-in. That script is all the class waits on: if
     site.js itself failed to load, the form would show and could not send. */
  .no-js .contact-form,
  .js .contact-fallback { display: none; }

  .js .contact[data-portal="unavailable"] .contact-form { display: none; }
  .js .contact[data-portal="unavailable"] .contact-fallback { display: block; }

  .contact-fallback {
    padding: var(--space-8);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--ink-body);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  .contact-fallback > * + * { margin-top: var(--space-6); }

  .contact-fallback__title {
    color: var(--ink);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-2xl);
  }

  /* Empty without JavaScript, and until site.js has something to say. */
  .contact-fallback__note {
    color: var(--ink);
    font-weight: var(--weight-medium);
  }

  .contact-fallback__note:empty { display: none; }

  /* The form's own controls have no inline padding; a box of text to copy
     reads better with some. */
  .contact-fallback__message {
    padding-inline: var(--space-3);
    resize: vertical;
  }

  /* aside ----------------------------------------------------------------- */
  .contact-aside {
    height: 100%;
    padding: var(--space-8);
    background: var(--surface-sunken);
    border-radius: var(--radius-lg);
  }

  .contact-aside__title {
    margin-bottom: var(--space-6);
    color: var(--ink);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-2xl);
  }

  .contact-aside__text {
    margin-bottom: var(--space-6);
    color: var(--ink-muted);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  .contact-aside__contact {
    margin-bottom: var(--space-6);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  /* The stand-in's list is the same list, beside the form. */
  .contact-aside__contact li,
  .contact-fallback__contact li { display: flex; align-items: flex-start; }

  .contact-aside__contact li + li,
  .contact-fallback__contact li + li { margin-top: var(--space-2); }

  .contact-aside__contact span,
  .contact-fallback__contact span { margin-right: var(--space-2); color: var(--ink-muted); }

  .contact-aside__contact a,
  .contact-fallback__contact a { color: var(--brand); }

  .contact-aside__contact a:hover,
  .contact-fallback__contact a:hover { color: var(--brand-hover); }

  /* The email address is one word, wider than a phone's column at this size.
     Unbroken, it widens the column and the page scrolls sideways. */
  .contact-fallback__contact a { overflow-wrap: anywhere; }

  .next-steps__title {
    margin-bottom: var(--space-4);
    color: var(--ink);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-xl);
  }

  /* Numbers come from a counter rather than the markup, as the process stages'
     do. The <ol> is what announces them, so the disc stays aria-hidden, and its
     role="list" keeps it a list in Safari, which drops that under list-style:
     none. */
  .next-steps {
    margin-bottom: var(--space-6);
    counter-reset: next-step;
  }

  .next-steps > li { counter-increment: next-step; }

  .next-steps .feature__icon::before {
    content: counter(next-step);
    font-weight: var(--weight-semibold);
  }

  .next-steps > * + *,
  .contact-aside__list > * + * { margin-top: var(--space-4); }

  .feature { display: flex; align-items: flex-start; }

  .feature__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: var(--space-8);
    height: var(--space-8);
    margin-top: var(--space-1);
    background: var(--blue-100);
    border-radius: var(--radius-full);
    color: var(--brand);
  }

  .feature__body { margin-left: var(--space-4); }

  .feature__title {
    color: var(--ink);
    font-size: var(--text-xl);
    font-weight: var(--weight-medium);
    line-height: var(--leading-xl);
  }

  .feature__text {
    color: var(--ink-muted);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  /* -- footer ------------------------------------------------------------- */
  .site-footer {
    background: var(--gray-900);
    color: var(--white);
  }

  .site-footer__inner { padding-block: var(--space-12); }

  .site-footer__cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
  }

  .site-footer h2 {
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-xl);
  }

  .site-footer__blurb {
    margin-bottom: var(--space-4);
    color: var(--gray-400);
  }

  .site-footer li + li { margin-top: var(--space-2); }

  .site-footer__contact li { display: flex; align-items: flex-start; }

  .site-footer__contact span { margin-right: var(--space-2); color: var(--gray-400); }

  .site-footer a { color: var(--gray-400); transition: color var(--duration-fast) var(--ease); }
  .site-footer a:hover { color: var(--white); }

  .site-footer__bottom {
    display: flex;
    flex-direction: column;
    padding-top: var(--space-8);
    border-top: 1px solid var(--gray-800);
  }

  .site-footer__copyright {
    margin-bottom: var(--space-4);
    color: var(--gray-400);
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
  }

  .site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
  .site-footer__legal a { font-size: var(--text-sm); line-height: var(--leading-sm); }

  @media (min-width: 48rem) {
    .site-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .site-footer__bottom {
      flex-direction: row;
      justify-content: space-between;
    }

    .site-footer__copyright { margin-bottom: 0; }
  }

  /* "Email: support@agilebespokesolutions.com" is 317px and cannot wrap, so a
     third of the row is too narrow for it until about 1064px with a classic
     scrollbar. Until then that column takes what it needs, or every page scrolls
     sideways. */
  @media (min-width: 48rem) and (max-width: 68.75rem) {
    .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  }

  /* -- legal pages -------------------------------------------------------- */
  /* The reference app writes `container mx-auto px-4 max-w-5xl` here, but its
     unlayered .container override beats the layered max-w-5xl utility, so the
     rendered width is the full 80rem container. Matching the rendered result. */
  .legal { max-width: var(--container-max); }

  .legal__back-wrap { margin-bottom: var(--space-8); }

  .legal__back {
    display: inline-flex;
    align-items: center;
    color: var(--brand);
    transition: color var(--duration-fast) var(--ease);
  }

  .legal__back:hover { color: var(--blue-800); }
  .legal__back svg { width: var(--space-4); height: var(--space-4); margin-right: var(--space-2); }

  .legal__header { margin-bottom: var(--space-12); text-align: center; }

  .legal__header h1 {
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: var(--text-4xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-4xl);
  }

  .legal__updated {
    color: var(--ink-muted);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
  }

  .legal section { margin-bottom: 2.5rem; }

  .legal h2 {
    margin-bottom: var(--space-4);
    color: var(--ink);
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-2xl);
  }

  .legal h3 {
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-xl);
  }

  .legal p { margin-bottom: var(--space-4); color: var(--ink-body); }

  .legal a { color: var(--brand); transition: color var(--duration-fast) var(--ease); }
  .legal a:hover { color: var(--blue-800); }

  /* These links sit inside sentences, and the blue is 1.96:1 against the
     text around them, where WCAG 1.4.1 wants 3:1 before colour alone will
     do. The underline is the cue that is not colour. The Back link stands
     alone, outside every section, and keeps its look. */
  .legal section a { text-decoration: underline; }

  .legal ul,
  .legal ol {
    margin-bottom: var(--space-6);
    margin-left: var(--space-4);
    padding: 0;
    color: var(--ink-body);
    list-style-position: inside;
  }

  .legal ul { list-style-type: disc; }
  .legal ol { list-style-type: decimal; }
  .legal ol > li + li { margin-top: var(--space-2); }

  .legal__indent {
    margin-bottom: var(--space-4);
    margin-left: var(--space-4);
  }

  .legal ul.is-spaced > li + li { margin-top: var(--space-2); }

  .legal address {
    margin-bottom: var(--space-4);
    margin-left: var(--space-4);
    color: var(--ink-body);
    font-style: normal;
  }

  .legal-main { padding-top: var(--nav-offset); padding-bottom: var(--space-16); }

  /* -- service pages ------------------------------------------------------ */
  /* The frame under the header: .site-main clears the nav, .page-head holds the
     breadcrumb and the opening, and .section bands follow, as on the homepage.
     .legal does not fit it: it styles every heading, paragraph and list as a
     document at the full 80rem. */
  .page-head { padding-block: var(--space-8) var(--space-20); }

  .page-head__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-12);
    align-items: center;
  }

  .page-head__title { font-size: var(--text-4xl); line-height: var(--leading-4xl); }

  /* The reset's display: contents would make <source> a grid item of its own. */
  .page-head picture { display: block; }

  .page-head__image {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
  }

  /* Text and image side by side, so the opening reads from the left, and not
     centred as it does stacked. */
  @media (min-width: 64rem) {
    .page-head__grid { grid-template-columns: minmax(0, 1fr) 28rem; }

    .page-head__title,
    .page-head__text .section__lede,
    .page-head__text .page-action { text-align: left; }

    /* The lede's own centring shows only where no image narrows the column. */
    .page-head__text .section__lede { margin-inline: 0; }
  }

  .section__lede:has(+ .page-action) { margin-bottom: 0; }

  .page-action {
    margin-top: var(--space-12);
    text-align: center;
  }

  .page-action--pair {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
  }

  .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    margin-bottom: var(--space-8);
    color: var(--ink-muted);
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
  }

  /* Empty alt text, so a screen reader announces the list and not the mark. */
  .breadcrumb li + li::before {
    content: "\203A";
    content: "\203A" / "";
    margin-right: var(--space-2);
  }

  .breadcrumb a {
    color: var(--brand);
    transition: color var(--duration-fast) var(--ease);
  }

  .breadcrumb a:hover { color: var(--blue-800); }

  .section--muted { background: var(--surface-muted); }

  /* Three cards would leave a hole at the two columns .value-grid reaches first,
     and two long lists need more than the four it reaches next. */
  @media (min-width: 48rem) {
    .value-grid--thirds { grid-template-columns: 1fr; }
  }

  @media (min-width: 64rem) {
    .value-grid--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .value-grid--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* Discs, not the reset's bare list, so Safari keeps these announced as lists. */
  .service-scope {
    padding-left: var(--space-6);
    color: var(--ink-muted);
    list-style-type: disc;
  }

  .value-card__text + .service-scope { margin-top: var(--space-3); }

  .service-scope > li + li { margin-top: var(--space-2); }

  .questions {
    max-width: 48rem;
    margin-inline: auto;
    margin-top: var(--space-12);
    border-top: 1px solid var(--border-default);
  }

  .question { border-bottom: 1px solid var(--border-default); }

  .question__summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: var(--space-4);
    color: var(--ink);
    font-size: var(--text-lg);
    font-weight: var(--weight-medium);
    line-height: var(--leading-lg);
    list-style: none;
    cursor: pointer;
  }

  .question__summary::-webkit-details-marker { display: none; }

  .question__summary svg {
    flex: none;
    margin-top: var(--space-1);
    transition: transform var(--duration-fast) var(--ease);
  }

  .question[open] .question__summary svg { transform: rotate(180deg); }

  .question__answer {
    padding-bottom: var(--space-4);
    color: var(--ink-body);
    text-wrap: pretty;
  }

  /* -- pricing page ------------------------------------------------------ */
  .value-card--term .value-card__text + .value-card__text { margin-top: var(--space-3); }

  /* The size table and the cards that stand in for it below 48rem say the same
     thing, as the process table and cards do: four columns will not read on a
     phone, and only one of the two is ever displayed. */
  .size-table-wrap { display: none; }

  .size-cards {
    display: grid;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
  }

  .size-card dt {
    color: var(--ink);
    font-weight: var(--weight-semibold);
  }

  .size-card dd { color: var(--ink-muted); }

  .size-card dd + dt { margin-top: var(--space-3); }

  @media (min-width: 48rem) {
    .size-cards { display: none; }

    .size-table-wrap {
      display: block;
      margin-bottom: var(--space-8);
      padding-top: 4px;
      background:
        linear-gradient(to right, var(--signature-from), var(--signature-to)) top / 100% 4px no-repeat,
        var(--white);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-md);
      overflow: clip;
    }

    .size-table { width: 100%; }

    .size-table th:first-child { white-space: nowrap; }

    .size-table th,
    .size-table td {
      padding: var(--space-4) var(--space-6);
      text-align: left;
      vertical-align: top;
    }

    .size-table th {
      color: var(--ink);
      font-weight: var(--weight-semibold);
    }

    .size-table thead th { background: var(--surface-muted); }

    .size-table td { color: var(--ink-muted); }

    .size-table tbody tr + tr { border-top: 1px solid var(--gray-200); }
  }

  /* -- 404 ---------------------------------------------------------------- */
  .notfound {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-inline: var(--space-4);
    background: var(--surface-muted);
  }

  .notfound__inner { max-width: 28rem; text-align: center; }

  .notfound__code {
    margin-bottom: var(--space-4);
    color: var(--brand);
    font-size: var(--text-6xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-6xl);
  }

  .notfound__title {
    margin-bottom: var(--space-4);
    color: var(--ink);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-2xl);
  }

  .notfound__text { margin-bottom: var(--space-8); color: var(--ink-muted); }

  .notfound__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .notfound__link svg { width: var(--space-4); height: var(--space-4); margin-right: var(--space-2); }
}

@layer utilities {
  /* Prose spacing overrides — the legal documents vary paragraph rhythm
     per section, so these mirror the source's mb-2 / mb-4 / mb-6. */
  .u-mb-2 { margin-bottom: var(--space-2); }
  .u-mb-4 { margin-bottom: var(--space-4); }
  .u-mb-0 { margin-bottom: 0; }
  .u-mb-6 { margin-bottom: var(--space-6); }
  .u-strong { font-weight: var(--weight-semibold); }
}
