/* Enterm site: shared styles. Dark, terminal and canvas inspired, colours from the app icon. */
:root {
  color-scheme: dark;
  --bg: #0a0c0d;
  --bg-2: #0f1213;
  --panel: #14181a;
  --panel-2: #191e20;
  --line: rgba(233, 240, 236, 0.09);
  --line-2: rgba(233, 240, 236, 0.16);
  --text: #eceeea;
  --muted: #a2aba6;
  --faint: #737c78;
  --lime: #d8ee4e;
  --lime-ink: #141a05;
  --green: #86d19a;
  --coral: #f47f78;
  --blue: #7fa6ff;
  --violet: #b59dff;
  --gold: #f1c75b;
  --silver: #c9d0d4;
  --bronze: #d99a6c;
  --radius: 14px;
  --radius-s: 9px;
  --max: 1180px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; display: block; }
a { color: var(--lime); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre { font-family: var(--mono); font-size: .92em; }
code { background: rgba(255,255,255,.06); padding: .08em .38em; border-radius: 5px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.6rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.8rem, 4.2vw, 3rem); letter-spacing: -0.035em; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--lime); color: var(--lime-ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lime); color: var(--lime-ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 13, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.08rem; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 2px; margin-left: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-size: .93rem; padding: 7px 11px; border-radius: 8px; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.05); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; padding: 2px; }
.lang a { display: inline-grid; place-items: center; color: var(--muted); font: 600 .78rem var(--mono); text-decoration: none; padding: 5px 8px; border-radius: 7px; min-width: 34px; min-height: 28px; }
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { background: var(--lime); color: var(--lime-ink); }
.menu-btn { display: none; appearance: none; background: transparent; border: 1px solid var(--line-2); color: var(--text); width: 40px; height: 36px; border-radius: 9px; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 16px; height: 1.5px; background: currentColor; margin: 0 auto; position: relative; transition: transform .25s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -5px; } .menu-btn span::after { top: 5px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; background: rgba(10,12,13,.97); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1rem; }
  .menu-btn { display: block; }
}
@media (max-width: 420px) {
  .star-btn .star-label { display: none; }
  .brand span { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 11px;
  font: 600 .98rem var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--text);
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.26); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); box-shadow: 0 8px 30px -10px rgba(216,238,78,.55); }
.btn-primary:hover { background: #e3f56d; border-color: #e3f56d; box-shadow: 0 12px 36px -10px rgba(216,238,78,.7); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: .88rem; border-radius: 9px; }
.btn .sub { font-weight: 500; opacity: .7; font-size: .85em; }
.star-btn .count { font-family: var(--mono); font-size: .82rem; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.08); min-width: 1ch; }
.star-btn .count:empty { display: none; }
.star-btn svg { color: var(--gold); }
.btn-primary.star-btn svg { color: var(--lime-ink); }
.btn-primary.star-btn .count { background: rgba(0,0,0,.12); }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(72px, 11vw, 140px) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 .8rem var(--mono); color: var(--lime); letter-spacing: .02em; text-transform: uppercase; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.22rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.split.flip > :first-child { order: 2; }
@media (max-width: 920px) { .split, .split.flip { grid-template-columns: minmax(0, 1fr); } .split.flip > :first-child { order: 0; } }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 22px 0 26px; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--muted); }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; font: 600 .8rem var(--mono); color: var(--lime); }
.steps strong { color: var(--text); font-weight: 600; }
.checks { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 26px; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: rotate(-45deg); }
.checks strong { color: var(--text); font-weight: 600; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more-link::after { content: "→"; transition: transform .2s; }
.more-link:hover::after { transform: translateX(4px); }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; } .js .reveal.d2 { transition-delay: .16s; } .js .reveal.d3 { transition-delay: .24s; }

/* panels and windows */
.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); }
.window { background: #0c0f10; border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: 0 40px 120px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4); }
.window-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.dots { display: flex; gap: 7px; flex: none; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3033; }

/* code blocks */
.codebox { position: relative; background: #08090a; border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 54px 16px 18px; font: .9rem/1.75 var(--mono); color: var(--text); overflow-x: auto; }
.codebox .p { color: var(--lime); user-select: none; }
.codebox .c { color: var(--faint); }
.copy { position: absolute; top: 10px; right: 10px; appearance: none; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; transition: color .2s, border-color .2s; }
.copy:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.copy svg { width: 16px; height: 16px; }
.copy.done { color: var(--lime); border-color: var(--lime); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--lime); color: var(--lime-ink); font-weight: 600; padding: 10px 16px; border-radius: 10px; z-index: 90; transition: opacity .25s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--muted); font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot .foot-h { margin: 0 0 10px; color: var(--text); font-size: .85rem; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot .fine { margin-top: 36px; font-size: .8rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* simple pages */
.page { padding: clamp(56px, 9vw, 110px) 0; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
