/* =============================================================================
   PITCO Engineering — Foundation Stylesheet
   Built to Story/design-verdict.md (LOCKED) + Story/style.md.
   8-section architecture. Per-page styles live in css/pages/[slug].css.
   ============================================================================= */

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

* { margin: 0; }

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

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button { background: none; border: 0; cursor: pointer; }

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

a { color: inherit; }

@font-face {
  font-family: "Good Times";
  src: url("../assets/fonts/GoodTimes-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =============================================================================
   2. CUSTOM PROPERTIES
   ============================================================================= */
:root {
  /* --- Color: surfaces --- */
  --c-bg:          #ffffff;
  --c-bg-alt:      #f5f7fa;
  --c-bg-dark:     #071323;
  --c-bg-dark-2:   #0c1e38;

  /* --- Color: ink --- */
  --c-ink:         #1d1d1f;
  --c-ink-2:       #515154;
  --c-ink-3:       #86868b;   /* large text only — fails AA for body copy */
  --c-on-dark:     #f5f5f7;
  --c-on-dark-2:   rgba(245, 245, 247, 0.66);  /* large text only */

  /* --- Color: brand --- */
  --c-accent:        #2EA3F2;
  --c-accent-hover:  #1B8CD6;
  --c-accent-ink:    #1B76B5;   /* AA-safe accent for small text on light (4.9:1) */
  --c-gold:          #F0C815;
  --c-gold-hover:    #d9b40c;

  /* --- Color: lines --- */
  --c-line:        rgba(0, 0, 0, 0.10);
  --c-line-dark:   rgba(255, 255, 255, 0.14);

  /* --- Typography: families --- */
  --f-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body:    "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-logo:    "Good Times", var(--f-display);

  /* --- Typography: clamp() scale --- */
  --t-eyebrow: clamp(0.75rem, 0.72rem + 0.12vw, 0.84rem);
  --t-body:    clamp(1rem, 0.96rem + 0.22vw, 1.19rem);
  --t-lead:    clamp(1.25rem, 1.06rem + 0.85vw, 1.75rem);
  --t-h3:      clamp(1.5rem, 1.22rem + 1.25vw, 2.25rem);
  --t-h2:      clamp(2rem, 1.42rem + 2.6vw, 3.5rem);
  --t-h1:      clamp(2.75rem, 1.62rem + 5vw, 5.5rem);
  --t-mega:    clamp(3.5rem, 1.4rem + 9.4vw, 8rem);

  /* --- Radii --- */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   22px;
  --r-xl:   32px;
  --r-pill: 999px;

  /* --- Elevation (two shadows only) --- */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.10), 0 32px 64px rgba(0, 0, 0, 0.14);

  /* --- Spacing (8px scale) --- */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4rem;
  --sp-7: 6rem;
  --section-pad: clamp(5rem, 8vw, 10rem);

  /* --- Layout --- */
  --w-max:   1200px;
  --w-wide:  1440px;
  --w-text:  680px;
  --gutter:  clamp(1.25rem, 4vw, 2.5rem);
  --nav-h:   58px;

  /* --- Motion --- */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  150ms;
  --dur-mid:   300ms;
  --dur-slow:  500ms;
}

/* =============================================================================
   3. GLOBAL
   ============================================================================= */
body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--c-ink);
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-lead); }

/* Weight 700 reserved for the largest display sizes only (verdict §2). */
.h1--bold,
h1.is-bold { font-weight: 700; }

p { line-height: 1.6; }

a {
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

strong { font-weight: 600; }

::selection {
  background: var(--c-accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Layout containers */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--w-wide); }
.container--text { max-width: var(--w-text); }

/* Full-bleed light-gray band behind a width-capped tile grid: beyond the
   grid's max-width the side area shows the same gray as the tiles, while the
   capped grid keeps its white seam-frame. Used on the white-background tile
   sections (home lineup, Start-with-Standard benefits); the gray tile sections
   (development, simulation) already provide this via their own section bg. */
.tile-band { background: var(--c-bg-alt); }

/* Section rhythm */
.section { padding-block: var(--section-pad); }
.section--alt  { background: var(--c-bg-alt); }
.section--dark {
  background: linear-gradient(180deg, var(--c-bg-dark) 0%, var(--c-bg-dark-2) 100%);
  color: var(--c-on-dark);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--c-on-dark); }

