/* Foster Circle — site styles */

:root {
  --navy-950: #060f1c;
  --navy-900: #0a1828;
  --navy-800: #0f2238;
  --navy-700: #183252;
  --steel-700: #3b4a5c;
  --steel-600: #4f6075;
  --steel-500: #6a7b8f;
  --steel-300: #aab7c5;
  --steel-200: #cdd6e0;
  --steel-100: #e4e9ef;
  --steel-50: #f2f5f8;
  --blue: #005ea8;
  --blue-700: #004b87;
  --blue-300: #7dbcf0;
  --white: #fff;
  --ink: #0d1a2a;
  --muted: #4f6075;
  --focus: #005ea8;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --radius: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 1px 2px rgba(10, 24, 40, 0.06), 0 8px 24px -12px rgba(10, 24, 40, 0.18);
  --shadow-lg: 0 2px 4px rgba(10, 24, 40, 0.06), 0 24px 48px -20px rgba(10, 24, 40, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[role='list'] { list-style: none; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.hero, .page-hero, .section-dark, .site-footer, .cta-band { --focus: #8cc8ff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy-900); color: var(--white); padding: 10px 16px; border-radius: 4px;
  font-weight: 600; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; --focus: #8cc8ff; }

.i {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.78em 1.25em; border-radius: 4px; border: 1px solid transparent;
  font-weight: 650; font-size: 0.98rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn .i { transition: transform 0.2s var(--ease); }
.btn:hover .i:last-child { transform: translateX(2px); }
.btn-lg { padding: 0.95em 1.5em; font-size: 1.02rem; }
.btn-sm { padding: 0.6em 1em; font-size: 0.92rem; min-height: 44px; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-700); }
.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.55); background: rgba(6, 15, 28, 0.15); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }
.btn-light { background: var(--white); color: var(--navy-900); }
.btn-light:hover { background: var(--steel-100); }
.btn-outline { color: var(--blue); border-color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: var(--white); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 650; color: var(--blue); text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow .i { transition: transform 0.2s var(--ease); }
.link-arrow:hover .i { transform: translateX(3px); }
.link-light { color: var(--blue-300); }
.text-link { font-size: 0.92rem; font-weight: 600; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-size: 0.78rem; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 1rem;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.section-dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow, .sl-band-dark .eyebrow { color: var(--blue-300); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--steel-100);
  transition: box-shadow 0.25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px -12px rgba(10, 24, 40, 0.35); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; min-height: 44px; flex: none; }
.brand img { height: 40px; width: auto; }
.primary-nav { margin-left: auto; display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.3em;
  padding: 0.55em 0.85em; border: 0; background: none; cursor: pointer;
  font-size: 0.95rem; font-weight: 600; color: var(--navy-800); text-decoration: none; border-radius: 4px;
}
.nav-link:hover, .nav-link[aria-current='page'], .nav-link.is-current { color: var(--blue); }
.nav-link[aria-current='page'], .nav-link.is-current { box-shadow: inset 0 -2px 0 var(--blue); border-radius: 0; }
.i-chev { width: 1em; height: 1em; transition: transform 0.2s; }
.sub-toggle[aria-expanded='true'] .i-chev { transform: rotate(180deg); }
.has-sub { position: relative; }
.sub-menu {
  list-style: none; position: absolute; top: calc(100% + 10px); left: -8px; min-width: 260px;
  background: var(--white); border: 1px solid var(--steel-100); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: none;
}
.has-sub.is-open .sub-menu { display: block; }
.sub-menu a {
  display: block; padding: 0.6em 0.8em; border-radius: 4px; color: var(--navy-800);
  text-decoration: none; font-weight: 550; font-size: 0.95rem;
}
.sub-menu a:hover, .sub-menu a[aria-current='page'] { background: var(--steel-50); color: var(--blue); }
.sub-menu li:first-child a { color: var(--blue); border-bottom: 1px solid var(--steel-100); border-radius: 4px 4px 0 0; margin-bottom: 4px; }
.nav-panel-contact { display: none; }
.nav-toggle { display: none; }
.header-cta { flex: none; }

@media (max-width: 959px) {
  :root { --header-h: 62px; }
  .brand img { height: 34px; }
  .header-inner { gap: 12px; }
  .primary-nav { order: 3; margin-left: 0; }
  .header-cta { margin-left: auto; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
    border: 1px solid var(--steel-200); border-radius: 4px; background: var(--white);
    font-weight: 600; font-size: 0.92rem; cursor: pointer; color: var(--navy-800);
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
    position: relative; transition: transform 0.2s, background-color 0.2s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded='true'] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded='true'] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .js .nav-panel {
    position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0;
    background: var(--white); overflow-y: auto; padding: 12px var(--gutter) 32px;
    border-top: 1px solid var(--steel-100); display: none;
  }
  .js .nav-panel.is-open { display: block; }
  .no-js .nav-panel { display: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--steel-100); }
  .nav-link { width: 100%; justify-content: space-between; padding: 1em 0.2em; font-size: 1.08rem; }
  .nav-link[aria-current='page'], .nav-link.is-current { box-shadow: none; }
  .sub-menu { position: static; box-shadow: none; border: 0; padding: 0 0 12px 8px; min-width: 0; }
  .sub-menu li:first-child a { border-bottom: 0; }
  .nav-panel-contact { display: grid; gap: 4px; margin-top: 20px; }
  .nav-panel-contact a {
    display: flex; align-items: center; gap: 10px; padding: 0.7em 0.2em;
    color: var(--navy-800); font-weight: 600; text-decoration: none;
  }
  .nav-panel-contact .i { color: var(--blue); }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 479px) {
  .brand img { height: 28px; }
  .header-cta { padding: 0.55em 0.75em; font-size: 0.84rem; }
  .nav-toggle-label { display: none; }
  .nav-toggle { width: 44px; justify-content: center; padding: 0; }
}
@media (max-width: 359px) {
  .header-cta { display: none; }
  .primary-nav { margin-left: auto; }
}

/* ---------- Home hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--white);
  background: var(--navy-950);
  min-height: min(calc(100svh - var(--header-h)), 860px);
  display: grid; grid-template-rows: 1fr auto;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%;
  animation: hero-drift 24s var(--ease) both;
  transform-origin: 70% 50%;
}
.hero-media::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(90deg, rgba(6, 15, 28, 0.94) 0%, rgba(6, 15, 28, 0.82) 34%, rgba(6, 15, 28, 0.3) 70%, rgba(6, 15, 28, 0.45) 100%),
    linear-gradient(0deg, rgba(6, 15, 28, 0.85) 0%, rgba(6, 15, 28, 0) 35%);
}
@keyframes hero-drift {
  from { transform: scale(1.1) translate3d(1.5%, 0, 0); }
  to { transform: scale(1.02) translate3d(0, 0, 0); }
}
.hero-inner { align-self: center; padding-block: clamp(56px, 11vh, 128px) clamp(40px, 8vh, 88px); }
.hero-eyebrow { margin-bottom: 1.4rem; }
.hero-title {
  font-size: clamp(2.7rem, 7.6vw, 6.4rem); font-weight: 800; font-stretch: 112%;
  line-height: 0.96; letter-spacing: -0.025em; max-width: 11ch; margin-bottom: 0.32em;
  text-wrap: balance;
}
/* Rolling headline: each letter rises out of a mask per word (letters are built in templates.mjs) */
.hero-title .hl-line { display: block; }
.hero-title .hl-line.is-accent { color: var(--blue-300); }
.hl-word { display: inline-block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; vertical-align: top; white-space: nowrap; }
.hl-ch {
  display: inline-block; transform-origin: 50% 100%;
  animation: hl-rise 0.62s var(--d, 0s) cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: translate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.8s var(--ease);
}
@keyframes hl-rise { from { transform: translateY(112%); } to { transform: none; } }
/* A light tap on hover, like a rivet being set; fine pointers only */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hl-ch:hover {
    translate: 0 0.05em; scale: 1.03 0.93; color: var(--blue-300);
    transition: translate 0.07s ease-in, scale 0.07s ease-in, color 0.07s;
  }
  .hl-line.is-accent .hl-ch:hover { color: var(--white); }
}

