/* ==========================================================================
   Castzo marketing site
   Tokens follow docs/website/02-design-system.md
   ========================================================================== */

:root {
  color-scheme: light;

  --brand-50: #f4f2fb;
  --brand-100: #eae7f7;
  --brand-200: #d9d3f0;
  --brand-300: #a79be0;
  --brand-400: #8a7ad6;
  --brand-500: #6a5bbf;
  --brand-600: #53449e;
  --brand-700: #3d3178;
  --brand-800: #302661;
  --brand-900: #241d4a;

  --gradient-brand: linear-gradient(135deg, #1fa2f2 0%, #6157e6 52%, #9a63f2 100%);
  --gradient-text: linear-gradient(135deg, #1479c9 0%, #53449e 55%, #7a4cc4 100%);

  --ok: #3e9b6b;
  --ok-soft: rgba(62, 155, 107, 0.12);
  --ok-ink: #2f7d55;
  --warn: #d99a3e;
  --warn-soft: rgba(217, 154, 62, 0.14);
  --warn-ink: #8a5a16;
  --danger: #c94f4b;
  --danger-soft: rgba(201, 79, 75, 0.12);
  --info: #3c7dd9;
  --info-soft: rgba(60, 125, 217, 0.12);

  --bg: #f7f6fb;
  --surface: #ffffff;
  --surface-2: #f1f0f8;
  --surface-3: #eae8f4;
  --text: #24223a;
  --text-muted: #67647e;
  --text-subtle: #6f6c86;
  --border: #e3e1ee;
  --border-subtle: #edebf5;
  --header-bg: rgba(255, 255, 255, 0.86);
  --overlay: rgba(24, 23, 36, 0.44);

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

  --shadow-sm: 0 1px 2px rgba(36, 34, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(36, 34, 58, 0.08);
  --shadow-lg: 0 24px 60px rgba(36, 34, 58, 0.12);
  --glow-brand: 0 20px 60px rgba(83, 68, 158, 0.22);

  --container: 1200px;
  --container-narrow: 760px;
  --container-wide: 1360px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

  --brand-50: rgba(154, 143, 224, 0.1);
  --brand-100: rgba(154, 143, 224, 0.16);
  --brand-200: rgba(154, 143, 224, 0.24);
  --brand-300: #b4a8ea;
  --brand-400: #a396e5;
  --brand-500: #9a8fe0;
  --brand-600: #9a8fe0;
  --brand-700: #b4a8ea;
  --brand-800: #c9c0f2;
  --brand-900: #ddd7f8;
  --gradient-text: linear-gradient(135deg, #6fd0ff 0%, #a99cf0 55%, #c9a6ff 100%);

  --ok-soft: rgba(72, 184, 128, 0.14);
  --ok-ink: #79d3a4;
  --warn-soft: rgba(217, 154, 62, 0.16);
  --warn-ink: #e5b46c;
  --danger-soft: rgba(242, 139, 135, 0.14);
  --info-soft: rgba(104, 158, 232, 0.16);

  --bg: #181724;
  --surface: #27263a;
  --surface-2: #232234;
  --surface-3: #2e2d44;
  --text: #f2f1f7;
  --text-muted: #a9a6bd;
  --text-subtle: #9a97ad;
  --border: #3b3a51;
  --border-subtle: #4a4862;
  --header-bg: rgba(24, 23, 36, 0.82);
  --overlay: rgba(8, 8, 14, 0.62);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.4);
  --glow-brand: 0 20px 60px rgba(97, 87, 230, 0.24);
}

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

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(97, 87, 230, 0.1), transparent 62%),
    radial-gradient(820px 480px at -8% 8%, rgba(31, 162, 242, 0.07), transparent 58%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid rgba(83, 68, 158, 0.42);
  outline-offset: 2px;
  border-radius: 6px;
}

html[data-theme="dark"] :focus-visible {
  outline-color: rgba(154, 143, 224, 0.55);
}

::selection {
  background: rgba(83, 68, 158, 0.24);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand-600);
  color: #fff;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}

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

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

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 48px, var(--container-wide));
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 48px, var(--container-narrow));
  margin-inline: auto;
}

.section {
  padding-block: 96px;
}

.section-tight {
  padding-block: 64px;
}

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

.section-head {
  max-width: 760px;
  margin-bottom: 44px;
}

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

.section-head h2 {
  margin: 12px 0 14px;
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.section-head p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}

