/* QuestSchool marketing site - page-level layout and components.
 *
 * Loaded AFTER /marketing.css, which owns the palette (the --ink/--accent/--band
 * custom properties used below) and the shared header, footer, form and
 * character-grid rules. This file is additive on purpose: /marketing.css is also
 * used by the error and game-gate views, so it is left alone.
 *
 * Constraints this file honours:
 *   - No @import of a remote stylesheet, no webfont from a CDN, no third-party
 *     anything. System fonts only.
 *   - Layout is CSS grid with auto-fit minmax, so every grid collapses to one
 *     column well above a 360px viewport without a media query per breakpoint.
 *   - Visible focus is defined here for every interactive element, and is never
 *     removed. Accessibility is an acceptance criterion (SOW 7.6).
 */

/* --- Focus and skip link -------------------------------------------------- */

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  z-index: 10;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* --- Header / footer nav as lists ---------------------------------------- */

.primary-nav, .footer-nav { margin-right: auto; }
.primary-nav ul, .footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.primary-nav a, .footer-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 4px 0;
  display: inline-block;
}
.primary-nav a:hover, .footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.primary-nav a[aria-current="page"], .footer-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

.site-footer { display: block; }
.site-footer .footer-nav { margin: 0 0 12px; }
.footer-note { max-width: 70ch; margin: 0 0 8px; }
.copyright { margin: 0; font-size: 0.9rem; }

/* --- Hero ----------------------------------------------------------------- */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 32px 0 0;
}
.hero h1 { max-width: 20ch; }
.hero .lede { font-size: 1.2rem; max-width: 62ch; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin: 24px 0;
}
.cta-secondary {
  display: inline-block;
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
}
.cta-secondary:hover { border-color: var(--accent); color: var(--accent); }

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.hero-facts li {
  background: var(--band);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-facts strong {
  display: block;
  font-size: 1.7rem;
  color: var(--ink);
  line-height: 1.1;
}

/* --- Grids and lists ------------------------------------------------------ */

.subject-grid {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.subject-grid li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.subject-grid h3 { margin-top: 0; }
.subject-grid p { margin: 0; color: var(--muted); }

.steps-inline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: step;
}
.steps-inline li {
  background: var(--band);
  border-radius: var(--radius);
  padding: 20px;
  counter-increment: step;
}
.steps-inline li::before {
  content: counter(step);
  display: block;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.steps-inline h3, .steps h3 { margin-top: 0; }
.steps-inline p, .steps p { margin: 0; }

.two-col {
  display: grid;
  gap: 12px 40px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.feature-list { margin: 0; }
.feature-list dt { font-weight: 700; margin-top: 16px; }
.feature-list dd { margin: 4px 0 0; color: var(--muted); }

.claim-list { list-style: none; padding: 0; margin: 0; }
.claim-list li { margin-bottom: 12px; }

.plain-list { padding-left: 1.1em; }
.plain-list li { margin-bottom: 10px; }

.tick-list { list-style: none; padding: 0; }
.tick-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 10px;
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 12px;
  height: 6px;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}

/* --- Pricing -------------------------------------------------------------- */

.price-card {
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0 8px;
  max-width: 560px;
}
.price-card h2 { margin-top: 0; }
.price-unit { font-size: 1rem; font-weight: 400; color: var(--muted); }
.price-note { color: var(--muted); font-size: 0.92rem; }

.notice-warn {
  border-left: 4px solid #b4690e;
  background: var(--band);
}

/* --- Closing CTA ---------------------------------------------------------- */

.closing-cta {
  background: var(--band);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 48px;
}
.closing-cta h2 { margin-top: 0; }

/* --- Contact form --------------------------------------------------------- */

.contact-form { max-width: 560px; }
.contact-form .field { display: grid; gap: 6px; margin-bottom: 18px; }
.contact-form label { font-weight: 600; }
.contact-form .hint { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* --- Small screens (360px phone) ------------------------------------------ */

@media (max-width: 480px) {
  main { padding-left: 16px; padding-right: 16px; }
  .site-header { gap: 12px; padding: 14px 16px; }
  .site-header .cta { width: 100%; text-align: center; }
  .cta-row > * { width: 100%; text-align: center; }
  .hero { padding-top: 24px; }
  .price-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
