/* ════════════════════════════════════════════
   KubeSolo.io — stylesheet
   aesthetic: industrial cartography. edge infrastructure.
   persona: cloud-native engineer deploying at the edge.
   ════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=DM+Sans:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg:        #0f1214;
  --bg2:       #171c20;
  --bg3:       #1e2429;
  --border:    #2a3038;
  --border2:   #222930;
  --text:      #c8d1db;
  --text-2:    #6b7a8a;
  --text-3:    #4a5564;
  --accent:    #00e5a0;
  --accent-dim: rgba(0,229,160,0.10);
  --accent-brd: rgba(0,229,160,0.25);
  --blue:      #4a9eff;
  --blue-dim:  rgba(74,158,255,0.08);
  --orange:    #ff6b35;
  --orange-dim: rgba(255,107,53,0.10);
  --orange-brd: rgba(255,107,53,0.25);
  --red:       #f85149;
  --purple:    #bc8cff;
  --green:     var(--accent);
  --green-dim: var(--accent-dim);
  --green-brd: var(--accent-brd);
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
  --sans:      'DM Sans', system-ui, sans-serif;
  --code:      'Fira Code', 'JetBrains Mono', monospace;
  --r:         2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  position: relative;
}

/* ── TOPOGRAPHIC TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cpath d='M40 200 Q100 160 200 180 Q300 200 360 160' fill='none' stroke='%2300e5a0' stroke-width='0.8'/%3E%3Cpath d='M20 240 Q120 200 200 220 Q280 240 380 200' fill='none' stroke='%2300e5a0' stroke-width='0.6'/%3E%3Cpath d='M60 280 Q140 240 220 260 Q300 280 360 240' fill='none' stroke='%2300e5a0' stroke-width='0.5'/%3E%3Cpath d='M0 320 Q100 280 200 300 Q300 320 400 280' fill='none' stroke='%2300e5a0' stroke-width='0.4'/%3E%3Cpath d='M30 120 Q130 80 200 100 Q270 120 370 80' fill='none' stroke='%234a9eff' stroke-width='0.6'/%3E%3Cpath d='M50 80 Q150 40 200 60 Q250 80 350 40' fill='none' stroke='%234a9eff' stroke-width='0.4'/%3E%3Cpath d='M0 360 Q80 330 160 345 Q240 360 320 330 Q400 300 400 360' fill='none' stroke='%2300e5a0' stroke-width='0.3'/%3E%3Cpath d='M10 40 Q90 10 170 25 Q250 40 330 10 Q400 -10 400 40' fill='none' stroke='%234a9eff' stroke-width='0.3'/%3E%3C/svg%3E");
  background-size: 400px 400px;
}

/* ── NOISE GRAIN OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ensure all content sits above the overlays */
body > * { position: relative; z-index: 2; }

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--code);
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 1px 6px;
  color: var(--orange);
}

/* ── LAYOUT ── */
.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}
.wrap-narrow { max-width: 760px; }

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0; z-index: 100;
  height: 72px;
  min-height: 72px;
  display: flex; align-items: center;
  background: rgba(15,18,20,0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px; width: 100%;
  min-width: 0;
  overflow: hidden;
}
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex-shrink: 0; flex-wrap: nowrap; }
.nav-logo img { height: 40px; width: auto; display: block; flex-shrink: 0; }
.nav-logo-text {
  font-family: var(--mono); font-size: 0.9rem; font-weight: 700;
  color: var(--text); letter-spacing: 0.08em; white-space: nowrap;
  text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; flex-wrap: nowrap; flex-shrink: 1; min-width: 0; }
.nav-links a {
  font-size: 0.78rem; color: var(--text-2); text-decoration: none;
  padding: 5px 8px; border-radius: var(--r);
  white-space: nowrap;
  display: block;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 8px; right: 8px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: nowrap; }
