/* ============================================
   mobaXterm — client site design system
   Single light theme.
   Token-based: colors / spacing / radius / elevation / type.
   ============================================ */

/* ============ TOKENS ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f8fa;
  --bg-muted: #eef3f6;
  --surface: #ffffff;
  --surface-2: #f4f7f9;
  --surface-3: rgba(31, 45, 61, 0.05);
  --border: rgba(31, 45, 61, 0.10);
  --border-strong: rgba(31, 45, 61, 0.20);

  --text: #1f2d3d;
  --text-muted: #54667a;   /* AA on white */
  --text-dim: #8494a3;

  --primary: #4fc3d9;       /* cyan — brand accent */
  --primary-2: #3bb3cc;     /* hover */
  --primary-strong: #148aa6;/* cyan readable as text on light bg */
  --primary-soft: rgba(79, 195, 217, 0.14);
  --primary-text: #122530;  /* dark text on cyan fills */

  --accent: #f39c12;        /* orange — CTA */
  --accent-2: #dd8b0a;
  --accent-soft: rgba(243, 156, 18, 0.14);
  --accent-text: #3d2704;   /* dark text on orange fills */

  --warning: #f39c12;
  --danger: #d64541;
  --success: #1d9e75;
  --link: #148aa6;

  --shadow-sm: 0 1px 2px rgba(31, 45, 61, 0.07);
  --shadow-md: 0 6px 18px rgba(31, 45, 61, 0.09);
  --shadow-lg: 0 20px 44px rgba(31, 45, 61, 0.13);
  --shadow-xl: 0 32px 64px rgba(31, 45, 61, 0.18);
  --glow-primary: 0 8px 30px rgba(79, 195, 217, 0.35);
  --glow-accent: 0 8px 30px rgba(243, 156, 18, 0.30);

  --navbar-bg: rgba(255, 255, 255, 0.82);
  --navbar-text: #1f2d3d;
  --footer-bg: #16222e;
  --footer-text: #e6edf3;

  --code-bg: #16222e;
  --code-text: #7fd8ea;

  --grid-line: rgba(31, 45, 61, 0.055);
  --hero-glow-1: rgba(79, 195, 217, 0.20);
  --hero-glow-2: rgba(243, 156, 18, 0.10);
}

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

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

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-med: 280ms;

  --nav-h: 68px;
}

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

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 820px; }

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

/* Sections */
.section { padding: var(--space-24) 0; }
.section-tight { padding: var(--space-16) 0; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--border); }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; }
h3, h4 { font-weight: 700; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  padding: 6px 14px;
  border-radius: var(--r-pill);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.section-head { max-width: 720px; margin: 0 auto var(--space-16); text-align: center; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.06rem; }
.section-head.left { margin-inline: 0; text-align: left; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); line-height: 1.7; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) ease,
              border-color var(--dur-fast) ease,
              color var(--dur-fast) ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-accent), var(--shadow-md);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--primary-strong);
  box-shadow: var(--shadow-md);
}

.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-3); }

