/* ParentalControl.uk design tokens and components */

:root {
  --color-brand-50: oklch(98% 0.02 60);
  --color-brand-100: oklch(95% 0.05 60);
  --color-brand-200: oklch(90% 0.09 58);
  --color-brand-300: oklch(82% 0.13 55);
  --color-brand-400: oklch(74% 0.16 50);
  --color-brand-500: #f48120;
  --color-brand-600: #e26f0f;
  --color-brand-700: oklch(56% 0.16 42);
  --color-brand-800: oklch(45% 0.13 38);
  --color-brand-900: oklch(32% 0.1 36);

  --color-ink: #0f172a;
  --color-ink-soft: #475569;
  --color-ink-mute: #94a3b8;
  --color-line: #e2e8f0;
  --color-line-soft: #f1f5f9;
  --color-paper: #ffffff;
  --color-canvas: #fafaf7;

  --color-success: #16a34a;
  --color-success-soft: #dcfce7;
  --color-warning: #f59e0b;
  --color-warning-soft: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-soft: #fee2e2;

  --elev-1: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --elev-2: 0 2px 4px rgba(15, 23, 42, 0.06), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
  --elev-3:
    0 4px 8px rgba(15, 23, 42, 0.06),
    0 24px 48px -16px rgba(15, 23, 42, 0.12),
    0 32px 64px -32px rgba(244, 129, 32, 0.18);

  --glow-brand: 0 0 0 1px rgba(244, 129, 32, 0.15), 0 8px 24px rgba(244, 129, 32, 0.25);
  --glow-success: 0 0 0 1px rgba(22, 163, 74, 0.15), 0 8px 24px rgba(22, 163, 74, 0.18);
  --glow-warning: 0 0 0 1px rgba(245, 158, 11, 0.15), 0 8px 24px rgba(245, 158, 11, 0.18);
  --glow-danger: 0 0 0 1px rgba(220, 38, 38, 0.15), 0 8px 24px rgba(220, 38, 38, 0.18);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-spring: linear(0, 0.45 11%, 0.78 22%, 1.04 33%, 1.05 44%, 1 55%, 0.99 70%, 1);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  --progress: 0%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-variation-settings: 'wght' 440;
  background: var(--color-canvas);
  color: var(--color-ink);
  min-height: 100vh;
}

.t-display {
  font-size: clamp(2.5rem, 4vw + 1rem, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-variation-settings: 'wght' 580, 'opsz' 32;
}

.t-h1 {
  font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variation-settings: 'wght' 580, 'opsz' 32;
}

.t-h2 {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-variation-settings: 'wght' 560;
}

.t-h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-variation-settings: 'wght' 560;
}

.t-body-lg {
  font-size: 1.125rem;
  line-height: 1.6;
}

.t-body {
  font-size: 1rem;
  line-height: 1.55;
}

.t-small {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.t-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  font-feature-settings: 'tnum', 'zero';
}

/* Aurora hero */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aurora__blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  will-change: transform;
}

.aurora__blob--a {
  background: var(--color-brand-400);
  top: -10%;
  left: -10%;
  animation: drift-a 22s var(--ease-in-out-quart) infinite alternate;
}

.aurora__blob--b {
  background: var(--color-brand-200);
  top: 20%;
  right: -15%;
  animation: drift-b 28s var(--ease-in-out-quart) infinite alternate;
}

.aurora__blob--c {
  background: oklch(92% 0.06 80);
  bottom: -20%;
  left: 30%;
  animation: drift-c 26s var(--ease-in-out-quart) infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate3d(8%, 6%, 0) scale(1.05);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-6%, 4%, 0) scale(1.08);
  }
}

@keyframes drift-c {
  to {
    transform: translate3d(4%, -6%, 0) scale(0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora__blob {
    animation: none;
  }
}

/* Top bar glass */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(250, 250, 247, 0.82);
  border-bottom: 1px solid var(--color-line);
}

.top-bar__inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-bar__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

.top-bar__nav a {
  color: var(--color-ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 8px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.top-bar__nav a:hover {
  color: var(--color-ink);
}

.top-bar__nav a:focus-visible {
  outline: 3px solid #ffc640;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Cards & buttons */
.card {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--elev-2);
  padding: 24px;
}

@media (min-width: 640px) {
  .card {
    padding: 32px;
  }
}

.card--elev3 {
  box-shadow: var(--elev-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 580;
  font-variation-settings: 'wght' 580;
  font-size: 1rem;
  line-height: 1;
  padding: 16px 24px;
  border-radius: var(--radius);
  transition:
    transform 0.15s var(--ease-out-expo),
    box-shadow 0.2s var(--ease-out-expo),
    background 0.15s linear;
  min-height: 48px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--color-brand-500);
  color: #fff;
  box-shadow: var(--elev-2);
}

.btn-primary:hover {
  background: color-mix(in oklch, var(--color-brand-500), black 6%);
  box-shadow: var(--glow-brand);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  transition-duration: 0.05s;
}

.btn:focus-visible,
.card:focus-visible {
  outline: 3px solid #ffc640;
  outline-offset: 3px;
}

.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border: 2px solid var(--color-line);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: var(--color-ink-mute);
  background: var(--color-line-soft);
}

.btn-pill {
  border-radius: 999px;
  padding: 18px 28px;
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-brand-600);
  box-shadow: none;
  font-weight: 580;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 12px;
  min-height: 44px;
}

.btn-text:focus-visible {
  outline: 3px solid #ffc640;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scanner panel */
.scanner-shell {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 0 auto;
}

.scanner-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-line-soft);
  border: 1px solid var(--color-line);
  font-size: 0.8125rem;
  color: var(--color-ink-soft);
}