/* =============================================================================
   4. UTILITIES
   ============================================================================= */
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-eyebrow);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* Eyebrows are small text → need AA contrast. Accent #2EA3F2 fails on white
     (2.75:1); the deeper --c-accent-ink passes. On navy, #2EA3F2 passes (6.8:1). */
  color: var(--c-accent-ink);
}
.section--dark .eyebrow { color: var(--c-accent); }
/* Gold text fails AA on white at any size → gold eyebrow stays quiet on light,
   gold only on dark surfaces where it passes. */
.eyebrow--gold { color: var(--c-ink); }
.section--dark .eyebrow--gold { color: var(--c-gold); }
.eyebrow--muted { color: var(--c-ink-2); }
.section--dark .eyebrow--muted { color: var(--c-on-dark-2); }

.lead {
  font-size: var(--t-lead);
  line-height: 1.4;
  color: var(--c-ink-2);
}
.section--dark .lead { color: var(--c-on-dark-2); }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: var(--w-text); }

.stack > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-4); }

.section-head { max-width: 760px; margin-bottom: var(--sp-6); }
.section-head .eyebrow { display: block; margin-bottom: var(--sp-2); }
.section-head p { margin-top: var(--sp-2); color: var(--c-ink-2); }
.section--dark .section-head p { color: var(--c-on-dark-2); }
.section-head.text-center { margin-inline: auto; }

/* Visually-hidden (kept accessible to AT) */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--c-ink);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 0.75rem; }

/* no-js fallbacks: when JS is off, everything is shown in final state */
.no-js .reveal { opacity: 1; transform: none; }
.no-js [data-mega] { display: none; }

/* =============================================================================
   5. ANIMATIONS
   ============================================================================= */
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-reveal: fade + 16px rise, 500ms, fires once */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children: cap at ~120ms steps */
.reveal[data-delay="1"] { transition-delay: 60ms; }
.reveal[data-delay="2"] { transition-delay: 120ms; }
.reveal[data-delay="3"] { transition-delay: 180ms; }
.reveal[data-delay="4"] { transition-delay: 240ms; }
.reveal[data-delay="5"] { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =============================================================================
   6. COMPONENTS
   ============================================================================= */

/* --- 6.1 Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--c-accent);
  color: #fff;
}
.btn--primary:hover { background: var(--c-accent-hover); }

.btn--gold {
  background: var(--c-gold);
  color: var(--c-ink);
}
.btn--gold:hover { background: var(--c-gold-hover); }

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1px solid var(--c-line);
}
.btn--ghost:hover { border-color: var(--c-ink); }
.section--dark .btn--ghost,
.btn--ghost.on-dark {
  color: var(--c-on-dark);
  border-color: var(--c-line-dark);
}
.section--dark .btn--ghost:hover,
.btn--ghost.on-dark:hover { border-color: var(--c-on-dark); }

.btn--lg { padding: 0.9rem 2rem; font-size: 1.06rem; }

/* Quiet text link with arrow — Apple "Learn more" pattern */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--c-accent);
}
.link-arrow::after {
  content: "›";
  font-size: 1.2em;
  line-height: 0;
  transition: transform var(--dur-fast) var(--ease-out);
}
.link-arrow:hover { color: var(--c-accent-hover); }
.link-arrow:hover::after { transform: translateX(3px); }

/* --- 6.2 Site navigation ------------------------------------------------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease-out),
    height var(--dur-mid) var(--ease-out);
}

/* Collapsed state — thin logo-only bar (set by nav.js on scroll-down past
   the first section; scrolling up re-expands it). The bar is thin but the
   logo keeps its full size, so it overhangs the bar slightly. */
