/* korect website chrome: editor/timeline motifs with the current black + electric violet studio palette. */

:root {
  --bg: #000000;
  --bg-1: #07070A;      /* subtle lift */
  --bg-2: #0D0D12;      /* surface */
  --bg-3: #171722;      /* surface high */
  --bg-4: #262638;      /* hairline */
  --fg: #F7F4FF;
  --fg-muted: #B8B2C8;
  --fg-faint: #817A93;
  --fg-dim: #5E586B;
  --accent: #8B5CF6;
  --accent-bright: #A78BFA;
  --accent-deep: #6D28D9;
  --accent-ink: #C4B5FD;
  --orange: var(--accent);
  --orange-soft: rgba(139, 92, 246, 0.18);
  --orange-ghost: rgba(139, 92, 246, 0.08);
  --hair: rgba(247, 244, 255, 0.07);
  --hair-2: rgba(247, 244, 255, 0.11);

  --font-display: "Epilogue", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;

  --track-h: 44px;
  --ruler-h: 28px;
  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Global editor/timeline texture layer — lives under everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    /* fine vertical frame-ticks (every 4px, like a filmstrip) */
    repeating-linear-gradient(
      90deg,
      rgba(247, 244, 255, 0.012) 0,
      rgba(247, 244, 255, 0.012) 1px,
      transparent 1px,
      transparent 4px
    ),
    /* thicker "second" markers every 80px */
    repeating-linear-gradient(
      90deg,
      rgba(247, 244, 255, 0.035) 0,
      rgba(247, 244, 255, 0.035) 1px,
      transparent 1px,
      transparent 80px
    ),
    /* faint track-separator horizontal bands (every 120px) */
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 119px,
      rgba(247, 244, 255, 0.025) 119px,
      rgba(247, 244, 255, 0.025) 120px
    ),
    /* soft warm orange glow, top-right, like a color-correction vignette */
    radial-gradient(1200px 700px at 92% -8%, rgba(139, 92, 246, 0.08), transparent 60%),
    radial-gradient(900px 500px at -4% 40%, rgba(139, 92, 246, 0.04), transparent 65%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.9) 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.9) 100%);
}
/* Grain / noise layer for extra editor feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
/* Ensure real content sits above the texture */
body > * { position: relative; z-index: 1; }

::selection { background: rgba(139, 92, 246, 0.35); color: #fff; }

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

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

/* ---------- Type utilities ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.92;
}
.display-xl { font-size: clamp(3.25rem, 9vw, 7rem); }
.display-lg { font-size: clamp(2.5rem, 6vw, 5rem); }
.display-md { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.display-sm { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.04em; line-height: 1; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.eyebrow--orange { color: var(--orange); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" on, "lnum" on;
  letter-spacing: 0.02em;
}

.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, background 200ms ease, color 200ms ease, box-shadow 300ms ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 6px 20px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover {
  background: #A78BFA;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 8px 28px rgba(139, 92, 246, 0.55);
}

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

.btn--outline {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--hair-2);
}
.btn--outline:hover { background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hair-2); }

.btn--lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }

/* ---------- Chrome: top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--hair);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.18em;
}
.nav__brand-logo {
  width: clamp(148px, 15vw, 190px);
  max-width: none;
  height: auto;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 28px rgba(139, 92, 246, 0.28));
  transition: transform 220ms ease, filter 220ms ease;
}
.nav__brand:hover .nav__brand-logo {
  transform: translateY(-1px) scale(1.025);
  filter: drop-shadow(0 14px 36px rgba(167, 139, 250, 0.42));
}
.nav__brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background:
    rgba(139, 92, 246, 0.12) url("brand/korect-icon.svg") center / 17px auto no-repeat;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 4px 16px rgba(139, 92, 246,0.35);
}
.nav__brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: 18px;
}
.nav__link {
  font-size: 14px;
  color: var(--fg-muted);
  transition: color 180ms ease;
  position: relative;
}
.nav__link:hover { color: var(--fg); }
.nav__link--active { color: var(--fg); }
.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--orange);
}
.nav__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 10px;
}
.nav__burger:hover { background: var(--bg-2); }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__right .btn--ghost { display: none; }
  .nav__burger { display: inline-flex; }
}

/* Mobile drawer */
.nav__drawer {
  display: none;
  position: fixed;
  inset: 64px 0 auto 0;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
  padding: 20px 24px 24px;
  z-index: 39;
}
.nav__drawer.open { display: block; }
.nav__drawer a {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  border-bottom: 1px solid var(--hair);
}
.nav__drawer .btn { margin-top: 16px; width: 100%; justify-content: center; }

/* ---------- Section scaffold ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }

.section-head { max-width: 820px; margin: 0 auto 56px; text-align: center; }
.section-head .eyebrow { margin-bottom: 16px; display: inline-block; }
.section-head h2 { margin: 0 0 16px; }
.section-head p { color: var(--fg-muted); font-size: 17px; margin: 0; }

/* ---------- Timeline ruler strip (section divider) ---------- */
.ruler {
  height: var(--ruler-h);
  position: relative;
  background: var(--bg-1);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.ruler::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--hair-2) 1px, transparent 1px),
    linear-gradient(to right, rgba(247, 244, 255,0.04) 1px, transparent 1px);
  background-size: 80px 100%, 16px 100%;
  background-repeat: repeat-x;
  background-position: 0 0;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.ruler__tc {
  position: absolute;
  top: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}
