/* ============================================================
   Devolutions · Remote Desktop Manager — site design system
   Direction: "Atelier" (demo-07) rendered in the Devolutions
   light palette. Hairline rules, tracked small caps, light-weight
   display type, spotlight tints, slow fades. Light theme only.
   Type: Red Hat Display (local) + Open Sans (Google) + system mono.
   ============================================================ */

/* ============ FONTS ============ */
@font-face {
  font-family: 'Red Hat Display';
  src: url('/assets/fonts/red-hat-display-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Red Hat Display';
  src: url('/assets/fonts/red-hat-display-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Red Hat Display';
  src: url('/assets/fonts/red-hat-display-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Red Hat Display';
  src: url('/assets/fonts/red-hat-display-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ============ TOKENS ============ */
:root {
  /* Surfaces (light scale from the Devolutions palette) */
  --bg: #ffffff;
  --bg-soft: #f9f9f9;
  --bg-tint: #f5f5f7;
  --bg-muted: #ececec;
  --line-soft: #ececec;
  --line: #e2e2e2;
  --line-strong: #d9d9d9;

  /* Ink */
  --text: #000000;
  --text-muted: #494949;
  --text-dim: #6e6e6e;

  /* Brand */
  --primary: #146ef5;          /* main CTA */
  --primary-hover: #00339c;    /* CTA hover */
  --brand: #0068c3;            /* RDM product blue: links, caps, accents */
  --brand-deep: #054a7a;
  --brand-ink: #022131;
  --brand-tint: #e7f0fe;       /* secondary */
  --link: #0068c3;

  /* Status / semantic (consumed by main.js inline styles) */
  --accent: #057a0b;           /* success */
  --danger: #b10101;           /* error */
  --favorite: #f6a222;         /* likes */

  /* Elevation — tinted with the deepest brand ink */
  --shadow-sm: 0 1px 2px rgba(2, 33, 49, 0.06);
  --shadow-md: 0 8px 24px rgba(2, 33, 49, 0.08);
  --shadow-lg: 0 20px 48px rgba(2, 33, 49, 0.12);
  --shadow-xl: 0 32px 72px rgba(2, 33, 49, 0.18);

  /* Type */
  --font-display: 'Red Hat Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* Radius scale */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Spacing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --space-16: 64px; --space-24: 96px;

  /* Motion — slow, quiet fades only */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
  --dur-slow: 640ms;

  --nav-h: 76px;
  --wrap: 1180px;
}

/* ============ BASE ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Author-level display rules (img, .info-card …) must not defeat [hidden] —
   main.js toggles the attribute on covers, office card, cookie banner, etc. */
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color-scheme: light;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text-muted);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

::selection { background: var(--primary); color: #ffffff; }

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

[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

/* ============ UTILITIES ============ */
.container { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 32px; }

.caps {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
}

.lead {
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 62ch;
}

.mono { font-family: var(--font-mono); }

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

.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-tight { padding: clamp(48px, 6vw, 72px) 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 {
  font-weight: 400;
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  margin-bottom: 14px;
}
.section-head h2 em {
  font-style: normal;
  font-weight: 600;
  color: var(--brand);
}
.section-head p { font-size: 16px; color: var(--text-muted); max-width: 60ch; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center p { margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 16px; top: -64px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  transition: top var(--dur-fast) ease;
}
.skip-link:focus { top: 12px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color var(--dur-med) var(--ease),
              color var(--dur-med) var(--ease),
              border-color var(--dur-med) var(--ease),
              box-shadow var(--dur-med) var(--ease),
              transform var(--dur-med) var(--ease);
}
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(2, 33, 49, 0.10);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20, 110, 245, 0.28);
}

.btn-secondary {
  background: var(--bg);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(0, 104, 195, 0.04);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  padding-inline: 4px;
}
.btn-ghost:hover { color: var(--primary-hover); }
.btn-ghost svg { transition: transform var(--dur-med) var(--ease); }
.btn-ghost:hover svg { transform: translateX(4px); }

.btn-lg { padding: 16px 34px; font-size: 13px; }
.btn-sm { padding: 9px 18px; font-size: 11px; letter-spacing: 0.12em; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.actions.center { justify-content: center; }

/* ============ NAVBAR ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
.navbar.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(2, 33, 49, 0.05);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 36px;
}

.brand { display: flex; align-items: center; gap: 12px; flex: none; }
/* full lockup (icon + wordmark SVG, 980×200) — navbar + footer; square corners, no shadow */
.brand-lockup { height: 34px; width: auto; border-radius: 0; box-shadow: none; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin-left: auto;
}
.nav-links a {
  display: block;
  padding: 6px 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-med) ease, border-color var(--dur-med) ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--brand); border-bottom-color: var(--brand); }

.nav-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.nav-cta:hover { background: var(--primary-hover); box-shadow: 0 8px 20px rgba(20, 110, 245, 0.25); }
.nav-cta svg { width: 14px; height: 14px; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  place-items: center;
  transition: border-color var(--dur-fast) ease;
}
.menu-toggle:hover { border-color: var(--brand); }
.menu-toggle svg { color: var(--text); }

/* ============ HERO — dark brand stage ============
   Palette sources (devolutions-color-palette.md): base #022131 (accent-brand-600)
   → #011221 (contrast-brand-100); top bloom rgba(58,163,255,.16) (§5.2 hero
   glow 1, dark); H1 accent gradient #3aa3ff→#54b6f8→#9ddafb (§5.2 dark);
   lead #ffffffb3; chips #ffffff12/#333/#ccc/icon #3aa3ff (§5.2 dark);
   secondary button #ffffff12/#ffffff36/#fffc, hover #3aa3ff (§5.6 dark). */
.hero {
  position: relative;
  /* Option A composition: the dark stage continues below the product frame
     (deliberate apron), so image bottom and background bottom never align */
  padding: clamp(72px, 9vw, 120px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
  color: #ffffffb3;
  background:
    radial-gradient(110% 65% at 50% -8%, rgba(58, 163, 255, 0.16) 0%, rgba(58, 163, 255, 0.05) 42%, transparent 68%),
    linear-gradient(180deg, #022131 0%, #011221 100%);
}

.hero-copy {
  max-width: 880px;
  margin: 0 auto clamp(34px, 4.2vw, 56px);
  text-align: center;
}
.hero-copy h1 {
  font-weight: 400;
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 0 18px;
}
.hero-copy h1 .accent {
  font-weight: 600;
  background: linear-gradient(90deg, #3aa3ff, #54b6f8, #9ddafb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy .lead {
  font-size: 17.5px;
  color: #ffffffb3;
  max-width: 72ch;
  margin-inline: auto;
}
.hero-copy .actions { margin-top: 26px; }

/* secondary CTA on the dark stage (§5.6 "secondary button on panel", dark) */
.hero .btn-secondary {
  background: #ffffff12;
  border-color: #ffffff36;
  color: #fffc;
}
.hero .btn-secondary:hover {
  background: #ffffff24;
  border-color: #3aa3ff;
  color: #3aa3ff;
  transform: translateY(-1px);
}

/* product showcase — large, square-cornered, fully visible inside the dark
   stage; the hero's bottom padding keeps its lower edge clear of the image */
.hero-media {
  position: relative;
  width: min(70vw, 1250px);
  margin: 0 auto;
}
.hero-media::before {
  /* soft atmospheric bloom strictly BEHIND the frame (z-index below);
     brand blues only: #3aa3ff core → #0068c3 → #054a7a → transparent */
  content: "";
  position: absolute;
  inset: -10% -7% 4%;
  background: radial-gradient(56% 62% at 50% 44%,
              rgba(58, 163, 255, 0.30) 0%,
              rgba(0, 104, 195, 0.16) 45%,
              rgba(5, 74, 122, 0.10) 64%,
              transparent 76%);
  filter: blur(46px);
  pointer-events: none;
  z-index: 0;
}
.product-frame {
  position: relative;
  z-index: 1;
  border: 1px solid #333;
  border-radius: 0;
  overflow: hidden;
  background: #011221;
  box-shadow: 0 32px 90px rgba(1, 18, 33, 0.6);
}
.product-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 562;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* ============ BADGE MARQUEE ============ */
.badges-band {
  background: var(--bg-soft);
  /* standalone band between content sections — hairline on top only */
  border-top: 1px solid var(--line);
  padding: 44px 0 48px;
  overflow: hidden;
}
.badges-label {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.marquee-track {
  display: flex;
  width: max-content;
  /* 4 identical sets; -50% = exactly 2 sets → pixel-identical loop point.
     96s over the doubled distance keeps the original ~29px/s speed.
     Pure compositor transform — no JS, no pause at the boundary. */
  animation: marquee 96s linear infinite;
}
.marquee-set {
  display: flex;
  align-items: center;
  gap: 64px;
  padding-right: 64px; /* equals the gap → uniform rhythm across set seams */
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-set figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: none;
}
.marquee-set img {
  height: 64px;
  width: auto;
  filter: saturate(0.92);
  transition: filter var(--dur-med) ease;
}
.marquee-set figure:hover img { filter: saturate(1); }
.marquee-set figcaption {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  max-width: 130px;
}

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; }
  .marquee-set {
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px 48px;
    padding: 0 32px;
  }
  .marquee-set[aria-hidden="true"] { display: none; }
}

/* ============ PILLARS CAROUSEL ============ */
.pillars-carousel-wrap { position: relative; }
.pillars-carousel { position: relative; }
.pillars-viewport { overflow: hidden; padding: 8px 0 16px; }
.pillars {
  display: flex;
  gap: 24px;
  transition: transform var(--dur-slow) var(--ease);
  will-change: transform;
}
.pillar {
  flex: 0 0 min(540px, 82%);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px;
  opacity: 0.45;
  transform: scale(0.985);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease),
              border-color var(--dur-med) ease,
              box-shadow var(--dur-med) ease;
}
.pillar.is-active {
  opacity: 1;
  transform: scale(1);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.pillar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.pillar-ico {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-tint);
  color: var(--brand);
  flex: none;
}
.pillar-no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.pillar h3 {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.pillar p { font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.pillar ul { list-style: none; margin-top: 16px; border-top: 1px solid var(--line-soft); }
.pillar ul li {
  padding: 9px 0 9px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--text-muted);
  position: relative;
}
.pillar ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 17px;
  width: 7px; height: 1.5px;
  background: var(--brand);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.carousel-btn:hover { border-color: var(--brand); color: var(--brand); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.carousel-dots .dot {
  width: 8px; height: 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 0;
  transition: background-color var(--dur-med) ease, border-color var(--dur-med) ease, width var(--dur-med) var(--ease);
}
.carousel-dots .dot.is-active {
  width: 26px;
  background: var(--brand);
  border-color: var(--brand);
}

/* ============ FEATURE REGISTER (craft rows) ============ */
.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(40px, 6vw, 88px);
}
.register { border-top: 1px solid var(--line); }
.reg-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  padding: 20px 10px 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur-med) ease, padding-left var(--dur-med) var(--ease);
}
.reg-row:hover { background: var(--bg-soft); padding-left: 12px; }
.reg-no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  padding-top: 5px;
  letter-spacing: 0.04em;
}
.reg-row h3 {
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -0.005em;
  margin-bottom: 3px;
}
.reg-row p { font-size: 14px; line-height: 1.65; color: var(--text-muted); }

/* ============ JOURNEY ============ */
.journey {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.journey-step { position: relative; padding-top: 28px; border-top: 1px solid var(--line-strong); }
.journey-step::before {
  content: "";
  position: absolute;
  top: -4.5px; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}
.j-no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 12px;
}
.journey-step h3 { font-weight: 600; font-size: 19px; margin-bottom: 8px; }
.journey-step p { font-size: 15px; color: var(--text-muted); }

/* ============ STATEMENT ============ */
.statement {
  padding: clamp(72px, 9vw, 112px) 0;
  background:
    radial-gradient(ellipse 60% 90% at 50% 50%, rgba(20, 110, 245, 0.05), transparent 70%),
    var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.statement .caps { display: block; margin-bottom: 26px; }
.statement blockquote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.8vw, 2.05rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 34ch;
  margin: 0 auto;
}
.statement blockquote em { font-style: normal; font-weight: 600; color: var(--brand); }
.statement cite {
  display: block;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

/* ============ STATS BAND ============ */
/* borderless treatment — no box, shadow or radius; tiles are separated by
   hairline vertical dividers only (responsive rules add row dividers) */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-tile {
  padding: clamp(26px, 3.4vw, 40px) 28px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.stat-tile:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  letter-spacing: -0.02em;
  color: var(--brand); /* palette brand blue #0068c3 — 5.9:1 on white */
  line-height: 1.05;
  font-variant-numeric: tabular-nums; /* steady width while counting */
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}
/* review-platform star — solid brand-blue fill, side by side with the number;
   the wrapper flexes star + .stat-num, leaving .stat-num text-only so the
   counting animation's textContent writes never touch the icon */
.stat-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.stat-star { width: clamp(20px, 2.2vw, 28px); height: auto; color: var(--brand); flex: none; }

/* ============ CTA BAND ============ */
.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(60px, 8vw, 96px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse 70% 120% at 50% -20%, rgba(20, 110, 245, 0.07), transparent 60%),
    var(--bg-soft);
}
.cta h2 {
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.cta h2 em { font-style: normal; font-weight: 600; color: var(--brand); }
.cta p { max-width: 58ch; margin: 0 auto; font-size: 16px; }
.cta .actions { justify-content: center; margin-top: 34px; }
.cta .fineprint {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* ============ PAGE HERO (interior pages) ============ */
.page-hero {
  position: relative;
  padding: clamp(56px, 7vw, 88px) 0 clamp(40px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -220px; right: -120px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(20, 110, 245, 0.06), transparent 65%);
  pointer-events: none;
}
.page-hero h1 {
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin: 6px 0 18px;
  max-width: 24ch;
}
.page-hero h1 em { font-style: normal; font-weight: 600; color: var(--brand); }
.page-hero .lead { max-width: 64ch; }
.page-hero .hero-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.page-hero .hero-note b { color: var(--text); font-weight: 600; }

/* ============ DOWNLOADS ============ */
.pillbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}
.pill-btn {
  padding: 10px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.pill-btn:hover { border-color: var(--brand); color: var(--brand); }
.pill-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.dl-featured {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid #c9dcfa;
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse 80% 140% at 100% 0%, rgba(20, 110, 245, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff, #f7faff);
  box-shadow: var(--shadow-md);
  margin-bottom: 64px;
}
.dl-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.dl-badge svg { width: 12px; height: 12px; }
.dl-featured h2 { font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 6px; }
.dl-featured .dl-version {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.dl-featured p { font-size: 15.5px; max-width: 62ch; }
.dl-featured-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.dl-featured-actions .btn { justify-content: center; }

.dl-section { margin-bottom: 56px; }
.dl-section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 8px;
}
.dl-section-title h2 { font-weight: 400; font-size: 1.55rem; letter-spacing: -0.01em; }
.dl-section-title .note { font-size: 13.5px; color: var(--text-dim); }
.dl-list { display: grid; gap: 16px; margin-top: 24px; }

.dl-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  transition: border-color var(--dur-med) ease, box-shadow var(--dur-med) ease, transform var(--dur-med) var(--ease);
}
.dl-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.dl-card.featured { border-color: #c9dcfa; background: linear-gradient(180deg, #ffffff, #f7faff); }
.dl-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.dl-icon img { width: 100%; height: 100%; object-fit: cover; }
.dl-icon svg { width: 24px; height: 24px; }
.dl-info h3 { font-weight: 600; font-size: 17px; margin-bottom: 3px; }
.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.dl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.dl-info p { font-size: 14px; color: var(--text-muted); }
.dl-actions { display: flex; align-items: center; gap: 12px; }

.dl-empty { padding: 24px 0; font-size: 14.5px; color: var(--text-dim); }

.info-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  /* default stretch: the two panels match height on desktop; single column
     (see 1020px breakpoint) stacks them naturally on small screens */
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  padding: clamp(24px, 3vw, 34px);
}
.panel h3 { font-weight: 600; font-size: 17px; margin-bottom: 16px; }
.info-list { display: grid; gap: 0; }
.info-list .row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.info-list .row:last-child { border-bottom: 0; }
.info-list dt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 4px;
}
.info-list dd { color: var(--text); }
.info-list dd .sub { display: block; color: var(--text-dim); font-size: 13px; margin-top: 2px; }

.steps { margin-left: 22px; display: grid; gap: 14px; font-size: 15px; color: var(--text-muted); }
.steps li::marker { color: var(--brand); font-weight: 700; font-family: var(--font-mono); font-size: 0.92em; }
.steps strong { color: var(--text); font-weight: 700; }

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.help-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  padding: 26px;
  transition: border-color var(--dur-med) ease, box-shadow var(--dur-med) ease, transform var(--dur-med) var(--ease);
}
.help-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.help-card .h-ico {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.help-card .h-ico svg { width: 19px; height: 19px; }
.help-card h3 { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.help-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }
.help-card a.more {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}
.help-card a.more:hover { color: var(--primary-hover); }

/* ============ FAQ ============ */
.faq-search { max-width: 520px; margin: 34px 0 8px; position: relative; }
.faq-search svg {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--text-dim);
  pointer-events: none;
}
.faq-search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.faq-search input::placeholder { color: var(--text-dim); }
.faq-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 104, 195, 0.12);
}
.faq-noresults { padding: 28px 0; color: var(--text-dim); font-size: 15px; }

.faq-category { margin-top: clamp(48px, 6vw, 72px); }
.faq-cat-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}
.faq-cat-no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  letter-spacing: 0.06em;
}
.faq-cat-title { font-weight: 400; font-size: clamp(1.35rem, 2.4vw, 1.7rem); letter-spacing: -0.01em; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 6px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--text);
  transition: color var(--dur-fast) ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--brand); }