.section-foot {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 0 4px var(--brand-50);
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.16s var(--ease), background 0.16s var(--ease),
    border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), color 0.16s var(--ease);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 10px 24px rgba(83, 68, 158, 0.22);
}

html[data-theme="dark"] .btn-primary {
  background: #6a5bbf;
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(83, 68, 158, 0.28);
}

html[data-theme="dark"] .btn-primary:hover {
  background: #7a6bd0;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-muted);
}

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

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  font-size: 14px;
  font-weight: 700;
}

.btn-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.18s var(--ease);
}

.btn-link:hover .icon {
  transform: translateX(3px);
}

.btn-sm {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-lg {
  height: 52px;
  padding: 0 26px;
  font-size: 15px;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none;
}

.btn[disabled]:hover,
.btn.is-disabled:hover {
  background: var(--brand-600);
}

/* ---------- Icon buttons / dropdowns ---------- */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn .icon {
  width: 19px;
  height: 19px;
}

.icon-btn .chevron {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.lang-toggle {
  width: auto;
  padding: 0 10px;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
}

.lang-toggle .lang-label {
  letter-spacing: 0.04em;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 224px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0.16s;
}

.dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--surface-2);
}

.dropdown-menu .menu-hint {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-subtle);
  line-height: 1.4;
}

.dropdown-menu .check {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--brand-600);
  opacity: 0;
}

.dropdown-menu [aria-checked="true"] .check,
.dropdown-menu .is-checked .check {
  opacity: 1;
}

.dropdown-divider {
  height: 1px;
  margin: 6px 8px;
  background: var(--border-subtle);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px rgba(36, 34, 58, 0.05);
}

html[data-theme="dark"] .site-header.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  line-height: 1;
  color: var(--text);
}

.brand-wordmark {
  display: block;
  width: auto;
  height: 23px;
  overflow: visible;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(83, 68, 158, 0.18);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 650;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link.is-active {
  background: var(--brand-50);
  color: var(--brand-600);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.header-download {
  margin-left: 4px;
}

.menu-toggle {
  display: none;
}

.lang-banner {
  border-bottom: 1px solid var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
}

.lang-banner[hidden] {
  display: none;
}

.lang-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 9px;
}

.lang-banner a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-weight: 800;
  color: var(--brand-700);
}

.lang-banner .icon {
  width: 15px;
  height: 15px;
}

/* ---------- Mobile drawer ---------- */

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 18px 22px 36px;
  background: var(--bg);
  overflow-y: auto;
  visibility: hidden;
  transform: translateX(102%);
  transition: transform 0.28s var(--ease), visibility 0.28s;
}

.mobile-drawer.is-open {
  visibility: visible;
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 4px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.drawer-nav a.is-active {
  color: var(--brand-600);
}

.drawer-nav a .icon {
  width: 18px;
  height: 18px;
  color: var(--text-subtle);
}

.drawer-section h3 {
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.segmented button,
.segmented a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.segmented .is-active {
  background: var(--surface);
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}

.drawer-download {
  margin-top: auto;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s;
}

.drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer-backdrop[hidden] {
  display: none;
}

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

.hero {
  position: relative;
  padding: 76px 0 64px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(2.65rem, 5.2vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero h1 .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 58ch;
  font-size: 18.5px;
  line-height: 1.68;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.hero-platforms span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-platforms .icon {
  width: 15px;
  height: 15px;
  color: var(--brand-600);
}

/* Hero visual */

.hero-visual {
  position: relative;
  min-height: 450px;
  isolation: isolate;
}

.hv-glow {
  position: absolute;
  inset: 4% -6% 2%;
  z-index: -1;
  border-radius: 50%;
  background: var(--gradient-brand);
  filter: blur(64px);
  opacity: 0.18;
}

html[data-theme="dark"] .hv-glow {
  opacity: 0.24;
}

.hv-card {
  position: absolute;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.hv-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.hv-card-head .icon {
  width: 15px;
  height: 15px;
  color: var(--brand-600);
}

.hv-sender {
  top: 18px;
  left: 0;
  width: 304px;
  transform: rotate(-1.6deg);
}

.hv-source {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.hv-source + .hv-source {
  margin-top: 7px;
}

.hv-source .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--text-subtle);
}

.hv-source .hv-source-meta {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
}

.hv-source.is-active {
  border-color: var(--brand-300);
  background: var(--brand-50);
  color: var(--brand-700);
}

.hv-source.is-active .icon {
  color: var(--brand-600);
}

.hv-source.is-active::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-600);
  margin-left: 2px;
}

.hv-receiver {
  right: 0;
  bottom: 24px;
  width: 330px;
  transform: rotate(1.6deg);
}

.hv-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(31, 162, 242, 0.4), transparent 55%),
    linear-gradient(135deg, #262142 0%, #4d3f9b 55%, #8a5cf0 100%);
}

.hv-screen::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.hv-screen::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 13%;
  width: 42%;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 16px 0 rgba(255, 255, 255, 0.38),
    0 32px 0 rgba(255, 255, 255, 0.26),
    0 48px 0 rgba(255, 255, 255, 0.18);
}

