/* KidSafePC site. The app's kids palette (indigo, tangerine, mist and cream),
   Baloo 2 for headings (shipped locally in fonts/), the system font for text.
   Themes: light by default, dark by system preference or the toggle
   (html[data-theme]). No inline styles anywhere, so the pages run under a
   strict CSP (default-src 'self'). */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/baloo-2-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/baloo-2-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/baloo-2-latin-800-normal.woff2") format("woff2");
}

:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Baloo 2", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #fbfaf6;
  --surface: #ffffff;
  --surface-2: #eef0ff;
  --text: #1e1b4b;
  --text-2: #43406f;
  --text-3: #5a5787;
  --line: rgba(30, 27, 75, 0.11);
  --line-strong: rgba(30, 27, 75, 0.2);
  --accent: #4f46e5;
  --accent-base: #3730a3;
  --accent-strong: #3730a3;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --warm: #f97316;
  --warm-base: #c2410c;
  --warm-ink: #1e1b4b;
  --warm-soft: rgba(249, 115, 22, 0.14);
  --tile-base: #c7d2fe;
  --leaf: #166534;
  --leaf-soft: rgba(22, 163, 74, 0.12);
  --danger: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --shadow: 0 1px 2px rgba(30, 27, 75, 0.06), 0 14px 34px -14px rgba(30, 27, 75, 0.22);
  --shadow-lg: 0 28px 64px -24px rgba(30, 27, 75, 0.38);
  --radius: 16px;
  --radius-lg: 28px;
  --press: 5px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 200ms;
  --dur-slow: 560ms;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #110f29;
  --surface: #1a1740;
  --surface-2: #231f55;
  --text: #eef0ff;
  --text-2: #c5c8f2;
  --text-3: #a3a7dc;
  --line: rgba(238, 240, 255, 0.1);
  --line-strong: rgba(238, 240, 255, 0.2);
  --accent: #a5b4fc;
  --accent-base: #6366f1;
  --accent-strong: #c7d2fe;
  --accent-ink: #1e1b4b;
  --accent-soft: rgba(165, 180, 252, 0.14);
  --warm: #fb923c;
  --warm-base: #c2410c;
  --warm-ink: #1e1b4b;
  --warm-soft: rgba(251, 146, 60, 0.16);
  --tile-base: #3b367a;
  --leaf: #4ade80;
  --leaf-soft: rgba(74, 222, 128, 0.14);
  --danger: #fca5a5;
  --danger-soft: rgba(252, 165, 165, 0.14);
  --shadow: 0 1px 2px rgba(5, 4, 20, 0.4), 0 14px 34px -14px rgba(5, 4, 20, 0.7);
  --shadow-lg: 0 28px 64px -24px rgba(5, 4, 20, 0.8);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

kbd {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(1180px, 100% - 2 * clamp(16px, 4vw, 40px));
  margin-inline: auto;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

html[data-theme="dark"] .eyebrow {
  color: var(--accent);
}

.h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.3vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 22ch;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--text-2);
  max-width: 62ch;
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* ---------- buttons: chunky, like the tiles of the kids screen ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur), border-color var(--dur);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 var(--press) 0 var(--accent-base);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--tile-base);
  color: var(--text);
  box-shadow: 0 var(--press) 0 var(--tile-base);
}

.btn-warm {
  background: var(--warm);
  color: var(--warm-ink);
  box-shadow: 0 var(--press) 0 var(--warm-base);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  box-shadow: 0 calc(var(--press) + 2px) 0 var(--accent-base);
}

.btn-secondary:hover {
  box-shadow: 0 calc(var(--press) + 2px) 0 var(--tile-base);
}

.btn-warm:hover {
  box-shadow: 0 calc(var(--press) + 2px) 0 var(--warm-base);
}

.btn:active {
  transform: translateY(var(--press));
  box-shadow: 0 0 0 transparent;
}

.btn-lg {
  min-height: 54px;
  padding-inline: 26px;
  font-size: 1.0625rem;
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.d1 { transition-delay: 60ms; }
.d2 { transition-delay: 120ms; }
.d3 { transition-delay: 180ms; }
.d4 { transition-delay: 240ms; }
.d5 { transition-delay: 300ms; }

.reveal.in,
html.no-observer .reveal,
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion: no movement anywhere ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .btn:active,
  .tile:hover,
  .icon-btn:hover {
    transform: none;
  }
}
