:root {
  --bg: #080c18;
  --bg-card: rgba(255, 255, 255, 0.04);
  --accent: #00d4b4;
  --accent-dim: rgba(0, 212, 180, 0.12);
  --accent-border: rgba(0, 212, 180, 0.25);
  --text: #e8eaf0;
  --text-muted: rgba(232, 234, 240, 0.58);
  --white-border: rgba(255, 255, 255, 0.08);
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ───────────────────────────── Nav ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 12, 24, 0.8);
  border-bottom: 1px solid var(--white-border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-img {
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 450;
  transition: color 0.18s;
}

.nav-links a:hover {
  color: var(--text);
}

/* ───────────────────────────── Buttons ── */

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #040810;
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 3px;
  letter-spacing: -0.01em;
  transition: opacity 0.18s, transform 0.18s;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--accent-border);
  color: var(--text);
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 3px;
  transition: border-color 0.18s, background 0.18s;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.star-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--white-border);
  border-radius: 3px;
  padding: 0.28rem 0.6rem;
  transition: color 0.18s, border-color 0.18s;
}

.star-badge:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.star-divider {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--white-border);
  margin: 0 0.1rem;
}

.btn-nav {
  background: var(--accent) !important;
  color: #040810 !important;
  padding: 0.38rem 1rem !important;
  border-radius: 3px;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  transition: opacity 0.18s !important;
}

.btn-nav:hover {
  opacity: 0.88;
}

@media (max-width: 640px) {
  /* Hide the GitHub star badge to save space */
  .star-badge { display: none; }
  .nav-links { gap: 1rem; }
}

@media (max-width: 420px) {
  /* Keep only the Get Started button */
  .nav-links > a:not(.btn-nav) { display: none; }
}

/* ───────────────────────────── Hero ── */

.hero {
  position: relative;
  isolation: isolate; /* stacking context — fixes Firefox z-index in flex containers */
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Static map PNG — full-bleed hero background image */
#hero-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

/* Darken map so hero text stays readable */
.hero-map-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(8,12,24,0.60) 0%,
      rgba(8,12,24,0.28) 38%,
      rgba(8,12,24,0.38) 68%,
      rgba(8,12,24,0.82) 100%
    );
  pointer-events: none;
}

/* Network canvas sits above the fade so node labels stay crisp */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 5rem 2rem 3rem 5vw;
  display: flex;
  align-items: center;
  flex: 1;
}

.hero-content {
  max-width: 430px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 0.28rem 0.7rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.72;
  max-width: 460px;
  margin-bottom: 2rem;
  font-weight: 380;
}

.hero-actions {
  margin-bottom: 1.5rem;
}


/* ───────────────────────────── Mascot ── */

.hero-mascot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
}

.mascot-logo {
  width: min(100%, 380px);
  /* invert: black turtle → white, white arch bg → dark (disappears into hero bg) */
  filter: invert(1) drop-shadow(0 0 60px rgba(0, 212, 180, 0.3));
  /* screen blend: dark arch background becomes fully transparent */
  mix-blend-mode: screen;
  animation: float 4.2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-18px); }
}

/* ───────────────────────────── Hero cards ── */

.hero-cards {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white-border);
  gap: 1px;
  border-top: 1px solid var(--white-border);
}

.hero-card {
  background: rgba(8, 12, 24, 0.92);
  padding: 2rem 1.75rem;
  transition: background 0.2s;
}

.hero-card:hover {
  background: rgba(255, 255, 255, 0.025);
}

.card-icon {
  margin-bottom: 0.7rem;
  color: var(--accent);
  display: flex;
}

.hero-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.hero-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ───────────────────────────── Infrastructure ── */

.infra {
  background: #f5f7fa;
  color: #0a0f1e;
  padding: 6.5rem 2rem;
}

.infra-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.infra-text .section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00a896;
  margin-bottom: 1rem;
}

.infra-text h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 1.25rem;
  color: #0a0f1e;
}

.infra-text p {
  color: #4a5568;
  line-height: 1.72;
  margin-bottom: 1.75rem;
  font-size: 0.97rem;
}