.hv-controls {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 5px;
}

.hv-controls span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.hv-controls span:nth-child(1) {
  background: rgba(255, 255, 255, 0.9);
}

.hv-controls span:nth-child(2) {
  background: rgba(62, 155, 107, 0.95);
}

.hv-link {
  position: absolute;
  left: 50%;
  top: 51%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.hv-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.hv-pulse::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  opacity: 0.5;
  animation: hv-pulse 2.2s var(--ease) infinite;
}

@keyframes hv-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  70%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.hv-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hv-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--brand-600);
}

.hv-chip-a {
  left: 6%;
  bottom: 14%;
}

.hv-chip-b {
  right: 8%;
  top: 11%;
}

/* ---------- Stats ---------- */

.stats-band {
  border-block: 1px solid var(--border-subtle);
  background: var(--surface);
}

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

.stat {
  padding: 30px 26px;
  border-right: 1px solid var(--border-subtle);
}

.stat:last-child {
  border-right: 0;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--brand-600);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.stat-note {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-subtle);
}

.stats-footnote {
  padding-bottom: 18px;
  font-size: 11.5px;
  color: var(--text-subtle);
}

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

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-600);
}

.card-icon .icon {
  width: 22px;
  height: 22px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 17.5px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 750;
}

.card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.68;
}

.card .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.card ul {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.card ul li {
  position: relative;
  padding-left: 18px;
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.63em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-300);
}

.card-feature:hover .card-icon {
  background: var(--brand-600);
  color: #fff;
}

/* ---------- Pills / badges ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill-available {
  background: var(--ok-soft);
  color: var(--ok-ink);
}

.pill-beta {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

.pill-planned {
  background: var(--brand-50);
  color: var(--brand-600);
}

.pill-unsupported {
  background: var(--surface-3);
  color: var(--text-muted);
}

.pill-vendor {
  background: var(--info-soft);
  color: var(--info);
}

.pill-evaluating {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

/* ---------- Scenario tabs ---------- */

.scenario-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  min-width: 0;
}

.scenario-tabs,
.scenario-panels,
.scenario-panel-inner,
.scene-visual {
  min-width: 0;
}

.scenario-tabs {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scenario-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  transition: background 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.scenario-tab .icon {
  width: 18px;
  height: 18px;
  color: var(--text-subtle);
}

.scenario-tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.scenario-tab[aria-selected="true"] {
  border-color: var(--border);
  background: var(--surface);
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}

.scenario-tab[aria-selected="true"] .icon {
  color: var(--brand-600);
}

.scenario-panel {
  display: none;
}

.scenario-panel.is-active {
  display: block;
  animation: fade-up 0.28s var(--ease);
}

.scenario-panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: center;
}

.scenario-copy h3 {
  margin-bottom: 10px;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
}