.nav-gh {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-2); text-decoration: none;
  padding: 5px 10px; border-radius: var(--r); border: 1px solid var(--border);
  transition: all 0.15s;
}
.nav-gh:hover { color: var(--text); border-color: var(--text-2); background: var(--bg2); text-decoration: none; }
.nav-gh svg { flex-shrink: 0; }
.btn-nav {
  font-size: 0.78rem; font-weight: 700; font-family: var(--mono);
  padding: 6px 14px; border-radius: var(--r);
  background: var(--orange); color: #0f1214;
  text-decoration: none; transition: opacity 0.15s, box-shadow 0.15s;
  border: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.btn-nav:hover { opacity: 0.9; box-shadow: 0 0 12px rgba(255,107,53,0.3); text-decoration: none; }

/* ── HERO ── */
.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border2);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 15% 60%, rgba(0,229,160,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 85% 30%, rgba(74,158,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 50% 80%, rgba(255,107,53,0.03) 0%, transparent 60%);
  pointer-events: none;
  animation: hero-glow 12s ease-in-out infinite alternate;
}
@keyframes hero-glow {
  0% { opacity: 1; }
  100% { opacity: 0.6; }
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--accent-brd); border-radius: var(--r);
  padding: 4px 10px; margin-bottom: 24px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: blink 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(0,229,160,0.5);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 20px;
  max-width: 22ch;
  text-transform: uppercase;
}
.hero h1 .hl { color: var(--accent); }

.hero-sub {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 56ch;
  margin-bottom: 36px;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-install {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r); padding: 14px 18px;
  max-width: 560px; margin-bottom: 32px;
  position: relative;
}
.hero-install .prompt { font-family: var(--mono); font-size: 0.88rem; color: var(--accent); user-select: none; }
.hero-install .cmd    { font-family: var(--code); font-size: 0.88rem; color: var(--text); flex: 1; }
.hero-install .copy-btn {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r); padding: 4px 8px; cursor: pointer;
  color: var(--text-2); font-family: var(--mono); font-size: 0.7rem;
  transition: all 0.15s; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.hero-install .copy-btn:hover { color: var(--text); border-color: var(--text-2); }
.hero-install .copy-btn.copied { color: var(--accent); border-color: var(--accent-brd); }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 700; font-family: var(--mono);
  padding: 10px 20px; border-radius: var(--r);
  background: var(--orange); color: #0f1214;
  text-decoration: none; transition: opacity 0.15s, box-shadow 0.15s;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.btn-primary:hover { opacity: 0.9; box-shadow: 0 0 16px rgba(255,107,53,0.3); text-decoration: none; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 600; font-family: var(--mono);
  padding: 10px 20px; border-radius: var(--r);
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border); text-decoration: none;
  transition: all 0.15s;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.btn-outline:hover { color: var(--text); border-color: var(--text-2); text-decoration: none; }

.hero-stats {
  display: flex; gap: 0;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
  max-width: 680px;
}
.hero-stat {
  flex: 1; padding: 14px 16px;
  border-right: 1px solid var(--border2);
  position: relative;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-val {
  font-family: var(--mono); font-size: 1.1rem;
  font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
  white-space: nowrap;
}
.hero-stat-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(0,229,160,0.5);
  animation: stat-pulse 3s ease-in-out infinite;
}
@keyframes stat-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-stat-label {
  font-size: 0.65rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  display: block; line-height: 1.4;
  font-family: var(--mono);
}

/* ── SECTION NUMBERS ── */
.section-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* ── SECTIONS ── */
section { padding: 64px 0; border-bottom: 1px solid var(--border2); position: relative; }
section:last-of-type { border-bottom: none; }
.section-header { margin-bottom: 40px; }
.section-header h2 {
  font-family: var(--mono);
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: 10px;
  text-transform: uppercase;
}
.section-header p { color: var(--text-2); max-width: 58ch; font-size: 0.95rem; }

/* ── WHAT IS ── */
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: start;
}
.what-prose p {
  color: var(--text-2); font-size: 0.95rem; line-height: 1.75;
  margin-bottom: 16px;
}
.what-prose p:last-child { margin-bottom: 0; }
.what-prose strong { color: var(--text); }
.what-prose a { color: var(--blue); }