/* WebGL light shaft over the photo (public/js/hero-light.js); black pixels vanish in screen blending */
.hero-light {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  z-index: 1; mix-blend-mode: screen; opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero-light[data-ready] { opacity: 1; }
.hero-lead { font-size: clamp(1.1rem, 1.8vw, 1.4rem); color: var(--steel-200); max-width: 34ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-strip { border-top: 1px solid rgba(255, 255, 255, 0.14); background: rgba(6, 15, 28, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-strip-list { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.hero-strip-list li {
  display: flex; align-items: center; gap: 12px; padding: 18px 0;
  font-size: 0.82rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel-200);
}
.hero-strip-list li::before { content: ''; width: 8px; height: 8px; background: var(--blue); flex: none; }

@media (max-width: 767px) {
  .hero { min-height: auto; }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(6, 15, 28, 0.62) 0%, rgba(6, 15, 28, 0.78) 55%, rgba(6, 15, 28, 0.92) 100%);
  }
  .hero-media img { object-position: 76% 50%; }
  .hero-actions .btn { width: 100%; }
  .hero-strip-list { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .hero-strip-list li { padding: 12px 0; font-size: 0.78rem; letter-spacing: 0.08em; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }
.section-alt { background: var(--steel-50); }
.section-catalogue { background: var(--steel-50); }
.section-dark {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(0, 94, 168, 0.28), transparent 60%),
    var(--navy-900);
  color: var(--white);
}
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head-split { max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 64px; align-items: end; }
.section-head-split .section-lead { margin-bottom: 0.8rem; }
@media (max-width: 859px) { .section-head-split { grid-template-columns: 1fr; } }
.section-title {
  font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 760; font-stretch: 108%;
  letter-spacing: -0.02em; line-height: 1.04; margin-bottom: 0.4em; text-wrap: balance;
}
.section-title-sm { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.section-dark .section-lead { color: var(--steel-300); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; list-style: none; }
.product-card { grid-column: span 2; }
.product-grid:not(.product-grid-compact) .product-card:nth-child(-n + 2) { grid-column: span 3; }
.product-card > a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--steel-100); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.product-card > a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--steel-200); }
.product-card-media { aspect-ratio: 16 / 10; background: var(--steel-100); overflow: hidden; position: relative; }
.product-grid:not(.product-grid-compact) .product-card:nth-child(-n + 2) .product-card-media { aspect-ratio: 16 / 9; }
.product-card-media img { width: 100%; height: 100%; transition: transform 0.6s var(--ease); }
.product-card > a:hover .product-card-media img { transform: scale(1.04); }
.is-photo .product-card-media > img { object-fit: cover; }
.mosaic { display: grid; height: 100%; gap: 2px; background: var(--steel-200); }
.mosaic img { object-fit: cover; }
.mosaic-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic-3 { grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--steel-50); padding: 12px 8px; }
.mosaic-3 img { object-fit: contain; mix-blend-mode: multiply; }
.mosaic-1 { background: var(--steel-50); padding: 16px; }
.mosaic-1 img { object-fit: contain; mix-blend-mode: multiply; }
.product-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.product-card-body h3 { font-size: 1.3rem; font-stretch: 105%; margin-bottom: 0.35em; }
.product-card-body p { color: var(--muted); font-size: 0.98rem; flex: 1; }
.product-card-body .link-arrow { margin-top: 4px; }
.product-grid-compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-grid-compact .product-card { grid-column: auto; }
@media (max-width: 899px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-card, .product-grid:not(.product-grid-compact) .product-card:nth-child(-n + 2) { grid-column: span 1; }
  .product-grid:not(.product-grid-compact) .product-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 559px) {
  .product-grid { grid-template-columns: 1fr; gap: 16px; }
  .product-grid:not(.product-grid-compact) .product-card:first-child { grid-column: auto; }
}

