:root {
  --korisec-red: #ff3435;
  --korisec-ink: #0f1419;
  --korisec-paper: #f7f9fd;
  --korisec-muted: #5b6570;
  --korisec-line: rgba(15, 20, 25, 0.1);
  --korisec-surface: #ffffff;
  --korisec-glow: rgba(255, 52, 53, 0.12);
  --korisec-hero-fade: radial-gradient(
    120% 80% at 50% -10%,
    var(--korisec-glow),
    transparent 55%
  );
  --bs-body-bg: var(--korisec-surface);
  --bs-body-color: var(--korisec-ink);
}

[data-bs-theme="dark"] {
  --korisec-ink: #f7f9fd;
  --korisec-paper: #0b1014;
  --korisec-muted: #9aa3ad;
  --korisec-line: rgba(247, 249, 253, 0.12);
  --korisec-surface: #12181e;
  --korisec-glow: rgba(255, 52, 53, 0.18);
  --bs-body-bg: var(--korisec-surface);
  --bs-body-color: var(--korisec-ink);
}

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

/* html and body share the exact bottom-of-gradient colour.
   Any overscroll rubber-band area is therefore indistinguishable
   from the page — no strip. */
html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--korisec-surface);
}

body {
  min-height: 100svh;
  min-height: 100dvh;
  color: var(--korisec-ink);
  font-family:
    "Segoe UI",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.site-shell {
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Gradient lives here — stretches with content, never bleeds */
  background-color: var(--korisec-surface);
  background-image:
    radial-gradient(120% 80% at 50% -10%, var(--korisec-glow), transparent 55%),
    linear-gradient(180deg, var(--korisec-paper) 0%, var(--korisec-surface) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.site-header {
  padding: 1.25rem 0;
}

.brand-logo {
  height: 2rem;
  width: auto;
  display: block;
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--korisec-line);
  background: transparent;
  color: var(--korisec-ink);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--korisec-glow);
  border-color: var(--korisec-red);
  outline: none;
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle .icon-moon,
[data-bs-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-bs-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2rem 0 4rem;
}

.hero-logo {
  height: clamp(2.75rem, 8vw, 4rem);
  width: auto;
  margin: 0 auto 1.75rem;
  display: block;
  animation: rise-in 0.7s ease both;
}

.hero-copy {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}

.hero-copy h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  animation: rise-in 0.7s ease 0.08s both;
}

.hero-copy p {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  color: var(--korisec-muted);
  font-size: 1.05rem;
  line-height: 1.55;
  animation: rise-in 0.7s ease 0.16s both;
}

.waitlist {
  max-width: 28rem;
  margin: 0 auto;
  animation: rise-in 0.7s ease 0.24s both;
}

.waitlist .form-control {
  border-color: var(--korisec-line);
  background: var(--korisec-surface);
  color: var(--korisec-ink);
  min-height: 3rem;
  box-shadow: none;
}

.waitlist .form-control::placeholder {
  color: var(--korisec-muted);
  opacity: 0.85;
}

.waitlist .form-control:focus {
  border-color: var(--korisec-red);
  box-shadow: 0 0 0 0.2rem var(--korisec-glow);
}

.waitlist .btn-korisec {
  min-height: 3rem;
  background: var(--korisec-red);
  border-color: var(--korisec-red);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.waitlist .btn-korisec:hover,
.waitlist .btn-korisec:focus-visible {
  background: #e52b2c;
  border-color: #e52b2c;
  color: #fff;
}

.waitlist .btn-korisec:disabled {
  opacity: 0.7;
}

.waitlist-note,
.waitlist-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--korisec-muted);
}

.waitlist-status[data-state="success"] {
  color: #1f7a4d;
}

[data-bs-theme="dark"] .waitlist-status[data-state="success"] {
  color: #6dcea0;
}

.waitlist-status[data-state="error"] {
  color: var(--korisec-red);
}

/* ── Tools / scanning-stack section ───────────────────────────── */
.tools-section {
  padding: 4.5rem 0 5.5rem;
  border-top: 1px solid var(--korisec-line);
}

.tools-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--korisec-red);
  margin: 0 0 0.55rem;
}

.tools-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.028em;
  line-height: 1.2;
  color: var(--korisec-ink);
  margin: 0 auto 0.75rem;
  max-width: 30rem;
}

.tools-sub {
  text-align: center;
  color: var(--korisec-muted);
  font-size: 0.975rem;
  max-width: 40rem;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 58rem;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.tool-card {
  border: 1px solid var(--korisec-line);
  border-radius: 0.875rem;
  padding: 1.3rem 1.4rem 1.45rem;
  background: var(--korisec-surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  border-color: rgba(255, 52, 53, 0.3);
  box-shadow: 0 4px 20px var(--korisec-glow);
}

.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.tool-name {
  font-size: 0.975rem;
  font-weight: 650;
  color: var(--korisec-ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.tool-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22em 0.6em;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tool-badge-mit {
  background: rgba(34, 139, 87, 0.12);
  color: #1f7a4d;
}

[data-bs-theme="dark"] .tool-badge-mit {
  background: rgba(34, 139, 87, 0.22);
  color: #6dcea0;
}

.tool-badge-apache {
  background: rgba(59, 130, 246, 0.12);
  color: #1d5fa6;
}

[data-bs-theme="dark"] .tool-badge-apache {
  background: rgba(59, 130, 246, 0.22);
  color: #7eb8f7;
}

.tool-origin {
  font-size: 0.72rem;
  color: var(--korisec-muted);
  margin: 0 0 0.55rem;
  letter-spacing: 0.01em;
}

.tool-desc {
  font-size: 0.875rem;
  color: var(--korisec-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  padding: 1.25rem 0 1.75rem;
  color: var(--korisec-muted);
  font-size: 0.85rem;
}

/* Toast */
#ks-toast {
  min-width: 18rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.9rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.18),
    0 1px 4px rgba(0, 0, 0, 0.12);
}

#ks-toast.toast-success {
  background: rgba(15, 118, 72, 0.92);
  color: #fff;
}

#ks-toast.toast-error {
  background: rgba(185, 28, 28, 0.92);
  color: #fff;
}

#ks-toast .btn-close-white {
  filter: invert(1) grayscale(1) brightness(2);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo,
  .hero-copy h1,
  .hero-copy p,
  .waitlist {
    animation: none;
  }

  .theme-toggle {
    transition: none;
  }
}
