/* The reusable parts. One block per partial in app/views/components/. */
@layer components {

  /* ── Icon ────────────────────────────────────────────────────────────── */
  .icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }

  .icon-badge {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius);
    background: var(--navy-900);
    color: var(--gold-300);
    flex: none;
  }
  .icon-badge .icon { width: 1.35rem; height: 1.35rem; }
  .icon-badge--lg { width: 3.5rem; height: 3.5rem; border-radius: var(--radius-lg); }
  .icon-badge--lg .icon { width: 1.6rem; height: 1.6rem; }
  .surface-dark .icon-badge { background: color-mix(in srgb, var(--gold-500) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold-500) 35%, transparent); }

  /* ── Button ──────────────────────────────────────────────────────────── */
  .button {
    --btn-bg: var(--btn-primary-bg);
    --btn-bg-hover: var(--btn-primary-bg-hover);
    --btn-text: var(--btn-primary-text);
    --btn-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 3rem;
    padding: var(--space-3) var(--space-5);
    border: 1.5px solid var(--btn-border);
    border-radius: var(--radius);
    background: var(--btn-bg);
    color: var(--btn-text);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--duration) var(--ease),
                border-color var(--duration) var(--ease),
                color var(--duration) var(--ease),
                transform var(--duration) var(--ease);
  }
  .button:hover { background: var(--btn-bg-hover); color: var(--btn-text); }
  .button .icon { width: 1.1em; height: 1.1em; transition: transform var(--duration) var(--ease); }
  .button:hover .icon--trailing { transform: translateX(3px); }
  .button:active { transform: translateY(1px); }
  .button[disabled], .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

  .button--accent {
    --btn-bg: var(--btn-accent-bg);
    --btn-bg-hover: var(--btn-accent-bg-hover);
    --btn-text: var(--btn-accent-text);
  }
  .button--ghost {
    --btn-bg: transparent;
    --btn-bg-hover: var(--navy-50);
    --btn-text: var(--navy-900);
    --btn-border: var(--navy-900);
  }
  /* Outline on navy: the StratEdge "View Case Studies" button. */
  .button--ghost-inverse {
    --btn-bg: transparent;
    --btn-bg-hover: color-mix(in srgb, var(--white) 8%, transparent);
    --btn-text: var(--white);
    --btn-border: color-mix(in srgb, var(--white) 60%, transparent);
  }
  .button--link {
    --btn-bg: transparent;
    --btn-bg-hover: transparent;
    --btn-text: var(--color-link);
    min-height: 0;
    padding: 0;
    border: 0;
  }
  .button--link:hover { text-decoration: underline; text-underline-offset: 4px; }
  .button--lg { min-height: 3.5rem; padding-inline: var(--space-6); font-size: var(--text-base); }
  .button--block { width: 100%; }

  /* Overlay header: the CTA turns gold while the header is transparent over
     navy, where a navy button would vanish; navy again once it goes white. */
  .site-header--overlay:not(.is-scrolled) .header-cta {
    --btn-bg: var(--btn-accent-bg);
    --btn-bg-hover: var(--btn-accent-bg-hover);
    --btn-text: var(--btn-accent-text);
  }

  .button-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

  /* ── Eyebrow and section header ──────────────────────────────────────── */
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0 0 var(--space-4);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--color-eyebrow);
  }
  .eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 2px;
    background: var(--color-accent-line);
  }
  .eyebrow--pill {
    padding: var(--space-1) var(--space-4);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--white) 4%, transparent);
  }
  .eyebrow--pill::before { display: none; }

  .section-header { max-width: 46rem; margin-bottom: var(--space-7); }
  .section-header--center { margin-inline: auto; text-align: center; }
  .section-header__lede { font-size: var(--text-lg); color: var(--color-text-muted); margin: 0; }
  .section-header__title { margin-bottom: var(--space-4); }

  /* ── Card ────────────────────────────────────────────────────────────── */
  .card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease),
                transform var(--duration) var(--ease);
  }
  .card__title { margin: 0; font-size: var(--text-lg); }
  .card__title a { color: inherit; text-decoration: none; }
  /* The whole card is one target, through the title link's ::after, so a
     screen reader hears one link rather than three. */
  .card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
  .card__title a:focus-visible { outline: none; box-shadow: none; }
  .card:has(.card__title a:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 2px; }
  .card__body { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
  .card__meta { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); letter-spacing: 0.02em; }
  .card__more {
    margin-top: auto;
    padding-top: var(--space-2);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 650;
    color: var(--color-link);
  }
  .card__more .icon { width: 1em; height: 1em; transition: transform var(--duration) var(--ease); }

  .card:has(a):hover { border-color: var(--gold-500); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
  .card:has(a):hover .card__more .icon { transform: translateX(3px); }

  /* Service card: a gold rule along the top on hover. */
  .card--service::before {
    content: "";
    position: absolute;
    inset: -1px -1px auto;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--gold-500);
    scale: 0 1;
    transform-origin: left;
    transition: scale 300ms var(--ease);
  }
  .card--service:hover::before { scale: 1 1; }

  /* Industry card: compact, icon beside title. */
  .card--industry { flex-direction: row; align-items: center; gap: var(--space-4); padding: var(--space-5); }
  .card--industry .card__title { font-size: var(--text-base); }

  /* Article / case study card: image on top, flush to the edges. */
  .card--media { padding: 0; overflow: hidden; }
  .card--media .card__content { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) var(--space-6) var(--space-6); flex: 1; }
  .card__image {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    background: var(--navy-900);
  }
  /* No image yet: a branded panel rather than a broken box. */
  .card__image--placeholder {
    background:
      radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--gold-500) 45%, transparent), transparent 55%),
      linear-gradient(135deg, var(--navy-900), var(--navy-600));
  }
  .card__tag {
    align-self: flex-start;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    background: var(--navy-50);
    color: var(--navy-700);
    font-size: var(--text-xs);
    font-weight: 600;
  }

  /* ── Steps (methodology) ─────────────────────────────────────────────── */
  .steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-5);
    counter-reset: step;
  }
  @media (min-width: 64rem) {
    .steps { grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
  }
  .step { position: relative; padding-top: var(--space-6); }
  .step__number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: 1;
    color: var(--color-eyebrow);   /* gold-700 on light, gold-300 on navy */
    margin-bottom: var(--space-3);
  }
  .step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-500), transparent);
  }
  .step__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
  .step__body { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }

  /* ── Stat ────────────────────────────────────────────────────────────── */
  .stat { border-left: 2px solid var(--gold-500); padding-left: var(--space-4); }
  .stat__value {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--color-heading);
    line-height: 1.1;
  }
  .stat__label { display: block; margin-top: var(--space-1); font-size: var(--text-sm); color: var(--color-text-muted); }

  /* ── Check list (Why Aucta) ──────────────────────────────────────────── */
  .check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
  .check-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
  .check-list .icon {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.25rem;
    border-radius: var(--radius-pill);
    background: var(--gold-100);
    color: var(--gold-700);
    margin-top: 0.15em;
  }

  /* ── CTA band ────────────────────────────────────────────────────────── */
  .cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(1.5rem, 1rem + 4vw, 4.5rem);
    border-radius: var(--radius-lg);
    isolation: isolate;
  }
  .cta-band::after {
    content: "";
    position: absolute;
    inset: auto -10% -60% 40%;
    height: 140%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--gold-500) 22%, transparent), transparent);
    z-index: -1;
  }
  .cta-band__inner { display: grid; gap: var(--space-5); align-items: center; }
  @media (min-width: 56rem) {
    .cta-band__inner { grid-template-columns: 1fr auto; gap: var(--space-7); }
  }
  .cta-band__title { margin-bottom: var(--space-3); font-size: var(--text-2xl); }
  .cta-band__body { margin: 0; color: var(--color-text-muted); font-size: var(--text-lg); max-width: 38rem; }

  /* ── Breadcrumb ──────────────────────────────────────────────────────── */
  .breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
  }
  .breadcrumb li { display: inline-flex; align-items: center; gap: var(--space-2); }
  .breadcrumb li + li::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    rotate: 45deg;
    opacity: 0.6;
  }
  .breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
  .breadcrumb a:hover { color: var(--color-link-hover); text-decoration: underline; }
  .breadcrumb [aria-current="page"] { color: var(--color-text); font-weight: 550; }

  /* ── Form field ──────────────────────────────────────────────────────── */
  /* align-content: start, or a field beside a taller one (with a hint) gets
     its input stretched to match. */
  .field { display: grid; gap: var(--space-2); align-content: start; }
  .field__label { font-size: var(--text-sm); font-weight: 600; color: var(--color-heading); }
  .field__optional { font-weight: 400; color: var(--color-text-muted); }
  .field__hint { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
  .field__error {
    margin: 0;
    display: flex;
    gap: var(--space-2);
    align-items: center;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--danger);
  }
  .field__error .icon { width: 1rem; height: 1rem; }

  .input {
    width: 100%;
    min-height: 3rem;
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink-900);
    font-size: 1rem;           /* 16px: stops iOS zooming into the field */
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  }
  .input::placeholder { color: var(--ink-500); opacity: 0.85; }
  .input:hover { border-color: var(--navy-600); }
  .input:focus-visible {
    outline: none;
    border-color: var(--navy-900);
    box-shadow: 0 0 0 3px var(--gold-300);
  }
  textarea.input { min-height: 9rem; resize: vertical; line-height: 1.5; }
  select.input {
    appearance: none;
    padding-right: var(--space-7);
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-600) 50%),
                      linear-gradient(135deg, var(--ink-600) 50%, transparent 50%);
    background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
    background-size: 0.35rem 0.35rem;
    background-repeat: no-repeat;
  }
  .field--invalid .input { border-color: var(--danger); background-color: var(--danger-bg); }

  .field--checkbox { grid-template-columns: auto 1fr; align-items: start; column-gap: var(--space-3); }
  .field--checkbox input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.2rem 0 0;
    accent-color: var(--navy-900);
  }
  .field--checkbox .field__label { font-weight: 450; color: var(--color-text); }
  .field--checkbox .field__hint, .field--checkbox .field__error { grid-column: 2; }

  .form-grid { display: grid; gap: var(--space-5); }
  @media (min-width: 40rem) {
    .form-grid--2 { grid-template-columns: 1fr 1fr; }
    .form-grid .field--full { grid-column: 1 / -1; }
  }

  .alert {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius);
    font-size: var(--text-sm);
  }
  .alert--error { background: var(--danger-bg); color: var(--danger); }
  .alert--success { background: var(--success-bg); color: var(--success); }

  /* ── Hero ────────────────────────────────────────────────────────────── */
  .hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--navy-950);
  }
  .hero__art {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(80% 70% at 75% 40%, var(--navy-700), transparent 70%),
      linear-gradient(180deg, var(--navy-950), var(--navy-900));
  }
  .hero__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .hero-stop-gold { stop-color: var(--gold-500); }
  .hero-stop-light { stop-color: var(--gold-300); }
  .hero-particles { color: var(--gold-300); }
  /* A scrim on the text side, so the copy never sits on bright gold. */
  .hero__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, color-mix(in srgb, var(--navy-950) 85%, transparent) 0%, color-mix(in srgb, var(--navy-950) 50%, transparent) 45%, transparent 75%);
  }
  .hero__inner {
    min-height: min(52rem, 100svh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-height) + var(--space-8));
    padding-bottom: var(--space-9);
  }
  .hero__content { max-width: 44rem; }
  .hero__title { font-size: var(--text-3xl); margin-bottom: var(--space-5); }
  .hero__title em { font-style: normal; color: var(--gold-300); }
  .hero__lede { font-size: var(--text-lg); color: var(--dark-text-muted); max-width: 36rem; margin-bottom: var(--space-6); }

  .hero--page .hero__inner {
    min-height: 0;
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }
  .hero--page .hero__title { font-size: var(--text-2xl); }
  .hero--page .breadcrumb { margin-bottom: var(--space-5); }

  /* The waves drift, slowly. Nothing else on the site moves on its own. */
  @media (prefers-reduced-motion: no-preference) {
    .wave-field { animation: wave-drift 26s ease-in-out infinite alternate; transform-origin: center; }
    @keyframes wave-drift {
      from { transform: translateX(-2%) translateY(0); }
      to   { transform: translateX(2%) translateY(-1.5%); }
    }
  }

  .hero__scroll {
    position: absolute;
    left: 50%;
    bottom: var(--space-6);
    translate: -50% 0;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid color-mix(in srgb, var(--white) 30%, transparent);
    border-radius: var(--radius-pill);
    color: var(--white);
  }
  .hero__scroll:hover { color: var(--gold-300); border-color: var(--gold-300); }
  .hero__scroll .icon { width: 1.1rem; height: 1.1rem; rotate: 90deg; }

  /* ── Reveal on scroll ────────────────────────────────────────────────── */
  /* Only once the controller has said it is watching, and only for people who
     have not asked for less motion. Without either, everything just shows. */
  @media (prefers-reduced-motion: no-preference) {
    .is-reveal-ready [data-reveal]:not(.is-revealed) { opacity: 0; translate: 0 16px; }
    .is-reveal-ready [data-reveal] { transition: opacity var(--duration-slow) var(--ease), translate var(--duration-slow) var(--ease); }
  }

  /* ── Brand mark (logo) ───────────────────────────────────────────────── */
  .logo-mark { display: inline-flex; }
  .logo-mark__img { display: block; height: 100%; width: auto; }
  .logo-mark__img--light { display: none; }
  /* On navy: swap to the white-on-navy mark. */
  .site-header--overlay:not(.is-scrolled) .logo-mark__img--default,
  .surface-dark .logo-mark__img--default { display: none; }
  .site-header--overlay:not(.is-scrolled) .logo-mark__img--light,
  .surface-dark .logo-mark__img--light { display: block; }
}

