/* ============================================================
   RemoraSFTP — landing page (redesigned)
   Static, dependency-free. System fonts. No build step.
   New: dark theme, command palette, compare, FAQ, live term.
   ============================================================ */

:root {
  --ink-950: #08111a;
  --ink-900: #0b141b;
  --ink-800: #10202b;
  --ink-700: #16293644;
  --ink-line: #223646;

  --paper: #f5f8f9;
  --card: #ffffff;
  --tint: #edf2f4;
  --line: #dfe8eb;

  --text-ink: #17242e;
  --text-muted: #5c6f7b;
  --text-on-dark: #e8f1f3;
  --text-on-dark-muted: #9db4bd;

  --accent: #0e7c86;
  --accent-deep: #0a5c64;
  --accent-bright: #63b9bf;
  --accent-soft: #e3f0f1;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(13, 30, 40, 0.06), 0 2px 8px rgba(13, 30, 40, 0.05);
  --shadow-md: 0 4px 16px rgba(13, 30, 40, 0.08), 0 12px 40px rgba(13, 30, 40, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;

  --container: 1080px;
  color-scheme: light;
}

/* ---------------- dark theme overrides ---------------- */

html[data-theme="dark"] {
  --paper: #0a1219;
  --card: #101c26;
  --tint: #0c1620;
  --line: #1d3040;
  --text-ink: #e6eef2;
  --text-muted: #93a9b4;
  --accent-soft: rgba(99, 185, 191, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45), 0 12px 40px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
html[data-theme="dark"] code { background: rgba(99, 185, 191, 0.12); color: var(--accent-bright); }
html[data-theme="dark"] .dl-card code { background: var(--tint); color: var(--text-muted); }
html[data-theme="dark"] .chip { background: rgba(99, 185, 191, 0.14); color: var(--accent-bright); }
html[data-theme="dark"] .stat-chips strong { color: var(--accent-bright); }
html[data-theme="dark"] .mock-titlebar { background: #0f1a23; border-color: var(--line); }
html[data-theme="dark"] .mock-side,
html[data-theme="dark"] .mock-insp { background: #0d1820; }
html[data-theme="dark"] .dot { background: #24394a; }
html[data-theme="dark"] .mdot { background: #2c4454; }
html[data-theme="dark"] .micon.mf { background: rgba(99, 185, 191, 0.2); }
html[data-theme="dark"] .micon.mfile { background: #1c2f3b; }
html[data-theme="dark"] .tr-bar { background: #1a2c38; }
html[data-theme="dark"] .in-prev { background: linear-gradient(135deg, #122230, #0f1d28); }
html[data-theme="dark"] .ver-chip { color: var(--accent-bright); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

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

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

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--accent); color: #fff;
  padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 8px; }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(14, 124, 134, 0.09);
  border-radius: 5px;
  padding: 0.12em 0.4em;
  color: var(--accent-deep);
}

.section-dark code, .terminal code, .hero code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-bright);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------------- scroll progress ---------------- */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------------- nav ---------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 17, 26, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}
.nav.scrolled { background: rgba(8, 17, 26, 0.94); box-shadow: 0 6px 24px rgba(4, 10, 16, 0.35); }

.nav-inner { display: flex; align-items: center; gap: 22px; height: 62px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16.5px; letter-spacing: 0.01em;
  color: var(--text-on-dark); text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; color: #3d566b; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }

.nav-links a {
  color: var(--text-on-dark-muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 7px 11px; border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text-on-dark); background: rgba(255, 255, 255, 0.06); }
.nav-links a.active { color: var(--text-on-dark); background: rgba(99, 185, 191, 0.16); }

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

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px; color: var(--text-on-dark-muted);
  cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.13); color: var(--text-on-dark); }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

.kbd-hint {
  display: inline-flex; align-items: center;
  padding: 6px 9px; background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px; cursor: pointer;
}
.kbd {
  font-family: var(--mono); font-size: 11.5px;
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-on-dark-muted);
}

.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 38px; padding: 8px;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px; cursor: pointer;
}
.nav-burger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--text-on-dark-muted);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600; line-height: 1;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-outline { background: transparent; color: var(--text-on-dark); border-color: rgba(255, 255, 255, 0.28); }
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.05); }
.btn-light { background: #fff; color: var(--ink-900); }
.btn-light:hover { background: #e6edf0; }
.btn-ghost { background: rgba(255, 255, 255, 0.07); color: var(--text-on-dark); border-color: rgba(255, 255, 255, 0.16); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.13); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 8px; }

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

.hero {
  position: relative; z-index: 0;
  background:
    radial-gradient(1100px 520px at 78% 8%, rgba(19, 56, 66, 0.55), transparent 62%),
    radial-gradient(900px 480px at 12% 100%, rgba(16, 40, 50, 0.5), transparent 60%),
    var(--ink-950);
  color: var(--text-on-dark);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(720px 440px at 70% 38%, #000, transparent 75%);
  mask-image: radial-gradient(720px 440px at 70% 38%, #000, transparent 75%);
}

.hero .container { position: relative; z-index: 1; }

.hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  align-items: center; gap: 40px;
  min-height: calc(92vh - 62px);
  padding: 72px 24px 96px;
}

.eyebrow {
  margin: 0 0 14px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-bright);
}
.eyebrow-light { color: var(--accent); }

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 5.4vw, 62px);
  line-height: 1.04; font-weight: 800; letter-spacing: -0.02em;
}
.hero h1 .accent {
  color: var(--accent-bright);
  background: linear-gradient(92deg, #63b9bf 10%, #9fe0dd 55%, #d9c9a3 110%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin: 0 0 30px; max-width: 34rem;
  font-size: 17.5px; line-height: 1.65; color: var(--text-on-dark-muted);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0;
  list-style: none; font-size: 13.5px; color: var(--text-on-dark-muted);
}
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-bright); opacity: 0.8;
}

