@import url('../fonts/inter.css');

/* ==========================================================================
   KPS Digital Solutions
   Design tokens sampled from Logo neu/KPS.png.
   See design-system/kps-digital-solutions/MASTER.md for the rationale and the
   verified contrast table. Do not introduce colours that aren't declared here.
   ========================================================================== */

:root {
  /* Brand ramp — straight off the logo artwork */
  --brand-400: #0CC0DF;   /* signal cyan  — CTA/accent on dark only (8.5:1) */
  --brand-500: #0097B2;   /* core teal    — the wordmark colour */
  --brand-600: #00788F;   /* CTA on light — white text clears 5.2:1 */
  --brand-700: #076F81;   /* accent text on light (5.8:1) */
  --brand-900: #05505D;   /* deep teal    — gradients, hairlines */

  --ink-950: #04191E;     /* page black, lifted off #000 with a trace of teal */
  --ink-900: #071F26;
  --ink-800: #0A2A33;     /* elevated surface on dark */
  --ink-700: #16404C;     /* border on dark */

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --space-xs: .25rem;
  --space-sm: .5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --section-y: clamp(4.5rem, 9vw, 8rem);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --shadow-md: 0 4px 6px rgba(4, 25, 30, .10);
  --shadow-lg: 0 14px 34px -12px rgba(4, 25, 30, .22);
  --shadow-xl: 0 28px 60px -20px rgba(4, 25, 30, .32);

  /* Motion — back.out(1.4) equivalent, per MASTER.md */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-overshoot: cubic-bezier(.34, 1.4, .64, 1);
  --dur-fast: 160ms;
  --dur: 240ms;

  --header-h: 76px;

  /* Theme defaults.
     Section scopes (.on-dark / .on-light) redeclare these, but elements that sit
     OUTSIDE any section — the fixed header, the footer, the skip link — still
     need them. Without these the header CTA renders with no background at all. */
  --color-background: var(--ink-950);
  --color-surface: var(--ink-800);
  --color-foreground: #D6E4E8;
  --color-heading: #FFFFFF;
  --color-muted-fg: #8FA9B0;
  --color-border: var(--ink-700);
  --color-accent: var(--brand-400);
  --color-cta: var(--brand-400);
  --color-on-cta: var(--ink-950);
  --color-ring: var(--brand-400);
}

/* --- Theme scopes ---------------------------------------------------------
   Sections declare their own surface. Buttons, cards, rules and text all read
   these variables, so identical markup renders correctly in either context. */

.on-dark {
  --color-background: var(--ink-950);
  --color-surface: var(--ink-800);
  --color-foreground: #D6E4E8;
  --color-heading: #FFFFFF;
  --color-muted-fg: #8FA9B0;
  --color-border: var(--ink-700);
  --color-accent: var(--brand-400);
  --color-cta: var(--brand-400);
  --color-on-cta: var(--ink-950);
  --color-ring: var(--brand-400);
  background: var(--color-background);
  color: var(--color-foreground);
}

.on-light {
  --color-background: #FFFFFF;
  --color-surface: #F4F8F9;
  --color-foreground: #3C555C;
  --color-heading: #0B2026;
  --color-muted-fg: #5A7178;
  --color-border: #E1E9EB;
  --color-accent: var(--brand-700);
  --color-cta: var(--brand-600);
  --color-on-cta: #FFFFFF;
  --color-ring: var(--brand-600);
  background: var(--color-background);
  color: var(--color-foreground);
}

/* --- Reset ---------------------------------------------------------------- */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--ink-950);
  color: #D6E4E8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

/* --- Typography ----------------------------------------------------------- */

h1, h2, h3, h4 {
  color: var(--color-heading);
  font-weight: 600;
  text-wrap: balance;
}

/* German compounds ("Digitalisierung") are long: at 5rem the hero headline ran
   to four lines and pushed the CTA off-screen. 4.25rem keeps it to three. */
.display {
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -.032em;
  /* hyphens:auto used to sit here to stop long compounds overflowing, but the
     browser's own break point can land mid-word in ordinary words too
     ("vers-\ntehen") — reads as broken, not clever. text-wrap:balance (on the
     shared h1..h4 rule) already keeps lines even by breaking at spaces, which
     is the safer trade-off for display type. */
}

h2, .h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -.028em;
}

h3, .h3 {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.28;
  letter-spacing: -.012em;
}

.lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--color-muted-fg);
  max-width: 62ch;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

/* The short rule before an eyebrow — a quiet echo of the logo's divider */
.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

a { color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: none; }

strong { color: var(--color-heading); font-weight: 600; }

