/* ============================================================
   OrangeRouter — design system
   Style: Minimalism / Swiss grid, developer-tool tone
   Brand orange retained; light theme primary, dark code surfaces
   Typography: Inter (UI) + JetBrains Mono (code/technical)
   ============================================================ */

:root {
  /* Brand — orange */
  --orange-50: #fff8f3;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --orange-800: #9a3412;

  /* Neutral — warm-tinted slate */
  --gray-50: #fafaf9;
  --gray-100: #f4f4f3;
  --gray-200: #e7e5e4;
  --gray-300: #d6d3d1;
  --gray-400: #a8a29e;
  --gray-500: #78716c;
  --gray-600: #57534e;
  --gray-700: #44403c;
  --gray-800: #292524;
  --gray-900: #1c1917;

  /* Code / dark surface */
  --code-bg: #1a1b26;
  --code-bg-2: #16161e;
  --code-fg: #c0caf5;
  --code-muted: #737aa2;
  --code-orange: #ff9e64;

  /* Semantic */
  --ink: var(--gray-900);
  --ink-soft: var(--gray-700);
  --ink-mute: var(--gray-500);
  --line: var(--gray-200);
  --surface: #ffffff;
  --surface-soft: var(--gray-50);

  /* System */
  --max-width: 980px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-xs: 0 1px 2px 0 rgb(28 25 23 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(28 25 23 / 0.08), 0 1px 2px -1px rgb(28 25 23 / 0.08);
  --shadow-md: 0 6px 16px -4px rgb(28 25 23 / 0.10), 0 2px 6px -2px rgb(28 25 23 / 0.08);
  --shadow-lg: 0 20px 40px -12px rgb(28 25 23 / 0.18), 0 8px 16px -8px rgb(28 25 23 / 0.10);
  --shadow-orange: 0 10px 30px -8px rgb(249 115 22 / 0.40);

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

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Google Fonts — swap to avoid FOIT */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: local("Inter");
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-feature-settings: "cv11", "ss01";
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background:
    radial-gradient(60rem 40rem at 100% -10%, var(--orange-50), transparent 60%),
    radial-gradient(50rem 40rem at -10% 0%, #fff7ed, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--gray-50) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Accessibility: focus + reduced motion ---------- */
:focus-visible {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Screen-reader-only utility (keep an h1 for SEO/a11y where the logo is an image) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a,
.btn,
.site-nav a,
.lang-switch a {
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Entrance ---------- */
main {
  animation: rise 0.5s var(--ease);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

a {
  color: var(--orange-600);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--orange-700);
}

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

::selection {
  background: var(--orange-200);
  color: var(--gray-900);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

/* PNG wordmark logo (OrangeRouter.png, opaque white background) */
.logo-img {
  height: 1.75rem;
  width: auto;
  flex-shrink: 0;
  display: block;
  /* The PNG carries its own white background; round it so it reads as a chip
     on any tinted surface rather than a hard rectangle. */
  border-radius: var(--radius-sm);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  gap: 0.25rem 0.125rem;
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  color: var(--ink-mute);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--gray-100);
}

.site-nav a.active {
  color: var(--orange-700);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--orange-600), var(--orange-400));
}

.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-switch a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.lang-switch a:hover {
  color: var(--ink);
}

.lang-switch [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.lang-switch .sep {
  user-select: none;
  color: var(--gray-300);
}

/* ============================================================
   Layout primitives
   ============================================================ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.25rem 1.5rem 5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-700);
  margin: 0 0 1rem;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--orange-400);
}

.section {
  margin-bottom: 3.5rem;
}

.section:last-child {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
}

.section-head .count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-400);
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.25rem;
  line-height: 1.25;
}

.section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.section p,
.section li {
  color: var(--ink-soft);
  font-size: 1.0125rem;
  line-height: 1.7;
}

.section p {
  margin: 0 0 1rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Hero / intro (home)
   ============================================================ */
.hero {
  padding: 0 0 2rem;
}

.hero-compact {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.hero-compact h1 {
  font-size: 1.875rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-compact .lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-mute);
  max-width: 56ch;
}

.intro {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) 1fr;
  gap: 2.5rem 3.5rem;
  align-items: center;
  padding: 1rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}

/* Hero logo — the PNG is opaque white, so sit it on white and give it a soft
   card so the white square reads as intentional, not a stray background. */
.brand-mark {
  width: 100%;
  max-width: 13rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand-mark:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.tagline {
  margin: 0 0 1.75rem;
  font-size: 1.2rem;
  color: var(--ink-mute);
  line-height: 1.5;
  font-weight: 400;
  max-width: 34rem;
}

.intro-body {
  margin: 0 0 2rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.intro-body p {
  margin: 0 0 1rem;
}

.intro-body p:last-child {
  margin-bottom: 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn .ic {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange-600), var(--orange-500));
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: var(--shadow-orange);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--orange-300);
  color: var(--orange-700);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Feature / value cards
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  position: relative;
  padding: 1.5rem 1.5rem 1.625rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange-500), var(--orange-700));
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

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

.card:hover::before {
  opacity: 1;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--orange-100), var(--orange-50));
  color: var(--orange-700);
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.card-num {
  position: absolute;
  top: 1.1rem;
  right: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray-300);
  letter-spacing: 0.08em;
}

