/* Chalkbrook product homepage. The deep green, cream, and yellow are the product site's own; --brand is the app's
   green and --primary-600 the app's blue, and e2e/site.spec.ts fails if either drifts from client/index.css. */
/* The site's fonts, served from the site itself so no visitor's address goes to a font host. Latin only; licences
   (SIL Open Font License) are next to them in fonts/. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: Fraunces; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-opsz-normal.woff2) format('woff2'); }
@font-face { font-family: Fraunces; font-style: italic; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-opsz-italic.woff2) format('woff2'); }
@font-face { font-family: Caveat; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/caveat-latin-wght-normal.woff2) format('woff2'); }

:root {
  --brand: #15803d;
  --brand-dark: #166534;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --ink: #0f2419;
  --ink-raised: #17322a;
  --ink-line: #2a4a3e;
  --on-ink: #eef3ef;
  --on-ink-muted: #a9bdb2;
  --cream: #f3eee2;
  --paper: #fbf8f1;
  --text: #1f2b24;
  --text-muted: #56635b;
  --line: #ded7c7;
  --yellow: #f2cd5d;
  --yellow-dark: #e3b93c;
  --coral: #e58a6f;
  --white: #fff;
  --serif: Fraunces, Georgia, 'Times New Roman', serif;
  --script: Caveat, 'Segoe Print', 'Bradley Hand', cursive;
}

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

/* A section a menu link jumps to lands just below the sticky header: three rows tall on a phone, one from 48rem. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

@media (min-width: 48rem) {
  html {
    scroll-padding-top: 4.25rem;
  }
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 400;
}

p {
  margin: 0 0 1rem;
}

/* The darker blue keeps body links readable on cream; the app's blue is too light there. */
a {
  color: var(--primary-700);
}

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

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.narrow {
  max-width: 40rem;
  text-align: center;
}

.script {
  font-family: var(--script);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.2;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--ink);
  color: var(--on-ink);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--on-ink);
  text-decoration: none;
}

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

.brand-small {
  font-size: 1.0625rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

nav a {
  color: var(--on-ink-muted);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

nav a:hover {
  color: var(--yellow);
}

/* Buttons: one main action (yellow), and a dark button for the contact address */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s;
}

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 0.5rem 1.5rem -0.5rem rgb(242 205 93 / 0.55);
}

.btn-primary:hover {
  background: var(--yellow-dark);
  color: var(--ink);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--ink);
  color: var(--on-ink);
}

.btn-dark:hover {
  background: var(--ink-raised);
  color: var(--white);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.dark {
  background: var(--ink);
  color: var(--on-ink-muted);
}

.dark h2,
.dark h3 {
  color: var(--on-ink);
}

.dark h2 em {
  color: var(--yellow);
}

.cream {
  background: var(--cream);
}

.paper {
  background: var(--paper);
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h3 {
  font-size: 1.375rem;
}

.blue {
  color: var(--primary-600);
}

.kicker {
  color: var(--brand-dark);
  margin-bottom: 0.25rem;
}

.section-lead {
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 2.5rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 15% 0%, rgb(37 99 235 / 0.16), transparent 70%),
    radial-gradient(40rem 30rem at 90% 30%, rgb(21 128 61 / 0.28), transparent 70%),
    var(--ink);
  color: var(--on-ink-muted);
  padding: 3.5rem 0 6rem;
}

.eyebrow {
  color: var(--yellow);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  font-weight: 400;
  color: var(--on-ink);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.circled {
  position: relative;
  display: inline-block;
  color: var(--yellow);
  white-space: nowrap;
}

.circled::after {
  content: '';
  position: absolute;
  inset: -0.1em -0.18em -0.02em -0.22em;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  transform: rotate(-3deg);
  pointer-events: none;
}

.lead {
  font-size: 1.125rem;
  max-width: 34rem;
  margin-top: 1.5rem;
}

.aside {
  color: var(--on-ink-muted);
  font-size: 1.25rem;
}

@media (min-width: 64rem) {
  .hero {
    padding-top: 4.5rem;
  }
}

/* The band of school kinds, sliding sideways where motion is welcome */
.band-wrap {
  overflow: hidden;
  background: var(--ink-raised);
  border-block: 1px solid var(--ink-line);
}

.band {
  display: flex;
  width: max-content;
  padding: 1rem 0;
}

.band-track {
  display: flex;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.band-track li {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
  white-space: nowrap;
  padding: 0 1.5rem;
}

.band-track li::after {
  content: '';
  display: inline-block;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--yellow);
  vertical-align: middle;
  margin-left: 3rem;
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .band {
    animation: slide 45s linear infinite;
  }
}

/* The school year timeline */
#year {
  padding-top: 3rem;
}

.split-head {
  display: grid;
  gap: 1rem 3rem;
  align-items: end;
  margin-bottom: 3rem;
}

.split-head p {
  max-width: 24rem;
  margin: 0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.5rem;
  display: grid;
  gap: 2rem;
  border-left: 2px dotted var(--ink-line);
}

.timeline li {
  position: relative;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: calc(-1.5rem - 0.5625rem - 1px);
  top: 0.2rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  border: 2px solid var(--yellow);
  background: var(--ink);
}

.timeline li:last-child::before {
  background: var(--yellow);
}

.timeline .when {
  color: var(--yellow);
  margin-bottom: 0.25rem;
}

.timeline h3 {
  font-size: 1.25rem;
}

.timeline p:last-child {
  margin: 0;
  font-size: 0.9375rem;
}

@media (min-width: 64rem) {
  .split-head {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .split-head p {
    justify-self: end;
  }

  .timeline {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 2.25rem 0 0;
    border-left: 0;
    border-top: 2px dotted var(--ink-line);
  }

  .timeline li::before {
    left: 0;
    top: calc(-2.25rem - 0.5625rem - 1px);
  }
}

/* Features: a bento of tiles, each with a small drawing of what it does */
.bento {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.tile {
  border-radius: 1rem;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}

.tile h3 + p {
  font-size: 0.9375rem;
}

.tile h3 {
  font-size: 1.5rem;
}

.num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-600);
  margin-bottom: 0.5rem;
}

.tile-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink-muted);
}