/* ---------- Software (home) ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; }
.app-card a {
  display: flex; flex-direction: column; height: 100%; padding: 26px 24px 22px; color: inherit; text-decoration: none;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.app-card a:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(125, 188, 240, 0.45); }
.app-card h3 { font-size: 1.15rem; margin: 18px 0 6px; transition: color 0.2s var(--ease); }
.app-card p { color: var(--steel-300); font-size: 0.96rem; margin: 0; }
.app-card a:hover h3 { color: var(--blue-300); }
.app-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: var(--radius);
  background: rgba(125, 188, 240, 0.12); color: var(--blue-300);
}
.app-icon .i { width: 24px; height: 24px; }
.screen {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 40px -24px rgba(0, 0, 0, 0.7);
}
.screen-bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--steel-100); }
.screen-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--steel-300); }
.screen img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: left top; }
/* Placeholder until an app screenshot is supplied */
.screen-placeholder { background: var(--navy-800); }
.screen-placeholder .screen-bar { background: var(--navy-900); }
.screen-placeholder .screen-bar i { background: var(--steel-700); }
.screen-art {
  aspect-ratio: 16 / 11; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(0, 94, 168, 0.55), transparent 60%),
    linear-gradient(160deg, var(--navy-700), var(--navy-900));
}
.screen-art-icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 18px; background: rgba(255, 255, 255, 0.08); color: var(--blue-300); }
.screen-art-icon .i { width: 42px; height: 42px; stroke-width: 1.5; }
.screen-art-name { font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 700; color: var(--white); }
.screen-art-lines { display: grid; gap: 8px; justify-items: center; margin-top: 6px; }
.screen-art-lines i { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); width: 200px; }
.screen-art-lines i:nth-child(2) { width: 150px; }
.screen-art-lines i:nth-child(3) { width: 170px; }
@media (max-width: 1023px) { .app-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .app-grid { grid-template-columns: 1fr; } }