/* Radar */
.radar-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 24px;
}

.radar-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: radial-gradient(circle, var(--color-line) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.35;
}

.radar {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(244, 129, 32, 0.15) 60deg,
    transparent 60deg
  );
  border: 2px solid var(--color-line);
  box-shadow: inset 0 0 40px rgba(244, 129, 32, 0.08);
}

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(244, 129, 32, 0.45) 25deg, transparent 25deg);
  animation: radar-sweep 3s linear infinite;
}

@keyframes radar-sweep {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .radar__sweep {
    animation: none;
  }
}

.radar.pulse-once .radar__sweep {
  animation: radar-pulse 0.42s var(--ease-out-expo) 1;
}

@keyframes radar-pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Ribbed shimmer progress */
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--color-line-soft);
  border: 1px solid var(--color-line);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: var(--progress);
  max-width: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(
      -60deg,
      var(--color-brand-400) 0 8px,
      var(--color-brand-500) 8px 16px
    ),
    linear-gradient(90deg, var(--color-brand-300), var(--color-brand-500));
  background-size: 24px 100%, 100% 100%;
  transition: width 0.12s linear;
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill {
    background: var(--color-brand-500);
    transition: width 0.2s linear;
  }
}

.progress-fill.is-shimmer:not(.reduced) {
  animation: shimmer-move 1.2s linear infinite;
}

@keyframes shimmer-move {
  to {
    background-position:
      -48px 0,
      0 0;
  }
}

.progress-slow-label {
  font-size: 0.8125rem;
  color: var(--color-ink-soft);
  margin-top: 8px;
  min-height: 1.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.progress-slow-label.is-visible {
  opacity: 1;
}

/* Scan rows */
.scan-active-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--color-paper);
  margin-bottom: 16px;
}

.scan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--color-line-soft);
  background: var(--color-paper);
  font-size: 0.9375rem;
  transition:
    transform 0.35s var(--ease-out-expo),
    opacity 0.35s var(--ease-out-expo);
}

.scan-row.is-active {
  border-color: var(--color-brand-300);
  box-shadow: var(--elev-1);
}

.scan-row.is-done {
  opacity: 0.85;
}

.scan-row__label {
  flex: 1;
  color: var(--color-ink-soft);
}

.scan-row__meta {
  flex-shrink: 0;
}

/* Status icons */
.status-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.status-icon .ring {
  fill: none;
  stroke: var(--color-line);
  stroke-width: 1.5;
  stroke-dasharray: 63;
  stroke-dashoffset: 63;
}

.status-icon.is-drawn .ring {
  animation: ring-draw 0.5s var(--ease-out-expo) forwards;
}

.status-icon .mark {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  opacity: 0;
}

.status-icon.is-drawn .mark {
  animation: mark-draw 0.4s var(--ease-out-expo) 0.25s forwards;
}

.status-icon.is-success {
  color: var(--color-success);
}

.status-icon.is-warn {
  color: var(--color-warning);
}

.status-icon.is-danger {
  color: var(--color-danger);
}

@keyframes ring-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes mark-draw {
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-icon .ring {
    stroke-dashoffset: 0;
  }

  .status-icon .mark {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Result score ring */
.score-ring-wrap {
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  position: relative;
}

.score-ring-svg {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: var(--color-line);
  stroke-width: 12;
}

.score-ring-fg {
  fill: none;
  stroke: var(--color-warning);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  transition: stroke-dashoffset 0.72s var(--ease-out-expo), stroke 0.3s ease;
}

.score-ring-fg.is-green {
  stroke: var(--color-success);
}

.score-ring-fg.is-orange {
  stroke: var(--color-warning);
}

.score-ring-fg.is-red {
  stroke: var(--color-danger);
}

.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  font-variation-settings: 'wght' 580;
}

.section-y {
  padding: 64px 16px;
}

@media (min-width: 768px) {
  .section-y {
    padding: 96px 24px;
  }
}

.container-marketing {
  max-width: 64rem;
  margin: 0 auto;
}

.prose-two-space p {
  white-space: pre-wrap;
}

/* FAQ accordion */
details.faq-item {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--color-paper);
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 580;
  list-style: none;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary:focus-visible {
  outline: 3px solid #ffc640;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Bento */
.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bento__card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  background: var(--color-paper);
  box-shadow: var(--elev-1);
}

/* Banners */
.banner {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  margin-bottom: 16px;
  border: 1px solid var(--color-line);
  background: var(--color-warning-soft);
  color: var(--color-ink);
}

.banner--info {
  background: var(--color-line-soft);
}

/* Noscript */
.noscript-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 2px dashed var(--color-line);
  background: var(--color-paper);
  max-width: 36rem;
  margin: 0 auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--color-ink);
  color: #fff;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Visually hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.remediation-checklist {
  counter-reset: step;
  padding-left: 0;
  list-style: none;
}

.remediation-checklist li {
  counter-increment: step;
  margin-bottom: 12px;
  padding-left: 36px;
  position: relative;
}

.remediation-checklist li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-brand-100);
  color: var(--color-brand-700);
  font-size: 0.8125rem;
  font-weight: 580;
  display: flex;
  align-items: center;
  justify-content: center;
}
