/*
 * The landing page (portal Phase 8, design DD-32), in the portal's palette: Coastal Slate
 * (light) and Harbor Night (dark, the carousel's look), following the reader's system setting.
 * No script, no web fonts, nothing from another host.
 */
:root {
  color-scheme: light;
  --bg: #f0f4f5;
  --surface: #ffffff;
  --surface-2: #f6f9fa;
  --border: #d3dde1;
  --text: #1e293b;
  --text-2: #475569;
  --primary: #0369a1;
  --on-primary: #ffffff;
  --accent: #0284c7;
  --kicker: #0369a1;
  --link: #075985;
  --sage: #789d4a;
  --danger: #b91c1c;
  --danger-bg: #fde8e8;
  --success: #15803d;
  --success-bg: #e3f4e8;
  --success-ink: #166534; /* on --success-bg: 6.4:1 */
  --focus: #0284c7;
  --shadow: 0 1px 2px rgba(30, 41, 59, 0.06), 0 4px 16px rgba(30, 41, 59, 0.06);
  --hero: linear-gradient(180deg, #e3ecef 0%, var(--bg) 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1519;
    --surface: #13232a;
    --surface-2: #182c34;
    --border: #25404b;
    --text: #e3ecee;
    --text-2: #94a9b0;
    --primary: #38bdf8;
    --on-primary: #0b1519;
    --accent: #38bdf8;
    --kicker: #38bdf8;
    --link: #7dd3fc;
    --sage: #a3c46c;
    --danger: #f87171;
    --danger-bg: #3a1a1d;
    --success: #4ade80;
    --success-bg: #12301f;
    --success-ink: #4ade80;
    --focus: #38bdf8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    --hero: linear-gradient(180deg, #0f1e24 0%, var(--bg) 100%);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
}

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 17ch;
}

h2 {
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 800;
  max-width: 22ch;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin: 0.8em 0 0;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon-lg {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

/* The top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}

/* Buttons and links out */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.btn:hover {
  filter: brightness(1.08);
}

.btn-small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 30px;
}

.link-out {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  min-height: 44px;
}

/* Sections */
main > section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

main > section.hero {
  border-top: 0;
  padding: 88px 0 80px;
  background: var(--hero);
}

.kicker {
  margin: 0 0 14px;
  color: var(--kicker);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.accent {
  color: var(--accent);
  display: block;
  margin-top: 0.1em;
}

.lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--text-2);
  max-width: 38em;
  margin-top: 24px;
}

.lead strong {
  color: var(--text);
}

.lead-sm {
  color: var(--text-2);
  max-width: 44em;
}

.note {
  color: var(--text-2);
  font-size: 0.95rem;
  margin-top: 18px;
}

.strong-line {
  font-weight: 700;
  margin-top: 28px;
}

.two {
  display: grid;
  gap: 32px;
  align-items: start;
}

@media (min-width: 860px) {
  .two {
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
  }

  .two-media {
    grid-template-columns: 1fr 1.4fr;
  }
}

/* Cards */
.cards {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 860px) {
  .three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin: 0;
}

.card h3 {
  margin-top: 4px;
}

.card-kicker {
  margin: 14px 0 0;
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.callout-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

.callout-text {
  font-size: 1.2rem;
  font-weight: 600;
}

.danger {
  color: var(--danger);
}

/* Architecture */
.arch {
  margin-top: 32px;
  display: grid;
  gap: 10px;
  max-width: 880px;
}

.arch-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.arch-box p {
  margin-top: 6px;
  color: var(--text-2);
}

.arch-row,
.arch-split {
  display: grid;
  gap: 10px;
}

@media (min-width: 640px) {
  .arch-row,
  .arch-split {
    grid-template-columns: 1fr 1fr;
  }
}

.arch-arrow {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 600;
  padding-left: 20px;
}

.arch-arrow::before {
  content: "\2193";
  color: var(--accent);
  font-weight: 800;
  margin-right: 8px;
}

.arch-kernel {
  border-color: var(--accent);
  border-width: 2px;
}

/* Detection numbers */
.stats {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 860px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.stat p {
  color: var(--text-2);
}

.stat strong {
  color: var(--text);
}

.stat-num {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent) !important;
  letter-spacing: -0.02em;
}

.stat-word {
  font-size: 1.6rem;
  line-height: 1.9;
}

/* Screenshots */
.shot {
  margin: 32px 0 0;
}

.shot img {
  margin: 0 auto;
}

.shot-framed img {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.shot figcaption,
.run figcaption {
  color: var(--text-2);
  margin-top: 14px;
}

.shot figcaption {
  text-align: center;
  max-width: 46em;
  margin-left: auto;
  margin-right: auto;
}

.run figcaption strong,
.shot figcaption strong {
  color: var(--text);
}

.run img {
  margin: 0 auto;
}

.sub {
  margin-top: 40px;
}

/* What reached the attacker */
.bytes {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .bytes {
    grid-template-columns: repeat(3, 1fr);
  }
}

.byte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
}

.byte-col {
  grid-column: 1 / -1;
  color: var(--text-2);
  font-size: 0.95rem;
}

.byte-num {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
}

.leaked .byte-num {
  color: var(--danger);
}

.safe .byte-num {
  color: var(--success);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.tag-success {
  background: var(--success-bg);
  color: var(--success-ink);
}

/* Built end to end */
.built {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .built {
    grid-template-columns: 1fr 1fr;
  }
}

.built li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  font-weight: 600;
}

.closing {
  margin-top: 48px;
}

.author {
  color: var(--text-2);
}

.author strong {
  color: var(--text);
  font-size: 1.1rem;
}

.foot {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--text-2);
  font-size: 0.9rem;
}