/* ---------- Superlisting band ---------- */
.sl-band {
  margin-top: clamp(40px, 6vw, 72px); padding: clamp(24px, 4vw, 40px);
  display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: center;
  border: 1px solid var(--steel-200); border-radius: 8px; background: var(--steel-50);
}
.sl-band-dark {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(115deg, rgba(0, 94, 168, 0.4), rgba(0, 94, 168, 0.06) 70%);
}
.sl-band .eyebrow { margin-bottom: 0.6rem; }
.sl-title { font-size: clamp(1.5rem, 2.6vw, 2rem); font-stretch: 108%; margin-bottom: 0.3em; }
.sl-band p { margin: 0; max-width: 62ch; }
.sl-band-dark p { color: var(--steel-200); }
.sl-band .sl-note { margin-top: 0.6em; font-size: 0.95rem; }
.sl-band-dark .sl-note { color: var(--steel-300); }
@media (max-width: 699px) { .sl-band { grid-template-columns: 1fr; } .sl-band .btn { width: 100%; } }

/* ---------- Services ---------- */
.service-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; list-style: none; counter-reset: s; }
.service { border-top: 2px solid var(--navy-900); padding-top: 20px; }
.section-dark .service { border-color: rgba(255, 255, 255, 0.3); }
.service-num {
  display: block; font-size: 2.8rem; font-weight: 800; font-stretch: 115%; line-height: 1; margin-bottom: 18px;
  color: transparent; -webkit-text-stroke: 1.2px var(--steel-300);
}
.service h3 { font-size: 1.25rem; font-stretch: 105%; }
.service p { color: var(--muted); font-size: 0.98rem; margin: 0; }
@media (max-width: 999px) { .service-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 559px) { .service-list { grid-template-columns: 1fr; gap: 28px; } }

.why-list {
  margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--steel-100); border: 1px solid var(--steel-100); border-radius: var(--radius); overflow: hidden; list-style: none;
}
.why-list li { display: flex; gap: 12px; padding: 20px; background: var(--white); font-size: 0.96rem; }
.why-list .i { color: var(--blue); margin-top: 3px; }
.why-list strong { display: block; color: var(--navy-900); }
.why-list span { color: var(--muted); }
@media (max-width: 899px) { .why-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 519px) { .why-list { grid-template-columns: 1fr; } }

