/* K12Claim landing page. No third-party requests: fonts are self-hosted, no analytics, no external scripts. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --teal: #0e3b3a;
  --teal-2: #14504e;
  --pencil: #f2b705;
  --pencil-ink: #3a2c00;
  --paper: #f6f8f7;
  --surface: #ffffff;
  --ink: #14201f;
  --ink-2: #4a5b59;
  --mint: #dde8e4;
  --line: #cfdcd8;
  --flag: #b24f08;
  --flag-bg: #fdeede;
  --ok: #17734a;
  --ok-bg: #dcf3e6;
  --on-teal: #eaf3f1;
  --on-teal-2: #b5cdc8;
  --focus: #1456d6;

  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --text: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0a1413;
    --surface: #101e1d;
    --ink: #e7f0ee;
    --ink-2: #9db4b0;
    --mint: #15302e;
    --line: #26413e;
    --flag: #ffb26b;
    --flag-bg: #3a2410;
    --ok: #6fdba5;
    --ok-bg: #123525;
    --teal: #0a2a29;
    --teal-2: #123f3d;
    --focus: #7aa7ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--pencil); color: var(--pencil-ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 34em; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px;
  font: 600 1rem/1 var(--text); text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pencil); color: var(--pencil-ink); }
.btn-primary:hover { background: #ffc92b; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--mint); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.35rem/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
@media (max-width: 860px) { .nav a:not(.btn) { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 104px);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 39px, color-mix(in srgb, var(--line) 55%, transparent) 39px, color-mix(in srgb, var(--line) 55%, transparent) 40px);
}
.hero-grid { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; } }
.hero-copy { display: grid; gap: 26px; justify-items: start; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* The claim ticket: one sample service line, walked through the stages. */
.ticket { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 8px 8px 0 var(--teal); overflow: hidden; }
.ticket-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 16px 20px; background: var(--mint); border-bottom: 2px solid var(--ink); }
.ticket-head strong { font: 700 1.05rem/1.2 var(--display); }
.ticket-head span { font-size: 0.875rem; color: var(--ink-2); }
.stages { list-style: none; margin: 0; padding: 8px 20px 4px; }
.stage { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 14px 0; }
.stage + .stage { border-top: 1px dashed var(--line); }
/* Sequence timings: --d is when the stage completes, --f (eligibility only) is when the problem is flagged. */
.stage:nth-child(1) { --d: 0.4s; }
.stage:nth-child(2) { --f: 1.2s; --d: 3s; }
.stage:nth-child(3) { --d: 3.8s; }
.stage:nth-child(4) { --d: 4.6s; }
.stage:nth-child(5) { --d: 5.4s; }
.dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; background: var(--surface); transition: none; }
.dot svg { width: 14px; height: 14px; }
.stage h3 { font: 600 1rem/1.3 var(--text); letter-spacing: 0; }
.stage p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.notes { display: grid; justify-items: start; margin-top: 8px; }
.notes .note { grid-area: 1 / 1; align-self: start; }
.note { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.note-flag { background: var(--flag-bg); color: var(--flag); }
.note-ok { background: var(--ok-bg); color: var(--ok); }
.ticket-foot { padding: 12px 20px 16px; font-size: 0.82rem; color: var(--ink-2); }

/* Final (static) state: every stage done. */
.stage .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stage .note-flag { display: none; }

/* Motion: play the sequence once, only if the visitor has not asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .stage .dot { background: var(--surface); border-color: var(--line); color: transparent; animation: dot-done 0.35s ease var(--d) forwards; }
  .stage-check .dot { animation: dot-flag 0.35s ease var(--f) forwards, dot-done 0.35s ease var(--d) forwards; }
  .stage .note-ok { opacity: 0; animation: ok-show 0.4s ease calc(var(--d) + 0.1s) forwards; }
  .stage-check .note-flag { display: inline-block; opacity: 0; animation: flag-show 1.8s ease var(--f) forwards; }
}
@keyframes dot-done { to { background: var(--ok); border-color: var(--ok); color: #fff; } }
@keyframes dot-flag { to { background: var(--flag); border-color: var(--flag); color: #fff; } }
@keyframes flag-show { 0% { opacity: 0; transform: translateY(4px); } 15%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes ok-show { to { opacity: 1; } }

/* ---------------------------------------------------------------- sections */
section { scroll-margin-top: 80px; }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 40rem; }