/* ============================================================
   Flow diagram (visual)
   ============================================================ */
.flow {
  margin-top: 0.5rem;
  padding: 1.75rem 1.5rem;
  background:
    radial-gradient(30rem 12rem at 50% -50%, var(--orange-50), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.flow-caption {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--gray-400);
}

.flow-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.flow-node {
  flex: 1 1 7rem;
  min-width: 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  background: var(--surface-soft);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-align: center;
}

.flow-node svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gray-600);
}

.flow-node .name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.flow-node .sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gray-400);
}

.flow-node.is-core {
  background: linear-gradient(135deg, var(--orange-600), var(--orange-500));
  border-color: transparent;
  box-shadow: var(--shadow-orange);
}

.flow-node.is-core svg,
.flow-node.is-core .name,
.flow-node.is-core .sub {
  color: #fff;
}

.flow-node.is-fanout {
  border-style: dashed;
}

.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--gray-300);
  font-family: var(--font-mono);
}

.flow-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

.flow-fanout {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1.2 1 9rem;
  min-width: 9rem;
}

.flow-fanout .flow-node {
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  min-width: 0;
}

.flow-fanout .flow-node svg {
  width: 1.1rem;
  height: 1.1rem;
}

.flow-fanout .flow-node .name {
  font-size: 0.8rem;
}

/* ============================================================
   Comparison list (distinction cards)
   ============================================================ */
.compare {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.compare li {
  display: grid;
  grid-template-columns: minmax(9rem, 11rem) 1fr;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding: 1.1rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.compare li:hover {
  border-color: var(--orange-200);
}

.compare .term {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9375rem;
}

.compare .term svg {
  width: 1rem;
  height: 1rem;
  color: var(--gray-400);
  flex-shrink: 0;
}

.compare .diff {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--surface);
  margin: 0;
}

th,
td {
  padding: 0.9rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.15s var(--ease);
}

tbody tr:hover {
  background: var(--orange-50);
}

th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--ink-mute);
  background: var(--surface-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

td {
  color: var(--ink-soft);
}

td:first-child {
  color: var(--ink);
  font-weight: 600;
}

td em {
  font-style: normal;
  color: var(--orange-700);
  font-weight: 500;
}

/* ============================================================
   Step list (lifecycle)
   ============================================================ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1rem;
  padding: 0.25rem 0;
  color: var(--ink-soft);
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--orange-600);
  background: var(--orange-50);
  border: 1px solid var(--orange-200);
  border-radius: var(--radius-sm);
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.steps li strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Module chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-mute);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

.chip-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--orange-400);
}

/* ============================================================
   Bullet lists
   ============================================================ */
ul,
ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

ul li,
ol li {
  margin-bottom: 0.5rem;
}

ul li:last-child,
ol li:last-child {
  margin-bottom: 0;
}

/* prose list with icon markers */
.icon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.icon-list li {
  position: relative;
  padding-left: 1.85rem;
  margin: 0;
  color: var(--ink-soft);
}

.icon-list li svg {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--orange-500);
  flex-shrink: 0;
}