.what-terminal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; font-family: var(--code);
  position: relative;
}
/* scanline effect */
.what-terminal::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,229,160,0.015) 2px,
    rgba(0,229,160,0.015) 4px
  );
}
.terminal-bar {
  background: var(--bg3); padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border2);
  position: relative; z-index: 1;
}
.tdot { width:11px; height:11px; border-radius:50%; }
.td-r{background:transparent; border: 1px solid var(--text-3);}
.td-y{background:transparent; border: 1px solid var(--text-3);}
.td-g{background:var(--accent); box-shadow: 0 0 4px rgba(0,229,160,0.5);}
.terminal-bar span { font-size: 0.72rem; color: var(--text-3); margin-left: 4px; font-family: var(--mono); }
.terminal-body { padding: 18px 20px; font-size: 0.82rem; line-height: 2.1; position: relative; z-index: 1; }
.tl { display: flex; gap: 14px; }
.tl-n { color: var(--text-3); user-select: none; min-width: 18px; text-align: right; font-size: 0.7rem; padding-top: 2px; }
.tl-c { flex: 1; }
.tl-c .p  { color: var(--accent); }
.tl-c .k  { color: var(--blue); }
.tl-c .v  { color: var(--orange); }
.tl-c .s  { color: var(--purple); }
.tl-c .cm { color: var(--text-3); font-style: italic; }
.tl-c .out{ color: var(--text-2); }
.tl-c .ok { color: var(--accent); }
.tl-gap   { height: 8px; }

/* ── USE CASES (bento grid) ── */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
}
/* first card spans 2 columns for bento effect */
.uc-cell:first-child {
  grid-column: span 2;
}
/* last card spans full width to avoid orphan gap */
.uc-cell:nth-child(6):last-child {
  grid-column: 1 / -1;
}
.uc-cell {
  background: var(--bg);
  padding: 28px 24px;
  transition: background 0.15s, border-color 0.15s;
  border-left: 3px solid transparent;
}
.uc-cell:hover {
  background: var(--bg2);
  border-left-color: var(--accent);
}
.uc-num {
  font-family: var(--mono); font-size: 0.65rem;
  color: var(--text-3); letter-spacing: 0.1em;
  margin-bottom: 12px; display: block;
}
.uc-cell h3 {
  font-family: var(--mono);
  font-size: 0.92rem; font-weight: 600; margin-bottom: 8px; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.02em;
}
.uc-cell p  { font-size: 0.82rem; color: var(--text-2); line-height: 1.65; }
.uc-tag {
  display: inline-block; margin-top: 12px;
  font-family: var(--mono); font-size: 0.65rem;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--accent-brd);
  border-radius: var(--r); padding: 2px 7px;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ── VS DOCKER ── */
.vs-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.vs-col {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px;
  border-top: 3px solid var(--border);
}
.vs-col:last-child {
  border-top-color: var(--accent);
}
.vs-col-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border2);
}
.vs-col-header h3 { font-size: 0.95rem; font-weight: 600; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.02em; }
.vs-badge {
  font-family: var(--mono); font-size: 0.65rem;
  padding: 2px 8px; border-radius: var(--r); letter-spacing: 0.04em;
  text-transform: uppercase;
}
.vs-badge-old { background: rgba(248,81,73,0.12); color: var(--red); border: 1px solid rgba(248,81,73,0.2); }
.vs-badge-new { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-brd); }
.vs-row {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border2); font-size: 0.84rem;
  align-items: flex-start;
}
.vs-row:last-child { border-bottom: none; padding-bottom: 0; }
.vs-icon { flex-shrink: 0; margin-top: 2px; font-size: 0.75rem; }
.vs-icon.bad  { color: var(--red); }
.vs-icon.good { color: var(--accent); }
.vs-row span  { color: var(--text-2); line-height: 1.5; }

