/* =========================================================================
   Streamcode design system
   Brand palette is taken from the logo: near-black structure + red gradient.
   Light theme is the default; dark theme follows the OS unless the visitor
   picks one explicitly (stored in localStorage, see site.js).
   ========================================================================= */

/* ---------- Fonts: self-hosted so text renders without a third-party round trip */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-greek.woff2') format('woff2-variations');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens */
:root {
  color-scheme: light;

  --brand-red: #d92b1c;
  --brand-red-deep: #b81d18;
  --brand-red-bright: #ef4123;

  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-sunken: #eef0f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #0f1115;
  --ink-soft: #333a45;
  --muted: #5c6673;
  --line: #e2e6ec;
  --line-strong: #cdd4dd;
  --accent: #c62717;
  --accent-hover: #a81f12;
  --accent-contrast: #ffffff;
  --accent-wash: #fdf0ee;
  --on-dark: #f4f6f8;

  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.06), 0 1px 3px rgba(15, 17, 21, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 17, 21, 0.07), 0 2px 4px rgba(15, 17, 21, 0.04);
  --shadow-lg: 0 18px 40px rgba(15, 17, 21, 0.1), 0 4px 12px rgba(15, 17, 21, 0.05);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --container: 1180px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(3.6rem, 7vw, 6.5rem);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.97rem + 0.14vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.09rem + 0.28vw, 1.32rem);
  --step-2: clamp(1.35rem, 1.22rem + 0.6vw, 1.72rem);
  --step-3: clamp(1.6rem, 1.36rem + 1.1vw, 2.3rem);
  --step-4: clamp(1.95rem, 1.5rem + 2vw, 3.1rem);
  --step-5: clamp(2.3rem, 1.6rem + 3.1vw, 4rem);
}