.site-nav.is-collapsed { height: 44px; }
.site-nav.is-collapsed .site-nav__primary,
.site-nav.is-collapsed .site-nav__cta,
.site-nav.is-collapsed .site-nav__toggle {
  opacity: 0;
  pointer-events: none;
}
/* Collapsed bar keeps the logo at 70px; the larger 78px is uncollapsed-only */
.site-nav.is-collapsed .site-nav__logo img { height: 30px; }
.site-nav__primary,
.site-nav__cta,
.site-nav__toggle {
  transition: opacity var(--dur-fast) var(--ease-out);
}
.site-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--c-line);
}
/* Dark-page nav variant (AEOS) */
.site-nav--dark {
  background: rgba(7, 19, 35, 0.72);
  color: var(--c-on-dark);
}
.site-nav--dark.is-scrolled {
  background: rgba(7, 19, 35, 0.92);
  border-bottom-color: var(--c-line-dark);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: 100%;
  max-width: var(--w-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-nav__logo {
  display: flex;
  align-items: center;
}
.site-nav__logo img {
  display: block;
  height: 34px;
  width: auto;
  /* Lock against flex compression so the brand logo renders at the
     same, undistorted size on every page (see .site-nav__aeos). */
  max-width: none;
  flex-shrink: 0;
  transition: height var(--dur-mid) var(--ease-out);
}

.site-nav__primary { margin-inline-start: auto; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav__item { position: relative; }

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-ink);
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-nav--dark .site-nav__link { color: var(--c-on-dark); }
.site-nav__link:hover { color: var(--c-accent); }
.site-nav__link[aria-current="page"] { color: var(--c-accent); }

.site-nav__caret {
  width: 9px; height: 9px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.site-nav__link[aria-expanded="true"] .site-nav__caret { transform: rotate(180deg); }

/* AEOS wordmark used in place of the text label in the nav. */
.site-nav__aeos {
  display: block;
  height: 32px;
  width: auto;
  /* Render the logo at the same size on every page. The global img
     reset (max-width: 100%) plus flex pressure from the per-page CTA
     would otherwise squeeze it — distorting it and shrinking it on
     pages with a longer CTA (e.g. start-with-standard). */
  max-width: none;
  flex-shrink: 0;
}

/* Keep the CTA label on one line — its text varies per page and the
   longest ("Get an Assessment") otherwise wraps on the tighter navs. */
.site-nav__cta { padding-block: 0.5rem; white-space: nowrap; }

/* Hamburger toggle (mobile) */
.site-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
}
.site-nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-ink);
  transition: transform var(--dur-mid) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}
.site-nav--dark .site-nav__toggle span { background: var(--c-on-dark); }
.site-nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- 6.3 Mega-menu ------------------------------------------------------- */
.mega {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow-1);
}
.mega[hidden] { display: none; }
.mega__inner {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr;
  gap: var(--sp-5);
  max-width: var(--w-wide);
  margin-inline: auto;
  padding: var(--sp-5) var(--gutter);
}
.mega__col--lead .eyebrow { display: block; margin-bottom: var(--sp-1); }
.mega__title {
  display: block;
  font-family: var(--f-display);
  font-size: var(--t-h3);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}
.mega__title:hover { color: var(--c-accent); }
.mega__title--logo img {
  display: block;
  height: 75px;
  width: auto;
}
.mega__desc { margin-top: var(--sp-1); color: var(--c-ink-2); font-size: 0.98rem; }

.mega__links { display: grid; gap: 0.15rem; align-content: start; }
.mega__links a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-sm);
  font-weight: 500;
  color: var(--c-ink);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.mega__links a:hover { background: var(--c-bg-alt); color: var(--c-accent); }

.mega__cross {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--sp-3);
  background: var(--c-bg-alt);
  border-radius: var(--r-md);
}
.mega__cross:hover { background: #eef1f6; }
.mega__cross .eyebrow { color: var(--c-ink-2); }
.mega__cross-title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-ink);
}
.mega__cross-desc { font-size: 0.92rem; color: var(--c-ink-2); }