.scenario-label {
  margin-top: 18px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.scenario-copy p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.scenario-copy ul {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.scenario-copy ul li {
  position: relative;
  padding-left: 20px;
}

.scenario-copy ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.scenario-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.scene-visual {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(90% 90% at 20% 0%, rgba(31, 162, 242, 0.3), transparent 55%),
    linear-gradient(145deg, #272143 0%, #4b3d94 55%, #8a5cf0 100%);
  box-shadow: var(--shadow-lg);
}

.scene-visual::before {
  content: "";
  position: absolute;
  inset: 9% 7%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.scene-visual::after {
  content: "";
  position: absolute;
  left: 13%;
  top: 20%;
  width: 38%;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 22px 0 rgba(255, 255, 255, 0.4),
    0 44px 0 rgba(255, 255, 255, 0.28),
    0 66px 0 rgba(255, 255, 255, 0.2),
    0 88px 0 rgba(255, 255, 255, 0.14);
}

.scene-icon {
  position: absolute;
  right: 12%;
  bottom: 14%;
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

.scene-icon .icon {
  width: 42px;
  height: 42px;
}

.scene-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(20, 18, 34, 0.42);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.scene-chip .icon {
  width: 13px;
  height: 13px;
}

.scene-chip-a {
  left: 8%;
  bottom: 12%;
}

.scene-chip-b {
  right: 7%;
  top: 10%;
}

.scene-office {
  background:
    radial-gradient(90% 90% at 20% 0%, rgba(31, 162, 242, 0.34), transparent 55%),
    linear-gradient(145deg, #222647 0%, #3e4a9b 55%, #6f73e8 100%);
}

.scene-gaming {
  background:
    radial-gradient(90% 90% at 80% 0%, rgba(255, 94, 168, 0.26), transparent 55%),
    linear-gradient(145deg, #241c3d 0%, #5a2f8f 55%, #b451c8 100%);
}

.scene-home {
  background:
    radial-gradient(90% 90% at 20% 0%, rgba(255, 180, 80, 0.26), transparent 55%),
    linear-gradient(145deg, #2a2140 0%, #6b3a7d 55%, #d06b86 100%);
}

.scene-education {
  background:
    radial-gradient(90% 90% at 20% 0%, rgba(72, 200, 160, 0.28), transparent 55%),
    linear-gradient(145deg, #1e2b43 0%, #2f5d8f 55%, #4c9fbd 100%);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-card::after {
  content: "";
  position: absolute;
  top: 48px;
  right: -14px;
  width: 28px;
  height: 1px;
  background: var(--border);
}

.step-card:last-child::after {
  display: none;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
  border-radius: 9px;
  background: var(--brand-600);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

html[data-theme="dark"] .step-num {
  background: #6a5bbf;
}

.step-card h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.step-card p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.step-tag {
  display: inline-flex;
  margin-top: 14px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

/* ---------- Table ---------- */

.table-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.matrix th,
.matrix td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

.matrix th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.matrix td:first-child {
  font-weight: 650;
  color: var(--text);
}

.matrix tr:last-child td {
  border-bottom: 0;
}

.matrix tbody tr:hover td {
  background: var(--surface-2);
}

.matrix .pill {
  min-height: 21px;
}

.table-hint {
  display: none;
  padding: 10px 16px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-subtle);
  font-size: 11.5px;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: var(--text-subtle);
  font-size: 11.5px;
}

.matrix-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Download ---------- */

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.download-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.download-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.download-card-head .card-icon {
  margin: 0;
  flex-shrink: 0;
}

.download-card h3 {
  margin-bottom: 4px;
  font-size: 19px;
  letter-spacing: -0.015em;
}

.download-card .muted {
  color: var(--text-muted);
  font-size: 13px;
}

.role-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid var(--border-subtle);
}

.role-row-info {
  min-width: 0;
  flex: 1 1 190px;
}

.role-row-info strong {
  display: block;
  font-size: 14px;
}

.role-row-info span {
  display: block;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.role-row .btn {
  flex-shrink: 0;
}

.role-row .file-hint {
  display: block;
  width: 100%;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  box-shadow: var(--shadow-sm);
}

.version-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: install;
}

.install-step {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.install-step::before {
  counter-increment: install;
  content: counter(install);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.install-step p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Callouts ---------- */

.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-600);
  border-radius: 12px;
  background: var(--surface-2);
}

.callout .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--brand-600);
}

.callout strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13.5px;
}

.callout p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.callout-warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.callout-warn .icon {
  color: var(--warn-ink);
}

.callout-danger {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.callout-danger .icon {
  color: var(--danger);
}

.callout-ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.callout-ok .icon {
  color: var(--ok-ink);
}

/* ---------- FAQ ---------- */

.faq-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin-bottom: 32px;
}

.search {
  position: relative;
  flex: 1;
}

.search .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--text-subtle);
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

.search input::placeholder {
  color: var(--text-subtle);
}

.faq-group {
  margin-bottom: 34px;
}

.faq-group h2 {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.faq-item[open] {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.5;
  list-style: none;
}

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

.faq-item summary .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--text-subtle);
  transition: transform 0.2s var(--ease);
}

.faq-item[open] summary .icon {
  transform: rotate(180deg);
  color: var(--brand-600);
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.faq-answer p + p {
  margin-top: 8px;
}

.faq-empty {
  display: none;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  text-align: center;
  font-size: 14px;
}

.faq-empty.is-visible {
  display: block;
}

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

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(31, 162, 242, 0.34), transparent 55%),
    linear-gradient(135deg, #241d4a 0%, #4b3d94 52%, #7d4fd0 100%);
  color: #fff;
}

.cta-band::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -40%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(10px);
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 46px;
}

.cta-inner h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cta-inner p {
  margin-top: 8px;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.cta-inner .btn-primary {
  background: #fff;
  color: var(--brand-700);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.cta-inner .btn-primary:hover {
  background: #f4f2fb;
  color: var(--brand-800);
}

/* ---------- Page hero ---------- */

.page-hero {
  padding: 64px 0 40px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 16px 0 16px;
  font-size: clamp(2.2rem, 4.2vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.page-hero .lead {
  max-width: 68ch;
}

html[data-page="activate"] .page-hero {
  padding: 30px 0 18px;
}

html[data-page="activate"] .page-hero h1 {
  margin: 10px 0 12px;
}

html[data-page="activate"] .session-checkout {
  padding-top: 0;
}

html[data-activation-checkout] .page-hero,
html[data-activation-checkout] [data-activation-guide] {
  display: none;
}

html[data-activation-checkout] .session-checkout {
  padding: 32px 0 56px;
}

html[data-activation-checkout] .checkout-card {
  max-width: 680px;
  margin-inline: auto;
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.section-divider {
  height: 1px;
  background: var(--border-subtle);
}

/* ---------- Technology flow ---------- */

.tech-flow {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.flow-node {
  padding: 16px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: center;
}

.flow-node .icon {
  width: 22px;
  height: 22px;
  margin: 0 auto 6px;
  color: var(--brand-600);
}

.flow-node strong {
  display: block;
  font-size: 12.5px;
}

.flow-node span {
  display: block;
  margin-top: 2px;
  color: var(--text-subtle);
  font-size: 10.5px;
}

.flow-arrow {
  color: var(--text-subtle);
}

.flow-arrow .icon {
  width: 18px;
  height: 18px;
}

.flow-fallback {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  border: 1px dashed var(--brand-300);
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 700;
}

.flow-fallback .icon {
  width: 16px;
  height: 16px;
}

/* ---------- Details / advanced ---------- */

.advanced {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

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

.advanced summary .icon {
  width: 17px;
  height: 17px;
  color: var(--text-subtle);
  transition: transform 0.2s var(--ease);
}

.advanced[open] summary .icon {
  transform: rotate(180deg);
}

.advanced-body {
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.advanced-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------- About ---------- */

.about-mission {
  max-width: 880px;
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  line-height: 1.45;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.about-mission .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.contact-card h3 {
  margin-bottom: 4px;
  font-size: 18px;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 13.5px;
}

.contact-card a {
  color: var(--brand-600);
  font-weight: 700;
}

/* ---------- 404 ---------- */

.error-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: 80px 0;
  text-align: center;
}

.error-page .error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page h1 {
  margin: 18px 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.error-page p {
  max-width: 44ch;
  color: var(--text-muted);
}

.error-page .btn {
  margin-top: 26px;
}

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

.site-footer {
  margin-top: 96px;
  padding: 56px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.footer-brand .footer-note {
  margin-top: 10px;
  color: var(--text-subtle);
  font-size: 11.5px;
}

.footer-col h3 {
  margin: 4px 0 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-col a:hover {
  color: var(--brand-600);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-subtle);
  font-size: 11.5px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal a:hover {
  color: var(--brand-600);
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    width: min(100%, 620px);
    min-height: 470px;
    margin-inline: auto;
  }

  .nav {
    display: none;
  }

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

  .header-download {
    display: none;
  }
}

@media (max-width: 1024px) {
  .section {
    padding-block: 76px;
  }

  .scenario-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .scenario-tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .scenario-tabs::-webkit-scrollbar {
    display: none;
  }

  .scenario-tab {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .scenario-panel-inner {
    grid-template-columns: 1fr;
  }

  .scene-visual {
    min-height: 290px;
    order: -1;
  }

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

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

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

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

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

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

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .step-card::after {
    display: none;
  }

  .download-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .install-steps {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 62px;
  }

  .container,
  .container-wide,
  .container-narrow {
    width: min(100% - 32px, var(--container));
  }

  body {
    font-size: 15px;
  }

  .brand {
    gap: 10px;
  }

  .brand-wordmark {
    height: 20px;
  }

  .section {
    padding-block: 62px;
  }

  .section-tight {
    padding-block: 44px;
  }

  .hero {
    padding: 48px 0 44px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 10vw, 3rem);
  }

  .hero-lead {
    font-size: 16.5px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 420px;
  }

  .hv-sender {
    width: 250px;
    left: 2%;
  }

  .hv-receiver {
    width: 268px;
    right: 0;
  }

  .hv-chip {
    display: none;
  }

  .hv-link {
    font-size: 9px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding: 22px 18px;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle);
  }

  .stat:last-child {
    border-bottom: 0;
  }

  .table-hint {
    display: block;
  }

  .page-hero {
    padding: 44px 0 28px;
  }

  .cta-inner {
    padding: 32px 24px;
  }

  .cta-inner .btn {
    width: 100%;
  }

  .scenario-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .scenario-tab {
    width: 100%;
    white-space: normal;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-banner .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .tech-flow {
    padding: 18px;
  }

  .faq-item summary {
    padding: 15px 16px;
    font-size: 14px;
  }

  .faq-answer {
    padding: 0 16px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Utility / theme icons ---------- */

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

.icon {
  flex-shrink: 0;
}

html[data-theme="light"] .theme-icon-dark,
html[data-theme="dark"] .theme-icon-light {
  display: none;
}

.version-badge:empty {
  display: none;
}

html[data-theme="dark"] .cta-inner .btn-primary {
  background: #fff;
  color: #3d3178;
}

html[data-theme="dark"] .cta-inner .btn-primary:hover {
  background: #f4f2fb;
  color: #302661;
}

@media (max-width: 640px) {
  .header-lang {
    display: none;
  }
}

/* Mobile drawer: keep the closed panel inside the viewport to avoid horizontal overflow */
.mobile-drawer {
  transform: none;
  opacity: 0;
  transition: opacity 0.24s var(--ease), visibility 0.24s;
}

.mobile-drawer.is-open {
  opacity: 1;
}

@media (max-width: 640px) {
  .hv-sender {
    width: 246px;
    left: 0;
  }

  .hv-receiver {
    width: 260px;
    right: 2px;
  }
}

.contact-card .btn-primary {
  color: #fff;
}

html[data-theme="dark"] .pill-planned {
  color: var(--brand-700);
}

/* ---------- Pricing / activation ---------- */

.pricing-grid {
  align-items: stretch;
}

.pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

.pricing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pricing-card .price {
  margin: 12px 0 6px;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--brand-600);
}

.pricing-card .price small {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
}

.pricing-card > ul {
  flex: 1;
}

.pricing-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.pricing-actions .btn {
  width: 100%;
}

.pricing-actions .pricing-link {
  justify-content: center;
}

.pricing-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.activation-steps {
  counter-reset: act;
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 0;
  list-style: none;
}

.activation-steps li {
  position: relative;
  padding-left: 32px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.activation-steps li::before {
  counter-increment: act;
  content: counter(act);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.matrix.compare {
  white-space: normal;
}

.matrix.compare td,
.matrix.compare th {
  vertical-align: top;
}

@media (max-width: 640px) {
  .pricing-card .price {
    font-size: 28px;
  }
}

.session-checkout[hidden] {
  display: none;
}

.checkout-card {
  padding: 28px;
  border: 1px solid var(--brand-200);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.checkout-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.checkout-head h2 {
  margin: 4px 0 8px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.checkout-head p {
  margin: 0;
}

.checkout-receiver {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  margin: 20px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt, var(--brand-50));
  font-size: 13px;
  color: var(--text-muted);
}

.checkout-receiver strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.checkout-steps {
  margin: 18px 0;
}

.checkout-form {
  max-width: none;
}

.checkout-form .btn {
  align-self: stretch;
}

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

.checkout-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .checkout-card {
    padding: 20px;
  }

  .checkout-head {
    gap: 12px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Order / activation forms ---------- */

.order-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 780px;
}

.order-form-status {
  max-width: 460px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.field input:focus,
.field select:focus {
  outline: 3px solid rgba(83, 68, 158, 0.25);
  border-color: var(--brand-300);
}

.order-form .btn {
  align-self: flex-start;
}

.order-result {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.order-result[hidden] {
  display: none;
}

.order-result h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.order-result .order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 14px 0;
}

.order-result .order-grid div {
  color: var(--text-muted);
  font-size: 13px;
}

.order-result .order-grid strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.order-result textarea {
  width: 100%;
  min-height: 100px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  resize: vertical;
}

.order-result .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.order-result .order-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.order-result .order-note.error {
  color: var(--danger);
}

@media (max-width: 640px) {
  .form-grid,
  .order-result .order-grid {
    grid-template-columns: 1fr;
  }
}