.faq-item[open] summary { color: var(--brand); }
.faq-item .chev {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  color: var(--text-dim);
  transition: transform var(--dur-med) var(--ease), color var(--dur-fast) ease;
}
.faq-item[open] .chev { transform: rotate(45deg); color: var(--brand); }
.faq-answer {
  overflow: hidden;
  padding: 0 48px 26px 6px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 82ch;
}
.faq-answer p + p { margin-top: 12px; }
.faq-answer a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.faq-answer ul { margin: 12px 0 0 18px; }
.faq-answer li { margin: 6px 0; }
.faq-answer code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ============ BLOG LIST ============ */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}
.posts { display: grid; gap: 22px; }

.post {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
  transition: border-color var(--dur-med) ease, box-shadow var(--dur-med) ease, transform var(--dur-med) var(--ease);
}
.post:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-thumb-wrap { position: relative; background: var(--bg-muted); min-height: 190px; }
.post-thumb { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.post-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 90% 120% at 30% 0%, rgba(20, 110, 245, 0.10), transparent 60%),
    var(--brand-tint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 44px;
  color: var(--brand);
  letter-spacing: -0.02em;
}
.post-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 9px; }
.post-cat {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.post h3 { font-weight: 600; font-size: 18.5px; letter-spacing: -0.01em; line-height: 1.35; }
.post h3 a { transition: color var(--dur-fast) ease; }
.post h3 a:hover { color: var(--brand); }
.post-excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-byline {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.post-byline .sep { color: var(--line-strong); }
.post-stats { display: flex; gap: 14px; margin-left: auto; }
.post-stat { display: inline-flex; align-items: center; gap: 5px; }
.post-stat svg { width: 13px; height: 13px; }

.empty-note {
  padding: 32px 0;
  color: var(--text-dim);
  font-size: 15px;
}
.empty-note a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* sidebar */
.sidebar { display: grid; gap: 22px; position: sticky; top: calc(var(--nav-h) + 24px); }
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  padding: 26px;
}
.sidebar-card h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text);
  font-family: var(--font-sans);
  margin-bottom: 18px;
}
.sidebar-search { position: relative; }
.sidebar-search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-dim);
  pointer-events: none;
}
.sidebar-search input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 14px;
  background: var(--bg);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.sidebar-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 104, 195, 0.12);
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud .tag,
.tag-cloud a[data-category] {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.tag-cloud .tag:hover,
.tag-cloud a[data-category]:hover { border-color: var(--brand); color: var(--brand); }

.newsletter-form { display: grid; gap: 10px; }
.newsletter-form p { font-size: 13.5px; color: var(--text-muted); }
.newsletter-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 14px;
  background: var(--bg);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 104, 195, 0.12);
}
.newsletter-form .btn { width: 100%; }
.newsletter-msg { font-size: 13px; margin-top: 2px; }
.newsletter-consent { font-size: 11.5px; color: var(--text-dim); line-height: 1.55; }

