/* ============================================================
   ZEKAST.STUDIO — DS v0.1
   Editorial sober · all sans · mono system stamps · single accent
   ============================================================ */

:root {
  /* ——— Tokens (DARK — sole theme) ——— */
  --bg:        #0f0e0c;
  --bg-2:      #181714;
  --bg-3:      #211f1a;
  --ink:       #f4f1e8;
  --ink-2:     #c8c3b6;
  --ink-3:     #8c887e;
  --ink-4:     #635f57;
  --ink-5:     #3f3c37;
  --rule:      #2a2825;
  --rule-soft: #1f1d1a;
  --paper:     #161412;

  /* Accent (cycled via tweaks) */
  --accent:        #e26a35;   /* orange brûlé — boosted for dark */
  --accent-ink:    #0f0e0c;
  --accent-soft:   color-mix(in oklab, var(--accent) 16%, var(--bg));
  --accent-line:   color-mix(in oklab, var(--accent) 45%, var(--rule));

  /* Semantic */
  --ok:    #6ba56a;
  --warn:  #d6a738;
  --err:   #d05a4e;

  /* Type */
  --f-display: "Inter Display", "Inter", system-ui, sans-serif;
  --f-sans:    "Inter", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --tracking-tight: -0.025em;
  --tracking-mono:  0.04em;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 192px;

  /* Radii */
  --r-0: 0;
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
  --r-full: 999px;

  --container: 1280px;
  --container-wide: 1440px;
}

/* ——— Accent variants for tweaks (dark-tuned) ——— */
html[data-accent="orange"]   { --accent: #e26a35; }
html[data-accent="ocre"]     { --accent: #d6a738; }
html[data-accent="green"]    { --accent: #6ba56a; }
html[data-accent="aubergine"]{ --accent: #a96bc4; }
html[data-accent="mono"]     { --accent: var(--ink); }

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 32px;
}
.wrap-wide { max-width: var(--container-wide); }
.wrap-narrow { max-width: 880px; }

.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); } .gap-5 { gap: var(--s-5); } .gap-6 { gap: var(--s-6); }
.gap-7 { gap: var(--s-7); } .gap-8 { gap: var(--s-8); }
.align-c { align-items: center; }
.align-b { align-items: baseline; }
.justify-b { justify-content: space-between; }

/* ============================================================
   TYPE
   ============================================================ */
.display-xl, .display-l, .display-m, .display-s, h1.h, h2.h, h3.h {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 0.98;
  text-wrap: balance;
  margin: 0;
}
.display-xl { font-size: clamp(56px, 8.4vw, 128px); line-height: 0.92; letter-spacing: -0.035em; font-weight: 600; }
.display-l  { font-size: clamp(40px, 5.6vw, 80px); line-height: 0.96; letter-spacing: -0.03em; }
.display-m  { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -0.025em; }
.display-s  { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -0.018em; font-weight: 600;}

.lede { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.body-l { font-size: 18px; line-height: 1.55; }
.body { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.body-s { font-size: 14px; line-height: 1.55; }
.caption { font-size: 13px; line-height: 1.4; color: var(--ink-3); }

p { margin: 0 0 var(--s-4); }
strong, b { font-weight: 600; color: var(--ink); }

/* Mono "system stamps" — the recurring detail */
.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  font-feature-settings: "tnum";
}
.mono-lg { font-size: 13px; }
.mono.ink { color: var(--ink); }
.mono.accent { color: var(--accent); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; vertical-align: middle; }
.dot.live { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent); }

/* Folio-style section label */
.folio {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s-6);
}
.folio .num { color: var(--accent); font-weight: 600; }
.folio .meta { margin-left: auto; }

/* ============================================================
   HEADER / FOOTER
   ============================================================ */
.site-bar {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.site-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  gap: 24px;
}
.site-bar .bar-l, .site-bar .bar-r { display: flex; gap: 24px; align-items: center; }
.site-bar .bar-r > * { display: flex; align-items: center; gap: 6px; }

.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.brand-mark {
  width: 22px; height: 22px;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  border-radius: 3px;
  position: relative;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  border-right-color: transparent;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.nav-links { display: flex; gap: 4px; margin-left: 24px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 3px;
  position: relative;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Footer */
.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: var(--s-10);
  padding: var(--s-8) 0 var(--s-6);
  background: var(--bg);
}
.site-foot .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: var(--s-6);
}
.site-foot h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 var(--s-4);
}
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-foot ul a { font-size: 14px; color: var(--ink-2); }
.site-foot ul a:hover { color: var(--ink); }
.site-foot .credit { color: var(--ink-3); font-size: 13px; max-width: 36ch; margin-top: 12px; }

.foot-bottom {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover { background: color-mix(in oklab, var(--accent) 80%, var(--ink)); }

.btn-ghost {
  color: var(--ink);
  border-color: var(--rule);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-2); }

.btn-link {
  padding: 0;
  font-size: inherit;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  border-radius: 0;
}
.btn-link:hover { color: var(--accent); }

.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }

.arrow { display: inline-block; transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   CARDS / BORDERS / RULES
   ============================================================ */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
}
.card-pad { padding: var(--s-6); }

.rule-h { border-top: 1px solid var(--rule); }
.thin-line { height: 1px; background: var(--rule); width: 100%; }

/* "Mono ticker" — thin horizontal rule with mono labels */
.ticker {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  overflow: hidden;
  white-space: nowrap;
}
.ticker .sep { color: var(--ink-5); }
.ticker .step { color: var(--ink-2); }
.ticker .step.now { color: var(--accent); font-weight: 600; }

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--r-1);
  background: var(--bg-2);
}
.tag.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.tag.dot::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Kbd */
kbd {
  font-family: var(--f-mono);
  font-size: 11px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--ink);
}

/* Code block */
.code {
  font-family: var(--f-mono);
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  padding: 16px 20px;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.55;
}
.code .c-comment { color: var(--ink-3); }
.code .c-key { color: var(--accent); }
.code .c-str { color: var(--ok); }
.code .c-num { color: var(--warn); }
code:not(.code) {
  font-family: var(--f-mono);
  font-size: 0.92em;
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--rule-soft);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--s-10) 0;
  border-top: 1px solid var(--rule);
}
.section-tight { padding: var(--s-8) 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-7);
  align-items: end;
  margin-bottom: var(--s-8);
}
.section-head .left .folio { margin-bottom: var(--s-4); border: 0; padding: 0; }
.section-head .right { max-width: 64ch; }
.section-head .right .lede { font-size: 18px; color: var(--ink-2); }

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: var(--s-4); }
}

/* ============================================================
   PLUGIN MOCKUPS (drawn placeholders)
   ============================================================ */

/* Episode artwork tile — striped placeholder w/ caption */
.art {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-3) 0,
      var(--bg-3) 6px,
      var(--bg-2) 6px,
      var(--bg-2) 12px
    );
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  aspect-ratio: 1;
}
.art.solid { background: var(--ink); color: var(--bg); }
.art.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.art .ep-num {
  position: absolute;
  inset: auto auto 8px 10px;
  font-size: 11px;
}
.art .ep-title {
  position: absolute;
  inset: 8px 10px auto auto;
  font-size: 10px;
  opacity: 0.65;
}

/* Browser chrome wrap for product shots */
.chrome {
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px color-mix(in oklab, var(--ink) 25%, transparent);
}
.chrome-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
}
.chrome-bar .dots { display: flex; gap: 6px; }
.chrome-bar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-5);
}
.chrome-bar .url {
  flex: 1;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 4px 10px;
  text-align: center;
}

/* Sticky player floating bar */
.player {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  box-shadow: 0 20px 40px -20px color-mix(in oklab, var(--ink) 20%, transparent);
}
.player .play {
  width: 44px; height: 44px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-full);
  display: grid; place-items: center;
}
.player .play::before {
  content: ""; width: 0; height: 0;
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}
.player .meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.player .meta .ep { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.player .meta .ti { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .progress { height: 3px; background: var(--rule); position: relative; min-width: 220px; border-radius: 999px; }
.player .progress::before { content: ""; position: absolute; left:0; top:0; height: 100%; width: 44%; background: var(--accent); border-radius: 999px; }
.player .time { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); }
.player .ctrls { display: flex; gap: 4px; }
.player .ctrl {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--ink-3);
  border-radius: 3px;
}
.player .ctrl:hover { color: var(--ink); background: var(--bg-2); }

/* "Floating" wrapper */
.float-wrap {
  position: relative;
  padding: 28px 16px 16px;
  background: var(--bg-2);
  border-radius: var(--r-3);
  border: 1px dashed var(--rule);
}
.float-wrap::before {
  content: "FLOATING · PERSISTS ACROSS PAGES";
  position: absolute;
  top: 8px; left: 16px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ============================================================
   LANGUAGE TOGGLE / SWITCHES
   ============================================================ */
.seg {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-2);
}
.seg button {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  color: var(--ink-3);
  border-right: 1px solid var(--rule);
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 100;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 20px 60px -20px color-mix(in oklab, var(--ink) 35%, transparent);
  padding: 14px;
  width: 280px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks .t-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 12px;
}
.tweaks .t-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule-soft); }
.tweaks .t-row:first-of-type { border-top: 0; }
.tweaks .t-row > span { font-size: 12px; color: var(--ink-2); }
.tweaks .t-swatches { display: flex; gap: 4px; }
.tweaks .t-swatch {
  width: 18px; height: 18px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  position: relative;
}
.tweaks .t-swatch[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: -3px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}
.tweaks .t-close {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--ink-3); cursor: pointer;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .wrap { padding-inline: 20px; }
  .site-bar { display: none; }
  .nav-links { display: none; }
  .site-foot .grid { grid-template-columns: 1fr 1fr; }
  .section { padding: var(--s-8) 0; }
  .section-head { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-foot .grid { grid-template-columns: 1fr; }
}

/* Visually hidden */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