/* ── COMPARE TABLE ── */
.compare-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow-x: auto;
  margin-top: 32px;
}
.compare-tbl { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.compare-tbl th {
  background: var(--bg2); padding: 12px 18px;
  text-align: left; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-2); border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-weight: 500;
}
.compare-tbl th.ks { color: var(--accent); background: rgba(0,229,160,0.04); }
.compare-tbl td {
  padding: 11px 18px; border-bottom: 1px solid var(--border2);
  color: var(--text-2); vertical-align: middle;
}
.compare-tbl td.ks { background: rgba(0,229,160,0.025); color: var(--text); font-weight: 500; }
.compare-tbl td:first-child { color: var(--text); font-family: var(--mono); font-size: 0.8rem; }
.compare-tbl tr:last-child td { border-bottom: none; }
.c-yes { color: var(--accent); }
.c-no  { color: var(--red); opacity: 0.7; }
.c-par { color: var(--orange); }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 2px; margin-top: 32px; }
.faq-item {
  border: 1px solid var(--border2); border-radius: var(--r);
  overflow: hidden;
  border-left: 3px solid var(--border2);
  transition: border-left-color 0.15s;
}
.faq-item:hover { border-left-color: var(--accent); }
.faq-q {
  width: 100%; text-align: left; background: var(--bg2);
  border: none; cursor: pointer; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; transition: background 0.15s;
  font-family: var(--mono); font-size: 0.88rem; font-weight: 600;
  color: var(--text);
}
.faq-q:hover { background: var(--bg3); }
.faq-q[aria-expanded="true"] { background: var(--bg3); }
.faq-icon {
  flex-shrink: 0; width: 18px; height: 18px;
  color: var(--text-3); transition: transform 0.2s;
}
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a {
  display: none; padding: 16px 20px;
  border-top: 1px solid var(--border2); background: var(--bg);
}
.faq-a.open { display: block; }
.faq-a p {
  font-size: 0.88rem; color: var(--text-2); line-height: 1.75;
  margin-bottom: 10px;
}
.faq-a p:last-child { margin-bottom: 0; }
.faq-a strong { color: var(--text); }
.faq-a a { color: var(--blue); }
.faq-a code { font-size: 0.82em; }

/* ── GET STARTED STEPS ── */
.gs-steps { display: flex; flex-direction: column; gap: 24px; margin-top: 32px; }
.gs-step { display: flex; gap: 20px; }
.gs-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--r);
  border: 1px solid var(--accent-brd); display: flex; align-items: center;
  justify-content: center; font-family: var(--mono); font-size: 0.7rem;
  color: var(--accent); margin-top: 2px;
  background: var(--accent-dim);
}
.gs-content {}
.gs-content h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; font-family: var(--mono); text-transform: uppercase; }
.gs-content p  { font-size: 0.85rem; color: var(--text-2); line-height: 1.65; }

/* ── PORTAINER CALLOUT ── */
.portainer-callout {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--r); padding: 28px 32px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; flex-wrap: wrap; margin-top: 64px;
}
.portainer-callout h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; font-family: var(--mono); }
.portainer-callout p  { font-size: 0.88rem; color: var(--text-2); max-width: 52ch; line-height: 1.65; }
.portainer-callout p a { color: var(--blue); }

/* ── FOOTER ── */
.footer {
  padding: 36px 0; border-top: 1px solid var(--border2);
  background: var(--bg2);
}
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 8px; }
.footer-logo img { height: 22px; width: auto; opacity: 0.7; }
.footer-logo-text { font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a {
  font-size: 0.8rem; color: var(--text-3); text-decoration: none;
  font-family: var(--mono); letter-spacing: 0.02em;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-legal { font-size: 0.75rem; color: var(--text-3); line-height: 1.6; }
.footer-legal a { color: var(--text-3); text-decoration: underline; }

/* ── INLINE CODE BLOCK ── */
.codeblock {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  margin: 20px 0; font-family: var(--code);
  position: relative;
}
/* scanline effect on code blocks */
.codeblock::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,229,160,0.012) 2px,
    rgba(0,229,160,0.012) 4px
  );
}
.codeblock-bar {
  background: var(--bg3); padding: 8px 16px;
  border-bottom: 1px solid var(--border2);
  display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 1;
}
.codeblock-title { font-size: 0.72rem; color: var(--text-3); font-family: var(--mono); }
.codeblock-body { padding: 20px; position: relative; z-index: 1; }
.cl { display: flex; gap: 16px; line-height: 2.0; font-size: 0.82rem; }
.cl-n { color: var(--text-3); user-select: none; min-width: 18px; text-align: right; font-size: 0.68rem; padding-top: 3px; opacity: 0.5; }
.cl-c .k  { color: var(--blue); }
.cl-c .v  { color: var(--accent); }
.cl-c .s  { color: var(--purple); }
.cl-c .cm { color: var(--text-3); font-style: italic; }
.cl-c .p  { color: var(--accent); }

