/* =========================================================
   Vkonsec — shared styles
   Dark editorial base. Tweak toggles light/dark.
   ========================================================= */

:root {
  /* dark (default) — brand-matched: deep navy + crimson */
  --bg: #0a0f1c;
  --bg-elev: #0f1526;
  --bg-card: #141b30;
  --fg: #eef1f8;
  --fg-muted: #8a93ad;
  --fg-dim: #434a60;
  --line: #1e2540;
  --line-strong: #2d3557;
  --accent: #c8182a;        /* brand crimson */
  --accent-soft: #e63846;
  --stone: #8a93ad;

  /* type */
  --f-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* rhythm */
  --max: 1360px;
  --pad-x: clamp(20px, 4vw, 56px);
}

html[data-theme="light"] {
  --bg: #f4f5f9;
  --bg-elev: #eaecf3;
  --bg-card: #dfe2ec;
  --fg: #0a0f1c;
  --fg-muted: #4a5266;
  --fg-dim: #a5acbe;
  --line: #d4d8e3;
  --line-strong: #b5bac8;
  --accent: #a8121f;
  --accent-soft: #c8182a;
  --stone: #8a93ad;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
  scroll-behavior: smooth;
}
html[data-theme="light"] { color-scheme: light; }
body {
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

::selection { background: var(--accent); color: #fff; }

/* -------- typography utilities -------- */
.display {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.h-xxl { font-size: clamp(48px, 9vw, 148px); }
.h-xl  { font-size: clamp(40px, 6.5vw, 104px); }
.h-l   { font-size: clamp(32px, 4.5vw, 72px); }
.h-m   { font-size: clamp(24px, 2.6vw, 40px); }
.h-s   { font-size: clamp(18px, 1.4vw, 22px); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.lead {
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 58ch;
}

.mono { font-family: var(--f-mono); }
.muted { color: var(--fg-muted); }
.accent { color: var(--accent); font-style: normal; }
em { font-style: normal; }

/* -------- layout -------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section {
  padding: clamp(80px, 10vw, 160px) 0;
  position: relative;
}
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* -------- buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--fg);
  color: var(--bg);
}
.btn--primary:hover { background: var(--accent); color: #fff; }
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn--ghost:hover { border-color: var(--fg); background: var(--bg-elev); }
.btn .arrow {
  width: 14px; height: 14px;
  transition: transform 220ms ease;
}
.btn:hover .arrow { transform: translate(3px, -3px); }

/* -------- nav -------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 12px;
}
.nav__logo .mark {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: #0a0f1c;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  display: grid; place-items: center;
}
.nav__logo .mark img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.nav__logo .brand { display: inline-flex; flex-direction: column; line-height: 1; }
.nav__logo .brand-name { font-size: 18px; letter-spacing: -0.02em; }
.nav__logo .brand-name .k { color: var(--accent); }
.nav__logo .brand-tag { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-muted); margin-top: 3px; font-weight: 500; }
.nav__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--fg-muted);
}
.nav__links a { transition: color 160ms ease; }
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); }
.nav__cta { display: flex; gap: 10px; align-items: center; }

@media (max-width: 780px) {
  .nav__links { display: none; }
}

/* -------- footer -------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px var(--pad-x) 32px;
  background: var(--bg-elev);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  max-width: var(--max);
  margin: 0 auto;
}
.footer h4 {
  font-family: var(--f-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  font-weight: 500;
  margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.footer a:hover { color: var(--accent); }
.footer__base {
  max-width: var(--max);
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.footer__wordmark {
  font-family: var(--f-display);
  font-size: clamp(80px, 22vw, 360px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  margin-top: 80px;
  color: var(--fg);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  text-align: center;
}
@media (max-width: 780px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__base { flex-direction: column; gap: 12px; }
}

/* -------- marquee -------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  background: var(--bg);
}
.marquee__track {
  display: flex;
  gap: 72px;
  width: max-content;
  animation: marquee 40s linear infinite;
  align-items: center;
}
.marquee__item {
  font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 40px);
  letter-spacing: -0.02em;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 72px;
  white-space: nowrap;
}
.marquee__item::after {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* -------- card / tile primitives -------- */
.tile {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}
.tile:hover { border-color: var(--line-strong); }

/* -------- tag -------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.tag .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 70%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* -------- reveal on scroll -------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* -------- theme toggle + tweaks panel -------- */
.tweaks {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 80;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: none;
  backdrop-filter: blur(14px);
  min-width: 240px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.tweaks.is-open { display: block; }
.tweaks__close {
  background: none; border: 0; color: var(--fg-muted);
  font-size: 18px; cursor: pointer; padding: 0 4px;
}
.tweaks__close:hover { color: var(--accent); }
.tweaks-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 79;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 0;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: transform 200ms ease;
}
.tweaks-toggle:hover { transform: rotate(45deg); }
.tweaks-toggle svg { width: 20px; height: 20px; }
.tweaks__title {
  color: var(--fg-muted);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks__title span:last-child { font-size: 10px; color: var(--accent); }
.tweaks__row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tweaks__row:last-child { margin-bottom: 0; }
.tweaks__btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 160ms ease;
}
.tweaks__btn:hover { color: var(--fg); border-color: var(--fg-muted); }
.tweaks__btn.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tweaks__label { color: var(--fg-muted); margin-bottom: 6px; font-size: 10px; }

/* =========================================================
   RESPONSIVE — global mobile pass (shared across all pages)
   Hero-specific rules live inline in index.html so they win
   over its inline <style> on equal specificity.
   ========================================================= */

/* never let media force horizontal scroll */
img, video, canvas, svg { max-width: 100%; }
html, body { max-width: 100%; }

@media (max-width: 900px) {
  :root { --pad-x: clamp(18px, 5vw, 44px); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }

  /* ---- nav: keep brand + CTA on one tidy row ---- */
  .nav { padding: 12px var(--pad-x); gap: 12px; }
  .nav__logo { font-size: 16px; gap: 10px; }
  .nav__logo .mark { width: 30px; height: 30px; }
  .nav__logo .brand-tag { display: none; }
  .nav__cta .btn { padding: 11px 15px; font-size: 14px; gap: 8px; }

  /* ---- section rhythm ---- */
  .section { padding: 64px 0; }
  .section--tight { padding: 48px 0; }

  /* ---- marquee ---- */
  .marquee { padding: 22px 0; }
  .marquee__track { gap: 44px; }
  .marquee__item { font-size: 20px; gap: 44px; }

  /* ---- footer ---- */
  .footer { padding: 56px var(--pad-x) 28px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer__wordmark { margin-top: 48px; }
}

@media (max-width: 420px) {
  .footer__grid { grid-template-columns: 1fr; }
}