.hero-visual { position: relative; min-height: 420px; height: 100%; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.hero-fallback svg { width: min(100%, 420px); opacity: 0.9; }

.hero-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 12.5px; font-weight: 600;
  color: var(--text-on-dark);
  background: rgba(16, 32, 43, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(4, 10, 16, 0.35);
  animation: chipFloat 6s ease-in-out infinite;
  white-space: nowrap;
}
.hero-chip .tick { color: var(--accent-bright); }
.chip-a { top: 12%; left: 2%; }
.chip-b { top: 46%; right: 0; animation-delay: 1.4s; }
.chip-c { bottom: 8%; left: 10%; animation-delay: 2.6s; }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.hero-scroll-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.28); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px; opacity: 0.7;
}
.hero-scroll-hint span {
  width: 3px; height: 8px; border-radius: 3px;
  background: var(--accent-bright);
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(10px); opacity: 0.25; }
}

/* ---------------- sections ---------------- */

.section { padding: 92px 0; }
.section-tint { background: var(--tint); }

.section-dark {
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(19, 56, 66, 0.5), transparent 60%),
    var(--ink-900);
  color: var(--text-on-dark);
}
.section-dark .section-sub,
.section-dark .section-head p { color: var(--text-on-dark-muted); }

.section-head { max-width: 640px; margin-bottom: 52px; }

.section-head h2, .fm-copy h2, .tui-copy h2, .dl-extra h3 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15; font-weight: 800; letter-spacing: -0.015em;
  margin: 0 0 16px;
}

.section-sub { font-size: 17px; color: var(--text-muted); margin: 0; }

.ver-chip {
  display: inline-block; vertical-align: middle;
  font-size: 13px; font-weight: 700; font-family: var(--mono);
  color: var(--accent-deep); background: var(--accent-soft);
  border: 1px solid rgba(14, 124, 134, 0.3);
  padding: 4px 12px; border-radius: 999px; letter-spacing: 0.02em;
}

/* ---------------- overview ---------------- */

.what-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start; }
.what-copy p { margin: 0 0 16px; color: var(--text-muted); }
.what-copy p:first-child { color: var(--text-ink); font-size: 17px; }

.stat-chips {
  display: flex; flex-wrap: wrap; gap: 14px;
  list-style: none; margin: 28px 0 0; padding: 0;
}
.stat-chips li {
  flex: 1 1 140px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat-chips strong {
  display: block; font-size: 30px; line-height: 1.1; font-weight: 800;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat-chips span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-muted); }

/* architecture diagram */

