/* =========================================================
   Test Landing Page — styles
   System fonts only, no external resources.
   ========================================================= */

/* ---------- Design tokens (light theme by default) ---------- */
:root {
  color-scheme: light dark;

  --bg: #f6f7fb;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --surface-hover: #fbfbfe;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #dfe4ee;
  --border-strong: #c7cfdd;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-2: #0e7490;
  --on-accent: #ffffff;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --accent-soft-2: rgba(14, 116, 144, 0.1);

  --success: #15803d;
  --focus: #2563eb;

  --header-bg: rgba(246, 247, 251, 0.82);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
}

/* ---------- Dark theme ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-alt: #0f1629;
    --surface: #131b30;
    --surface-hover: #172038;
    --text: #e6e9f2;
    --text-muted: #a5afc4;
    --border: #243049;
    --border-strong: #33415f;

    --accent: #8b93ff;
    --accent-hover: #a5abff;
    --accent-2: #22d3ee;
    --on-accent: #0b1020;
    --accent-soft: rgba(139, 147, 255, 0.14);
    --accent-soft-2: rgba(34, 211, 238, 0.12);

    --success: #4ade80;
    --focus: #93c5fd;

    --header-bg: rgba(11, 16, 32, 0.78);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px -14px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--text);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: 780px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-accent);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  width: 32px;
  height: 32px;
  flex: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 10vw, 120px) clamp(48px, 8vw, 96px);
  background:
    radial-gradient(60% 60% at 15% 10%, var(--accent-soft) 0%, transparent 70%),
    radial-gradient(50% 55% at 90% 20%, var(--accent-soft-2) 0%, transparent 70%);
  text-align: center;
}

.hero-inner {
  max-width: 880px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 {
  font-size: clamp(2rem, 1.2rem + 4.2vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  hyphens: auto;
}

.gradient-text {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px -8px var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

.pipeline-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.pipeline-chips li {
  padding: 6px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
}

.pipeline-chips .arrow {
  padding: 0;
  border: 0;
  color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(56px, 8vw, 96px);
}

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

.section-head {
  max-width: 640px;
  margin: 0 auto clamp(32px, 5vw, 48px);
  text-align: center;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem);
  font-weight: 800;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 28px 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent);
  font-weight: 800;
  font-size: 1.05rem;
}

.step h3 {
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Feature cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card h3 {
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 22px;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

.faq details[open] summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}

.faq details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-inner p {
  margin: 0;
}

.build-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.build-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

/* ---------- 404 page ---------- */
.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px var(--gutter);
  background:
    radial-gradient(60% 50% at 20% 15%, var(--accent-soft) 0%, transparent 70%),
    radial-gradient(50% 50% at 85% 85%, var(--accent-soft-2) 0%, transparent 70%),
    var(--bg);
  text-align: center;
}

.notfound-box {
  max-width: 480px;
}

.notfound-code {
  margin: 0 0 8px;
  font-size: clamp(4.5rem, 3rem + 8vw, 7.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.notfound h1 {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
}

.notfound p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .header-inner {
    justify-content: center;
    padding-block: 10px;
  }

  .site-nav ul {
    justify-content: center;
  }

  .site-nav a {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .cta-row .btn {
    width: 100%;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}
