/* KronHub site theme: same tokens as the docs page (dark first, light when the OS asks for it). */
:root {
  --bg: #15161c;
  --bg-deep: #101116;
  --surface: #1c1e27;
  --surface-2: #242734;
  --line: #2f3242;
  --line-strong: #3b3f52;
  --fg: #e9eaf1;
  --prose: #c9cbd8;
  --muted: #9c9fb2;
  --faint: #6c7084;
  --accent: #7d93ee;
  --accent-soft: rgba(125, 147, 238, 0.14);
  --dot: rgba(255, 255, 255, 0.07);
  --font-display: "Titillium Web", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f4f8;
    --bg-deep: #eceef6;
    --surface: #ffffff;
    --surface-2: #eceef6;
    --line: #d8dbe7;
    --line-strong: #b9bdcc;
    --fg: #1a1c26;
    --prose: #33364a;
    --muted: #5a5e73;
    --faint: #7b7f93;
    --accent: #3048cc;
    --accent-soft: rgba(48, 72, 204, 0.09);
    --dot: rgba(26, 28, 38, 0.12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; }

.page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; }

/* Footer shared by every page */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--faint);
  font-size: 0.9rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.site-footer a:hover { color: var(--fg); }

/* Landing */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop .dots,
.backdrop .spot {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.5px);
  background-size: 28px 28px;
  background-position: center;
}
.backdrop .dots {
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 15%, transparent 75%);
}
.backdrop .spot {
  background-image: radial-gradient(var(--accent) 1.4px, transparent 1.7px);
  opacity: 0;
  transition: opacity 0.4s ease;
  -webkit-mask-image: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), #000, transparent 72%);
  mask-image: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), #000, transparent 72%);
}
.backdrop.lit .spot { opacity: 0.55; }

.hero {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  padding: 48px 20px 72px;
  text-align: center;
}
.hero-logo { width: 84px; height: auto; margin-bottom: 14px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35)); }
.hero-logo-float { animation: float 6s ease-in-out 1.2s infinite; }
.hero h1 { margin: 0; font-size: clamp(3.2rem, 11vw, 5.6rem); font-weight: 700; letter-spacing: -0.01em; }
.hero h1 span { color: var(--accent); }
.hero-tag { margin: 6px 0 34px; max-width: 34em; font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 220px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--fg);
  font: 700 1rem/1 var(--font-body);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn svg { width: 14px; height: 14px; color: var(--muted); transition: color 0.2s ease, transform 0.2s ease; }
.btn:hover { background: var(--surface-2); }
.btn:hover svg { color: var(--fg); transform: translate(2px, -2px); }

.rise { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.12s; }
.d2 { animation-delay: 0.24s; }
.d3 { animation-delay: 0.36s; }
.d4 { animation-delay: 0.44s; }
.d5 { animation-delay: 0.52s; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

@media (max-width: 720px) {
  .actions { flex-direction: column; width: min(320px, 100%); }
  .btn { width: 100%; }
}

/* Legal pages */
.legal { width: 100%; max-width: 760px; margin: 0 auto; padding-inline: 20px; padding-block: 28px 72px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: color 0.2s ease; }
.back span { display: inline-block; transition: transform 0.2s ease; }
.back:hover { color: var(--fg); }
.back:hover span { transform: translateX(-3px); }
.back img { width: 20px; height: auto; }
.legal h1 { margin: 40px 0 12px; font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 700; }
.updated { margin: 0; color: var(--muted); font-size: 0.95rem; }
.updated b { color: var(--fg); }
.legal hr { margin: 28px 0 32px; border: 0; border-top: 1px solid var(--line); }
.legal h2 { margin: 44px 0 10px; font-size: 1.3rem; font-weight: 700; scroll-margin-top: 24px; }
.legal p, .legal li { color: var(--prose); line-height: 1.75; }
.legal p { margin: 0 0 14px; max-width: 65ch; }
.legal ul { margin: 0 0 14px; padding-left: 1.2em; display: grid; gap: 6px; max-width: 65ch; }
.legal a { color: var(--fg); }
.legal strong { color: var(--fg); }
.note {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--prose);
  max-width: 65ch;
}

@media (prefers-reduced-motion: reduce) {
  .rise, .hero-logo-float { animation: none; }
  .btn, .btn svg, .back, .back span, .backdrop .spot { transition: none; }
  .btn:hover svg, .back:hover span { transform: none; }
}