/* ── Public pages (p5) ─────────────────────────────────────────────────── */
@layer components {
  /* Rich text from admin, in the site's reading style. */
  .prose { font-size: var(--text-base); color: var(--color-text); max-width: 46rem; }
  .prose .trix-content > *:first-child { margin-top: 0; }
  .prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 var(--space-4); }
  .prose h1, .prose h2, .prose h3 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-3); }
  .prose a { color: var(--color-link); }
  .prose blockquote { margin-left: 0; padding-left: var(--space-5); border-left: 3px solid var(--gold-500); color: var(--color-text-muted); }
  .prose--lead { font-size: var(--text-lg); line-height: 1.7; }
  .prose--lead p { color: var(--color-text); }

  /* Bulleted lists as gold-marked points (benefits, on navy or white). */
  /* Trix's own stylesheet indents list items; inside our layouts it must not. */
  .prose li { margin-left: 0; }
  .prose--checks ul { list-style: none; padding: 0; display: grid; gap: var(--space-4); }
  .prose--checks li { position: relative; padding-left: var(--space-6); }
  .prose--checks li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.55em;
    width: 0.6rem;
    height: 0.6rem;
    background: var(--gold-500);
    rotate: 45deg;
  }

  /* Bulleted lists as a grid of cards (business challenges). */
  .prose--cards { max-width: none; }
  .prose--cards ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  }
  .prose--cards li {
    position: relative;
    padding: var(--space-5) var(--space-5) var(--space-5) var(--space-7);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-weight: 500;
    color: var(--navy-900);
    line-height: var(--leading-snug);
  }
  .prose--cards li::before {
    content: "";
    position: absolute;
    left: var(--space-5);
    top: var(--space-5);
    bottom: var(--space-5);
    width: 3px;
    border-radius: 2px;
    background: var(--gold-500);
  }

  /* A numbered list of services in a division. */
  .service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0 var(--space-6);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    counter-reset: service;
  }
  .service-list li {
    counter-increment: service;
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
  }
  .service-list li::before {
    content: counter(service, decimal-leading-zero);
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-eyebrow);
  }
  .service-list strong { display: block; color: var(--color-heading); font-weight: 650; }
  .service-list span { display: block; color: var(--color-text-muted); font-size: var(--text-sm); }

  /* A short statement set large (philosophy, intro quote). */
  .statement {
    margin: 0;
    padding-left: var(--space-5);
    border-left: 3px solid var(--gold-500);
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 650;
    line-height: var(--leading-snug);
    color: var(--color-heading);
  }

  .text-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 650;
    color: var(--color-link);
  }
  .text-link .icon { width: 1em; height: 1em; transition: transform var(--duration) var(--ease); }
  .text-link:hover .icon { transform: translateX(3px); }

  /* Admin preview of a draft: impossible to mistake for the live page. */
  .preview-banner {
    position: sticky;
    top: var(--header-height);
    z-index: 40;
    padding: var(--space-3) var(--gutter);
    background: var(--gold-300);
    color: var(--navy-900);
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: center;
  }
  .preview-banner a { color: var(--navy-900); }

  /* A division on the services index: summary beside its services. */
  .division-row {
    display: grid;
    gap: var(--space-5) var(--space-7);
    padding-block: var(--space-7);
    border-top: 1px solid var(--color-border);
  }
  .division-row:last-child { border-bottom: 1px solid var(--color-border); }
  @media (min-width: 56rem) { .division-row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
  .division-row__head { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
  .division-row h2 { font-size: var(--text-xl); margin: 0; }
  .division-row h2 a { color: inherit; text-decoration: none; }
  .division-row h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold-500); }
  .division-row p { margin: 0; color: var(--color-text-muted); }
  .division-row .service-list li { padding-block: var(--space-3); }

  .hero__icon { margin-bottom: var(--space-5); }
}