.btn-lg { padding: 15px 30px; font-size: 1rem; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.btn .btn-arrow, .btn svg { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

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

/* ============ NAVBAR ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-med) ease, background-color 0.25s ease;
}
.navbar.is-scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand-logo {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out);
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.05); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-x { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 13px;
  border-radius: var(--r-sm);
  position: relative;
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-3); }
.nav-links a.active { color: var(--primary-strong); font-weight: 600; background: var(--primary-soft); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-2) 100%);
  color: var(--primary-text) !important;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: var(--glow-primary); }
.nav-cta-icon { width: 15px; height: 15px; }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  place-items: center;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background-color var(--dur-fast) ease;
}
.menu-toggle:hover { background: var(--surface-2); }

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 0 var(--space-24);
  /* Single theme-color wash behind the title, fading to transparent
     right where the video begins. Adapts to light/dark via color-mix. */
  background:
    linear-gradient(100deg,
      color-mix(in srgb, var(--accent) 30%, var(--bg)) 0%,
      color-mix(in srgb, var(--accent) 12%, var(--bg)) 34%,
      color-mix(in srgb, var(--accent) 0%, var(--bg)) 58%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Minimal diagonal hatch, visible only inside the colored zone */
  background-image:
    repeating-linear-gradient(45deg,
      color-mix(in srgb, var(--text) 9%, transparent) 0 1px, transparent 1px 12px);
  -webkit-mask-image: linear-gradient(100deg, black 0%, transparent 56%);
  mask-image: linear-gradient(100deg, black 0%, transparent 56%);
  pointer-events: none;
}
.hero .container { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
/* Full-bleed hero: exactly one screen tall, text anchored left, right
   media owns half of the browser window from navbar to hero bottom. */
@media (min-width: 1021px) {
  .hero {
    height: calc(100vh - var(--nav-h)); /* one screen minus the sticky navbar */
    min-height: 560px;
    padding: 0;
    display: flex;
  }
  .hero .hero-grid {
    flex: 1;
    height: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding-left: clamp(24px, 4vw, 64px);
    padding-right: 0;
    gap: 0; /* media's left edge sits exactly at the viewport middle */
  }
  .hero .hero-grid > div:first-child {
    padding-top: 0; /* grid centers the text vertically */
    padding-right: clamp(32px, 4vw, 56px);
    max-width: 560px; /* text block anchors left; open air before the video */
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 0 0 18px;
}
.hero p.lead { margin-bottom: 30px; max-width: 34rem; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

/* Hero visual: animated live demo, plain flush rectangle — no radius,
   no border, no shadow, no overlays */
.hero-media {
  position: relative;
  aspect-ratio: 1040 / 700;
}
@media (min-width: 1021px) {
  /* Pinned to the full-bleed hero grid (position: relative): top flush to
     the navbar, right edge flush, left edge exactly at the screen middle,
     bottom edge on the same line as the bottom of the title/content row. */
  .hero-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    aspect-ratio: auto;
    min-height: 0;
  }
  .hero-media img { width: 100%; height: 100%; }
  /* Seam glow: transparent → solid page-bg → transparent, centered exactly
     on the border between the title side and the video (theme-adaptive). */
  .hero-media::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -18%;
    width: 36%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg,
      transparent 0%,
      transparent 0%,
      var(--bg) 52%,
      transparent 100%);
  }
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-float { animation: heroFloat 7s ease-in-out infinite; }
  @keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }
}

/* Hero entrance (staggered via .hero-in) */
.hero-in { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .hero-in {
    animation: heroIn 0.7s var(--ease-out) forwards;
    animation-delay: var(--in-delay, 0ms);
  }
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-in { opacity: 1; }
}

/* ============ PILLARS CAROUSEL ============ */
.pillars-carousel-wrap { position: relative; }
.pillars-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pillars-viewport {
  flex: 1;
  overflow: hidden;
  padding: 20px 0;
}
.pillars {
  display: flex;
  gap: 20px;
  transition: transform 0.6s var(--ease-out);
  will-change: transform;
}
.pillar {
  flex: 0 0 clamp(260px, 32%, 340px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  opacity: 0.45;
  transform: scale(0.96);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out),
              border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
.pillar.is-active {
  opacity: 1;
  transform: scale(1);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: var(--shadow-md);
}
.pillar-ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  margin-bottom: 18px;
}
.pillar h3 { font-size: 1.08rem; margin-bottom: 8px; }
.pillar p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.carousel-btn {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-fast) var(--ease-out);
}
.carousel-btn:hover {
  color: var(--primary-strong);
  border-color: var(--primary);
  transform: scale(1.06);
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: var(--r-pill);
  background: var(--border-strong);
  transition: width var(--dur-med) var(--ease-out), background-color var(--dur-med) ease;
}
.carousel-dot.is-active { width: 26px; background: var(--primary); }

/* ============ FEATURES GRID ============ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-group-title {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-strong);
  padding-top: 22px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.feature-group-title:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med) ease;
}
.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.feature .ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary-strong);
  background: var(--primary-soft);
  margin-bottom: 16px;
  transition: transform var(--dur-med) var(--ease-out), background-color var(--dur-med) ease;
}
.feature:hover .ico {
  transform: scale(1.08) rotate(-4deg);
  background: color-mix(in srgb, var(--primary) 24%, transparent);
}
.feature h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.feature code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ============ CTA ============ */
.cta {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(560px 260px at 85% 0%, rgba(93, 212, 237, 0.14), transparent 70%),
    linear-gradient(160deg, #1b2b3c 0%, #111d29 100%);
  color: #e6edf3;
  border-radius: var(--r-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-bottom: 12px; }
.cta p { color: #9db0c0; max-width: 34rem; margin: 0 auto 28px; font-size: 1.05rem; }
.cta .actions { justify-content: center; }
.cta .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #e6edf3;
}
.cta .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.cta-video {
  max-width: 760px;
  margin: 34px auto 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-xl);
}
.cta-video video { width: 100%; display: block; }

/* ============ PAGE HERO (inner pages) ============ */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0 var(--space-16);
  background:
    radial-gradient(600px 280px at 78% -20%, var(--hero-glow-1), transparent 70%);
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 0%, black 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 90% at 50% 0%, black 20%, transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 16px; max-width: 22ch; }
.page-hero .lead { max-width: 44rem; }
.page-hero a { color: var(--primary-strong); font-weight: 600; }
.page-hero a:hover { text-decoration: underline; }