/* ---------- Quote / contact ---------- */
.section-quote { background: var(--steel-50); }
.quote-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 899px) { .quote-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; display: grid; gap: 22px; margin-top: 28px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px; border-radius: 4px; flex: none; display: grid; place-items: center;
  background: var(--navy-900); color: var(--white);
}
.contact-label { display: block; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact-list a:not(.text-link) { font-size: 1.15rem; font-weight: 650; color: var(--navy-900); text-decoration: none; word-break: break-word; }
.contact-list a:not(.text-link):hover { color: var(--blue); text-decoration: underline; }
.contact-list address { margin-bottom: 4px; }
.contact-aside { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--steel-200); }
.contact-aside h3 { font-size: 1.15rem; }
.contact-aside p { color: var(--muted); }

.quote-panel { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-lg); padding: clamp(22px, 4vw, 40px); border-top: 4px solid var(--blue); }
.form-title { font-size: 1.5rem; font-stretch: 105%; margin-bottom: 0.3em; }
.form-intro { color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 559px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--navy-800); }
.req { color: #b3261e; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75em 0.85em; border: 1px solid var(--steel-300); border-radius: 4px; background: var(--white);
  font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--steel-500); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 94, 168, 0.25); }
.field [aria-invalid='true'] { border-color: #b3261e; }
.field-error { display: block; color: #b3261e; font-size: 0.88rem; margin-top: 4px; font-weight: 550; }
.form-note { font-size: 0.86rem; color: var(--muted); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-alt { margin: 0; color: var(--muted); font-size: 0.95rem; }
.form-alt a { font-weight: 650; }
.form-status { margin: 16px 0 0; font-weight: 550; }
.form-status:empty { display: none; }
.form-status.is-ok { color: #1b6b3a; background: #e8f5ec; padding: 12px 14px; border-radius: 4px; }
.form-status.is-error { color: #8c1d18; background: #fcebea; padding: 12px 14px; border-radius: 4px; }

/* ---------- Page hero ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-950); color: var(--white); }
.page-hero-bg { position: absolute; inset: 0; z-index: -1; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; opacity: 0.38; animation: hero-drift 24s var(--ease) both; }
.page-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6, 15, 28, 0.96) 0%, rgba(6, 15, 28, 0.8) 50%, rgba(6, 15, 28, 0.55) 100%);
}
.page-hero-inner { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 88px); }
.page-hero-short .page-hero-inner { padding-block: clamp(36px, 5vw, 64px); }
.page-title {
  font-size: clamp(2.2rem, 5.4vw, 4.2rem); font-weight: 800; font-stretch: 110%;
  letter-spacing: -0.022em; line-height: 1; max-width: 18ch; text-wrap: balance;
}
.page-intro { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--steel-200); max-width: 60ch; margin-bottom: 1.8rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: 0.88rem; margin-bottom: 28px; }
.crumbs li { color: var(--steel-300); }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--steel-500); }
.crumbs a { color: var(--steel-200); text-decoration: none; }
.crumbs a:hover { color: var(--white); text-decoration: underline; }
@media (max-width: 559px) { .page-hero .hero-actions .btn { width: 100%; } }

/* ---------- Jump nav ---------- */
.jump-nav {
  position: sticky; top: var(--header-h); z-index: 40; background: var(--white);
  border-bottom: 1px solid var(--steel-100);
}
.jump-list {
  display: flex; gap: 6px; list-style: none; overflow-x: auto; padding-block: 10px;
  scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.jump-list::-webkit-scrollbar { display: none; }
.jump-list a {
  display: block; white-space: nowrap; padding: 0.45em 0.9em; border-radius: 999px;
  border: 1px solid var(--steel-200); font-size: 0.88rem; font-weight: 600; color: var(--navy-800); text-decoration: none;
}
.jump-list a:hover, .jump-list a.is-active { border-color: var(--blue); color: var(--blue); background: rgba(0, 94, 168, 0.06); }
.jump-nav ~ * [id], .jump-nav ~ [id] { scroll-margin-top: calc(var(--header-h) + 64px); }

/* ---------- Spec sections ---------- */
.spec-section { padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--steel-100); }
.spec-sections > .spec-section:first-child { border-top: 0; }
.spec-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.spec-media {
  position: sticky; top: calc(var(--header-h) + 80px);
  background: var(--steel-50); border-radius: var(--radius); aspect-ratio: 4 / 3;
  display: grid; place-items: center; padding: 20px; overflow: hidden;
}
.spec-media img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.spec-media.is-photo { padding: 0; }
.spec-media.is-photo img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.spec-title { font-size: clamp(1.5rem, 2.6vw, 2rem); font-stretch: 106%; letter-spacing: -0.01em; }
.spec-body > p { color: var(--muted); max-width: 64ch; }
.spec-body > .link-arrow { margin-top: 20px; }
@media (max-width: 767px) {
  .spec-grid { grid-template-columns: 1fr; }
  .spec-media { position: static; max-width: 420px; aspect-ratio: 16 / 10; }
}
.spec-dl { display: grid; gap: 0; margin: 0 0 8px; border-top: 1px solid var(--steel-100); }
.spec-dl div { display: grid; grid-template-columns: 9rem 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--steel-100); }
.spec-dl dt { font-weight: 650; color: var(--navy-800); }
.spec-dl dd { margin: 0; }
@media (max-width: 479px) { .spec-dl div { grid-template-columns: 1fr; gap: 2px; } }
.tag-label { font-size: 0.8rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-bottom: 20px; }
.tags li { padding: 0.35em 0.8em; border-radius: 999px; background: var(--steel-100); font-size: 0.9rem; font-weight: 550; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin-top: 8px; border: 1px solid var(--steel-100); border-radius: var(--radius); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.spec-table caption {
  caption-side: top; text-align: left; padding: 12px 14px; font-size: 0.8rem; font-weight: 650;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--steel-50);
  border-bottom: 1px solid var(--steel-100);
}
.spec-table thead th {
  background: var(--navy-900); color: var(--white); text-align: left; font-weight: 600;
  font-size: 0.85rem; letter-spacing: 0.03em; padding: 10px 14px; white-space: nowrap;
}
.spec-table tbody th, .spec-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--steel-100); }
.spec-table tbody th { font-weight: 650; color: var(--navy-900); white-space: nowrap; }
.spec-table tbody tr:nth-child(even) { background: var(--steel-50); }
.spec-table tbody tr:last-child > * { border-bottom: 0; }
.spec-table tbody tr:hover { background: rgba(0, 94, 168, 0.05); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; min-width: 2.8em; text-align: center; padding: 0.15em 0.55em; border-radius: 3px;
  background: var(--white); border: 1px solid var(--steel-200); font-size: 0.88rem; font-weight: 550;
}
/* Stack wide tables on small screens */
@media (max-width: 639px) {
  .spec-table.is-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .spec-table.is-stack tbody tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--steel-100); }
  .spec-table.is-stack tbody tr:last-child { border-bottom: 0; }
  .spec-table.is-stack tbody th { display: block; padding: 0 0 6px; border: 0; white-space: normal; font-size: 1rem; }
  .spec-table.is-stack td { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; padding: 3px 0; border: 0; }
  .spec-table.is-stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 0.86rem; }
  .spec-table tbody th.wrap-ok { white-space: normal; }
}