@layer components {
  .statement + .prose { margin-top: var(--space-5); }
  .muted-note { margin-top: var(--space-6); font-size: var(--text-sm); color: var(--color-text-muted); }
}

/* ── Insights (p6) ─────────────────────────────────────────────────────── */
@layer components {
  .topic-filter { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-7); }
  .topic-filter a {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--navy-900);
    text-decoration: none;
  }
  .topic-filter a:hover { border-color: var(--navy-900); }
  .topic-filter a[aria-current="page"] { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }

  .feature-article {
    position: relative;
    display: grid;
    margin-bottom: var(--space-7);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
  }
  @media (min-width: 56rem) { .feature-article { grid-template-columns: 7fr 5fr; } }
  .feature-article__image { width: 100%; height: 100%; min-height: 16rem; aspect-ratio: 16 / 9; object-fit: cover; }
  .feature-article__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); justify-content: center; }
  .feature-article__title { font-size: var(--text-xl); margin: 0; }
  .feature-article__title a { color: inherit; text-decoration: none; }
  .feature-article__title a::after { content: ""; position: absolute; inset: 0; }
  .feature-article__body p { margin: 0; color: var(--color-text-muted); }
  .feature-article:hover { border-color: var(--gold-500); box-shadow: var(--shadow-lg); }

  .empty-state { max-width: 36rem; padding-block: var(--space-6); }

  .public-pagination { margin-top: var(--space-7); display: flex; justify-content: center; }
  .public-pagination nav { display: flex; flex-wrap: wrap; gap: var(--space-1); }
  .public-pagination a {
    min-width: 2.75rem;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--navy-900);
    font-weight: 600;
  }
  .public-pagination a[aria-current="page"] { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
  .public-pagination a[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

  /* The article page. */
  .article__header { padding-block: var(--space-8) var(--space-7); }
  .article__header .breadcrumb { margin-bottom: var(--space-5); }
  .article__title { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
  .article__excerpt { font-size: var(--text-lg); color: var(--color-text-muted); }
  .article__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
  .article__cover { margin-top: calc(-1 * var(--space-5)); }
  .article__cover img { width: 100%; max-height: 32rem; object-fit: cover; border-radius: var(--radius-lg); }
  .article__body { padding-block: var(--space-8); }

  .prose--article { font-size: 1.1875rem; line-height: 1.75; }
  .prose--article h2 { font-size: var(--text-xl); margin-top: var(--space-7); }
  .prose--article ul, .prose--article ol { padding-left: 1.25em; }
  .prose--article li { margin-bottom: var(--space-2); }
  .prose--article li::marker { color: var(--gold-700); }

  .share { margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
  .share__title { margin: 0; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); color: var(--color-eyebrow); }
  .share ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-2); }
  .share a, .share__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-width: 2.75rem;
    height: 2.75rem;
    padding-inline: var(--space-3);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--navy-900);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
  }
  .share a:hover, .share__copy:hover { border-color: var(--navy-900); }
  .share .icon { width: 1.05rem; height: 1.05rem; }
}