.tile-dark h3 {
  color: var(--on-ink);
}

.tile-dark .num {
  color: var(--yellow);
}

.tile-blue {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: var(--white);
}

.tile-blue h3,
.tile-blue .num {
  color: var(--white);
}

.tile-yellow {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #3b3415;
}

.tile-yellow .num {
  color: var(--ink);
}

.tile-wide,
.tile-full {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.mini-form {
  background: var(--white);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 1rem 1.125rem;
  box-shadow: 0 1rem 2rem -1rem rgb(0 0 0 / 0.5);
  transform: rotate(2deg);
  max-width: 19rem;
  justify-self: center;
}

.mini-title {
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.375rem 0;
  margin: 0;
  border-bottom: 1px solid #ece8de;
  font-size: 0.8125rem;
}

.mini-total {
  font-weight: 600;
  border-bottom: 0;
}

.pill {
  font-size: 0.6875rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-700);
}

.signature {
  font-family: var(--script);
  font-size: 1.75rem;
  color: var(--primary-700);
  border-bottom: 1px solid var(--line);
  margin: 0.25rem 0 0;
}

.mini-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.receipt {
  margin-top: 1.25rem;
  display: inline-block;
  padding: 0.75rem 1rem;
  border: 1px dashed #b8b09c;
  border-radius: 0.375rem;
  background: var(--paper);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.75rem;
  transform: rotate(-1.5deg);
}

.receipt p {
  margin: 0;
}

.voided {
  text-decoration: line-through;
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

.chip {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.5);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--white);
}

.chip-on {
  background: var(--white);
  color: var(--primary-700);
}