.arch { display: flex; flex-direction: column; align-items: stretch; }
.arch-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.arch-box p { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }
.arch-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
}
.arch-surface { background: var(--ink-900); border-color: var(--ink-line); }
.arch-surface .arch-tag { color: var(--accent-bright); }
.arch-private { border-color: rgba(14, 124, 134, 0.4); }
.arch-net { background: var(--accent-soft); border-color: rgba(14, 124, 134, 0.35); }

.arch-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-block; font-size: 13px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
}
.arch-surface .chip { background: rgba(255, 255, 255, 0.09); color: var(--text-on-dark); }

.arch-arrow { align-self: center; margin: 6px 0; font-size: 18px; line-height: 1; color: var(--accent); opacity: 0.7; }

/* ---------------- feature cards ---------------- */

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(14, 124, 134, 0.35); }
.card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.005em; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }
.sec-card { background: var(--paper); }

/* ---------------- file manager ---------------- */

.fm-grid, .tui-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

.fm-copy p, .tui-copy p { color: var(--text-muted); }
.fm-copy > p:not(.eyebrow), .tui-copy > p:not(.eyebrow) { font-size: 16.5px; margin: 0 0 18px; }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 7px 0 7px 30px; font-size: 15px; color: var(--text-ink); }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 14px;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------------- mock windows ---------------- */

.mock-window {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden;
}
.mock-titlebar {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  background: #eef3f5; border-bottom: 1px solid var(--line);
}
.mock-title {
  margin-left: 10px; font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #cfdbe0; flex: none; }
.mock-body { padding: 0; }

.fm-mock { display: grid; grid-template-columns: 150px 1fr 170px; min-height: 300px; }
.mock-side, .mock-insp { padding: 14px; }
.mock-side { border-right: 1px solid var(--line); background: #fafcfc; }
.mock-insp { border-left: 1px solid var(--line); background: #fafcfc; }

.mock-side-label {
  margin: 0 0 8px; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #8ba0aa;
}
.mock-side-label + .mock-side-label,
.mock-side-item + .mock-side-label { margin-top: 16px; }

.mock-side-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  padding: 5px 8px; border-radius: 7px; white-space: nowrap;
}
.mock-side-item.active { background: var(--accent-soft); color: var(--accent-deep); }
.mock-side-item.dim { opacity: 0.6; }

.mdot { width: 7px; height: 7px; border-radius: 50%; background: #c3d2d8; flex: none; }
.mdot-teal { background: var(--accent); }

.mock-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mock-row {
  display: grid; grid-template-columns: 22px 1fr auto;
  align-items: center; gap: 9px; font-size: 13px;
  padding: 6px 8px; border-radius: 7px; color: var(--text-ink);
}
.mock-row span:last-child { color: #93a7b0; font-size: 12px; }
.mock-row.selected { background: var(--accent-soft); }

.micon { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.micon.mf { background: #cfe6e8; position: relative; }
.micon.mf::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 6px; height: 3px; border-radius: 1.5px; background: var(--accent);
}
.micon.mfile { background: #e8eff2; }

.in-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 4px 0; color: var(--text-muted); }
.in-row b { color: var(--text-ink); font-weight: 600; text-align: right; }
.in-prev {
  height: 96px; margin-top: 10px; border-radius: 8px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #f2f7f8 0%, #e7f0f2 100%);
}

/* ---------------- terminal ---------------- */

.terminal {
  background: #0d1a22; border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  overflow: hidden; color: #cfe0e6;
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  background: #12222c; border-bottom: 1px solid var(--ink-line);
  font-size: 12px; color: #7d95a1;
}
.terminal-bar .dot { background: #2a4150; }

.terminal-body {
  margin: 0; padding: 18px 20px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  white-space: pre; overflow-x: auto;
}

.term-live-wrap { margin-top: 44px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #79b886; margin-left: auto;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(121, 184, 134, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(121, 184, 134, 0); }
  100% { box-shadow: 0 0 0 0 rgba(121, 184, 134, 0); }
}
.term-cursor {
  display: inline-block; width: 8px; height: 1.05em;
  background: var(--accent-bright); vertical-align: text-bottom; margin-left: 2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- protocols ---------------- */

.proto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }

.proto-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg); padding: 26px 24px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.proto-card:hover { border-color: rgba(99, 185, 191, 0.45); background: rgba(255, 255, 255, 0.055); }

.proto-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99, 185, 191, 0.12); color: var(--accent-bright); margin-bottom: 16px;
}
.proto-icon svg { width: 24px; height: 24px; }

.proto-card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.proto-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-on-dark-muted); }

.proto-note {
  margin: 0; font-size: 14.5px; color: var(--text-on-dark-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.09); padding-top: 20px; max-width: 640px;
}

/* ---------------- platforms ---------------- */

.os-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.os-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.os-icon { width: 34px; height: 34px; color: var(--accent); margin-bottom: 14px; }
.os-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.os-card p { margin: 0; font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }

/* ---------------- security ---------------- */

.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------------- compare table ---------------- */

.cmp-wrap {
  overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow-sm);
}
.cmp-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14.5px; }
.cmp-table th, .cmp-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table thead th {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); font-weight: 700;
}
.cmp-table tbody th { font-weight: 600; color: var(--text-ink); text-align: left; }
.cmp-table td { text-align: center; font-weight: 700; }
.cmp-table .hl { background: var(--accent-soft); }
.cmp-table .good { color: var(--accent); }
html[data-theme="dark"] .cmp-table .good { color: var(--accent-bright); }
.cmp-table .bad { color: var(--text-muted); opacity: 0.55; }
.cmp-table .part { color: var(--text-muted); opacity: 0.85; }
.cmp-note { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }

/* ---------------- showcase ---------------- */

.show-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.show-card { margin: 0; }
.show-card figcaption { margin-top: 14px; text-align: center; font-size: 13.5px; color: var(--text-on-dark-muted); }

.mock-window.mini .mock-titlebar { height: 32px; }
.mini-body { min-height: 210px; display: flex; flex-direction: column; }
.mini-body .mock-list { flex: 1; }
.mini-body .mock-list.only { padding: 12px; }

.transfers { padding: 14px; }
.tr-row {
  display: grid; grid-template-columns: 1fr auto;
  grid-template-areas: "name pct" "bar bar";
  align-items: center; gap: 4px 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.tr-row:last-child { border-bottom: 0; }
.tr-name { grid-area: name; font-size: 12.5px; font-weight: 600; }
.tr-pct { grid-area: pct; font-size: 11.5px; color: var(--text-muted); }
.tr-bar { grid-area: bar; height: 6px; border-radius: 4px; background: #e3ebef; overflow: hidden; }
.tr-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.tr-bar.done i { background: #79b886; }

.terminal.mini .terminal-bar { height: 32px; }
.terminal.mini .terminal-body { font-size: 11px; min-height: 210px; padding: 14px; }

/* ---------------- download ---------------- */

.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 44px; }

.dl-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px 20px;
  text-decoration: none; color: var(--text-ink); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dl-card:hover { transform: translateY(-3px); border-color: rgba(14, 124, 134, 0.45); box-shadow: var(--shadow-md); }
.dl-card.recommended { border-color: rgba(14, 124, 134, 0.55); }
.dl-card h3 { margin: 0; font-size: 15px; font-weight: 700; }
.dl-card code { align-self: flex-start; font-size: 11.5px; background: var(--tint); color: var(--text-muted); }
.dl-cta { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--accent); }

.rec-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-soft);
  border: 1px solid rgba(14, 124, 134, 0.35);
  padding: 4px 9px; border-radius: 999px;
}
html[data-theme="dark"] .rec-badge { color: var(--accent-bright); }

.dl-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.dl-extra > .reveal:last-child > p { color: var(--text-muted); margin: 0 0 14px; font-size: 15px; }

.code {
  position: relative;
  background: var(--ink-900); border: 1px solid var(--ink-line);
  border-radius: var(--radius); padding: 18px 20px; overflow-x: auto;
}
.code pre {
  margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7;
  color: #cfe0e6; white-space: pre;
}

.copy-btn {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-size: 12px; font-weight: 600;
  font-family: var(--font);
  color: var(--text-on-dark-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px; cursor: pointer;
  opacity: 0; transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.code:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text-on-dark); }