/* ── Case studies (p7) ─────────────────────────────────────────────────── */
@layer components {
  .filters { display: grid; gap: var(--space-3); margin-bottom: var(--space-7); }
  .filters .topic-filter { margin-bottom: 0; }

  .metrics { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
  .metrics .stat { margin: 0; }

  .case-facts { display: grid; gap: var(--space-6) var(--space-8); align-items: start; }
  @media (min-width: 56rem) { .case-facts { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } }
  .facts { margin: 0; display: grid; gap: var(--space-4); }
  .facts dt { font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-eyebrow); }
  .facts dd { margin: var(--space-1) 0 0; font-weight: 600; color: var(--navy-900); }
}

/* ── Contact (p8) ──────────────────────────────────────────────────────── */
@layer components {
  .contact-layout { display: grid; gap: var(--space-7); align-items: start; }
  @media (min-width: 64rem) { .contact-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--space-8); } }

  .enquiry-card {
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    background: var(--white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
  }
  .enquiry-card:focus { outline: none; }
  .enquiry-card__title { font-size: var(--text-xl); margin-bottom: var(--space-2); }
  .enquiry-card form { margin-top: var(--space-6); }
  .enquiry-card--done { display: grid; gap: var(--space-3); justify-items: start; }
  .enquiry-card--done .icon-badge { margin-bottom: var(--space-2); }

  .muted-text { color: var(--color-text-muted); }

  .contact-aside h2 { font-size: var(--text-lg); }
  .contact-list { list-style: none; margin: var(--space-5) 0 var(--space-7); padding: 0; display: grid; gap: var(--space-4); }
  .contact-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
  .contact-list .icon { width: 1.25rem; height: 1.25rem; color: var(--gold-700); margin-top: 0.2em; flex: none; }
  .contact-list__label { display: block; font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-text-muted); }
  .contact-aside__next { font-size: var(--text-base); margin-bottom: var(--space-3); }
  .next-steps { padding-left: 1.25em; display: grid; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); }
  .next-steps li::marker { color: var(--gold-700); font-weight: 700; }
}