.grade {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.grade-score {
  font-family: var(--serif);
  font-size: 2.75rem;
  font-style: italic;
  color: var(--brand);
  line-height: 1;
}

.grade .script {
  color: var(--text-muted);
}

.mini-phone {
  justify-self: center;
  width: 15rem;
  padding: 1rem 0.875rem 1.25rem;
  border: 0.5rem solid var(--ink);
  border-bottom: 0;
  border-radius: 1.75rem 1.75rem 0 0;
  background: var(--paper);
  margin-bottom: -1.75rem;
}

.home-row {
  display: flex;
  gap: 0.625rem;
  margin: 0 0 0.875rem;
}

.home-row img,
.home-row span {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
}

.home-row span {
  background: #e4dfd3;
}

.bubble {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.875rem;
  max-width: 85%;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.bubble-in {
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom-left-radius: 0.25rem;
}

.bubble-out {
  margin-left: auto;
  background: var(--primary-600);
  color: var(--white);
  border-bottom-right-radius: 0.25rem;
}

.move-up {
  margin: 1.25rem 0 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--on-ink);
}

.move-up span {
  color: var(--yellow);
  margin: 0 0.5rem;
}

.move-up em {
  font-family: var(--script);
  font-style: normal;
  font-size: 1.875rem;
  color: var(--yellow);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 0.375rem;
  height: 3.5rem;
  margin: 1.25rem 0 0;
}

.bars span {
  width: 1.5rem;
  border-radius: 0.25rem 0.25rem 0 0;
  background: #bfd1fb;
}

.bars span:nth-child(1) { height: 30%; }
.bars span:nth-child(2) { height: 55%; background: #93b2f7; }
.bars span:nth-child(3) { height: 42%; }
.bars span:nth-child(4) { height: 75%; background: #5b8af0; }
.bars span:nth-child(5) { height: 100%; background: var(--primary-600); }

.audit {
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
}

.audit-url {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  color: var(--on-ink);
  margin: 0 0 0.625rem;
}

.audit-url::before {
  content: '🔒 ';
  font-size: 0.75rem;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.375rem 0.25rem;
  margin: 0;
  font-size: 0.8125rem;
  border-top: 1px solid var(--ink-line);
}

@media (min-width: 48rem) {
  .bento {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .tile {
    grid-column: span 6;
  }

  .bento > .tile:nth-child(1),
  .bento > .tile:nth-child(5) {
    grid-column: span 7;
  }

  .bento > .tile:nth-child(2),
  .bento > .tile:nth-child(6) {
    grid-column: span 5;
  }

  .bento > .tile-full {
    grid-column: 1 / -1;
  }

  .tile-wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }

  .tile-full {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .tile-yellow {
    padding-bottom: 0;
    align-items: end;
  }

  .tile-yellow > div:first-child {
    padding-bottom: 1.75rem;
  }
}

/* Roles */
.roles-section {
  padding-top: 0;
}

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.role {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.75rem;
}

.role-tag {
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.role h3 {
  font-size: 1.375rem;
}

.role ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

.role li {
  margin-bottom: 0.25rem;
}

/* How it works: big outlined numbers */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 2rem;
}

.steps li {
  counter-increment: step;
  border-top: 1px solid var(--ink-line);
  padding-top: 1.5rem;
}

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 4.5rem;
  line-height: 1;
  margin-bottom: 1rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--yellow);
}

.steps li:nth-child(2)::before {
  -webkit-text-stroke-color: #9db9ff;
}

.steps li:nth-child(3)::before {
  -webkit-text-stroke-color: var(--coral);
}

.steps strong {
  color: var(--on-ink);
}

/* Demo: a blue card with what to try in the sample school */
.demo-card {
  margin-top: 5rem;
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 1.5rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(30rem 20rem at 100% 100%, rgb(255 255 255 / 0.12), transparent 70%),
    var(--primary-600);
  color: #e3ebff;
  scroll-margin-top: 1.5rem;
}

.demo-card h2 {
  color: var(--white);
}

.demo-card h2 em {
  color: var(--white);
}

.demo-card .kicker {
  color: #fff7d6;
}

.demo-email {
  margin: 0;
  font-size: 0.875rem;
}

.demo-email a {
  color: var(--white);
}

.demo-panel {
  background: var(--ink);
  color: var(--on-ink-muted);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1.5rem 3rem -1rem rgb(0 0 0 / 0.5);
}

.demo-school {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--on-ink);
}

.demo-badge {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
}

.demo-sub {
  font-size: 0.8125rem;
  margin: 0.125rem 0 1.25rem;
}

.demo-panel dl {
  margin: 0;
}

.demo-panel dt {
  font-family: var(--script);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--yellow);
}

.demo-panel dd {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.demo-panel dd:last-child {
  margin-bottom: 0;
}

@media (min-width: 60rem) {
  .demo-card {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    padding: 3.5rem;
    gap: 3rem;
  }

  .demo-panel {
    transform: rotate(1.5deg);
  }
}

/* Contact */
.contact h2 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  margin-bottom: 1.25rem;
}

.underline {
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.contact p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* FAQ */
.faq {
  max-width: 48rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 1.125rem 0;
  font-family: var(--serif);
  font-size: 1.1875rem;
  color: var(--ink);
}

.faq details p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Privacy and terms */
.legal {
  max-width: 44rem;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.legal h1 {
  color: var(--ink);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
}

.legal .updated {
  color: var(--text-muted);
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

.legal dt {
  font-weight: 600;
  color: var(--ink);
}

.legal dd {
  margin: 0 0 1rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  padding: 2.5rem 0;
  font-size: 0.875rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer-row p {
  margin: 0;
}

/* 404 */
.not-found {
  padding: 6rem 1rem;
  text-align: center;
}

.not-found p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