.ruler__playhead {
  position: absolute;
  top: -6px; bottom: -6px;
  width: 2px;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(139, 92, 246,0.7);
}
.ruler__playhead::before {
  content: "";
  position: absolute;
  top: -4px; left: -6px;
  width: 14px; height: 10px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--hair);
  background: var(--bg);
  padding: 72px 0 40px;
  margin-top: 24px;
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 48px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.foot__brand { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.18em; font-size: 15px; margin-bottom: 16px; }
.foot__tag { color: var(--fg-muted); font-size: 14px; max-width: 280px; line-height: 1.55; }
.foot__social { display: flex; gap: 12px; margin-top: 24px; }
.foot__social a {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--fg-muted);
  background: var(--bg-2);
  transition: background 180ms ease, color 180ms ease;
}
.foot__social a:hover { background: var(--bg-3); color: var(--fg); }
.foot__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin: 0 0 18px;
}
.foot__col a {
  display: block;
  font-size: 14px;
  color: var(--fg-muted);
  padding: 6px 0;
  transition: color 160ms ease;
}
.foot__col a:hover { color: var(--fg); }

.foot__bottom {
  max-width: var(--container);
  margin: 56px auto 0;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--hair);
  color: var(--fg-faint);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.foot__bottom-r { display: flex; gap: 20px; }

@media (max-width: 860px) {
  .foot__grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .foot__brand-col { grid-column: 1 / -1; }
  .foot__bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ---------- Caption chip (reusable) ---------- */
.cap-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  background: var(--bg-2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--hair);
  position: relative;
}
.cap-chip::before {
  content: "";
  width: 3px; height: 16px;
  border-radius: 2px;
  background: var(--orange);
}

/* ---------- Track header label ---------- */
.track-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.track-head--orange { color: var(--orange); background: rgba(139, 92, 246,0.12); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: background 200ms ease, transform 200ms ease;
}
.card:hover { background: linear-gradient(180deg, rgba(139, 92, 246, 0.10), rgba(13, 13, 18, 0.94)); }

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
  padding: clamp(72px, 14vw, 160px) 0 clamp(48px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.page-hero__inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.page-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.page-hero__eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--orange);
}
.page-hero h1 { margin: 0 0 20px; max-width: 12ch; }
.page-hero__sub { color: var(--fg-muted); font-size: clamp(16px, 2vw, 19px); max-width: 58ch; margin: 0; }

/* Hero background: soft timeline waves */
.page-hero__bg {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.55;
  overflow: hidden;
}
.page-hero__bg::before {
  content: "";
  position: absolute;
  left: -10%; right: -10%;
  top: 20%;
  height: 260px;
  background:
    radial-gradient(60% 100% at 20% 50%, rgba(139, 92, 246,0.10), transparent 70%),
    radial-gradient(40% 100% at 85% 50%, rgba(139, 92, 246,0.06), transparent 70%);
  filter: blur(8px);
}