/* --- 6.4 Mobile menu ----------------------------------------------------- */
.nav-mobile {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 890;
  background: var(--c-bg);
  overflow-y: auto;
  padding: var(--sp-4) var(--gutter) var(--sp-7);
}
.nav-mobile[hidden] { display: none; }
.nav-mobile__group { border-bottom: 1px solid var(--c-line); }
.nav-mobile__link {
  display: block;
  padding: var(--sp-2) 0;
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--c-ink);
}
.nav-mobile__sub {
  padding: 0 0 var(--sp-2) var(--sp-2);
  display: grid;
  gap: 0.2rem;
}
.nav-mobile__sub a {
  padding: 0.4rem 0;
  color: var(--c-ink-2);
  font-size: 0.98rem;
}
.nav-mobile__cta { margin-top: var(--sp-4); }
.nav-mobile__cta .btn { width: 100%; justify-content: center; }

/* --- 6.5 Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(92svh, 900px);
  padding-block: calc(var(--nav-h) + var(--sp-6)) var(--sp-7);
  overflow: hidden;
}
.hero--dark {
  background: linear-gradient(180deg, var(--c-bg-dark) 0%, var(--c-bg-dark-2) 100%);
  color: var(--c-on-dark);
}
.hero--gold { background: var(--c-bg); }
.hero__inner { width: 100%; }
.hero__eyebrow { display: block; margin-bottom: var(--sp-3); }
.hero h1 { max-width: 16ch; }
.hero--center { text-align: center; }
.hero--center .hero h1,
.hero--center h1 { margin-inline: auto; }
.hero__sub {
  margin-top: var(--sp-3);
  max-width: 54ch;
  font-size: var(--t-lead);
  line-height: 1.4;
  color: var(--c-ink-2);
}
.hero--dark .hero__sub { color: var(--c-on-dark-2); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.hero__media {
  margin-top: var(--sp-6);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* --- 6.6 Product-group tiles (Apple lineup) ------------------------------ */
.lineup { display: grid; }
.tile {
  display: grid;
  align-content: center;
  gap: var(--sp-2);
  padding: var(--section-pad) var(--gutter);
  text-align: center;
}
.tile__inner {
  max-width: 640px;
  margin-inline: auto;
  display: grid;
  gap: var(--sp-2);
  justify-items: center;
}
.tile--light { background: var(--c-bg); }
.tile--alt   { background: var(--c-bg-alt); }
.tile--dark  {
  background: linear-gradient(180deg, var(--c-bg-dark) 0%, var(--c-bg-dark-2) 100%);
  color: var(--c-on-dark);
}
.tile--dark h2,
.tile--dark h3 { color: var(--c-on-dark); }
.tile__title { font-size: var(--t-h2); }
.tile__desc { color: var(--c-ink-2); max-width: 48ch; }
.tile--dark .tile__desc { color: var(--c-on-dark-2); }

/* --- 6.7 Lineup grid (service cards) ------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* max 3 across (verdict §1) */
  gap: var(--sp-3);
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--c-bg-alt);
  border-radius: var(--r-lg);
  height: 100%;
}
.section--alt .card { background: var(--c-bg); }
.section--dark .card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--c-line-dark);
}
.card__icon {
  width: 44px; height: 44px;
  color: var(--c-accent);
}
.card h3 { font-size: var(--t-h3); }
.card__body { color: var(--c-ink-2); font-size: 1rem; }
.section--dark .card__body { color: var(--c-on-dark-2); }

/* --- 6.8 Stat block ------------------------------------------------------ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--f-display);
  font-size: clamp(2.75rem, 1.8rem + 4vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-on-dark);
}
.stat__num--accent { color: var(--c-accent); }
.stat__num--gold { color: var(--c-gold); }
.stat__label {
  margin-top: var(--sp-2);
  font-family: var(--f-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-on-dark-2);
}
/* on light surfaces */
.section:not(.section--dark) .stat__num { color: var(--c-ink); }
.section:not(.section--dark) .stat__label { color: var(--c-ink-2); }

/* --- 6.9 Cross-link band ------------------------------------------------- */
.cross-link {
  display: grid;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-6);
  background: var(--c-bg-alt);
  border-radius: var(--r-xl);
}
.cross-link__title { font-size: var(--t-h3); }
.cross-link__body { color: var(--c-ink-2); max-width: 56ch; }
.cross-link__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