.copy-btn.copied { color: #8fd6a4; }
@media (hover: none) { .copy-btn { opacity: 1; } }

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

.faq-list { max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item.open { border-color: rgba(14, 124, 134, 0.4); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; background: none; border: 0;
  font: 600 15.5px var(--font); color: var(--text-ink);
  cursor: pointer; text-align: left;
}
.faq-q .chev { color: var(--accent); transition: transform 0.25s ease; flex: none; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.faq-a > div { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 20px 18px; color: var(--text-muted); font-size: 14.5px; }

/* ---------------- github banner ---------------- */

.gh-banner { background: var(--tint); }
.gh-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background:
    radial-gradient(700px 300px at 90% 10%, rgba(19, 56, 66, 0.45), transparent 60%),
    var(--ink-900);
  border-radius: 22px; padding: 44px 48px; color: var(--text-on-dark);
}
.gh-inner h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.gh-inner p { margin: 0; max-width: 46ch; color: var(--text-on-dark-muted); font-size: 15.5px; }

/* ---------------- footer ---------------- */

.footer { background: var(--ink-950); color: var(--text-on-dark-muted); padding: 52px 0 36px; }
.footer-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 32px; flex-wrap: wrap; padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer .brand-mark { width: 38px; height: 38px; color: #3d566b; margin-top: 2px; }
.footer-name { margin: 0; font-weight: 700; font-size: 16px; color: var(--text-on-dark); }
.footer-tag { margin: 2px 0 0; font-size: 13.5px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer-links a { color: var(--text-on-dark-muted); text-decoration: none; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--text-on-dark); }
.footer-fine { padding-top: 26px; font-size: 13px; }
.footer-fine p { margin: 0; }

/* ---------------- command palette ---------------- */

.palette-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 17, 26, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 14vh 20px 20px;
  opacity: 0; transition: opacity 0.15s ease;
}
.palette-overlay.show { opacity: 1; }
.palette {
  width: min(560px, 100%);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-md); overflow: hidden;
  transform: translateY(-8px) scale(0.98); transition: transform 0.18s ease;
}
.palette-overlay.show .palette { transform: none; }
.palette-input {
  width: 100%; border: 0; outline: 0; background: transparent;
  padding: 16px 18px; font: 500 15px var(--font); color: var(--text-ink);
  border-bottom: 1px solid var(--line);
}
.palette-input::placeholder { color: var(--text-muted); }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 320px; overflow-y: auto; }
.palette-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 14px;
  color: var(--text-ink);
}
.palette-item.selected { background: var(--accent-soft); color: var(--accent-deep); }
html[data-theme="dark"] .palette-item.selected { color: var(--accent-bright); }
.palette-hint { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.palette-empty { padding: 14px 12px; font-size: 14px; color: var(--text-muted); }
.palette-foot {
  padding: 10px 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-muted); display: flex; gap: 16px;
}

/* ---------------- toast & to-top ---------------- */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  background: var(--ink-900); color: var(--text-on-dark);
  border: 1px solid var(--ink-line);
  padding: 10px 18px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 120;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink-900); color: var(--text-on-dark);
  border: 1px solid var(--ink-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--ink-800); }

/* ---------------- scroll reveal ---------------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

section[id] { scroll-margin-top: 76px; }

/* ---------------- responsive ---------------- */

@media (max-width: 1024px) {
  .feature-grid, .proto-grid, .os-grid, .sec-grid, .show-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .kbd-hint { display: none; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 56px 24px 84px; }
  .hero-visual { position: absolute; inset: 0; min-height: 0; z-index: -1; opacity: 0.55; }
  .hero-chip { display: none; }
  .hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(8, 17, 26, 0.75), rgba(8, 17, 26, 0.25));
    pointer-events: none;
  }
  .what-grid, .fm-grid, .tui-grid, .dl-extra { grid-template-columns: 1fr; gap: 36px; }
  .fm-visual { order: -1; }
  .tui-visual { order: -1; }
  .section { padding: 72px 0; }
  .nav-links {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    background: rgba(8, 17, 26, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px 14px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }
  .gh-inner { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
  .palette-overlay { padding-top: 10vh; }
}

@media (max-width: 620px) {
  .feature-grid, .proto-grid, .os-grid, .sec-grid, .show-grid, .dl-grid { grid-template-columns: 1fr; }
  .fm-mock { grid-template-columns: 110px 1fr; }
  .mock-insp { display: none; }
  .hero-cta .btn { width: 100%; }
  .hero-scroll-hint { display: none; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll-hint span { animation: none; }
  .hero-chip { animation: none; }
  .live-dot { animation: none; }
  .term-cursor { animation: none; }
  .card:hover, .dl-card:hover { transform: none; }
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