/* ---------- Generator comparison ---------- */
.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.compare-card {
  border: 1px solid var(--steel-100); border-top: 4px solid var(--blue); border-radius: var(--radius);
  padding: 24px; background: var(--white); display: flex; flex-direction: column;
}
.compare-card h3 { font-size: 1.35rem; font-stretch: 106%; }
.compare-card dl { margin: 0 0 20px; flex: 1; }
.compare-card dl div { padding: 10px 0; border-top: 1px solid var(--steel-100); }
.compare-card dt { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.compare-card dd { margin: 2px 0 0; font-weight: 550; }
.compare-card .btn { align-self: flex-start; }
@media (max-width: 859px) { .compare-grid { grid-template-columns: 1fr; } }

/* ---------- Product lines / notes ---------- */
.lines-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; list-style: none; }
.lines-grid li { background: var(--white); border-radius: var(--radius); padding: 20px 22px; border-left: 3px solid var(--blue); }
.lines-grid h3 { font-size: 1.08rem; margin-bottom: 0.3em; }
.lines-grid p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.lines-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(110deg, var(--navy-900) 0%, var(--navy-800) 60%, #0b3a66 100%);
  color: var(--white); padding-block: clamp(48px, 7vw, 88px);
}
.cta-band-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; }
.cta-band h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-stretch: 108%; letter-spacing: -0.015em; }
.cta-band p { color: var(--steel-300); margin: 0; max-width: 56ch; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 799px) {
  .cta-band-inner { grid-template-columns: 1fr; }
  .cta-band-actions .btn { flex: 1 1 100%; }
}