/* ── REVEAL ANIMATION (horizontal wipe) ── */
.reveal {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ── MOBILE NAV ── */
.nav-hamburger {
  display: none; background: none; border: none;
  color: var(--text-2); cursor: pointer; padding: 6px;
  flex-shrink: 0;
}
/* items only shown inside the mobile drawer */
.mobile-only { display: none !important; }
.nav-links.nav-open .mobile-only { display: list-item !important; }

/* ── NAV MOBILE OPEN STATE ── */
.nav-links.nav-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 0 20px;
  z-index: 199;
  gap: 2px;
}
.nav-links.nav-open a {
  padding: 10px clamp(20px, 4vw, 60px);
  border-radius: 0;
  font-size: 0.95rem;
}
.nav-links.nav-open a::after { display: none; }
.nav-links.nav-open .btn-nav {
  margin: 8px clamp(20px, 4vw, 60px) 0;
  display: inline-flex;
  width: auto;
  align-self: flex-start;
}

/* ── TABLET (≤900px) ── */
@media (max-width: 900px) {
  /* index */
  .what-grid    { grid-template-columns: 1fr; gap: 32px; }
  .vs-layout    { grid-template-columns: 1fr; }
  .usecases-grid { grid-template-columns: 1fr 1fr; }
  .uc-cell:first-child { grid-column: span 2; }
  .uc-cell:nth-child(6):last-child { grid-column: 1 / -1; }

  /* portainer callout */
  .portainer-callout { flex-direction: column; gap: 20px; }
  .portainer-callout .btn-primary { width: 100%; justify-content: center; }

  /* doc pages */
  .doc-layout   { grid-template-columns: 1fr; gap: 0; }
  .doc-toc      { display: none; }
  .about-body   { grid-template-columns: 1fr; }
  .about-sidebar { position: static; }

  /* footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-links { flex-wrap: wrap; gap: 14px; }
}

/* ── NAV COLLAPSE (≤1024px) ── */
@media (max-width: 1024px) {
  .nav-links    { display: none; }
  .nav-right    { display: none; }
  .nav-hamburger { display: block; }
}

/* ── MOBILE (≤640px) ── */
@media (max-width: 640px) {
  /* hero */
  .hero         { padding-top: 100px; padding-bottom: 48px; }
  .hero-badge   { font-size: 0.65rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline { width: 100%; justify-content: center; }
  .hero-install { flex-wrap: wrap; gap: 8px; }
  .hero-install .cmd { font-size: 0.78rem; word-break: break-all; }
  .hero-stats   { flex-direction: column; gap: 16px; }
  .hero-stat    { flex-direction: row; align-items: center; gap: 12px; }
  .hero-stat-val { font-size: 1.1rem; }

  /* bento grid single column */
  .uc-cell:first-child { grid-column: span 1; }

  /* sections */
  section       { padding: 48px 0; }

  /* use cases */
  .usecases-grid { grid-template-columns: 1fr; }

  /* compare table — allow horizontal scroll */
  .compare-wrap { border-radius: 0; margin-left: calc(-1 * clamp(20px, 4vw, 60px)); margin-right: calc(-1 * clamp(20px, 4vw, 60px)); }
  .compare-tbl  { font-size: 0.75rem; }
  .compare-tbl th,
  .compare-tbl td { padding: 9px 12px; }

  /* FAQ */
  .faq-q        { font-size: 0.85rem; padding: 14px 16px; }
  .faq-a        { padding: 14px 16px; }

  /* code blocks */
  .codeblock-body { padding: 14px; overflow-x: auto; }
  .cl           { font-size: 0.75rem; }
  .terminal-body { padding: 14px 16px; font-size: 0.75rem; }

  /* doc pages */
  .doc-body h2  { font-size: 1.1rem; }
  .req-grid     { grid-template-columns: 1fr 1fr; }
  .next-cards   { grid-template-columns: 1fr; }

  /* about */
  .about-body   { padding: 40px 0 60px; }

  /* get-started steps */
  .gs-step      { flex-direction: column; gap: 10px; }

  /* portainer callout */
  .portainer-callout { padding: 20px; }

  /* footer */
  .footer-links { gap: 12px; }
  .footer-legal { font-size: 0.7rem; }
}

/* ── VERY SMALL (≤380px) ── */
@media (max-width: 380px) {
  .hero-install .cmd { font-size: 0.7rem; }
  .req-grid     { grid-template-columns: 1fr; }
  .hero-stat-val { font-size: 1rem; }
}

/* ════════════════════════════════════════════
   SUB-PAGE SHARED STYLES
   (page-hero, doc-layout, callouts, tables, etc.)
   ════════════════════════════════════════════ */

/* ── PAGE HERO ── */
.page-hero { padding: 80px 0 48px; border-bottom: 1px solid var(--border2); }
.page-hero .eyebrow { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: block; }
.page-hero h1 {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: 14px;
  text-transform: uppercase;
}
.page-hero p { color: var(--text-2); max-width: 54ch; font-size: 0.95rem; }

/* ── DOC LAYOUT ── */
.doc-layout { display: grid; grid-template-columns: 200px 1fr; gap: 56px; padding: 56px 0 100px; align-items: start; }
.doc-toc { position: sticky; top: 88px; }
.doc-toc-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 10px; font-family: var(--mono); }
.doc-toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.doc-toc a {
  display: block; font-size: 0.82rem; color: var(--text-3); text-decoration: none;
  padding: 5px 10px; border-left: 2px solid transparent;
  border-radius: 0; transition: all 0.15s;
}
.doc-toc a:hover { color: var(--text); border-left-color: var(--border); text-decoration: none; }
.doc-toc a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); }
.doc-toc-sep { height: 1px; background: var(--border2); margin: 10px 0; }