/* --- 6.10 CTA band ------------------------------------------------------- */
.cta-band {
  text-align: center;
  padding-block: var(--section-pad);
}
.cta-band__inner {
  max-width: 720px;
  margin-inline: auto;
  display: grid;
  gap: var(--sp-3);
  justify-items: center;
}
.cta-band h2 { font-size: var(--t-h2); }
.cta-band p { color: var(--c-on-dark-2); }
.cta-band .hubspot-form { width: 100%; margin-top: var(--sp-2); }

/* Mobile gutter for the form column.
   Most pages render .cta-band as a top-level <section> with no .container
   wrapper — so on phones the .cta-form inputs (which fill 100% of their grid
   row) would otherwise touch the screen edges. Give the inner column the
   same side gutter as body-text containers so inputs align with body text.
   The :has() guard skips the sws-assessment / about cases, where .cta-band
   sits inside .container (sws) or uses .container--text instead of
   .cta-band__inner (about) — both already provide the gutter via .container. */
@media (max-width: 768px) {
  .cta-band:has(> .cta-band__inner):not(.container > .cta-band) {
    padding-inline: var(--gutter);
  }
  /* .cta-band__inner uses display:grid + justify-items:center, so without
     an explicit width here the .cta-form sizes to max-content (centered) —
     which is *narrower* than the column on phones, leaving empty side
     gutters even after the padding-inline reduction in #82. Force the
     form to fill the column on all mobile breakpoints. .cta-form rules
     are duplicated across 9 per-page CSS files (index, mfr-subpage, aeos,
     development, about, integrator-services, simulation-vc,
     manufacturer-services, start-with-standard); fixing once globally
     here covers them all. */
  .cta-form {
    width: 100%;
    max-width: none;
  }
}

/* --- 6.11 Sticky CTA bar ------------------------------------------------- */
.sticky-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: 0.75rem var(--gutter);
  background: rgba(7, 19, 35, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--c-on-dark);
  transform: translateY(110%);
  transition: transform var(--dur-mid) var(--ease-out);
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta__text { font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}

/* --- 6.12 Scrollytelling shell ------------------------------------------ */
.scrolly { position: relative; }
.scrolly__sticky {
  position: sticky;
  top: var(--nav-h);
  height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  /* clip (not hidden) — clipping without creating a scroll container.
     NOTE for page CSS: never put overflow:hidden on a .scrolly ancestor —
     it silently breaks position:sticky here. Use overflow:clip if needed. */
  overflow: clip;
}
.scrolly__steps { position: relative; }
.scrolly__step {
  min-height: 90svh;
  display: flex;
  align-items: center;
}
.scrolly__step-card {
  max-width: 460px;
  padding: var(--sp-4);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--c-line-dark);
  border-radius: var(--r-lg);
}
/* Reduced-motion / no-js: unpin into a legible static list */
@media (prefers-reduced-motion: reduce) {
  .scrolly__sticky { position: static; height: auto; }
  .scrolly__step { min-height: 0; padding-block: var(--sp-4); }
}
.no-js .scrolly__sticky { position: static; height: auto; }
.no-js .scrolly__step { min-height: 0; padding-block: var(--sp-4); }

/* --- 6.13 Schematic diagram --------------------------------------------- */
.schematic {
  width: 100%;
  height: auto;
}
.schematic .node {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 1.5;
}
.schematic .wire {
  fill: none;
  stroke: var(--c-ink-3);
  stroke-width: 1.5;
}
.schematic .label {
  font-family: var(--f-mono);
  font-size: 11px;
  fill: var(--c-ink-2);
}
.section--dark .schematic .label { fill: var(--c-on-dark-2); }
.figure-caption {
  margin-top: var(--sp-2);
  font-family: var(--f-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.06em;
  color: var(--c-ink-3);
  text-transform: uppercase;
}

/* --- 6.14 Greybox placeholder ------------------------------------------- */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(
      45deg,
      var(--c-bg-alt),
      var(--c-bg-alt) 14px,
      #eceff3 14px,
      #eceff3 28px
    );
  color: var(--c-ink-3);
  font-family: var(--f-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-lg);
  aspect-ratio: 16 / 9;
}

