/* ── kubementat landing ──────────────────────────────────────────────
   No webfonts, no CDN, no analytics. Self-hosted is the brand.
   Same skeleton as the kwisatz sibling page — one design language,
   teal instead of amber for the kubernetes side of the family.
   ─────────────────────────────────────────────────────────────────── */

:root {
  --ink-0:   #04070d;
  --ink-1:   #080e18;
  --ink-2:   #0d1522;
  --ink-3:   #12203255;
  --line:     #21374f;
  --line-soft:#182838;
  --line-strong:#2c4a68;
  --text:    #dce8f3;
  --text-dim:#94a8bf;
  --text-mute:#647a92;
  --teal:    #2dd4bf;
  --teal-soft:#2dd4bf22;
  --cyan:    #67e8f9;
  --violet:  #a78bfa;
  --green:   #4ade80;
  --red:     #f87171;

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

  --wrap: 1140px;
  --r: 10px;
  --r-sm: 7px;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
  --sec: clamp(4.5rem, 9vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .6em; font-weight: 600; }
p { margin: 0 0 1.1em; }
code, .mono { font-family: var(--mono); font-variant-ligatures: none; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-size: .86em; letter-spacing: -0.01em; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--teal); color: #02100d; padding: .5rem .9rem; border-radius: 6px; }

/* ── nav ── */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px) saturate(1.4);
  background: #04070dd0;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-stuck { border-bottom-color: var(--line-soft); background: #04070de8; }
.nav__inner { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid; place-items: center; width: 26px; height: 26px;
  background: linear-gradient(150deg, var(--teal), #0e9488);
  color: #04100e; border-radius: 7px; font-family: var(--mono);
  font-size: 14px; font-weight: 700;
}
.brand__mark span { opacity: .5; margin-left: 1px; }
.brand__name { font-family: var(--mono); letter-spacing: -0.04em; font-size: 19px; }
.nav__links { display: flex; gap: clamp(.7rem, 2vw, 1.5rem); margin-left: auto; font-size: .93rem; }
.nav__toggle { display: none; }
@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav__inner { justify-content: space-between; }

  /* the head nav can no longer fit the links inline — fold them into a panel */
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    flex: none; width: 40px; height: 40px; padding: 0 10px; margin-left: .2rem;
    background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
  }
  .nav__toggle:hover { border-color: var(--line-strong); background: var(--ink-3); }
  .nav__toggle-bar { display: block; height: 2px; border-radius: 2px; background: var(--text-dim); transition: transform .2s ease, opacity .2s ease; }
  .nav.is-open .nav__toggle-bar { background: var(--text); }
  .nav.is-open .nav__toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav.is-open .nav__toggle-bar:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav__links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0;
    padding: .35rem var(--pad) .7rem;
    font-size: 1rem;
    background: #04070df2; backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -30px #000;
  }
  .nav.is-open .nav__links { display: block; }
  .nav__links a { display: block; padding: .68rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a.active { color: var(--teal); }
  .nav__cta { margin-left: auto; }
}
@media (max-width: 420px) {
  /* keep the icon, drop the label — the menu button needs the width */
  .nav__cta span { display: none; }
  .nav__cta { padding: .6rem .7rem; }
}
.nav__links a { color: var(--text-dim); }
.nav__links a:hover, .nav__links a.active { color: var(--text); text-decoration: none; }
.nav__cta { font-size: .85rem !important; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.05rem; border-radius: 8px; font-size: .95rem; font-weight: 550;
  border: 1px solid var(--line); color: var(--text); background: var(--ink-2);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--line-strong); transform: translateY(-1px); }