/* ============ PILL TABS ============ */
.platform-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.pill-btn {
  padding: 9px 20px;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.pill-btn:hover { color: var(--text); }
.pill-btn.active {
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: var(--shadow-sm);
}

/* ============ DOWNLOAD CARDS ============ */
.dl-card {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med) ease;
}
.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.dl-card.featured {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background:
    radial-gradient(400px 160px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  padding: 30px;
  box-shadow: var(--shadow-md);
}
.dl-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  padding: 5px 14px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}
.dl-icon {
  width: 60px; height: 60px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
}
.dl-info { flex: 1; min-width: 0; }
.dl-info h3 { font-size: 1.08rem; margin-bottom: 6px; }
.dl-info p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }
.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.dl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.dl-card .btn { flex-shrink: 0; }

.dl-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dl-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.help-grid h4 { font-size: 0.98rem; margin-bottom: 6px; }
.help-grid p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}

/* ============ BLOG LIST ============ */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.posts { display: grid; gap: 20px; }

.post {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med) ease;
}
.post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.post-thumb {
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--primary-soft), var(--surface-2));
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  align-self: center;
  font-size: 2rem;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.post:hover .post-thumb img { transform: scale(1.05); }

.post-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary-strong);
  background: var(--primary-soft);
  padding: 4px 11px;
  border-radius: var(--r-pill);
  margin-bottom: 10px;
}
.post h3 { font-size: 1.12rem; margin-bottom: 6px; }
.post h3 a { transition: color var(--dur-fast) ease; }
.post h3 a:hover { color: var(--primary-strong); }
.post > div > p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 12px; }
.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.post-stat { display: inline-flex; align-items: center; gap: 4px; }

.sidebar { display: grid; gap: 20px; position: sticky; top: calc(var(--nav-h) + 20px); }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h4 { font-size: 0.98rem; margin-bottom: 14px; }
.sidebar-card input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.sidebar-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  transition: all var(--dur-fast) ease;
}
.tag-cloud a:hover { color: var(--primary-strong); border-color: var(--primary); }