[data-theme='dark'] {
  color-scheme: dark;

  --bg: #0b0d11;
  --bg-alt: #10141a;
  --bg-sunken: #14181f;
  --surface: #12161d;
  --surface-raised: #171c25;
  --ink: #f3f5f8;
  --ink-soft: #d5dae2;
  --muted: #98a3b2;
  --line: #232a34;
  --line-strong: #323b48;
  --accent: #ff6a52;
  --accent-hover: #ff8570;
  --accent-contrast: #140603;
  --accent-wash: #23120e;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.62);
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  /* `clip` (unlike `hidden`) guards against sideways overflow without turning
     the root into a scroll container, which would break sticky positioning. */
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
  overflow-x: hidden;
}

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

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
  line-height: 1.18;
  letter-spacing: -0.021em;
  font-weight: 680;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
  letter-spacing: -0.032em;
}
h2 {
  font-size: var(--step-4);
  letter-spacing: -0.028em;
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p {
  text-wrap: pretty;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

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

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

.container-narrow {
  max-width: 760px;
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.stack > * + * {
  margin-top: var(--stack-gap, 1rem);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 999;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--bg);
}

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

/* ---------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header[data-stuck='true'] {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.075rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

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

.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.brand__text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__tag {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  padding: 0;
}

.site-nav__link {
  display: inline-block;
  padding: 0.5rem 0.72rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 550;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__link:hover {
  background: var(--bg-sunken);
  color: var(--ink);
}

.site-nav__link[aria-current] {
  color: var(--accent);
  background: var(--accent-wash);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--bg-sunken);
}

.icon-button svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-switch:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.nav-toggle {
  display: none;
}

/* Mobile navigation */
@media (max-width: 960px) {
  .nav-toggle {
    display: inline-grid;
    margin-inline-start: auto;
  }

  .site-nav {
    position: fixed;
    inset: 4.5rem 0 auto 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 1.1rem var(--gutter) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-125%);
    visibility: hidden;
    transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.26s;
  }

  .site-nav[data-open='true'] {
    transform: translateY(0);
    visibility: visible;
  }

  /* Dims the page under the open panel so the two layers read as separate.
     `transform` on .site-nav makes it a stacking context, so the negative
     z-index keeps the scrim behind the panel but above the page. */
  .site-nav[data-open='true']::after {
    content: '';
    position: absolute;
    inset: 100% 0 auto 0;
    height: 100vh;
    background: rgba(9, 11, 14, 0.42);
    z-index: -1;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .site-nav__link {
    padding: 0.75rem 0.85rem;
    font-size: 1.02rem;
  }

  .site-nav .btn {
    margin-top: 0.5rem;
    justify-content: center;
  }
}

/* ---------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 620;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease,
    transform 0.16s ease, box-shadow 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--secondary:hover {
  background: var(--bg-sunken);
  border-color: var(--muted);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  padding-inline: 0.5rem;
}

.btn--ghost:hover {
  color: var(--accent);
}

.btn--on-dark {
  background: #ffffff;
  border-color: #ffffff;
  color: #14171c;
}

.btn--on-dark:hover {
  background: #eceff3;
  border-color: #eceff3;
  color: #14171c;
}

.btn--outline-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}

.btn--outline-dark:hover {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn--lg {
  padding: 0.88rem 1.5rem;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 620;
  font-size: 0.94rem;
  text-decoration: none;
}

.arrow-link::after {
  content: '→';
  transition: transform 0.18s ease;
}

.arrow-link:hover::after {
  transform: translateX(3px);
}

/* ---------- Small text elements */
.eyebrow {
  display: block;
  font-size: 0.775rem;
  font-weight: 680;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

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

.lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.34rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.79rem;
  font-weight: 560;
  color: var(--ink-soft);
}

.pill__dot {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: #1f9d55;
  flex: none;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head p {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.6;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Hero */
.hero {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -35% -10% auto auto;
  width: min(46rem, 78vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand-red) 13%, transparent), transparent 62%);
  pointer-events: none;
  z-index: -1;
}

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

.hero h1 {
  margin-block: 1rem 1.2rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero__lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.62;
  max-width: 34rem;
}

.hero__points {
  list-style: none;
  padding: 0;
  margin-top: 1.6rem;
  display: grid;
  gap: 0.6rem;
}

.hero__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.hero__points svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  margin-top: 0.16rem;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.4rem;
  margin-top: 1.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.845rem;
  color: var(--muted);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero__meta svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero side card */
.hero__card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.hero__card-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
}

.hero__card-dots {
  display: flex;
  gap: 0.3rem;
}

.hero__card-dots i {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.hero__card-dots i:first-child {
  background: var(--brand-red);
}

.hero__card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero__card-cell {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.hero__card-cell:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.hero__card-cell:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.hero__card-cell strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 660;
  letter-spacing: -0.01em;
}

.hero__card-cell span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.855rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ---------- Marquee-free tech strip */
.techstrip {
  padding-block: 1.5rem;
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}

.techstrip__label {
  font-size: 0.76rem;
  font-weight: 680;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.techstrip__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  list-style: none;
  padding: 0;
}

.techstrip__items li {
  padding: 0.34rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.83rem;
  font-weight: 560;
  color: var(--ink-soft);
  font-feature-settings: 'tnum';
}

/* ---------- Card grids */
.grid {
  display: grid;
  gap: 1.1rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1000px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

/* Card titles carry a class because the element level changes with page
   context (h2 on a hub page, h3 under a section heading). */
.card h3,
.card .card__title {
  font-size: var(--step-1);
  margin-bottom: 0.55rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card--link:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card--link .card__cta {
  margin-top: auto;
  padding-top: 1.1rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 620;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card--link .card__cta::after {
  content: '→';
  transition: transform 0.18s ease;
}

.card--link:hover .card__cta::after {
  transform: translateX(3px);
}

/* Links that leave the site get the outward arrow instead of the forward one. */
.card--link .card__cta--external::after {
  content: '↗';
}

.card--link:hover .card__cta--external::after {
  transform: translate(2px, -2px);
}

.card__stretch-link {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 1.05rem;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.card__icon svg {
  width: 1.32rem;
  height: 1.32rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Numbered process */
.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  counter-reset: step;
}

.process__item {
  position: relative;
  padding-top: 1.6rem;
  border-top: 2px solid var(--line);
  counter-increment: step;
}

.process__item::before {
  content: '0' counter(step);
  position: absolute;
  top: -0.9rem;
  left: 0;
  padding-right: 0.6rem;
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-feature-settings: 'tnum';
}

.section--alt .process__item::before {
  background: var(--bg-alt);
}

.process__item h3 {
  font-size: var(--step-1);
  margin-bottom: 0.5rem;
}

.process__item p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

@media (max-width: 1000px) {
  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem 1.1rem;
  }
}

@media (max-width: 620px) {
  .process {
    grid-template-columns: 1fr;
  }
}

/* ---------- Product / case cards */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.product + .product {
  margin-top: 1.15rem;
}

.product__body {
  padding: clamp(1.5rem, 3vw, 2.35rem);
}

.product__kicker {
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.product__body h3,
.product__body .product__title {
  margin-block: 0.6rem 0.8rem;
  font-size: var(--step-2);
}

.product__body > p {
  color: var(--muted);
  line-height: 1.65;
}

.product__sector {
  margin-top: -0.35rem;
  margin-bottom: 0.8rem;
  font-size: 0.88rem;
  font-weight: 560;
  color: var(--ink-soft);
}

.product__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.3rem;
  font-weight: 620;
  font-size: 0.93rem;
  text-decoration: none;
}

.product__link::after {
  content: '↗';
}

.product__aside {
  padding: clamp(1.5rem, 3vw, 2.35rem);
  background: var(--bg-alt);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.checklist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.checklist svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  margin-top: 0.16rem;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin-top: auto;
}

.stack-tags li {
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface);
}

@media (max-width: 860px) {
  .product {
    grid-template-columns: 1fr;
  }

  .product__aside {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ---------- Split feature rows */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.split--reverse > *:first-child {
  order: 2;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .split--reverse > *:first-child {
    order: 0;
  }
}

.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.feature-list h3 {
  font-size: var(--step-1);
  margin-bottom: 0.35rem;
}

.feature-list p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.rule-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.rule-list svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  margin-top: 0.2rem;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Definition table (legal info) */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.info-table th,
.info-table td {
  text-align: start;
  padding: 0.8rem 0.25rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.info-table th {
  width: 40%;
  font-weight: 600;
  color: var(--muted);
}

.info-table td {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Long legal terms and registry numbers would otherwise force the table
   wider than the viewport on a phone. */
@media (max-width: 560px) {
  .info-table {
    table-layout: fixed;
  }

  .info-table th,
  .info-table td {
    padding-inline: 0;
    overflow-wrap: break-word;
  }

  .info-table th {
    width: 42%;
    padding-right: 0.6rem;
  }
}

/* ---------- FAQ */
.faq {
  border-top: 1px solid var(--line);
}

.faq__item {
  border-bottom: 1px solid var(--line);
}

.faq__item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 0;
  cursor: pointer;
  font-size: var(--step-1);
  font-weight: 620;
  line-height: 1.4;
  letter-spacing: -0.014em;
  color: var(--ink);
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary:hover {
  color: var(--accent);
}

.faq__item summary::after {
  content: '';
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.3rem;
  background: currentColor;
  clip-path: polygon(46% 0, 54% 0, 54% 46%, 100% 46%, 100% 54%, 54% 54%, 54% 100%, 46% 100%, 46% 54%, 0 54%, 0 46%, 46% 46%);
  transition: transform 0.22s ease;
}

.faq__item[open] summary::after {
  transform: rotate(135deg);
}

.faq__answer {
  padding-bottom: 1.3rem;
  max-width: 58rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- CTA band */
.cta-band {
  position: relative;
  padding-block: clamp(3rem, 6vw, 4.75rem);
  background: linear-gradient(135deg, #14171d 0%, #1c2029 52%, #241a19 100%);
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: auto -5% -60% auto;
  right: -5%;
  width: 34rem;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(217, 43, 28, 0.42), transparent 62%);
  z-index: -1;
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-band h2 {
  color: #ffffff;
  font-size: var(--step-3);
  max-width: 28rem;
}

.cta-band p {
  margin-top: 0.75rem;
  color: rgba(244, 246, 248, 0.78);
  max-width: 34rem;
  line-height: 1.65;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Blog */
.post-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  list-style: none;
  padding: 0;
}

.post-list__item {
  border-bottom: 1px solid var(--line);
}

.post-list__link {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0 2rem;
  padding: 1.9rem 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.16s ease;
}

.post-list__link:hover {
  color: inherit;
  background: color-mix(in srgb, var(--bg-alt) 70%, transparent);
}

.post-list__meta {
  font-size: 0.83rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.3rem;
}

.post-list__link h2,
.post-list__link h3 {
  font-size: var(--step-2);
  margin-bottom: 0.6rem;
  transition: color 0.16s ease;
}

.post-list__link:hover h2,
.post-list__link:hover h3 {
  color: var(--accent);
}

.post-list__link p {
  color: var(--muted);
  line-height: 1.62;
  max-width: 46rem;
}

@media (max-width: 720px) {
  .post-list__link {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .post-list__meta {
    padding-top: 0;
    order: -1;
  }
}

/* ---------- Article body with sticky table of contents */
.article-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 2.5rem;
}

.toc {
  position: sticky;
  top: 6rem;
  padding-left: 1.35rem;
  border-left: 1px solid var(--line);
  font-size: 0.9rem;
}

.toc__title {
  font-size: 0.74rem;
  font-weight: 680;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  display: flex;
  gap: 0.55rem;
  line-height: 1.45;
}

.toc li::before {
  content: counter(toc);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  padding-top: 0.1rem;
}

.toc a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.toc a:hover {
  color: var(--accent);
  border-bottom-color: currentColor;
}

/* Below the two-column threshold the list becomes a plain intro block. */
@media (max-width: 1080px) {
  .article-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    order: -1;
    padding: 1.15rem 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-alt);
    max-width: 44rem;
  }
}

/* ---------- Prose (articles & legal) */
.prose {
  max-width: 44rem;
  font-size: 1.055rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.prose > * + * {
  margin-top: 1.35rem;
}

.prose h2 {
  font-size: var(--step-2);
  margin-top: 2.75rem;
  color: var(--ink);
  scroll-margin-top: 6rem;
}

.prose h3 {
  font-size: var(--step-1);
  margin-top: 2rem;
  color: var(--ink);
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
  display: grid;
  gap: 0.55rem;
}

.prose li {
  line-height: 1.68;
}

.prose li::marker {
  color: var(--accent);
}

.prose strong {
  color: var(--ink);
  font-weight: 640;
}

.prose blockquote {
  margin-inline: 0;
  padding: 1.1rem 1.35rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.prose blockquote p {
  margin: 0;
}

.article-header {
  max-width: 44rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- Breadcrumbs */
.breadcrumbs {
  padding-top: 1.6rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  list-style: none;
  padding: 0;
  font-size: 0.83rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 0.42rem;
  color: var(--line-strong);
}

.breadcrumbs [aria-current] {
  color: var(--ink-soft);
}

/* A long article title would otherwise wrap the trail onto three lines;
   keep it to one and let the current page truncate. */
@media (max-width: 640px) {
  .breadcrumbs ol {
    flex-wrap: nowrap;
  }

  .breadcrumbs li {
    white-space: nowrap;
  }

  .breadcrumbs [aria-current] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- Page header block */
.page-head {
  padding-block: clamp(2.25rem, 4vw, 3.5rem) clamp(1.75rem, 3vw, 2.5rem);
}

.page-head h1 {
  font-size: var(--step-4);
  max-width: 40rem;
}

.page-head .lead {
  margin-top: 1.15rem;
  max-width: 44rem;
}

/* The page header already provides breathing room below itself. */
.page-head + .section {
  padding-top: clamp(1rem, 2.5vw, 2rem);
}

/* ---------- Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (max-width: 940px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-card + .contact-card {
  margin-top: 1rem;
}

.contact-direct {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.contact-direct a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  text-decoration: none;
  color: var(--ink);
  font-weight: 580;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-direct a:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
  color: var(--ink);
}

/* A flex item will not shrink below its content by default, and the email
   address is one long unbreakable token — without this it pushes the card
   wider than a phone viewport. */
.contact-direct a > span {
  min-width: 0;
  /* `break-word` respects the <wbr> after the @ first and only splits the
     token arbitrarily if even that does not fit. */
  overflow-wrap: break-word;
}

.contact-direct svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  color: var(--accent);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-direct small {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.detail-rows {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.15rem;
}

.detail-rows dt {
  font-size: 0.8rem;
  font-weight: 660;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-rows dd {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

/* ---------- Forms */
.form {
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.05rem;
  margin-top: 1.4rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.field .req {
  color: var(--accent);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 9.5rem;
  resize: vertical;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 49%, var(--muted) 50%),
    linear-gradient(-45deg, transparent 49%, var(--muted) 50%);
  background-position: calc(100% - 1.05rem) 55%, calc(100% - 0.68rem) 55%;
  background-size: 0.38rem 0.38rem;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.checkbox input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.22rem;
  flex: none;
  accent-color: var(--accent);
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form__hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.form-status {
  display: none;
  margin-top: 1.15rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 0.93rem;
  line-height: 1.55;
}

.form-status[data-state='success'] {
  display: block;
  border-color: #1f9d5540;
  background: #1f9d550f;
  color: var(--ink);
}

.form-status[data-state='error'] {
  display: block;
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-wash);
  color: var(--ink);
}

.form-status strong {
  display: block;
  margin-bottom: 0.2rem;
}

@media (max-width: 620px) {
  .form__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer */
.site-footer {
  padding-block: clamp(2.75rem, 5vw, 4rem) 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  font-size: 0.92rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2.25rem;
}

.site-footer h2,
.site-footer h3 {
  font-size: 0.8rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-brand p {
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 24rem;
}

.footer-legal-list {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.15rem;
  font-size: 0.845rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.845rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Cookie notice */
.cookie-notice {
  position: fixed;
  z-index: 300;
  left: max(1rem, env(safe-area-inset-left));
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  max-width: 30rem;
  margin-inline-start: auto;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  display: none;
}

.cookie-notice[data-visible='true'] {
  display: block;
}

.cookie-notice h2 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.cookie-notice p {
  font-size: 0.885rem;
  color: var(--muted);
  line-height: 1.6;
}

.cookie-notice__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* ---------- 404 */
.error-page {
  padding-block: clamp(4rem, 10vw, 8rem);
  text-align: center;
}

.error-page__code {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.error-page .lead {
  margin-inline: auto;
  margin-top: 1.1rem;
  max-width: 34rem;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2.25rem;
  list-style: none;
  padding: 0;
}

/* ---------- Scroll reveal (progressive enhancement only) */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

/* ---------- Print */
@media print {
  .site-header,
  .site-footer,
  .cookie-notice,
  .cta-band,
  .skip-link {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}