/* --- Layout --------------------------------------------------------------- */

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

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head h2 + .lead { margin-top: var(--space-lg); }

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

.stack > * + * { margin-top: var(--space-md); }

/* --- Skip link ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 200;
  background: var(--brand-400);
  color: var(--ink-950);
  font-weight: 600;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* --- Header --------------------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              backdrop-filter var(--dur) var(--ease-out);
}

/* The single frosted-glass element in the whole design — see MASTER.md */
.header.is-stuck {
  background: rgba(4, 25, 30, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--ink-700);
}

.header__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

/* The lockup carries a two-line wordmark, so it needs more height than a
   single-line logo before "DIGITAL SOLUTIONS" becomes legible. */
.brand { flex-shrink: 0; line-height: 0; }
.brand img { height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding-inline: .875rem;
  border-radius: var(--radius-sm);
  color: #C3D6DB;
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: #fff; }

/* Active page marked with a cyan underline, not just colour — colour alone is
   not a sufficient signal (WCAG 1.4.1). */
.nav__link[aria-current='page'] { color: #fff; }
.nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: .875rem;
  right: .875rem;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-400);
}

.header__actions { display: flex; align-items: center; gap: var(--space-sm); }

/* Language switcher */
.lang {
  display: flex;
  align-items: center;
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 40px;
}
.lang__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8FA9B0;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: 0 .625rem;
  height: 100%;
  min-width: 40px;
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.lang__btn:hover { color: #fff; }
.lang__btn[aria-pressed='true'] { background: var(--brand-400); color: var(--ink-950); }
.lang__btn:focus-visible { outline: 2px solid var(--brand-400); outline-offset: -2px; }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded='true'] .icon-close { display: block; }
.nav-toggle[aria-expanded='true'] .icon-open { display: none; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding-inline: 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary { background: var(--color-cta); color: var(--color-on-cta); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -8px color-mix(in srgb, var(--color-cta) 65%, transparent);
}

.btn-secondary {
  background: transparent;
  color: var(--color-heading);
  border-color: var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-cta); color: var(--color-accent); }

.btn-sm { min-height: 40px; padding-inline: 1.125rem; font-size: .875rem; }

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Inline text link with a trailing arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  color: var(--color-accent);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --- Cards ---------------------------------------------------------------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: border-color var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.card h3 { margin-bottom: .625rem; }
.card p { color: var(--color-muted-fg); font-size: .9688rem; }

/* Only cards that navigate get the pointer + lift. */
a.card { cursor: pointer; text-decoration: none; display: block; color: inherit; }
a.card:hover,
.card--interactive:hover {
  border-color: var(--color-cta);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  margin-bottom: var(--space-lg);
  background: color-mix(in srgb, var(--color-cta) 14%, transparent);
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--color-cta) 26%, transparent);
}
.card__icon svg { width: 21px; height: 21px; }

.card__num {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}

/* Ambient light: a soft teal bloom echoing the logo's gradient. Two layers,
   both pure CSS — no images, no cost. */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 60rem; height: 60rem;
  top: -28rem; right: -18rem;
  background: radial-gradient(circle, rgba(12, 192, 223, .17) 0%, rgba(12, 192, 223, 0) 62%);
}
.hero::after {
  width: 44rem; height: 44rem;
  bottom: -26rem; left: -14rem;
  background: radial-gradient(circle, rgba(0, 151, 178, .13) 0%, rgba(0, 151, 178, 0) 65%);
}

/* Text-only page headers (Leistungen, Referenzen, Kontakt) carry no portrait, so
   the full hero padding left a 430px band holding three lines of text — on an
   800px-tall laptop screen that pushed all real content below the fold. These
   read as a header band, not a hero. */
.hero--compact {
  padding-top: calc(var(--header-h) + clamp(1.75rem, 3.4vw, 3.25rem));
  padding-bottom: clamp(2rem, 3.4vw, 3.25rem);
}
/* …and the ambient glow moves left and strengthens, so the space beside the
   headline reads as atmosphere rather than as an unfilled column. */
