/* ===========================================================
   Kavmio — design tokens
   Change these few values to re-skin the whole site.
   =========================================================== */
:root {
  --bg:            #09090b;
  --bg-elev:       #111113;
  --surface:       rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text:          #f4f4f5;
  --text-muted:    #a1a1aa;
  --text-dim:      #71717a;

  --accent:        #6366f1;
  --accent-2:      #a855f7;
  --accent-soft:   rgba(99, 102, 241, 0.14);

  --radius:        18px;
  --radius-sm:     12px;
  --maxw:          1120px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

/* ----------------------------- reset ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.028em; margin: 0; font-weight: 650; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }

/* ambient glow behind the page */
body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto 0;
  height: 70vh;
  background:
    radial-gradient(60% 60% at 20% 0%, rgba(99, 102, 241, 0.20), transparent 70%),
    radial-gradient(50% 50% at 85% 10%, rgba(168, 85, 247, 0.16), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
main { position: relative; z-index: 1; }

/* ----------------------------- header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(9, 9, 11, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 640; letter-spacing: -0.02em; font-size: 1.0625rem; }
.brand svg { width: 28px; height: 28px; flex: none; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.18s ease;
}
.nav a:hover { color: var(--text); }
.nav .btn { color: var(--text); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px; margin: -8px -8px -8px 0;
  color: var(--text-muted); cursor: pointer;
}

/* ----------------------------- buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 550;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-hover); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 28px -10px rgba(99, 102, 241, 0.7);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)); filter: brightness(1.08); }
.btn svg { width: 16px; height: 16px; }

/* ----------------------------- hero ----------------------------- */
.hero { padding: clamp(72px, 13vw, 148px) 0 clamp(56px, 9vw, 104px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: #c7d2fe;
  font-size: 0.8125rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  margin-bottom: 26px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.18);
}
.hero h1 {
  font-size: clamp(2.5rem, 7.2vw, 4.5rem);
  font-weight: 680;
  max-width: 17ch;
}
.hero h1 .grad {
  background: linear-gradient(120deg, #a5b4fc, #e9d5ff 55%, #fbcfe8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1.9vw, 1.25rem);
  color: var(--text-muted);
  max-width: 54ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ----------------------------- sections ----------------------------- */
section { position: relative; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 58ch; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
.section-head p { margin-top: 14px; color: var(--text-muted); font-size: 1.0625rem; }
.kicker {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ----------------------------- app cards ----------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.app-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-hover); }
.app-card::after {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.app-card:hover::after { opacity: 1; }

.app-top { display: flex; align-items: center; gap: 14px; }
.app-icon {
  width: 60px; height: 60px; flex: none;
  border-radius: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  object-fit: cover;
}
.app-name { font-size: 1.0625rem; font-weight: 620; letter-spacing: -0.015em; }
.app-cat { font-size: 0.8125rem; color: var(--text-dim); margin-top: 2px; }
.app-desc { color: var(--text-muted); font-size: 0.9375rem; flex: 1; }

.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.875rem; font-weight: 550; color: #a5b4fc;
  transition: gap 0.18s ease;
}
.app-link:hover { gap: 10px; }
.app-link svg { width: 14px; height: 14px; }

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  letter-spacing: 0.01em;
}
.badge-live { color: #86efac; border-color: rgba(134, 239, 172, 0.25); background: rgba(134, 239, 172, 0.08); }
.badge-soon { color: #fcd34d; border-color: rgba(252, 211, 77, 0.25); background: rgba(252, 211, 77, 0.08); }

.app-card.is-soon { border-style: dashed; }
.app-card.is-soon .app-icon { opacity: 0.55; }

/* ----------------------------- values ----------------------------- */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.value {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.value-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: #a5b4fc;
  margin-bottom: 18px;
}
.value-icon svg { width: 20px; height: 20px; }
.value h3 { font-size: 1.0625rem; font-weight: 620; }
.value p { margin-top: 10px; color: var(--text-muted); font-size: 0.9375rem; }

/* ----------------------------- CTA ----------------------------- */
.cta {
  margin: clamp(56px, 8vw, 96px) 0;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 56px);
  border-radius: 26px;
  border: 1px solid var(--border);
  background:
    radial-gradient(90% 140% at 10% 0%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(70% 120% at 90% 100%, rgba(168, 85, 247, 0.18), transparent 60%),
    var(--bg-elev);
  text-align: center;
}
.cta h2 { font-size: clamp(1.625rem, 3.4vw, 2.25rem); }
.cta p { margin: 14px auto 0; color: var(--text-muted); max-width: 48ch; }
.cta .hero-actions { justify-content: center; margin-top: 30px; }

/* ----------------------------- footer ----------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  margin-top: 24px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-brand { max-width: 36ch; }
.footer-brand p { margin-top: 14px; color: var(--text-dim); font-size: 0.875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); margin: 0 0 14px;
}
.footer-col a { display: block; font-size: 0.9375rem; color: var(--text-muted); padding: 5px 0; transition: color 0.18s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between;
  color: var(--text-dim); font-size: 0.8125rem;
}

/* ----------------------------- legal / prose pages ----------------------------- */
.prose { max-width: 72ch; padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 72px); }
.prose h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.prose .updated { margin-top: 16px; color: var(--text-dim); font-size: 0.9375rem; }
.prose h2 { font-size: 1.3125rem; margin: 44px 0 0; }
.prose h3 { font-size: 1.0625rem; margin: 28px 0 0; font-weight: 620; }
.prose p, .prose ul, .prose ol { margin-top: 14px; color: var(--text-muted); }
.prose li { margin-top: 8px; }
.prose a { color: #a5b4fc; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.note {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(252, 211, 77, 0.28);
  background: rgba(252, 211, 77, 0.07);
  color: #fde68a;
  font-size: 0.9375rem;
}
.note strong { color: #fef3c7; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 28px;
  font-size: 0.9375rem; color: var(--text-muted);
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 15px; height: 15px; }

/* FAQ */
.faq { margin-top: 32px; display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 16px 20px;
}
.faq summary {
  cursor: pointer;
  font-weight: 560;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-dim); font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin-top: 12px; font-size: 0.9375rem; }

/* ----------------------------- reveal on scroll ----------------------------- */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }

/* ----------------------------- responsive ----------------------------- */
@media (max-width: 760px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.9);
  }
  .nav.is-open a { padding: 10px 0; font-size: 1rem; }
  .nav.is-open .btn { margin-top: 10px; justify-content: center; }
  .nav-toggle { display: block; }
  .footer-links { gap: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