/* ── Engagement (p9) ───────────────────────────────────────────────────── */
@layer components {
  .newsletter__form { display: grid; gap: var(--space-2); }
  .newsletter__label { font-weight: 650; font-size: var(--text-sm); color: var(--color-heading); display: flex; gap: var(--space-2); align-items: center; }
  .newsletter__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .newsletter__row .input { flex: 1 1 12rem; min-width: 0; }
  .newsletter__row .button { flex: none; }
  .newsletter__note { margin: 0; font-size: var(--text-xs); color: var(--color-text-muted); }
  .newsletter--dark .input { background: var(--navy-800); border-color: var(--dark-border); color: var(--white); }
  .newsletter--dark .input::placeholder { color: var(--navy-200); }
  .newsletter--done:focus { outline: none; }

  .subscribe-band {
    display: grid;
    gap: var(--space-5) var(--space-7);
    align-items: center;
    padding: var(--space-6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--mist);
  }
  @media (min-width: 56rem) { .subscribe-band { grid-template-columns: 1fr 1fr; } }
  .subscribe-band h2 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
  .subscribe-band p { margin: 0; }

  /* Navy, not WhatsApp green: a white mark on that green is under 3:1. */
  .whatsapp-float {
    position: fixed;
    right: var(--space-4);
    bottom: var(--space-4);
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 3.5rem;
    padding: 0 var(--space-4);
    border-radius: var(--radius-pill);
    background: var(--navy-900);
    color: var(--white);
    box-shadow: 0 0 0 2px var(--gold-500), var(--shadow-lg);
    font-weight: 650;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: transform var(--duration) var(--ease);
  }
  .whatsapp-float:hover { color: var(--white); transform: translateY(-2px); }
  .whatsapp-float .icon { width: 1.5rem; height: 1.5rem; }
  /* Phones: icon only, so it never covers content; the name stays for screen readers. */
  @media (max-width: 40rem) {
    .whatsapp-float { width: 3.5rem; padding: 0; justify-content: center; }
    .whatsapp-float__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  }
  @media print { .whatsapp-float { display: none; } }

  .contact-aside__extras { display: grid; gap: var(--space-3); justify-items: start; margin-bottom: var(--space-7); }
  .contact-aside__extras .button--block { justify-content: center; }

  .booking { border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); }
  .booking__intro { display: grid; gap: var(--space-3); justify-items: start; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
  .booking__intro h2 { font-size: var(--text-xl); margin: 0; }
  .booking__calendar { min-height: 40rem; border-top: 1px solid var(--color-border); }

  .download-cover { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow); }
}