/* ---------- Software page ---------- */
.app-rows { display: grid; gap: clamp(48px, 7vw, 96px); }
.app-row { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 72px); align-items: center; scroll-margin-top: calc(var(--header-h) + 24px); }
.app-row.is-flipped .screen, .app-row.is-flipped .app-shot { order: 2; }
/* Product images have a transparent background: the laptop and phone sit directly on the dark section */
.app-shot { margin: 0; }
.app-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.screen-lg img { aspect-ratio: 16 / 11; }
.app-row-body h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-stretch: 106%; }
.app-row-body > p { color: var(--steel-300); font-size: 1.08rem; }
.helps-label { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-300); margin: 20px 0 10px; }
.helps { list-style: none; display: grid; gap: 10px; }
.helps li { display: flex; gap: 10px; align-items: flex-start; color: var(--steel-100); }
.helps .i { color: var(--blue-300); margin-top: 4px; }
.app-row-head { display: flex; align-items: center; gap: 16px; margin-bottom: 0.5em; }
.app-row-head h3 { margin: 0; }
.app-for { margin: 20px 0 0; color: var(--steel-300); font-size: 0.96rem; }
.app-for span { display: block; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-300); margin-bottom: 6px; }
.app-row-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12);
}
@media (max-width: 859px) {
  .app-row { grid-template-columns: 1fr; }
  .app-row.is-flipped .screen, .app-row.is-flipped .app-shot { order: 0; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--steel-300); font-size: 0.95rem; padding-top: clamp(48px, 7vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr 1.2fr; gap: 40px; }
.footer-logo { display: inline-block; background: var(--white); padding: 10px 14px; border-radius: 4px; margin-bottom: 18px; }
.footer-logo img { height: 34px; width: auto; }
.footer-brand p { max-width: 40ch; }
.footer-tagline { color: var(--white); font-weight: 650; letter-spacing: 0.02em; }
.footer-h { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; }
.footer-h-gap { margin-top: 28px; }
.footer-list { list-style: none; display: grid; gap: 8px; }
.footer-list a { color: var(--steel-200); text-decoration: none; }
.footer-list a:hover { color: var(--white); text-decoration: underline; }
.footer-site span { display: block; font-size: 0.88rem; color: var(--steel-300); }
.footer-ext { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--blue-300) !important; }
.footer-contact li, .footer-contact a { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .i { margin-top: 4px; color: var(--blue-300); }
.footer-contact address { color: var(--steel-200); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: clamp(40px, 6vw, 64px); padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.86rem; color: var(--steel-300);
}
.footer-base p { margin: 0; }
@media (max-width: 959px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 519px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img, .page-hero-bg img { animation: none; transform: none; }
  .hl-ch { animation: none; transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .jump-nav, .hero-media, .page-hero-bg, .cta-band, .quote-panel { display: none !important; }
  .hero, .page-hero, .section-dark, .site-footer { background: none !important; color: #000 !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Wide product banners (e.g. generator ranges) */
.spec-media.is-wide { aspect-ratio: 16 / 10; padding: 10px; }
.spec-media.is-wide img { width: 100%; height: auto; }

/* Touch targets: at least 44px tall on touch screens (UI/UX review, Dec 2026).
   Text links grow their hit area with a pseudo-element so the layout does not move. */
.field select { cursor: pointer; }
.jump-list a { display: flex; align-items: center; min-height: 44px; }
@media (pointer: coarse) {
  .link-arrow { position: relative; }
  .link-arrow::after { content: ''; position: absolute; inset: -9px -4px; }
  .footer-list { gap: 0; }
  .footer-list a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-contact .i { margin-top: 0; align-self: center; }
  .crumbs a { position: relative; }
  .crumbs a::after { content: ''; position: absolute; inset: -12px -3px; }
}