/* Hero lines: timeline-esque arcs */
.hero-lines { position: absolute; inset: 0; pointer-events: none; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); }

/* ---------- Utility ---------- */
.hide-mobile { }
@media (max-width: 720px) { .hide-mobile { display: none !important; } }
.only-mobile { display: none; }
@media (max-width: 720px) { .only-mobile { display: block; } }

/* Scrollbar subtle */
* { scrollbar-color: var(--bg-3) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 10px; }
*::-webkit-scrollbar-track { background: transparent; }

/* Prose */
.prose { max-width: 68ch; margin: 0 auto; line-height: 1.75; color: var(--fg-muted); font-size: 16px; }
.prose h2 { color: var(--fg); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; font-size: 24px; margin: 48px 0 16px; display: flex; align-items: center; gap: 12px; }
.prose h2 .num {
  font-family: var(--font-mono); font-size: 13px; color: var(--orange);
  background: rgba(139, 92, 246,0.1);
  padding: 4px 8px; border-radius: 6px;
  letter-spacing: 0.05em;
}
.prose p { margin: 0 0 16px; }
.prose ul { padding: 0; margin: 0 0 16px; list-style: none; }
.prose li { padding: 6px 0 6px 20px; position: relative; }
.prose li::before {
  content: "";
  position: absolute; left: 0; top: 16px;
  width: 10px; height: 1px; background: var(--orange);
}
.prose a { color: var(--orange); text-decoration: none; border-bottom: 1px solid rgba(139, 92, 246,0.3); }
.prose a:hover { border-bottom-color: var(--orange); }
.prose code {
  font-family: var(--font-mono);
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Tweaks panel */
.tweaks {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 300px;
  background: rgba(18, 17, 16, 0.92);
  backdrop-filter: blur(24px);
  border-radius: 14px;
  padding: 18px;
  z-index: 100;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 0 0 1px var(--hair-2);
  display: none;
}
.tweaks.open { display: block; }
.tweaks__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.tweaks__title::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--orange); }
.tweaks__row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--hair); }
.tweaks__row:first-of-type { border-top: 0; }
.tweaks__row label { font-size: 13px; color: var(--fg); }
.tweaks__row select, .tweaks__row input[type="range"] { background: var(--bg-2); border: 0; border-radius: 6px; padding: 6px 10px; color: var(--fg); font-size: 12px; }
.tweaks__row input[type="checkbox"] { accent-color: var(--orange); }

/* ---------- korect polish overrides ---------- */
body {
  --premium-glow: rgba(167, 139, 250, 0.34);
  --premium-glow-strong: rgba(196, 181, 253, 0.5);
}

.btn,
.nav__link,
.nav__burger,
.foot__social a,
.foot__col a,
.card,
.badge,
.install__step,
.compat-chip,
.proof-list__item,
.page-hero__inner,
.logo-grid > div {
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease,
    filter 220ms ease;
}

.btn:hover,
.nav__burger:hover,
.foot__social a:hover,
.logo-grid > div:hover,
.card:hover,
.install__step:hover,
.compat-chip:hover,
.proof-list__item:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.13), rgba(255,255,255,0.035));
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.22), 0 18px 44px -28px var(--premium-glow-strong);
}

.btn--primary,
.billing-toggle button.active,
.plan__pop-badge {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent) 58%, var(--accent-deep));
}

.btn--primary:hover {
  background: linear-gradient(135deg, #C4B5FD, var(--accent-bright) 52%, var(--accent));
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 12px 34px rgba(139, 92, 246, 0.48);
}

.btn--outline:hover,
.btn--ghost:hover {
  background: rgba(139, 92, 246, 0.10);
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.24), 0 14px 34px -26px var(--premium-glow);
}

.nav__link:hover,
.foot__col a:hover,
.prose a:hover {
  color: var(--accent-ink);
}

.card:hover,
.feature:hover {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.10), rgba(13, 13, 18, 0.94));
}

.eyebrow--orange,
.track-head--orange {
  color: var(--accent-ink);
}

.page-hero__eyebrow::before,
.badge__dot,
.timeline-bg__playhead,
.nav__link--active::after {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.58);
}
