/* =============================================================
   Kormix — modern dark + orange-glow design system
   Hand-rolled, no framework dependency.
   ============================================================= */

:root {
  /* Canvas */
  --bg:          #08090c;
  --bg-2:        #0c0e13;
  --bg-3:        #11141b;
  --surface:     rgba(255, 255, 255, 0.035);
  --surface-2:   rgba(255, 255, 255, 0.06);
  --border:      rgba(255, 255, 255, 0.09);
  --border-2:    rgba(255, 255, 255, 0.14);

  /* Text */
  --text:        #f6f7f9;
  --text-muted:  rgba(246, 247, 249, 0.62);
  --text-dim:    rgba(246, 247, 249, 0.40);

  /* Brand accent */
  --accent:      #ff8c00;
  --accent-2:    #ffb84d;
  --accent-soft: rgba(255, 140, 0, 0.14);
  --accent-line: rgba(255, 140, 0, 0.40);
  --accent-glow: rgba(255, 140, 0, 0.55);
  --grad:        linear-gradient(135deg, #ff8c00 0%, #ffb84d 100%);
  --grad-text:   linear-gradient(120deg, #fff 0%, #ffd8a6 60%, #ff8c00 100%);

  /* Cool secondary (used sparingly for "audio" cyan glints) */
  --cool:        #38bdf8;

  --radius:      18px;
  --radius-sm:   12px;
  --radius-pill: 999px;

  --shadow:      0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 16px 50px -12px rgba(255, 140, 0, 0.45);

  --maxw:        1180px;
  --font-display:'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glow that drifts with scroll (driven by --scroll: 0..1) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  --s: var(--scroll, 0);
  background:
    radial-gradient(66rem 46rem at calc(82% - 60% * var(--s)) calc(-12% + 150% * var(--s)),
      rgba(255, 140, 0, 0.22), transparent 60%),
    radial-gradient(58rem 44rem at calc(4% + 70% * var(--s)) calc(126% - 150% * var(--s)),
      rgba(56, 189, 248, 0.13), transparent 60%),
    radial-gradient(40rem 30rem at calc(50% + 30% * var(--s)) calc(40% + 30% * var(--s)),
      rgba(255, 90, 120, 0.07), transparent 65%),
    var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: #fff;
}

p { margin: 0 0 1rem; }
.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 7rem 0; position: relative; }
.section--tight { padding: 4.5rem 0; }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.narrow { max-width: 46rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem; height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.eyebrow.center-line { justify-content: center; }
.eyebrow.center-line::before { display: none; }

.section-title { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-lede  { font-size: 1.12rem; color: var(--text-muted); max-width: 40rem; }
.center .section-lede { margin-left: auto; margin-right: auto; }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.92rem 1.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .2s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn--primary {
  background: var(--grad);
  color: #1a1206;
  box-shadow: 0 10px 30px -8px var(--accent-glow);
}
.btn--primary:hover {
  color: #1a1206;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px var(--accent-glow);
}
.btn--ghost {
  background: var(--surface);
  color: #fff;
  border-color: var(--border-2);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { color:#fff; border-color: var(--accent-line); background: var(--surface-2); transform: translateY(-2px); }
.btn--lg { padding: 1.05rem 2.1rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: var(--banner-h, 0px) 0 auto 0;
  z-index: 100;
  transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
  padding: 0.6rem 0;
}
.nav.is-scrolled {
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.brand:hover { color: #fff; }
.brand__dot {
  width: 0.62rem; height: 0.62rem; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px var(--accent-glow);
  flex: 0 0 auto;
}
/* keep "kormix.io" as one inline run so the suffix sits on the same baseline */
.brand__word { display: inline-block; line-height: 1; }
.brand__suffix { color: var(--text-dim); font-weight: 500; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a:not(.btn) {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
}
.nav__links a:not(.btn):hover { color: #fff; }
.nav__toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: #fff;
  width: 2.7rem; height: 2.7rem;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center; justify-content: center;
}

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1.5rem; left: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: rgba(12, 14, 19, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: 0.75rem 1rem; }
  .nav__links .btn { margin-top: 0.4rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(8rem + var(--banner-h, 0px)) 0 5rem;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: center / cover no-repeat var(--hero-img, none);
  opacity: 0.18;
  filter: grayscale(0.2) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45rem 30rem at 80% 30%, rgba(255, 140, 0, 0.18), transparent 65%),
    linear-gradient(to bottom, rgba(8,9,12,0.55), rgba(8,9,12,0.92));
}
.hero__inner { max-width: 52rem; position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 1.3rem;
  text-shadow: 0 2px 40px rgba(8, 9, 12, 0.65);
}
.hero__sub {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--text-muted);
  max-width: 38rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 24px rgba(8, 9, 12, 0.6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero__note { color: var(--text-dim); font-size: 0.9rem; margin: 1.4rem 0 0; }

/* Oscilloscope background for the hero (rendered to canvas by kormix.js):
   a calm baseline trace with intermittent signal bursts that ring in and decay. */
.hero-scope {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

/* ---------- Stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--bg-2); padding: 2rem 1.5rem; text-align: center; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__label { color: var(--text-muted); font-size: 0.9rem; margin: 0.3rem 0 0; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 1.8rem;
}
.step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  width: 2.6rem; height: 2.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.2rem; }
.step p { color: var(--text-muted); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Feature rows (alternating) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.feature + .feature { margin-top: 6rem; }
.feature--reverse .feature__media { order: 2; }
.feature__body { max-width: 30rem; }
.feature__body h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.feature__body p { color: var(--text-muted); font-size: 1.05rem; }
.feature__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.feature__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 55%, rgba(255,140,0,0.16));
  pointer-events: none;
}
.feature__list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.feature__list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.7rem;
  color: var(--text-muted);
}
.feature__list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute; left: 0; top: 0.1rem;
  color: var(--accent);
  font-size: 0.85rem;
}
@media (max-width: 880px) {
  .feature { grid-template-columns: 1fr; gap: 1.8rem; }
  .feature--reverse .feature__media { order: 0; }
}

/* ---------- Card grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); background: var(--surface-2); }
.card__icon {
  width: 3rem; height: 3rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.98rem; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Spec sheet ---------- */
.spec-panel {
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
}
.spec-panel::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(30rem 18rem at 100% 0%, rgba(255,140,0,0.12), transparent 60%);
  pointer-events: none;
}
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.spec-item { border-top: 2px solid var(--accent-line); padding-top: 1rem; }
.spec-item__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  color: #fff;
}
.spec-item__label { color: var(--text-muted); font-size: 0.92rem; margin: 0.3rem 0 0; }
@media (max-width: 820px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Platforms ---------- */
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
.platform-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.95rem;
}
.platform-badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.platform-badge.available {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
}
.platform-badge.available .dot { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.platform-badge.soon {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.platform-badge.soon .dot { background: var(--text-dim); }

/* ---------- CTA / signup band ---------- */
.cta-band {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  border: 1px solid var(--accent-line);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  text-align: center;
  background:
    radial-gradient(40rem 26rem at 50% -20%, rgba(255,140,0,0.22), transparent 60%),
    linear-gradient(160deg, var(--bg-3), var(--bg-2));
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }

/* shared form bits used on landing newsletter */
.field {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  color: #fff;
  padding: 0.95rem 1.4rem;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field::placeholder { color: var(--text-dim); }
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.inline-form {
  display: flex;
  gap: 0.6rem;
  max-width: 30rem;
  margin: 1.6rem auto 0;
}
.inline-form .field { border-radius: var(--radius-pill); }
.form-msg {
  margin: 1rem auto 0;
  max-width: 30rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  display: none;
}
.form-msg.ok    { display:block; background: rgba(56,189,248,0.10); border:1px solid rgba(56,189,248,0.3); color:#7dd3fc; }
.form-msg.warn  { display:block; background: rgba(255,184,77,0.10); border:1px solid rgba(255,184,77,0.3); color: var(--accent-2); }
.form-msg.error { display:block; background: rgba(248,113,113,0.10); border:1px solid rgba(248,113,113,0.3); color:#fca5a5; }
@media (max-width: 520px) { .inline-form { flex-direction: column; } }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-2);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__links a { color: var(--text-muted); font-size: 0.95rem; }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
}
.footer__bottom a { color: var(--text-muted); }

/* ---------- Scroll reveal (only hides when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Legal / prose pages ---------- */
.prose-page { padding: calc(8rem + var(--banner-h, 0px)) 0 5rem; }
.prose {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--text-muted);
}
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.4rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2.4rem; color: #fff; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6rem; color: #fff; }
.prose p, .prose li { color: var(--text-muted); }
.prose a { text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose .updated { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 2rem; }

/* ---------- Announcement Banner ---------- */
.banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    background: var(--grad);
    color: #1a1206;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.banner a {
    color: #1a1206;
    text-decoration: underline;
    font-weight: 600;
}
.banner a:hover {
    color: #000;
}