/* Features: a plain two-column list, not a wall of cards. */
.features { display: grid; gap: clamp(32px, 4vw, 44px) clamp(32px, 6vw, 80px); }
@media (min-width: 800px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); display: grid; place-items: center; color: var(--teal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .feature-icon { color: var(--pencil); } }
.feature-icon svg { width: 22px; height: 22px; }
.feature p { color: var(--ink-2); margin-top: 6px; }

/* Services */
.services { background: var(--mint); }
.service-grid { display: grid; gap: 20px; }
@media (min-width: 800px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service { background: var(--surface); border-radius: 14px; padding: 28px; display: grid; gap: 10px; align-content: start; border-top: 6px solid var(--teal); }
.service:nth-child(2) { border-top-color: var(--pencil); }
.service:nth-child(3) { border-top-color: var(--flag); }
.service p { color: var(--ink-2); }
.service ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--ink-2); }
.service li + li { margin-top: 4px; }

/* How it works: a real sequence, so it is numbered. */
.how { background: var(--teal); color: var(--on-teal); }
.how .lede { color: var(--on-teal-2); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding-block: 26px; border-top: 1px solid color-mix(in srgb, var(--on-teal) 22%, transparent); align-items: start; }
.step:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-teal) 22%, transparent); }
.step::before { counter-increment: step; content: counter(step); font: 700 2.6rem/1 var(--display); color: var(--pencil); }
.step h3 { color: #fff; }
.step p { color: var(--on-teal-2); margin-top: 6px; max-width: 38rem; }
@media (min-width: 800px) { .step { grid-template-columns: 90px 260px 1fr; align-items: baseline; } .step p { margin-top: 0; } }

/* Teams */
.teams { display: grid; gap: 28px; }
@media (min-width: 800px) { .teams { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.team h3 { margin-bottom: 8px; }
.team p { color: var(--ink-2); }

/* Call to action */
.cta { background: var(--pencil); color: var(--pencil-ink); }
.cta-inner { display: grid; gap: 24px; justify-items: start; }
.cta h2 { color: var(--pencil-ink); max-width: 18em; }
.cta p { max-width: 36rem; }
.cta .btn { background: var(--teal); color: #fff; }
.cta .btn:hover { background: var(--teal-2); }
.cta small { font-size: 0.9rem; opacity: 0.85; }

/* Footer */
.site-footer { padding-block: 40px; font-size: 0.95rem; color: var(--ink-2); }
.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* Sign-in dialog */
dialog { border: 2px solid var(--ink); border-radius: 16px; padding: 0; background: var(--surface); color: var(--ink); width: min(440px, calc(100vw - 32px)); box-shadow: 8px 8px 0 var(--teal); }
dialog::backdrop { background: rgba(8, 20, 19, 0.6); }
.dialog-body { padding: 28px; display: grid; gap: 16px; }
.dialog-body p { color: var(--ink-2); font-size: 0.98rem; }
.dialog-title { font-size: 1.5rem; }
.noscript { padding-block: 16px; }
label { font-weight: 600; font-size: 0.95rem; }
.field { display: flex; align-items: stretch; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--paper); }
.field:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 1.05rem/1 var(--text); padding: 14px 12px; outline: none; }
.field span { display: grid; place-items: center; padding: 0 12px; background: var(--mint); color: var(--ink-2); font-size: 0.95rem; white-space: nowrap; }
.error { color: var(--flag); font-weight: 600; font-size: 0.92rem; min-height: 1.2em; }
.dialog-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Legal pages */
.prose { max-width: 44rem; padding-block: clamp(48px, 7vw, 88px); }
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 8px; }
.prose h2 { font-size: 1.4rem; margin: 36px 0 10px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 1.2em; }
.updated { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 28px; }

@media print { .site-header, .cta, dialog { display: none; } }