@layer layout {
  .site-footer__subhead { margin-top: var(--space-6); }
  /* Room at the end of the page so the floating WhatsApp button never sits on
     the last links. Two classes, to outrank layout.css's .site-footer
     padding (same layer, and that file loads after this one). */
  .site-footer .site-footer__bottom { margin-bottom: 4.5rem; }
}

/* ── Images in rich text (p10) ─────────────────────────────────────────── */
@layer components {
  .prose figure { margin: var(--space-6) 0; }
  .prose figure img { width: 100%; height: auto; border-radius: var(--radius); }
  .prose figcaption { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; }
}

/* ── Consent banner (p11) ──────────────────────────────────────────────── */
@layer components {
  .consent {
    position: fixed;
    inset: auto var(--space-4) var(--space-4) var(--space-4);
    z-index: 60;
    max-width: 44rem;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--navy-900);
    color: var(--white);
    /* A gold edge: on the navy hero a navy panel would otherwise melt into the page. */
    box-shadow: 0 0 0 1px var(--gold-500), var(--shadow-lg);
    --color-heading: var(--white);
    --color-link: var(--gold-300);
    --color-focus-ring: var(--white);
  }
  .consent__inner { display: grid; gap: var(--space-4); }
  .consent__title { font-size: var(--text-base); margin-bottom: var(--space-2); }
  .consent__body { margin: 0; font-size: var(--text-sm); color: var(--navy-200); }
  .consent__body a { color: var(--gold-300); }
}

@layer components {
  .site-footer__install { border: 0; padding: 0; background: none; cursor: pointer; color: var(--gold-300); font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 3px; }
}