.hero--compact::before {
  width: 46rem; height: 46rem;
  top: -24rem; right: -6rem;
  background: radial-gradient(circle, rgba(12, 192, 223, .22) 0%, rgba(12, 192, 223, 0) 64%);
}
.hero--compact::after { display: none; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__copy { max-width: 40rem; }
.hero__copy .lead { margin-top: var(--space-lg); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* Portrait: the studio shot is already on a dark ground, so instead of cutting
   it out we blend its edges into the page with a mask. Cheaper and cleaner than
   a hard silhouette. */
.hero__portrait { position: relative; }
.hero__portrait img {
  width: 100%;
  /* A single radial mask, not two composited layers: mask-composite is
     inconsistently prefixed across engines and silently dropped the whole mask
     in testing, leaving a hard rectangle.

     The radii must be SMALLER than the box (58%/66%, not 105%/78%) or the fade
     band falls outside the element and the edges stay hard. Centred at 42% down
     so the solid core sits over the face and the fade eats the shoulders and
     the empty studio background instead. */
  -webkit-mask-image: radial-gradient(58% 66% at 50% 42%, #000 45%, transparent 100%);
  mask-image: radial-gradient(58% 66% at 50% 42%, #000 45%, transparent 100%);
}

/* Floating credential chip over the portrait — the "Jakob" card from ref. 1 */
.hero__chip {
  position: absolute;
  left: -1.5rem;
  bottom: 1.5rem;
  background: rgba(10, 42, 51, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.375rem;
  box-shadow: var(--shadow-xl);
  max-width: 17rem;
}
.hero__chip .name { color: #fff; font-weight: 600; font-size: .9375rem; }
.hero__chip .role { color: #8FA9B0; font-size: .8125rem; line-height: 1.45; margin-top: .25rem; }

/* --- Stat bar ------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { background: var(--color-background); padding: clamp(1.25rem, 2.5vw, 1.875rem); }
.stat__value {
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--color-heading);
}
.stat__value span { color: var(--color-accent); }
.stat__label {
  margin-top: .5rem;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--color-muted-fg);
}

/* --- Split feature row ---------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split + .split { margin-top: clamp(3.5rem, 7vw, 6rem); }
.split--flip .split__media { order: -1; }

.split__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/* Photos of wildly different native ratios (a 3:2 stage shot next to a 2:3
   portrait one) leave a ragged hole in a grid. Forcing one ratio and cropping
   keeps the row even. */
.media-tile {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 40%;
}

.checklist { margin-top: var(--space-xl); }
.checklist li {
  position: relative;
  padding-left: 2rem;
  color: var(--color-foreground);
}
.checklist li + li { margin-top: .875rem; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-cta) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-cta) 40%, transparent);
}
.checklist li::after {
  content: '';
  position: absolute;
  left: .34rem;
  top: .74em;
  width: .45rem;
  height: .24rem;
  border-left: 1.6px solid var(--color-accent);
  border-bottom: 1.6px solid var(--color-accent);
  transform: rotate(-45deg);
}

/* --- Client logo wall (placeholders until real files arrive) -------------- */

/* The 1px gap over a coloured container is what draws the hairline grid — which
   means every row must be FULL. With auto-fit the last row was left half empty
   and the container background showed through as a grey slab. Fixed column
   counts that divide the slot count (8) evenly avoid that entirely. */
.logowall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 860px) { .logowall { grid-template-columns: repeat(2, 1fr); } }
.logowall__slot {
  background: var(--color-background);
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  text-align: center;
}

/* Client logos come in wildly different proportions (Mercedes-Benz is ~5:1,
   AM Solutions is near-square). Capping BOTH axes and using object-fit keeps
   every mark inside the same optical box instead of letting the widest one
   dominate the row. Tune max-height per logo with an inline style if one still
   reads too small. */
.logowall__slot img {
  /* Each logo carries its own width inline, computed to give every mark the
     same optical AREA (~5000px²). Height/width caps alone can't do this: these
     eight range from 1.3:1 to 11.9:1, so a shared height cap would make the
     Daimler Truck wordmark enormous and AM Solutions a stamp.
     Regenerate with scratchpad/build_clients.py after swapping any file. */
  height: auto;
  max-width: 100%;      /* the only cap — keeps wide marks inside narrow slots */
  object-fit: contain;
  /* A slight lift off full saturation: eight brand palettes side by side
     otherwise fight each other and the page's own teal. */
  opacity: .82;
  transition: opacity var(--dur) var(--ease-out);
}
.logowall__slot img:hover { opacity: 1; }

/* Text stand-in — used for the "logo missing" fallback and any slot that has
   no artwork. Reads as a name, not as a greyed-out logo. */
.logowall__slot span {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.35;
  color: var(--color-muted-fg);
}

/* --- Case study body ------------------------------------------------------ */

.case { margin-top: var(--space-lg); }
.case dt {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.case dd {
  margin: .3125rem 0 0;
  font-size: .9375rem;
  color: var(--color-muted-fg);
}
.case dd + dt { margin-top: var(--space-md); }

/* --- Quote ---------------------------------------------------------------- */

.quote {
  border-left: 2px solid var(--color-cta);
  padding-left: clamp(1.25rem, 3vw, 2rem);
}
.quote p {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -.015em;
  color: var(--color-heading);
  text-wrap: pretty;
}
.quote footer {
  margin-top: var(--space-lg);
  font-size: .875rem;
  color: var(--color-muted-fg);
}

/* Compact variant for a grid of several real testimonials — same idea as
   .quote, sized down so four fit legibly without one dominating the page. */
.quote--card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 2px solid var(--color-cta);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  height: 100%;
}
.quote--card p {
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -.008em;
  color: var(--color-heading);
}
.quote--card footer {
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--color-muted-fg);
}
/* Small language tag — these are verbatim quotes and are shown in their
   original wording rather than translated, so the reader is told which
   language that original is in. */
.quote--card .lang-tag {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--color-cta) 40%, transparent);
  border-radius: 4px;
  padding: .0625rem .375rem;
}