/* ============ BLOG POST PAGE ============ */
.post-hero {
  padding: clamp(48px, 7vw, 84px) 0 var(--space-12);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(600px 260px at 80% -20%, var(--hero-glow-1), transparent 70%);
}
.post-hero .back-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--dur-fast) ease, gap var(--dur-fast) var(--ease-out);
}
.post-hero .back-link:hover { color: var(--primary-strong); gap: 9px; }
.post-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin: 18px 0 24px;
  max-width: 24ch;
}
.post-author { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-text);
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-img { object-fit: cover; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.post-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease-out);
}
.post-action:hover { border-color: var(--primary); color: var(--primary-strong); transform: translateY(-1px); }
.post-action svg { width: 16px; height: 16px; }
.post-action.is-liked { color: #e25563; border-color: #e25563; }
.post-action.is-liked svg { fill: #e25563; }
.post-action.is-copied { color: var(--success); border-color: var(--success); }

.post-cover-wrap {
  max-width: 900px;
  margin: var(--space-12) auto 0;
  padding: 0 24px;
}
.post-cover {
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.post-body {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-12) 24px var(--space-16);
  font-size: 1.04rem;
  line-height: 1.8;
}
.post-body h2 { font-size: 1.55rem; margin: 44px 0 14px; }
.post-body h3 { font-size: 1.25rem; margin: 34px 0 12px; }
.post-body p { margin-bottom: 18px; }
.post-body a { color: var(--link); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { margin: 0 0 18px 22px; }
.post-body li { margin-bottom: 8px; }
.post-body img { border-radius: var(--r-md); border: 1px solid var(--border); margin: 26px 0; }
.post-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 6px 0 6px 20px;
  margin: 26px 0;
  color: var(--text-muted);
  font-style: italic;
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-3);
  padding: 2px 7px;
  border-radius: 6px;
}
.post-body pre {
  background: var(--code-bg);
  color: #d7e5ef;
  padding: 20px 22px;
  border-radius: var(--r-md);
  overflow-x: auto;
  margin: 26px 0;
  font-size: 0.87rem;
  line-height: 1.6;
}
.post-body pre code { background: none; padding: 0; color: var(--code-text); }

/* ============ FAQ ============ */
.faq-category { max-width: 800px; margin: 0 auto var(--space-12); }
.faq-cat-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq-cat-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
.faq-item[open] {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: var(--shadow-md);
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: color var(--dur-fast) ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--primary-strong); }
.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform var(--dur-med) var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(225deg); }
.faq-item > p, .faq-item .faq-answer {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
}
.faq-item .faq-answer { overflow: hidden; }
.faq-item code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 5px;
}
.faq-item a { color: var(--link); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-h {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.contact-h::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.info-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.info-card[hidden] { display: none; }
.info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.info-card .ico {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary-strong);
  background: var(--primary-soft);
}
.info-card h4 { font-size: 0.95rem; margin-bottom: 3px; }
.info-card p { color: var(--text-muted); font-size: 0.88rem; }
.info-card a { color: inherit; transition: color var(--dur-fast) ease; }
.info-card a:hover { color: var(--primary-strong); }

/* Forms */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: grid; gap: 7px; }
.form-group label { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-note { color: var(--text-dim); font-size: 0.84rem; }

/* ============ ABOUT ============ */
.story-block h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 20px; }
.story-block p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.75; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.principle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.principle:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.principle .num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.principle h3 { font-size: 1.02rem; margin-bottom: 8px; }
.principle p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

.stats-band {
  background: linear-gradient(160deg, #1b2b3c 0%, #111d29 100%);
  color: #e6edf3;
  border-block: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-tile .num {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--primary), #9be5f2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-tile .lbl {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fa5b5;
  margin-top: 6px;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-24);
}
.footer .brand { color: #ffffff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.footer-brand p {
  color: #8fa5b5;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 14px 0 18px;
  max-width: 30rem;
}
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #8fa5b5;
  transition: all var(--dur-fast) var(--ease-out);
}
.socials a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.socials svg { width: 17px; height: 17px; }

.footer h5 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c3d2df;
  margin-bottom: 16px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a:not(.brand) {
  color: #8fa5b5;
  font-size: 0.9rem;
  transition: color var(--dur-fast) ease;
}
.footer-grid a:not(.brand):hover { color: var(--primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: var(--space-8);
  color: #6b7f92;
  font-size: 0.85rem;
}
.footer-bottom .legal { display: flex; gap: 22px; }
.footer-bottom .legal a { color: #8fa5b5; transition: color var(--dur-fast) ease; }
.footer-bottom .legal a:hover { color: var(--primary); }
/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 24px);
  width: min(680px, calc(100% - 32px));
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}
.cookie-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-xl);
}
.cookie-text { flex: 1; font-size: 0.86rem; color: var(--text-muted); line-height: 1.55; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-actions .btn { padding: 10px 20px; font-size: 0.88rem; }

/* ============ SCROLL REVEAL ============ */
[data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  [data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pillars { transition: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero p.lead { max-width: none; }
  /* Stacked hero: demo spans the full screen width below the text */
  .hero-media {
    width: calc(100% + 48px);
    margin-inline: -24px;
    aspect-ratio: 16 / 11;
  }
  .features { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .menu-toggle { display: grid; }

  .nav-links {
    position: absolute;
    top: calc(var(--nav-h));
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 18px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--dur-med) ease, transform var(--dur-med) var(--ease-out);
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }

  .nav-cta-label { display: none; }
  .nav-cta { padding: 10px 12px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .help-grid { grid-template-columns: 1fr; }
  .pillar { flex-basis: clamp(240px, 78%, 320px); }
  .carousel-btn { display: none; }
}

@media (max-width: 620px) {
  .features { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post-thumb { aspect-ratio: 16 / 8; }
  .dl-card { flex-direction: column; align-items: flex-start; }
  .dl-card .btn { align-self: stretch; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-actions { justify-content: center; }
  .cta { padding: 36px 22px; }
}
