/* calma.sh: tokens. Dark by default, Tokyo Night palette from the blocked page. */
:root {
  --bg: #1a1b26;
  --bg-deep: #16161e;
  --surface: #24283b;
  --surface-2: #1f2335;
  --border: #2f3549;
  --ink: #c0caf5;
  --fg: #a9b1d6;
  --muted: #565f89;
  --muted-2: #414868;
  --accent: #7aa2f7;
  --accent-ink: #1a1b26;
  --red: #f7768e;
  --green: #9ece6a;
  --radius: 10px;
  --radius-l: 18px;
  --wrap: 1120px;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; color: var(--ink); }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

/* mono label helpers */
.eyebrow, .btn, .copy, .block-k, .col-k, .step-k, .strip-k, .strip-v, .strip-end, .code-head,
.nav-links a, .wire-k, .layer-n, .hero-meta, .more, .frame-url, .pill {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.eyebrow { color: var(--accent); text-transform: lowercase; }
.eyebrow::before { content: "// "; color: var(--muted); }

/* NAV */
.nav { padding: 26px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 500; font-size: 17px; letter-spacing: 0.01em;
  color: var(--ink);
}
.mark { width: 18px; height: 18px; display: block; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

/* HERO */
.hero {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  margin-top: 22px;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
}
.tagline { margin-top: 24px; font-size: 17.5px; line-height: 1.6; color: var(--fg); max-width: 500px; }
.hero-actions { margin-top: 34px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center;
  padding: 11px 20px; border-radius: 999px;
  font-size: 13px; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: var(--ink); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-meta { margin-top: 22px; color: var(--muted); }

/* HERO DEMO: the blocked page, recreated */
.hero-demo { display: flex; flex-direction: column; gap: 14px; }
.frame {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  overflow: hidden;
  box-shadow: 0 40px 100px -40px rgb(0 0 0 / 0.7);
}
.frame-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.frame-dots { display: inline-flex; gap: 6px; }
.frame-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); display: block; }
.frame-url {
  flex: 1; text-align: center; color: var(--muted);
  background: var(--bg); border-radius: 6px; padding: 4px 10px; font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.blocked {
  min-height: 420px;
  display: grid; grid-template-rows: 1fr auto; place-items: center; gap: 14px;
  padding: 28px 22px 18px;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
}
.card {
  width: min(100%, 24rem);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.55rem;
  padding: 2rem 1.5rem 1.8rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.55), 0 1px 0 rgb(255 255 255 / 0.04) inset;
  animation: rise 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.glyph {
  display: grid; place-items: center;
  width: 3.6rem; height: 3.6rem; margin-bottom: 0.3rem;
  border-radius: 50%; font-size: 1.6rem; font-family: var(--mono), var(--sans);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent) inset;
}
.label { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.2; }
.message { max-width: 22rem; font-size: 0.98rem; color: var(--fg); text-wrap: balance; }
.budget { margin-top: 0.1rem; font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.budget span { white-space: nowrap; }
.action { margin-top: 1rem; }
.primary {
  padding: 0.75rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem;
  color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform 160ms ease, filter 160ms ease;
}
.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.note { margin-top: 0.9rem; font-size: 0.9rem; color: var(--muted); }
.note strong { color: var(--fg); font-weight: 500; }
[hidden] { display: none !important; }
.card-foot { font-size: 0.74rem; color: var(--muted); display: flex; gap: 0.5rem; align-items: center; }
.card-foot code { font-size: 0.72rem; padding: 0.1rem 0.4rem; border-radius: 5px; background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }

/* state: open */
.open { position: relative; min-height: 420px; padding: 18px; background: var(--bg); display: flex; }
.open .wire { flex: 1; align-content: start; }
.pill {
  position: absolute; right: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  border: 1px solid var(--border);
  color: var(--fg); font-size: 12px;
  box-shadow: 0 14px 34px -14px rgb(0 0 0 / 0.7);
  animation: rise 400ms ease both;
}
.pill .sep { color: var(--muted-2); }
.pill .time { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 2.6em; }
.pill button { color: var(--accent); font-family: inherit; font-size: inherit; padding: 0; }
.pill button:hover { color: var(--ink); }

.demo-steps { display: inline-flex; gap: 6px; justify-content: center; }
.demo-steps i { width: 26px; height: 2px; background: var(--border); display: block; transition: background .3s; }
.demo-steps i.on { background: var(--accent); }

/* WIREFRAMES (shared) */
.wire {
  display: grid; gap: 14px;
  padding: 16px; border-radius: 10px;
  background: var(--bg-deep); border: 1px solid var(--border);
  min-height: 170px;
}
.wire-x { grid-template-columns: 22px 1fr 60px; }
.wire-nav { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 2px; }
.wire-nav i { width: 10px; height: 10px; border-radius: 3px; background: var(--muted-2); display: block; }
.wire-nav i.dot-x { background: var(--fg); border-radius: 50%; }
.wire-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wire-tabs { display: flex; gap: 14px; font-family: var(--mono); font-size: 10px; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.wire-tabs span { white-space: nowrap; }
.wire-tabs .on { color: var(--ink); box-shadow: 0 7px 0 -5px var(--accent); }
.wire-post { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.wire-post i { width: 18px; height: 18px; border-radius: 50%; background: var(--muted-2); }
.wire-post b { display: flex; flex-direction: column; gap: 5px; padding-top: 3px; }
.wire u, .wire-main > u { display: block; height: 5px; border-radius: 3px; background: var(--border); width: 100%; }
.w30 { width: 30% !important; } .w40 { width: 40% !important; } .w50 { width: 50% !important; }
.w60 { width: 60% !important; } .w70 { width: 70% !important; } .w90 { width: 90% !important; }
.wire-post.promo i, .wire-post.promo u { background: color-mix(in srgb, var(--red) 40%, var(--border)); }
.wire-side { display: flex; flex-direction: column; gap: 8px; }
.wire-search { display: block; height: 12px; border-radius: 999px; border: 1px solid var(--border); }
.wire-box { display: block; height: 30px; border-radius: 5px; background: color-mix(in srgb, var(--red) 18%, var(--surface-2)); border: 1px dashed color-mix(in srgb, var(--red) 40%, var(--border)); }
.wire-box.tall { height: 46px; }

.wire-yt { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 10px; }
.wire-top { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: center; }
.dot-yt { width: 14px; height: 10px; border-radius: 3px; background: var(--red); display: block; }
.wire-top .wire-search { max-width: 55%; justify-self: center; width: 100%; }
.wire-body { display: grid; grid-template-columns: 18px 1fr; gap: 14px; }
.wire-chips { display: flex; gap: 6px; }
.wire-chips span { height: 9px; width: 28px; border-radius: 999px; background: var(--muted-2); }
.wire-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.wire-thumbs i { display: block; aspect-ratio: 16/9; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.wire-shorts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.wire-shorts i { display: block; aspect-ratio: 9/14; max-height: 44px; border-radius: 4px; background: color-mix(in srgb, var(--red) 18%, var(--surface-2)); border: 1px dashed color-mix(in srgb, var(--red) 40%, var(--border)); }
.wire-player { aspect-ratio: 16/9; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.wire-player::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-40%, -50%); border-left: 12px solid var(--muted); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }

/* STRIP */
.strip {
  margin-top: 72px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 230px;
}
.strip > * { min-width: 0; }
.strip-cell { padding: 16px 20px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.strip-title { border-right: 1px solid var(--border); }
.strip-k { color: var(--ink); }
.strip-v, .strip-end span { color: var(--muted); font-size: 11px; }
.strip-cmd { flex-direction: row; align-items: center; gap: 12px; }
.strip-cmd code { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.copy {
  padding: 7px 12px; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink); white-space: nowrap;
  transition: background .15s;
}
.copy:hover, .copy.ok { background: var(--ink); color: var(--accent-ink); }
.copy-small { padding: 4px 9px; font-size: 11px; }
.strip-end { border-left: 1px solid var(--border); }
.strip-end a { color: var(--ink); }

/* SECTIONS */
.section { padding-top: 112px; }
h2 {
  margin-top: 16px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 720px;
  text-wrap: balance;
}
.sub { margin-top: 16px; color: var(--muted); max-width: 620px; font-size: 16.5px; }
.sub code { color: var(--fg); }
.after { margin-top: 28px; color: var(--muted); font-size: 15px; max-width: 760px; line-height: 1.6; }
.after.small { font-size: 14px; }
.more { display: inline-block; margin-top: 20px; color: var(--ink); }
.more:hover { color: var(--accent); }

/* THE MODEL */
.blocks { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.block { background: var(--bg); padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.block-k { color: var(--ink); }
.block p:last-child { font-size: 15px; color: var(--fg); line-height: 1.6; }

/* MINIMAL */
.minimal-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.minimal { min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 24px; }
.minimal-head { display: flex; align-items: center; gap: 12px; }
.minimal-head h3 { font-size: 20px; }
.glyph-s { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--mono); font-size: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent) inset; }
.glyph-s.yt { font-size: 11px; padding-left: 2px; }
.wires { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wire-pane { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wire-pane .wire { flex: 1; }
.wire-k { color: var(--muted); }
.wire-k.on { color: var(--accent); }
.wire-full { opacity: 0.85; }
.cols { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.col-k { color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cols ul { margin-top: 8px; }
.cols li { padding: 6px 0 6px 16px; font-size: 14.5px; position: relative; color: var(--fg); }
.cols li::before { content: ""; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; border-radius: 50%; }
.keep li::before { background: var(--accent); }
.gone li { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 55%, transparent); }
.gone li::before { background: var(--red); opacity: 0.7; }

/* LAYERS */
.layers { margin-top: 40px; border-top: 1px solid var(--border); max-width: 860px; }
.layers li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); font-size: 15.5px; line-height: 1.6; }
.layer-n { color: var(--accent); padding-top: 4px; }
.layers b { color: var(--ink); font-weight: 500; }

/* HONESTY */
.honest {
  display: grid; grid-template-columns: 5fr 6fr; gap: 48px;
  padding: 40px; border-radius: var(--radius-l);
  background: var(--surface-2); border: 1px solid var(--border);
}
.honest > * { min-width: 0; }
.honest h2 { font-size: clamp(24px, 2.6vw, 32px); }
.honest-text { display: flex; flex-direction: column; gap: 16px; font-size: 15.5px; line-height: 1.65; color: var(--fg); }
.honest-text .more { margin-top: 6px; }

/* INSTALL */
.install-grid { margin-top: 40px; display: grid; grid-template-columns: 5fr 6fr; gap: 48px; }
.install-grid > * { min-width: 0; }
.steps { display: flex; flex-direction: column; gap: 28px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 16px; min-width: 0; }
.steps li > div { min-width: 0; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.step-k { color: var(--ink); font-size: 13px; }
.step-k em { font-style: normal; color: var(--accent); }
.steps p + p, .steps .step-k + p { margin-top: 8px; font-size: 15px; color: var(--fg); line-height: 1.6; }
.steps .code-panel { margin-top: 10px; }
.install-panels { display: flex; flex-direction: column; gap: 14px; }

/* CODE PANELS */
.code-panel { background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.code-head { padding: 9px 16px; color: var(--muted); border-bottom: 1px solid var(--border); font-size: 11px; }
.code-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.code { margin: 0; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; overflow-x: auto; white-space: pre; color: var(--ink); }
.code-wrap { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; }
.code .c { color: var(--muted); }
.code .p { color: var(--accent); user-select: none; }

/* FAQ */
.faq { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; border-top: 1px solid var(--border); max-width: 1000px; }
.faq > div { padding: 22px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.faq dt { color: var(--ink); font-weight: 500; font-size: 16px; }
.faq dd { margin-top: 8px; color: var(--fg); font-size: 15px; line-height: 1.6; }

/* FOOTER */
.footer { margin-top: 112px; border-top: 1px solid var(--border); background: var(--bg-deep); }
.footer-inner { padding-top: 40px; padding-bottom: 32px; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.footer-brand p:last-child { font-size: 14px; color: var(--muted); line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--mono); font-size: 12px; color: var(--fg); align-content: start; }
.footer-bottom { padding-top: 18px; padding-bottom: 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); }
.footer-bottom a { color: var(--fg); }
.footer-bottom a:hover { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; margin-top: 36px; }
  .blocks { grid-template-columns: 1fr 1fr; }
  .minimal-grid { grid-template-columns: 1fr; }
  .honest, .install-grid { grid-template-columns: 1fr; gap: 28px; }
  .strip { grid-template-columns: 1fr; }
  .strip-title { border-right: 0; border-bottom: 1px solid var(--border); }
  .strip-end { border-left: 0; border-top: 1px solid var(--border); }
  .faq { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .section { padding-top: 80px; }
  .nav { padding: 20px 0; }
  .nav-links { gap: 18px; }
  .hero h1 { font-size: clamp(32px, 9.5vw, 40px); }
  .tagline { font-size: 16px; }
  .blocks { grid-template-columns: 1fr; }
  .blocked, .open { min-height: 380px; padding: 22px 14px 14px; }
  .card { padding: 1.6rem 1rem 1.4rem; }
  .honest { padding: 24px; }
  .minimal { padding: 18px; }
  .wires { grid-template-columns: 1fr; }
  .wire-x { grid-template-columns: 18px 1fr 48px; }
  .layers li { grid-template-columns: 40px 1fr; gap: 10px; }
  .strip-cmd { flex-direction: column; align-items: stretch; }
  .strip-cmd .copy { align-self: flex-start; }
  .footer { margin-top: 80px; }
  .footer-brand .wordmark { font-size: 16px; }
}

/* MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .pill { animation: none; }
  .primary, .btn, .copy, .demo-steps i { transition: none; }
}