/* ── DOC BODY ── */
.doc-body { min-width: 0; overflow: hidden; }
.doc-body section { padding: 0 0 56px; border: none; }
.doc-body section + section { border-top: 1px solid var(--border2); padding-top: 48px; }
.doc-body h2 {
  font-family: var(--mono);
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: 16px;
  overflow-wrap: break-word; text-transform: uppercase;
}
.doc-body h3 { font-size: 0.95rem; font-weight: 600; margin-top: 28px; margin-bottom: 10px; color: var(--text); font-family: var(--mono); overflow-wrap: break-word; }
.doc-body p { font-size: 0.88rem; color: var(--text-2); line-height: 1.75; margin-bottom: 14px; overflow-wrap: break-word; word-break: break-word; }
.doc-body p strong { color: var(--text); }
.doc-body p a { color: var(--blue); }
.doc-body p:last-child { margin-bottom: 0; }

/* ── CONFIG TABLE ── */
.config-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border2); border-radius: var(--r); margin: 18px 0; }
.config-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.config-table th { background: var(--bg2); padding: 10px 14px; text-align: left; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); border-bottom: 1px solid var(--border2); font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.config-table td { padding: 10px 14px; border-bottom: 1px solid var(--border2); color: var(--text-2); vertical-align: top; }
.config-table td:first-child { font-family: var(--mono); color: var(--orange); font-size: 0.8rem; white-space: nowrap; }
.config-table tr:last-child td { border-bottom: none; }

/* ── CALLOUT ── */
.callout {
  background: var(--bg2); border: 1px solid var(--border2);
  border-left: 3px solid var(--accent);
  border-radius: var(--r); padding: 14px 18px; margin: 18px 0;
  font-size: 0.84rem; color: var(--text-2); line-height: 1.65;
  overflow-wrap: break-word;
  font-family: var(--sans);
}
.callout strong { color: var(--accent); font-family: var(--mono); }
.callout-warn { border-left-color: var(--orange); }
.callout-warn strong { color: var(--orange); }