.infra-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.infra-list li {
  font-size: 0.88rem;
  color: #2d3748;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.infra-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


/* ───────────────────────────── Admin Interface ── */

.admin {
  background: #f5f7fa;
  padding: 6.5rem 2rem;
}

.admin-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.admin-visual { order: 2; }
.admin-text   { order: 1; }

/* ── Browser chrome wrapper ── */
.browser-chrome {
  background: #2a2f3a;
  border-radius: 6px 6px 0 0;
  padding: 0.55rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.browser-dots {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a505e;
}

.browser-url {
  flex: 1;
  background: #1c2028;
  border-radius: 3px;
  padding: 0.22rem 0.7rem;
  font-size: 0.71rem;
  font-family: ui-monospace, 'SF Mono', monospace;
  color: #6a7389;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Real app shell (matches TunnelMesh UI exactly) ── */
.tm-app {
  background: #0d1117;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #e6edf3;
}

/* Header bar */
.tm-header {
  background: #1e252e;
  border-bottom: 1px solid #30363d;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tm-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tm-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #e6edf3;
}

.tm-header-stats {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #8b949e;
}

.tm-stat strong { color: #e6edf3; }
.tm-green { color: #3fb950 !important; }
.tm-stat-sep { color: #30363d; }

/* App | Data | Mesh tabs */
.tm-tabs {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
}

.tm-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8b949e;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: default;
  font-family: inherit;
  margin-bottom: -1px;
}

.tm-tab-active {
  color: #58a6ff;
  border-bottom-color: #58a6ff;
}

.tm-tab-sep {
  color: #30363d;
  padding: 0 0.1rem;
  font-size: 0.75rem;
  user-select: none;
}

/* Collapsible panels */
.tm-panel {
  border-bottom: 1px solid #30363d;
}

.tm-panel-hdr {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.tm-arrow {
  font-size: 0.6rem;
  color: #8b949e;
  flex-shrink: 0;
}

.tm-panel-title {
  flex: 1;
}

.tm-panel-actions {
  display: flex;
  gap: 0.4rem;
}

.tm-btn-sm {
  background: #21262d;
  border: 1px solid #30363d;
  color: #e6edf3;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  cursor: default;
  font-family: inherit;
  border-radius: 0;
}

/* S3 breadcrumb nav */
.tm-s3-nav {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  min-height: 36px;
  flex-wrap: wrap;
}

.tm-crumb-link { color: #58a6ff; }
.tm-crumb-sep  { color: #8b949e; }
.tm-crumb-cur  { color: #e6edf3; font-weight: 600; }

.tm-s3-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tm-badge-md {
  background: rgba(240, 165, 0, 0.15);
  color: #f0a500;
  border: 1px solid rgba(240, 165, 0, 0.4);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  letter-spacing: 0.05em;
  font-family: ui-monospace, monospace;
}

/* WYSIWYG markdown body — matches real app s3explorer styles */
.tm-md-body {
  padding: 1rem 1.25rem;
  background: #0d1117;
  font-size: 0.875rem;
  line-height: 1.75;
}

.tm-md-h1 {
  color: #58a6ff;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid #30363d;
  padding-bottom: 0.3rem;
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.tm-md-h2 {
  color: #e6edf3;
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 1px solid #21262d;
  padding-bottom: 0.2rem;
  margin: 0.75rem 0 0.4rem;
}

.tm-md-ul {
  margin: 0 0 0.5rem 1.25rem;
  color: #8b949e;
}

.tm-md-ul li { margin-bottom: 0.2rem; }

.tm-md-code {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 0.8rem;
  color: #f0a500;
  background: rgba(240, 165, 0, 0.1);
  padding: 0.05rem 0.3rem;
}

.tm-md-p {
  color: #8b949e;
  margin: 0;
}

.tm-md-link {
  color: #58a6ff;
  text-decoration: underline dotted;
}

/* Peers table */
.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.tm-table th {
  background: #161b22;
  color: #8b949e;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #30363d;
  letter-spacing: 0.02em;
}

.tm-table td {
  padding: 0.42rem 0.75rem;
  border-bottom: 1px solid #21262d;
  color: #e6edf3;
}

.tm-table tr:last-child td { border-bottom: none; }
.tm-table tr:hover td { background: #161b22; }

.tm-r    { text-align: right; }
.tm-mono { font-family: ui-monospace, 'SF Mono', monospace; font-size: 0.75rem; }
.tm-muted { color: #8b949e; }

.tm-transport {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  letter-spacing: 0.04em;
  font-family: ui-monospace, monospace;
}

.tm-udp {
  background: rgba(88, 166, 255, 0.15);
  color: #58a6ff;
  border: 1px solid rgba(88, 166, 255, 0.4);
}

.tm-ssh {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.4);
}

.tm-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  letter-spacing: 0.04em;
}

.tm-online {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.4);
}

.tm-offline {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
  border: 1px solid rgba(248, 81, 73, 0.4);
}

.tm-action {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  letter-spacing: 0.04em;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
}

.tm-allow {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.tm-deny {
  background: rgba(248, 81, 73, 0.1);
  color: #f85149;
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.tm-btn-primary-sm {
  background: #238636;
  border: 1px solid #2ea043;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  cursor: default;
  font-family: inherit;
  border-radius: 0;
}

.tm-filter-meta {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 0.35rem 1rem;
  display: flex;
  gap: 1.5rem;
}

/* Infra section: app panels as cards */
.infra-tm-card {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #30363d;
}

/* Admin text */
.admin-text .section-label {
  color: #00a896;
}

.admin-text h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 1.25rem;
  color: #0a0f1e;
}

.admin-text > p {
  color: #4a5568;
  line-height: 1.72;
  margin-bottom: 1.75rem;
  font-size: 0.97rem;
}

.admin-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.admin-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #00a896;
  display: flex;
}

.admin-list strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0a0f1e;
  margin-bottom: 0.2rem;
}

.admin-list p {
  font-size: 0.85rem;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 920px) {
  .admin-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .editor-split {
    grid-template-columns: 1fr;
  }

  .editor-pane {
    border-right: none;
    border-bottom: 1px solid var(--white-border);
  }

  /* Prevent the mockup from overflowing its column */
  .admin-visual {
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  /* Hide secondary header stats */
  .tm-header-stats {
    display: none;
  }

  /* Hide Address + Transport + Throughput columns — keep Name, Latency, Status */
  .tm-table th:nth-child(2),
  .tm-table td:nth-child(2),
  .tm-table th:nth-child(3),
  .tm-table td:nth-child(3),
  .tm-table th:nth-child(5),
  .tm-table td:nth-child(5) {
    display: none;
  }

  /* Hide S3 nav action buttons */
  .tm-s3-nav-right {
    display: none;
  }

  /* Hide panel action buttons */
  .tm-panel-actions {
    display: none;
  }

  /* Allow long code strings to wrap */
  .tm-md-code {
    word-break: break-all;
  }

  /* Reduce panel/nav padding on small screens */
  .tm-panel-hdr,
  .tm-s3-nav,
  .tm-table th,
  .tm-table td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* ───────────────────────────── Features ── */

.features {
  padding: 6.5rem 2rem;
  background: var(--bg);
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-label.centered,
.features-inner h2.centered {
  text-align: center;
}

.features-inner h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 3.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--white-border);
  border: 1px solid var(--white-border);
  border-radius: 4px;
  overflow: hidden;
}

.feature-tile {
  background: var(--bg);
  padding: 2rem 1.75rem;
  transition: background 0.2s;
}

.feature-tile:hover {
  background: rgba(0, 212, 180, 0.04);
}

.feature-icon {
  margin-bottom: 1rem;
  color: var(--accent);
  display: flex;
}

.feature-tile h3 {
  font-size: 0.97rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  letter-spacing: -0.01em;
}

.feature-tile p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ───────────────────────────── S3 Storage ── */

.s3 {
  background: #0b0f1f;
  border-top: 1px solid var(--white-border);
  border-bottom: 1px solid var(--white-border);
  padding: 6.5rem 2rem;
}

.s3-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.s3-text .section-label {
  color: var(--accent);
}

.s3-text h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 1.25rem;
}

.s3-text p {
  color: var(--text-muted);
  line-height: 1.72;
  margin-bottom: 1.75rem;
  font-size: 0.97rem;
}

.s3-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.s3-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.s3-bullet {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
  display: flex;
}

.s3-file-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0.3rem;
  color: var(--text-muted);
}

.check-svg {
  color: #00a896;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  margin-top: 0.1rem;
}

/* Mock browser card */
.s3-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.s3-card {
  background: var(--bg);
  border: 1px solid var(--white-border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.82rem;
  font-family: 'JetBrains Mono', monospace;
}

.s3-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--white-border);
  background: rgba(255,255,255,0.025);
  color: var(--text);
  font-weight: 500;
}

.s3-card-meta {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.s3-card-table {
  display: flex;
  flex-direction: column;
}

.s3-row {
  display: grid;
  grid-template-columns: 2fr 0.6fr 0.5fr 0.7fr;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center;
  gap: 0.5rem;
}

.s3-row:last-child {
  border-bottom: none;
}

.s3-row-head {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.02);
}

.s3-file-icon {
  margin-right: 0.35rem;
  opacity: 0.5;
}

.s3-ver {
  color: var(--accent);
}

.s3-rep {
  color: #4ade80;
  font-size: 0.78rem;
}

.s3-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--white-border);
  background: rgba(255,255,255,0.02);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.s3-dedup {
  opacity: 0.7;
}

.s3-repl-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
}

/* Stat row */
.s3-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--white-border);
  border: 1px solid var(--white-border);
  border-radius: 4px;
  overflow: hidden;
}

.s3-stat {
  background: var(--bg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.s3-stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.s3-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 920px) {
  .s3-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

/* ───────────────────────────── CTA ── */

.cta {
  position: relative;
  padding: 8rem 2rem;
  text-align: center;
  overflow: hidden;
  background: var(--bg);
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(ellipse at center, rgba(0, 212, 180, 0.1) 0%, transparent 68%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.cta-inner h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.9rem;
}

.cta-inner p {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ───────────────────────────── Footer ── */

.footer {
  border-top: 1px solid var(--white-border);
  padding: 2.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.75;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.18s;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-tagline {
  font-size: 0.79rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ───────────────────────────── Responsive ── */

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  .hero-mascot {
    display: none;
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

  .infra-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .nav-links .btn-nav {
    display: none;
  }

  .install-bar {
    font-size: 0.72rem;
  }

  #install-cmd {
    max-width: 160px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}