/* --- 6.15 HubSpot form embed -------------------------------------------- */
.hubspot-form { min-height: 320px; }   /* reserve space → no CLS */

/* --- 6.16 Core values kinetic card -------------------------------------- */
/* Shared 1:1 component — cycles six values via CSS-only keyframes.
   Used in the home About Preview and the About page Core Values section.
   Background is transparent so it sits on whatever section colour you give it.
   Reduced-motion / no-JS fall back to a static stacked list. */
.values-loop {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  color: var(--c-ink);
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--sp-3);
}

.values-loop__eyebrow {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-2);
}

.values-loop__list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.values-loop__list li {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.4vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  animation: values-loop-step 4.2s infinite;
  will-change: opacity, transform;
}

.values-loop__list li:nth-child(1) { animation-delay: 0s;   }
.values-loop__list li:nth-child(2) { animation-delay: 0.7s; }
.values-loop__list li:nth-child(3) { animation-delay: 1.4s; }
.values-loop__list li:nth-child(4) { animation-delay: 2.1s; }
.values-loop__list li:nth-child(5) { animation-delay: 2.8s; }
.values-loop__list li:nth-child(6) { animation-delay: 3.5s; }

@keyframes values-loop-step {
  /* Six values × 0.7s each. Each slot: enter 0–3%, hold 3–14%, exit 14–17%. */
  0%      { opacity: 0; transform: translateY(14px)  scale(0.96); }
  3%      { opacity: 1; transform: translateY(0)     scale(1);    }
  14%     { opacity: 1; transform: translateY(0)     scale(1);    }
  17%     { opacity: 0; transform: translateY(-14px) scale(0.96); }
  100%    { opacity: 0; transform: translateY(-14px) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .values-loop__list {
    display: grid;
    place-content: center;
    text-align: center;
    gap: var(--sp-2);
  }
  .values-loop__list li {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    animation: none;
    font-size: clamp(1rem, 2vw, 1.4rem);
  }
}

/* --- 6.17 Footer --------------------------------------------------------- */
.site-footer {
  background: var(--c-bg-dark);
  color: var(--c-on-dark-2);
  padding-block: var(--sp-7) var(--sp-4);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--sp-4);
}
/* Sub-group inside a sitemap column — stack Product+Company (and Resources+Legal)
   in the same column with a clear vertical break between sub-headings. */
.site-footer__group + .site-footer__group {
  margin-top: var(--sp-4);
}
.site-footer__brand .site-footer__logo {
  display: inline-block;
}
.site-footer__brand .site-footer__logo img {
  display: block;
  height: 38px;
  width: auto;
}
/* Brand column — extra trailing space sets it visibly apart from the sitemap */
.site-footer__brand {
  padding-inline-end: var(--sp-6);
}
.site-footer__slogan {
  margin-top: var(--sp-2);
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--c-on-dark);
}
.site-footer__member {
  margin-top: var(--sp-4);
}
.site-footer__member-label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: 0.82rem;
  color: var(--c-ink-3);
}
/* A3 badge artwork is dark-on-white — sit it on a white chip on the dark footer */
.site-footer__member-badge {
  display: block;
  width: 164px;
  height: auto;
  background: #fff;
  border-radius: 10px;
  padding: 11px 15px;
}
.site-footer__col h3 {
  font-family: var(--f-mono);
  font-size: var(--t-eyebrow);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-on-dark);
  margin-bottom: var(--sp-2);
}
/* No list indent — links sit flush-left under the column heading */
.site-footer__col ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__col a {
  font-size: 0.95rem;
  color: var(--c-on-dark-2);
  white-space: nowrap;
}
.site-footer__col a:hover { color: var(--c-on-dark); }
.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: space-between;
  margin-top: var(--sp-6);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-line-dark);
  font-size: 0.85rem;
  color: var(--c-ink-3);
}