.btn--primary { background: var(--teal); border-color: var(--teal); color: #05130f; }
.btn--primary:hover { background: #43e0cc; }
.btn--ghost { background: transparent; }

/* ── hero ── */
.hero { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero__grid {
  position: absolute; inset: -20% -10% auto -10%; height: 130%;
  background:
    radial-gradient(60% 55% at 22% 12%, #2dd4bf12 0%, transparent 70%),
    radial-gradient(50% 60% at 88% 8%, #67e8f90e 0%, transparent 70%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0/48px 48px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0/48px 48px;
  mask-image: radial-gradient(80% 70% at 50% 15%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; grid-template-columns: minmax(0,1fr) minmax(0,.86fr); }
@media (max-width: 980px) { .hero__inner { grid-template-columns: 1fr; } }

.eyebrow { color: var(--teal); font-size: .74rem; letter-spacing: .17em; text-transform: uppercase; margin: 0 0 1.1rem; }
.hero h1 { font-size: clamp(2.5rem, 6.6vw, 4.1rem); margin: 0 0 1rem; }
.hero h1 .line { display: block; }
.hero h1 em { font-style: normal; color: var(--teal); }
.lede { color: var(--text-dim); font-size: clamp(1rem, 1.4vw, 1.13rem); max-width: 56ch; }
.lede strong { color: var(--text); font-weight: 550; }
.hero__formula { display: flex; flex-wrap: wrap; gap: .5rem .6rem; align-items: center; margin: 1.5rem 0 1.9rem; }
.chip {
  font-family: var(--mono); font-size: .78rem; padding: .3rem .65rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink-1); color: var(--text-dim); white-space: nowrap;
}
.chip--accent { border-color: #2dd4bf55; background: var(--teal-soft); color: var(--teal); }
.arrow { color: var(--text-mute); font-size: .85rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

.stats { display: flex; flex-wrap: wrap; gap: clamp(1.4rem, 4vw, 3rem); margin: clamp(2rem, 4vw, 3rem) 0 0; padding: clamp(1.2rem,2vw,1.6rem) 0 0; border-top: 1px solid var(--line-soft); }
.stats div { display: grid; gap: .1rem; }
.stats dt { color: var(--text-mute); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.stats dd { margin: 0; font-family: var(--mono); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* terminal */
.term { border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg,#081120,#060b14); box-shadow: 0 34px 90px -46px #000, inset 0 1px 0 #ffffff08; }
.term__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.term__title { margin-left: 10px; color: var(--text-mute); font-size: 11.5px; }
.term__body { margin: 0; padding: 18px 18px 22px; font-size: 12.6px; line-height: 1.9; min-height: 208px; white-space: pre-wrap; overflow-wrap: anywhere; }
.term__body code { font-family: inherit; }
.prompt { color: var(--green); }
.term .out { display: block; color: var(--text-mute); }
.term .out b { color: var(--cyan); font-weight: 400; }
.caret { display: inline-block; width: 7px; height: 15px; background: var(--teal); vertical-align: -2px; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0 } }

/* ── sections ── */
.sec { padding: var(--sec) 0; }
.sec--alt { background: linear-gradient(180deg, transparent, #080e1898 12%, #080e1898 88%, transparent); border-block: 1px solid var(--line-soft); }
.sec__h { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 22ch; }
.sec__intro { color: var(--text-dim); max-width: 66ch; margin-top: -.3em; }
.section-label { display: flex; align-items: center; gap: .75rem; color: var(--text-mute); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 1.5rem; }
.section-label span { color: var(--teal); }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); max-width: 180px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── compare table ── */
.compare { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-1); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.compare th, .compare td { padding: .95rem 1.15rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
.compare thead th { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); border-bottom-color: var(--line); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody th { font-weight: 450; color: var(--text-dim); width: 34%; }
.compare td.kb, .compare th.kb { color: var(--teal); }
.compare td.kb { font-weight: 500; }
.compare td.bad { color: var(--text-mute); }
.compare td.good { color: var(--text); }
.compare tbody tr:hover { background: #2dd4bf08; }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: 0 var(--r) var(--r) 0; background: #2dd4bf0d; padding: 1.1rem 1.4rem; margin-top: 1.6rem; }
.callout p { margin: 0; color: var(--text-dim); }
.callout strong { color: var(--text); }
.callout--warn { border-left-color: var(--cyan); background: #67e8f908; }

/* ── split / feature list ── */
.split { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); align-items: start; }
@media (max-width: 940px) { .split { grid-template-columns: 1fr; } }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.feature-list p { margin: .35rem 0 0; color: var(--text-dim); }
.feature-list strong { color: var(--text); font-weight: 550; }
.tag { display: inline-block; font-size: .8rem; color: var(--cyan); background: #67e8f914; border: 1px solid #67e8f928; border-radius: 6px; padding: .1rem .5rem; }
.ticks { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: .6rem; color: var(--text-dim); }
.ticks li { padding-left: 1.5rem; position: relative; }
.ticks li::before { content: "▸"; position: absolute; left: 0; color: var(--teal); }

.diagram { margin: 0; border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1rem,2vw,1.6rem); background: radial-gradient(120% 100% at 50% 0%, #0a1420, var(--ink-1)); }
.diagram svg { width: 100%; height: auto; }
.dg-box rect { fill: #0a1420; stroke: var(--line-strong); stroke-width: 1; rx: 8; }
.dg-box text { fill: var(--text); font-family: var(--mono); font-size: 14px; }
.dg-box .sub { fill: var(--text-mute); font-size: 10.5px; }
.dg-box--accent rect { fill: var(--teal-soft); stroke: var(--teal); }
.dg-box--accent text { fill: var(--teal); }
.dg-box--soft rect { fill: #ffffff06; stroke: var(--line); }
.dg-line path { stroke: var(--line-strong); stroke-width: 1.4; fill: none; }
.diagram figcaption { color: var(--text-mute); font-size: .82rem; margin-top: 1rem; text-align: center; }

/* ── steps ── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.4rem; }
.steps h3 { font-size: 1.25rem; margin: 0; }
.step__head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .9rem; }
.step__num { color: var(--teal); font-size: .8rem; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.step__note { color: var(--text-dim); margin: .75rem 0 0; font-size: .94rem; max-width: 74ch; }

/* code blocks must not widen their grid/flex parent */
.steps > li, .split > *, .codes > *, .cli-grid > *, .compare > *, .docgrid > *, .cards > * { min-width: 0; }
pre { max-width: 100%; }

/* ── code blocks ── */
.code { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: #060a12; overflow: hidden; }
.code pre { margin: 0; padding: 1.05rem 1.15rem; overflow-x: auto; font-size: 13px; line-height: 1.75; color: #c3d4e6; }
.code code { font-family: var(--mono); }
.code .copy {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-mute); background: #0d1724; border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 8px; cursor: pointer; opacity: 0; transition: opacity .18s ease, color .18s ease, border-color .18s ease;
}
.code:hover .copy, .copy:focus-visible { opacity: 1; }
/* touch devices never hover — keep the copy button tappable */
@media (hover: none) { .code .copy { opacity: .85; } .code .copy:active { opacity: 1; } }
.code .copy:hover { color: var(--teal); border-color: var(--teal); }
.code .copy.done { color: var(--green); border-color: var(--green); opacity: 1; }
.code--wide { align-self: start; }

/* ── cli grid ── */
.cli-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); margin: 2rem 0 2.4rem; }
.cli-card { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; background: var(--ink-1); transition: border-color .2s, transform .2s, background .2s; }
.cli-card:hover { border-color: var(--line-strong); transform: translateY(-2px); background: var(--ink-2); }
.cli-card code { color: var(--teal); font-size: .87rem; }
.cli-card p { margin: .5rem 0 0; color: var(--text-dim); font-size: .89rem; line-height: 1.5; }

.codes { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: start; }
@media (max-width: 940px) { .codes { grid-template-columns: 1fr; } }
.exitcodes { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-1); border-collapse: separate; border-spacing: 0; font-size: .87rem; overflow: hidden; }
.exitcodes caption { text-align: left; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); padding: .8rem 1rem .3rem; }
.exitcodes td { padding: .5rem .9rem; border-top: 1px solid var(--line-soft); color: var(--text-dim); }
.exitcodes td:first-child { color: var(--teal); width: 1%; white-space: nowrap; }
.exitcodes td:nth-child(3) { color: var(--teal); width: 1%; white-space: nowrap; }

/* ── component cards ── */
.cards { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card {
  overflow-wrap: anywhere; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem 1.05rem;
  background: linear-gradient(180deg, var(--ink-1), #070c15);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 18px 40px -30px #000; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .45rem; }
.card__name { font-family: var(--mono); font-size: .87rem; color: var(--teal); }
.card__kind { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 5px; }
.card__kind--python { color: var(--cyan); border-color: #67e8f930; }
.card__cat { font-size: .71rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 .4rem; }
.card p { margin: 0; color: var(--text-dim); font-size: .895rem; line-height: 1.55; }
.card__blurb { flex: 1 1 auto; }
.card__src {
  align-self: flex-start; margin-top: .6rem;
  font-family: var(--mono); font-size: .76rem; color: var(--text-mute); text-decoration: none;
  border-bottom: 1px dotted var(--line-strong); transition: color .18s, border-color .18s;
}
.card__src:hover, .card__src:focus-visible { color: var(--teal); border-bottom-color: var(--teal); }

/* ── docs grid ── */
.docgrid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); margin-top: 2rem; }
.doc {
  display: block; color: inherit; border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.15rem 1.2rem 1rem; background: var(--ink-1); position: relative;
  transition: border-color .2s, transform .2s, background .2s;
}
.doc:hover { text-decoration: none; border-color: var(--teal); transform: translateY(-2px); background: var(--ink-2); }
.doc h3 { font-size: 1.02rem; margin: 0 0 .35rem; }
.doc p { margin: 0 0 .9rem; color: var(--text-dim); font-size: .88rem; line-height: 1.5; }
.doc__go { font-family: var(--mono); font-size: .74rem; color: var(--teal); }

/* ── footer ── */
.foot { border-top: 1px solid var(--line-soft); padding: clamp(2.4rem, 5vw, 3.5rem) 0 2.5rem; background: #030509; }
.foot__inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-end; }
.foot__brand { font-family: var(--mono); font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.foot__line { margin: .15rem 0; color: var(--text-mute); font-size: .85rem; }
.foot__meta { text-align: right; }
@media (max-width: 720px) { .foot__meta { text-align: left; } }
@media (max-width: 640px) {
  .sec { padding-block: clamp(3.4rem, 11vw, 5rem); }
  .sec__h { max-width: none; }
  /* the compare table cannot show three columns at phone width */
  .compare { font-size: .86rem; }
  .compare th, .compare td { padding: .7rem .8rem; }
  .compare tbody th { width: 38%; }
  .exitcodes { font-size: .8rem; }
  .exitcodes td { padding: .45rem .6rem; }
  /* diagram text gets unreadably small when the svg is scaled down — hold the
     box and let it scroll instead of shrinking the glyphs */
  .diagram { overflow-x: auto; }
  .diagram svg { min-width: 560px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
  .steps { gap: 1.8rem; }
}
.foot__self { color: var(--text-mute); font-size: .76rem; line-height: 1.7; margin: 0 0 .9rem; }
.foot__gen { color: var(--line-strong); font-size: .7rem; }

/* ── legal pages ── */
.legal { max-width: 74ch; }
.legal h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); margin: 2.2rem 0 .7em; }
.legal h3 { font-size: 1.05rem; margin: 1.6rem 0 .5em; color: var(--text-dim); }
.legal p { color: var(--text-dim); }
.legal strong { color: var(--text); }
.legal__card {
  font-style: normal; line-height: 1.7; color: var(--text-dim);
  border: 1px solid var(--line); border-left: 3px solid var(--teal);
  border-radius: 0 var(--r) var(--r) 0; background: var(--ink-1);
  padding: 1rem 1.3rem; margin: 0 0 1rem;
}
.legal__name { display: block; color: var(--text); font-weight: 600; }
.legal__back { margin-top: 2.5rem; }

/* ── motion / contrast ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (prefers-contrast: more) {
  :root { --text-dim: #c0cddf; --text-mute: #a3b2c6; --line: #37547a; }
}