/* --- TODO marker: visible, never mistaken for finished copy ---------------- */

.todo {
  display: inline-block;
  background: repeating-linear-gradient(45deg, rgba(255, 176, 32, .16) 0 8px, rgba(255, 176, 32, .07) 8px 16px);
  border: 1px dashed rgba(255, 176, 32, .65);
  border-radius: var(--radius-sm);
  padding: .125rem .5rem;
  font-size: .8125rem;
  font-weight: 500;
  color: #B87A00;
  letter-spacing: 0;
}
.on-dark .todo { color: #FFC559; }

/* --- Forms ---------------------------------------------------------------- */

.form { display: grid; gap: var(--space-lg); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }

.field { display: grid; gap: .4375rem; }
.field label { font-size: .875rem; font-weight: 600; color: var(--color-heading); }
.field .hint { font-size: .8125rem; color: var(--color-muted-fg); }

.input {
  width: 100%;
  min-height: 48px;
  padding: .75rem 1rem;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;              /* 16px — stops iOS zooming the page on focus */
  color: var(--color-heading);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder { color: var(--color-muted-fg); opacity: .8; }
.input:focus {
  outline: none;
  border-color: var(--color-cta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-cta) 22%, transparent);
}
textarea.input { min-height: 148px; resize: vertical; }

.field--error .input { border-color: #D14343; }
.field .error {
  font-size: .8125rem;
  font-weight: 500;
  color: #D14343;
}
.on-dark .field .error { color: #FF8A8A; }

.form__status { font-size: .9375rem; font-weight: 500; }

/* --- Contact routes --------------------------------------------------------
   With no form on the page, e-mail and phone ARE the conversion path, so they
   get card-sized targets rather than a line in a list. */

.contact-card {
  display: grid;
  gap: .375rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.contact-card:hover {
  border-color: var(--color-cta);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.contact-card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 11px;
  margin-bottom: var(--space-sm);
  background: color-mix(in srgb, var(--color-cta) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-cta) 26%, transparent);
  color: var(--color-accent);
}
.contact-card__icon svg { width: 22px; height: 22px; }

.contact-card__label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
}
.contact-card__value {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--color-heading);
  /* Long addresses must wrap rather than push the card wide on a phone. */
  overflow-wrap: anywhere;
}
.contact-card:hover .contact-card__value { color: var(--color-accent); }
.contact-card__hint { font-size: .875rem; color: var(--color-muted-fg); }

.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.copy-row__status { font-size: .875rem; font-weight: 500; color: var(--color-accent); }

/* --- Contact detail list --------------------------------------------------- */

.contact-list { display: grid; gap: var(--space-lg); }
.contact-item { display: flex; gap: var(--space-md); align-items: flex-start; }
.contact-item__label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
}
.contact-item__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--color-cta) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-cta) 26%, transparent);
  color: var(--color-accent);
}
.contact-item__icon svg { width: 18px; height: 18px; }
.contact-item dt {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
}
.contact-item dd { margin: .1875rem 0 0; }
.contact-item dd a { color: var(--color-heading); text-decoration: none; font-weight: 500; }
.contact-item dd a:hover { color: var(--color-accent); }

/* --- CTA band -------------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(12, 192, 223, .22) 0%, rgba(12, 192, 223, 0) 60%),
    linear-gradient(160deg, var(--ink-800) 0%, var(--ink-950) 70%);
  border: 1px solid var(--ink-700);
}
.cta-band .lead { margin-inline: auto; }
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-xl);
}

/* --- Footer ---------------------------------------------------------------- */

.footer {
  background: var(--ink-900);
  border-top: 1px solid var(--ink-700);
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--space-xl);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: var(--space-2xl);
}
/* width:auto is load-bearing — without it the img falls back to its 1347px
   width attribute, clamped by max-width:100%, and the logo renders squashed. */