/* =============================================================================
   7. SECTION-SPECIFIC
   ---------------------------------------------------------------------------
   Intentionally empty. Per-page styles live in css/pages/[slug].css.
   ============================================================================= */

/* =============================================================================
   8. RESPONSIVE
   ============================================================================= */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .mega__inner { grid-template-columns: 1fr 1fr; }
  .mega__col--lead { grid-column: 1 / -1; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --nav-h: 54px; }

  /* Collapse desktop nav, expose hamburger */
  .site-nav__primary,
  .site-nav__cta { display: none; }
  /* margin-inline-start:auto pushes the hamburger to the right edge — the hidden
     .site-nav__primary normally carries that auto-margin on desktop. */
  .site-nav__toggle { display: flex; margin-inline-start: auto; }
  .mega { display: none !important; }

  /* Scale the nav logo for the shorter mobile bar.
     The logo-pitco-*.svg files carry an intrinsic 9.6:1 viewBox while the
     <img> HTML attributes describe the 3.4:1 brand-mark ratio; without an
     explicit aspect-ratio here, the browser uses the SVG's intrinsic ratio
     and the logo balloons to ~288px — pushing the hamburger past the
     right edge on phones <= 412px. Lock to the brand-mark ratio so the
     logo renders at ~155px (45 × 656/191) on every page. */
  .site-nav__logo img {
    height: 45px;
    width: auto;
    aspect-ratio: 656 / 191;
  }

  .card-grid,
  .card-grid--2,
  .cross-link__cards { grid-template-columns: 1fr; }

  .hero { min-height: auto; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .site-footer__grid { grid-template-columns: 1fr 1fr; }

  /* Sticky CTA: drop the lead-in text on mobile so the bar stays a single short
     row (button only) and never grows tall enough to overlap pinned content. */
  .sticky-cta__text { display: none; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .cross-link { padding: var(--sp-4); }

  /* Footer: put the two sub-groups within each .site-footer__col side-by-
     side on phones, so the footer collapses from 5 stacked sections
     (brand + 4 groups) down to 3 (brand + 2 paired-group rows). Worked
     on both iPhone 17 Pro Max + Galaxy Flip 7 (Maik confirmed), so this
     breakpoint stays at ≤480 (not narrowed below). */
  .site-footer__col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
  }
  .site-footer__group + .site-footer__group {
    margin-top: 0;
  }
}

@media (max-width: 412px) {
  /* Narrow-phone nav: tighten the inner gutter + gap so the hamburger
     never gets squeezed past the right edge on the truly narrow viewports
     (iPhone SE/13 mini at 375px, Galaxy S at 360px, Pixel non-pro at 412px,
     Galaxy Flip 7 narrow modes). iPhone 17 Pro Max at ~430px does NOT
     fall in here — it stays in the standard ≤768 mobile rule. */
  .site-nav__inner {
    padding-inline: 1rem;
    gap: 1rem;
  }
  .site-nav__logo img { height: 39px; }
}

@media (min-width: 413px) and (max-width: 480px) {
  /* iPhone 17 Pro Max-class viewports (430-ish): bigger logo than the
     narrow-phone size because the device screen is physically larger and
     39px reads as "super tiny" (Maik on iPhone 17 Pro Max). Hamburger fits
     fine: at 430px viewport, default-gutter padding leaves ~382px usable,
     with the 50px-height logo at ~172px wide + 44px hamburger + gap, all
     comfortable. */
  .site-nav__logo img { height: 50px; }

  /* Same range: trim the .cta-band side gutter so form inputs span more
     of the wider iPhone viewport. The default mobile rule from line 795
     (padding-inline: var(--gutter), ~20px) makes the form look narrow on
     the bigger iPhone screen even though Android-narrow likes that
     padding ratio. 0.5rem here gives ~16px more usable width on iPhone. */
  .cta-band:has(> .cta-band__inner):not(.container > .cta-band) {
    padding-inline: 0.5rem;
  }
}

@media (min-width: 1400px) {
  .container { max-width: var(--w-max); }
}