.icon-list li strong {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   Callouts (note / warn / honest)
   ============================================================ */
.callout {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.85rem;
  padding: 1.1rem 1.35rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange-400);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--orange-50), var(--surface));
  font-size: 0.9375rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-xs);
}

.callout svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--orange-600);
  margin-top: 0.15rem;
}

.callout p {
  margin: 0;
}

.callout.is-muted {
  border-left-color: var(--gray-300);
  background: var(--surface-soft);
}

.callout.is-muted svg {
  color: var(--gray-500);
}

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

/* inline code */
code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--gray-100);
  color: var(--orange-700);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--gray-200);
}

/* ============================================================
   Architecture stack (ASCII, dark)
   ============================================================ */
.arch-stack {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  background:
    radial-gradient(20rem 10rem at 80% 0%, rgba(249, 115, 22, 0.08), transparent 70%),
    linear-gradient(160deg, var(--code-bg), var(--code-bg-2));
  color: var(--code-fg);
  padding: 1.5rem 1.75rem;
  border: 1px solid #2a2c3e;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  white-space: pre;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow-sm);
  margin: 0;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.code-head .dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--gray-300);
}

.code-head .dot:nth-child(1) {
  background: #ff5f57;
}
.code-head .dot:nth-child(2) {
  background: #febc2e;
}
.code-head .dot:nth-child(3) {
  background: #28c840;
}

.code-head .file {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--code-muted);
}

/* ============================================================
   Badge
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--orange-100), var(--orange-50));
  color: var(--orange-700);
  border: 1px solid var(--orange-200);
  border-radius: 999px;
}

.badge .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* ============================================================
   Contact card
   ============================================================ */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  text-decoration: none;
  color: var(--ink);
}

.contact-card:hover {
  border-color: var(--orange-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.contact-card .ic-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--orange-100), var(--orange-50));
  color: var(--orange-700);
  flex-shrink: 0;
}

.contact-card .ic-box svg {
  width: 1.5rem;
  height: 1.5rem;
}

.contact-card .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

.contact-card .value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.contact-card .arrow {
  margin-left: auto;
  color: var(--gray-400);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

.contact-card:hover .arrow {
  transform: translateX(3px);
  color: var(--orange-600);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem 3rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 2rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 600;
}

.footer-brand .footer-logo {
  height: 1.4rem;
  width: auto;
  border-radius: var(--radius-sm);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

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

.footer-meta a:hover {
  color: var(--orange-600);
}

.footer-meta .copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gray-400);
}

.footer-version {
  justify-self: end;
  text-align: right;
}

.footer-version .ver {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gray-400);
}

.footer-version .nav {
  display: flex;
  gap: 1rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-version .nav a {
  font-size: 0.82rem;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-version .nav a:hover {
  color: var(--orange-600);
}

/* ============================================================
   404 / error
   ============================================================ */
.error-page {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--gray-900), var(--orange-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-page p {
  color: var(--ink-mute);
  margin: 1.25rem auto 2rem;
  font-size: 1.1rem;
  max-width: 40ch;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  main {
    padding: 2.25rem 1.25rem 4rem;
  }

  .section {
    margin-bottom: 2.75rem;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    padding: 0.5rem 0 2.5rem;
  }

  .brand-mark {
    max-width: 10rem;
    margin: 0 auto;
    padding: 1rem 1.15rem;
  }

  .tagline,
  .intro-body {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-group {
    justify-content: center;
  }

  .compare li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .steps li {
    grid-template-columns: 2rem 1fr;
    gap: 0.85rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-version {
    justify-self: start;
    text-align: left;
  }

  .footer-version .nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav {
    gap: 0.125rem;
  }

  .site-nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
  }

  .section h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 420px) {
  .cta-group {
    flex-direction: column;
  }

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

  .btn {
    padding: 0.7rem 1.1rem;
    font-size: 0.9rem;
  }

  .flow-node {
    flex: 1 1 100%;
  }
}

/* Mobile nav: drop the active underline offset */
@media (max-width: 640px) {
  .site-nav a.active::after {
    left: 0.55rem;
    right: 0.55rem;
  }
}