.footer__brand img { height: 38px; width: auto; margin-bottom: var(--space-md); }
.footer p { color: #8FA9B0; font-size: .9375rem; }
.footer__brand p { max-width: 34ch; }
.footer h4 {
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8FA9B0;
  margin-bottom: var(--space-md);
  font-weight: 600;
}
.footer__links li + li { margin-top: .625rem; }
.footer__links a {
  color: #C3D6DB;
  text-decoration: none;
  font-size: .9375rem;
  transition: color var(--dur-fast);
}
.footer__links a:hover { color: var(--brand-400); }

.footer__bottom {
  border-top: 1px solid var(--ink-700);
  padding-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  align-items: center;
  justify-content: space-between;
  font-size: .875rem;
  color: #7A959C;
}
.footer__bottom nav { display: flex; gap: var(--space-lg); }
.footer__bottom a { color: #7A959C; text-decoration: none; }
.footer__bottom a:hover { color: var(--brand-400); }

/* --- Legal pages ----------------------------------------------------------- */

.prose { max-width: 46rem; }
.prose h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -.015em;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 {
  font-size: 1.0625rem;
  margin-top: var(--space-xl);
  margin-bottom: .5rem;
}
.prose p, .prose li { color: var(--color-foreground); }
.prose p + p { margin-top: var(--space-md); }
.prose ul { margin: var(--space-md) 0; display: grid; gap: .625rem; }
.prose ul li { position: relative; padding-left: 1.25rem; }
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0; top: .68em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-cta);
}
.prose address { font-style: normal; margin: var(--space-md) 0; line-height: 1.7; }

/* --- Scroll reveal --------------------------------------------------------
   IntersectionObserver + CSS transitions rather than a JS animation library:
   it needs no third-party request (see the GDPR note on fonts) and degrades to
   plain visible content if JS is off. */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-overshoot);
}
.reveal.is-visible { opacity: 1; transform: none; }
.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; }

/* No JS -> show everything. */
.no-js .reveal { opacity: 1; transform: none; }

/* --- Hero intro ----------------------------------------------------------
   Above-the-fold content must never wait on IntersectionObserver: on a cold
   load the hero sat blank until the observer fired. This is a pure CSS
   animation, so it starts with the first paint and still runs with JS off. */

@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero-in {
  animation: hero-in 620ms var(--ease-out) both;
}
.hero-in[data-delay='1'] { animation-delay: 70ms; }
.hero-in[data-delay='2'] { animation-delay: 140ms; }
.hero-in[data-delay='3'] { animation-delay: 210ms; }
.hero-in[data-delay='4'] { animation-delay: 280ms; }

/* --- Utilities ------------------------------------------------------------- */

.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;
}

.text-center { text-align: center; }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

/* Hairline divider that fades out at both ends, echoing the logo's rule */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--color-border) 22%, var(--color-border) 78%, transparent);
}

/* ==========================================================================
   Responsive — mobile-first breakpoints checked at 375/768/1024/1440
   ========================================================================== */

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__portrait { max-width: 30rem; margin-inline: auto; }
  .hero__chip { left: 0; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; }

  .nav-toggle { display: inline-flex; }

  /* Mobile drawer */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--space-md) var(--gutter) var(--space-xl);
    background: rgba(4, 25, 30, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--ink-700);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease-out),
                transform var(--dur) var(--ease-out),
                visibility var(--dur);
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }

  .nav__link { height: 52px; padding-inline: 0; font-size: 1.0625rem; }
  .nav__link[aria-current='page']::after { left: 0; right: auto; width: 1.5rem; bottom: 10px; }

  .header__actions .btn { display: none; }

  .split,
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__chip { position: static; margin-top: var(--space-md); max-width: none; }
  .hero__actions .btn { width: 100%; }
  .cta-band__actions .btn { width: 100%; }
}

/* ==========================================================================
   Accessibility & print
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-in { animation: none !important; opacity: 1; transform: none; }
  .btn-primary:hover { transform: none; }
  a.card:hover { transform: none; }
}

@media (forced-colors: active) {
  .btn, .card, .input { border: 1px solid ButtonBorder; }
  .nav__link[aria-current='page']::after { background: Highlight; }
}

@media print {
  .header, .footer, .cta-band, .nav, .skip-link { display: none !important; }
  body, .on-dark, .on-light { background: #fff !important; color: #000 !important; }
  .on-dark { --color-heading: #000; --color-foreground: #000; --color-muted-fg: #333; }
  a::after { content: ' (' attr(href) ')'; font-size: .8em; }
}