/* ── CODEBLOCK OVERFLOW ── */
.codeblock { overflow: hidden; }
.codeblock-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── REQUIREMENTS GRID ── */
.req-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border2); border: 1px solid var(--border2); border-radius: var(--r); overflow: hidden; margin: 20px 0; }
.req-cell { background: var(--bg2); padding: 16px 18px; border-left: 3px solid transparent; }
.req-cell:first-child { border-left-color: var(--accent); }
.req-cell-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-family: var(--mono); margin-bottom: 4px; }
.req-cell-val { font-size: 0.88rem; font-weight: 600; color: var(--text); font-family: var(--mono); }
.req-cell-note { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }

/* ── NEXT STEP CARDS ── */
.next-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 24px; }
.next-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--r); padding: 20px;
  text-decoration: none; color: inherit;
  transition: border-left-color 0.15s, box-shadow 0.15s;
  display: block;
}
.next-card:hover { border-left-color: var(--accent); box-shadow: 0 0 12px rgba(0,229,160,0.08); text-decoration: none; }
.next-card h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; font-family: var(--mono); }
.next-card p { font-size: 0.8rem; color: var(--text-3); line-height: 1.55; margin: 0; }
.next-card .arr { display: block; color: var(--accent); font-size: 0.75rem; margin-top: 10px; font-family: var(--mono); }

/* ── ABOUT PAGE ── */
.about-body { padding: 56px 0 100px; display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: start; }
.about-prose h2 {
  font-family: var(--mono);
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: 0.02em; margin: 40px 0 14px;
  text-transform: uppercase;
}
.about-prose h2:first-child { margin-top: 0; }
.about-prose p { font-size: 0.88rem; color: var(--text-2); line-height: 1.8; margin-bottom: 14px; }
.about-prose p strong { color: var(--text); }
.about-prose p a { color: var(--blue); }

.about-sidebar { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r); padding: 20px;
}
.sidebar-card h3 { font-size: 0.82rem; font-weight: 600; margin-bottom: 10px; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--mono); }
.sidebar-card p { font-size: 0.82rem; color: var(--text-3); line-height: 1.6; margin-bottom: 10px; }
.sidebar-card a.sidebar-link { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--blue); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--border2); transition: color 0.15s; }
.sidebar-card a.sidebar-link:last-child { border-bottom: none; }
.sidebar-card a.sidebar-link:hover { color: var(--text); text-decoration: none; }
.sidebar-tag { display: inline-block; font-family: var(--mono); font-size: 0.7rem; padding: 3px 8px; border-radius: var(--r); margin: 3px 3px 0 0; text-transform: uppercase; }
.tag-green { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-brd); }
.tag-blue  { background: var(--blue-dim);  color: var(--blue);  border: 1px solid rgba(74,158,255,0.2); }

/* ── SUB-PAGE RESPONSIVE ── */
@media (max-width: 800px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .doc-toc { display: none; }
  .about-body { grid-template-columns: 1fr; gap: 32px; }
  .about-sidebar { position: static; }
  .req-grid { grid-template-columns: 1fr 1fr; }
  .next-cards { grid-template-columns: 1fr; }
  .page-hero { padding: 52px 0 32px; }
}
@media (max-width: 640px) {
  .doc-layout { padding: 32px 0 60px; }
  .doc-body section { padding: 0 0 32px; }
  .doc-body section + section { padding-top: 28px; }
  .doc-body h2 { font-size: 1rem; }
  .doc-body h3 { font-size: 0.88rem; }
  .doc-body p { font-size: 0.84rem; }
  .callout { padding: 12px 14px; font-size: 0.8rem; }
  .config-table { font-size: 0.75rem; }
  .config-table th, .config-table td { padding: 8px 10px; }
  .about-body { padding: 32px 0 60px; }
  .about-prose h2 { font-size: 1.1rem; }
  .sidebar-card { padding: 16px; }
  .req-grid { grid-template-columns: 1fr; }
}