/* ============ BLOG POST ============ */
.post-hero { padding: clamp(48px, 6vw, 72px) 0 36px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  transition: color var(--dur-fast) ease;
}
.back-link:hover { color: var(--primary-hover); }
.post-hero .post-cat { margin: 22px 0 16px; }
.post-hero h1 {
  font-weight: 400;
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.18;
  max-width: 30ch;
  margin-bottom: 26px;
}
.post-author { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  flex: none;
  overflow: hidden;
}
.avatar-img { object-fit: cover; }
.post-author .a-name { font-weight: 700; font-size: 14.5px; color: var(--text); font-family: var(--font-sans); }
.post-author .a-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }

.post-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.post-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.post-action svg { width: 15px; height: 15px; }
.post-action:hover { border-color: var(--line-strong); color: var(--text); }
button.post-action.is-liked { color: var(--favorite); border-color: var(--favorite); background: rgba(246, 162, 34, 0.07); }
button.post-action.is-liked svg { fill: var(--favorite); }
button.post-action.is-copied { color: var(--accent); border-color: var(--accent); background: rgba(5, 122, 11, 0.06); }
.pa-ico { display: inline-flex; }

.post-cover-wrap {
  max-width: 980px;
  margin: 8px auto 0;
  padding: 0 32px;
}
.post-cover {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.post-body {
  max-width: 74ch;
  margin: 0 auto;
  padding: clamp(44px, 6vw, 72px) 32px 24px;
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--text);
}
.post-body > * + * { margin-top: 20px; }
.post-body h2 {
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  letter-spacing: -0.012em;
  margin: 52px 0 4px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.post-body h3 { font-weight: 600; font-size: 1.18rem; margin: 36px 0 0; }
.post-body p { color: #1a1a1a; }
.post-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body a:hover { color: var(--primary-hover); }
.post-body strong { font-weight: 700; color: var(--text); }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li { margin: 9px 0; color: #1a1a1a; }
.post-body ul > li::marker { color: var(--brand); }
.post-body ol > li::marker { color: var(--brand); font-family: var(--font-mono); font-size: 0.9em; }
.post-body blockquote {
  margin: 30px 0;
  padding: 6px 0 6px 26px;
  border-left: 2px solid var(--brand);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.14rem;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--text);
}
.post-body blockquote p + p { margin-top: 12px; }
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
}
.post-body pre {
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  overflow-x: auto;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: 13.5px; }
.post-body img { border-radius: var(--r-md); border: 1px solid var(--line); }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.post-body th { background: var(--bg-soft); font-weight: 700; }

.related { border-top: 1px solid var(--line); margin-top: 40px; }
.related-list { list-style: none; display: grid; gap: 0; margin-top: 8px; }
.related-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
  transition: color var(--dur-fast) ease, padding-left var(--dur-med) var(--ease);
}
.related-list a:hover { color: var(--brand); padding-left: 12px; }
.related-list .r-meta {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.related-list li:first-child a { border-top: 1px solid var(--line); }

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}
.contact-h {
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.inbox-list { display: grid; gap: 14px; margin-top: 24px; }
.info-card[hidden] { display: none; }
.info-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  transition: border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
.info-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.info-ico {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}
.info-ico svg { width: 19px; height: 19px; }
.info-card h4 {  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.info-card .i-email { font-weight: 700; font-size: 15.5px; color: var(--text); }
.info-card a.i-email:hover { color: var(--brand); }
.info-card .i-sla { font-size: 13px; color: var(--text-dim); margin-top: 4px; font-family: var(--font-mono); }
.info-card .i-address { font-size: 14.5px; color: var(--text-muted); white-space: pre-line; line-height: 1.7; }

.form-panel {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
}
.form { display: grid; gap: 18px; margin-top: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: grid; gap: 7px; }
.form-group label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-group label .req { color: var(--danger); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #9a9a9a; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 104, 195, 0.12);
}
.form-consent { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.form-consent a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.form-note { font-size: 12.5px; color: var(--text-dim); }
.form-status { font-size: 14px; }

.side-cards { display: grid; gap: 20px; }
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  background: var(--bg-soft);
}
.side-card h3 { font-weight: 600; font-size: 16.5px; margin-bottom: 8px; }
.side-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.side-card .btn { width: 100%; }

/* ============ ABOUT ============ */
.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.story-block p + p { margin-top: 18px; }
.story-block p { font-size: 16px; max-width: 62ch; }
.story-lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
}

.timeline { border-left: 1px solid var(--line-strong); padding-left: clamp(24px, 3vw, 36px); }
.milestone { position: relative; padding: 14px 0; }
.milestone::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(24px, 3vw, 36px) - 4.5px);
  top: 24px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--brand);
}
.milestone .m-year {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand);
  display: block;
  margin-bottom: 4px;
}
.milestone .m-text { font-size: 14.5px; color: var(--text-muted); max-width: 52ch; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(32px, 4vw, 56px);
}
.principle { padding: 26px 0; border-top: 1px solid var(--line-strong); }
.p-no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 12px;
}
.principle h3 { font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.principle p { font-size: 14.5px; color: var(--text-muted); }

/* ============ 404 ============ */
.nf-term {
  margin: 34px auto 0;
  max-width: 560px;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-tint);
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
}
.nf-term .prompt { color: var(--brand); }
.nf-term .err { color: var(--danger); }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: #011221; /* palette §5.2 Black Blue — same base as the hero */
  margin-top: 0;
  /* dark-theme tokens scoped to the footer (palette §5.6 dark column) —
     every child rule keeps using var(--…) and resolves to dark-safe values */
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-dim: rgba(255, 255, 255, 0.56);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --brand: #54b6f8; /* light blue accent — 7.4:1 on #011221 */
  --brand-soft: #9ddafb;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(32px, 4vw, 56px);
  padding: clamp(52px, 6vw, 72px) 0 48px;
}
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand .brand-lockup { height: 40px; }
.footer-tagline { font-size: 14px; color: var(--text-muted); max-width: 38ch; line-height: 1.7; }
/* clean standalone icons — no borders, boxes or backgrounds */
.footer-socials { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.footer-socials a {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--dur-fast) ease;
}
.footer-socials svg { width: 18px; height: 18px; display: block; }
/* hover: official platform brand colors — X and GitHub use their official
   reversed (white) marks, the standard treatment on dark surfaces */
.footer-socials .soc-x:hover { color: #ffffff; }
.footer-socials .soc-github:hover { color: #ffffff; }
.footer-socials .soc-linkedin:hover { color: #0a66c2; }
.footer-socials .soc-instagram:hover { color: #e4405f; }
.footer-socials .soc-facebook:hover { color: #1877f2; }
.footer-socials .soc-youtube:hover { color: #ff0000; }
.footer-socials .soc-reddit:hover { color: #ff4500; }

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
}
.footer-col a:hover { color: var(--brand); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}
.footer-copy { font-size: 13px; color: var(--text-dim); }
.footer-legal { display: flex; gap: 24px; list-style: none; }
.footer-legal a { font-size: 13px; color: var(--text-dim); transition: color var(--dur-fast) ease; }
.footer-legal a:hover { color: var(--brand); }
.footer-origin {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.footer-origin img { width: 20px; height: auto; display: block; flex: none; }

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed;
  left: 24px; bottom: 24px;
  z-index: 150;
  max-width: 480px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 24px 26px;
  transform: translateY(calc(100% + 40px));
  transition: transform var(--dur-slow) var(--ease);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner h2 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cookie-banner p { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }
.cookie-banner p a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ============ REVEAL ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .carousel-prev { left: 4px; }
  .carousel-next { right: 4px; }
}

@media (max-width: 1020px) {
  .hero-media { width: min(84vw, 1000px); }
  .register-grid { grid-template-columns: 1fr; }
  .blog-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); display: grid; }
  .contact-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; gap: 48px; }
  .info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dl-featured { grid-template-columns: 1fr; }
  .dl-featured-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 860px) {
  .container, .container-narrow { padding: 0 22px; }
  .nav-inner { padding: 0 22px; gap: 16px; }

  .menu-toggle { display: grid; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: calc(var(--nav-h) + 8px);
    left: 16px; right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line-soft); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-links a {
    display: block;
    padding: 14px 12px;
    font-size: 12px;
    border-bottom: 0;
  }
  .nav-links a.active { color: var(--brand); background: rgba(0, 104, 195, 0.05); border-radius: var(--r-sm); }
  .nav-cta { display: none; }

  .stats-band { grid-template-columns: 1fr 1fr; }
  .stat-tile:nth-child(2) { border-right: 0; }
  .stat-tile:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .journey { grid-template-columns: 1fr; gap: 32px; }
  .principles { grid-template-columns: 1fr 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .pillar { flex-basis: 86%; padding: 28px; }

  .post { grid-template-columns: 1fr; }
  .post-thumb-wrap { min-height: 180px; max-height: 220px; }

  .dl-card { grid-template-columns: 48px 1fr; }
  .dl-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .info-list .row { grid-template-columns: 1fr; gap: 4px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding-top: 56px; }
  .hero-media { width: 92vw; }
  .hero-media::before { inset: -8% -3% 6%; filter: blur(30px); }
  .brand-lockup { height: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .principles { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr; }
  .stat-tile { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-tile:last-child { border-bottom: 0; }
  .pillar { flex-basis: 92%; }
  .carousel-btn { display: none; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .marquee-set { gap: 40px; padding-right: 40px; }
  .marquee-set img { height: 52px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .post-body { padding-inline: 22px; }
  .post-cover-wrap { padding: 0 22px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .pillar { opacity: 1; transform: none; }
}

/* ============ PRINT ============ */
@media print {
  .navbar, .footer, .cookie-banner, .carousel-btn, .carousel-dots, .post-actions { display: none !important; }
  body { color: #000; }
}
