/* The Larchmark site (ADR-0025). Colours and spacing come from tokens.css (docs/brand/tokens.json);
   layout follows the brand guide: up to 1120px wide, columns from 1024px, one column on phones. */
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/Newsreader-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/Figtree-Variable.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

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

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

p {
  margin: 0 0 var(--space-4);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 var(--space-6);
  }
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-md);
  z-index: 10;
}

.skip:focus {
  top: var(--space-2);
}

.lead {
  font-size: 1.1875rem;
  color: var(--ink-muted);
  max-width: 62ch;
}

.note {
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--larch-ink);
  margin-bottom: var(--space-3);
}

/* Buttons: 44pt targets, sentence case, spruce for the main action. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  border: 2px solid var(--spruce);
  background: var(--spruce);
  color: var(--on-spruce);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
}

.button:hover {
  background: var(--spruce-strong);
  border-color: var(--spruce-strong);
}

.button.secondary {
  background: transparent;
  color: var(--spruce);
}

.button.secondary:hover {
  background: var(--spruce-soft);
}

.button.small {
  min-height: 44px;
  padding: 0 var(--space-4);
  font-size: 1rem;
}

.button.larch {
  background: var(--larch);
  border-color: var(--larch);
  color: var(--on-larch);
}

.button.larch:hover {
  filter: brightness(1.05);
}

.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-3);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.lockup {
  height: 24px;
  width: auto;
}

.dark-only {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .light-only {
    display: none;
  }
  .dark-only {
    display: inline;
  }
}

.site-header nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header nav a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.site-header nav a:not(.button):hover {
  color: var(--spruce);
  text-decoration: underline;
}

.wide-only {
  display: none;
}

@media (min-width: 880px) {
  .wide-only {
    display: list-item;
  }
}

/* Hero */
.hero {
  padding: var(--space-7) 0 var(--space-8);
  background: var(--paper);
  overflow: hidden;
}

/* The exercise-book margin rule beside the hero copy, where there's room for it. */
@media (min-width: 640px) {
  .hero {
    background:
      linear-gradient(
        to right,
        transparent calc(var(--space-6) + 12px),
        var(--margin-rule) calc(var(--space-6) + 12px),
        var(--margin-rule) calc(var(--space-6) + 14px),
        transparent calc(var(--space-6) + 14px)
      ),
      var(--paper);
  }
}

@media (min-width: 1184px) {
  .hero {
    background:
      linear-gradient(
        to right,
        transparent calc(50% - 560px + var(--space-6) + 12px),
        var(--margin-rule) calc(50% - 560px + var(--space-6) + 12px),
        var(--margin-rule) calc(50% - 560px + var(--space-6) + 14px),
        transparent calc(50% - 560px + var(--space-6) + 14px)
      ),
      var(--paper);
  }
}

.hero-grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 640px) {
  .hero-copy {
    padding-left: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}

.hero-visual {
  position: relative;
  padding-bottom: 12%;
}

.hero-visual .screen {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgb(20 38 36 / 0.35);
}

.hero-visual .sheet-on-top {
  position: absolute;
  right: -4%;
  bottom: 0;
  width: 38%;
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 36px -12px rgb(20 38 36 / 0.4);
  transform: rotate(3deg);
  border: 1px solid var(--line);
}

/* Bands */
.band {
  padding: var(--space-8) 0;
}

.band.tinted {
  background: var(--surface-sunk);
}

.cards {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
}

@media (min-width: 640px) {
  .cards.two,
  .cards.three,
  .cards.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards {
    gap: var(--space-5);
  }
  .cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cards.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.card p:last-child {
  margin-bottom: 0;
}

.spot-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--spruce-soft);
  color: var(--spruce);
}

.spot p {
  color: var(--ink-muted);
}

/* Two columns: a visual beside its words. */
.split {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-6);
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* The week loop */
.diagram text {
  font-family: var(--font-sans);
  fill: var(--ink);
}

.loop {
  width: 100%;
  max-width: 420px;
  justify-self: center;
}

.loop-ring {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

.loop-chevron {
  fill: none;
  stroke: var(--larch);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loop-node {
  fill: var(--surface);
  stroke: var(--spruce);
  stroke-width: 2;
}

.loop-node.child {
  fill: var(--spruce-soft);
}

.loop-when {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  fill: var(--ink-muted) !important;
}

.loop-what {
  font-size: 15px;
  font-weight: 600;
}

.loop-centre {
  font-family: var(--font-display) !important;
  font-size: 26px;
  font-weight: 600;
  fill: var(--spruce) !important;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.steps li::before {
  content: counter(step);
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--spruce);
  color: var(--on-spruce);
  font-weight: 600;
}

.steps li.child::before {
  background: var(--spruce-soft);
  color: var(--spruce);
  box-shadow: inset 0 0 0 2px var(--spruce);
}

.step-when {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.step-what {
  font-weight: 600;
}

.step-time {
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* The print pack, fanned on wide screens. */
.pack {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

@media (min-width: 1024px) {
  .pack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pack li:nth-child(1) {
    transform: rotate(-3deg);
  }
  .pack li:nth-child(2) {
    transform: rotate(-1deg) translateY(12px);
  }
  .pack li:nth-child(3) {
    transform: rotate(1deg) translateY(12px);
  }
  .pack li:nth-child(4) {
    transform: rotate(3deg);
  }
}

.pack figure {
  margin: 0;
}

.pack .page {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 32px -16px rgb(20 38 36 / 0.35);
  background: #fff;
}

.pack figcaption {
  margin-top: var(--space-3);
  font-weight: 600;
  text-align: center;
}

/* The parent's minutes */
.bars {
  width: 100%;
  max-width: 520px;
}

.bar {
  fill: var(--spruce);
}

.bar-day {
  font-weight: 600;
  font-size: 15px;
}

.bar-value {
  font-size: 15px;
  fill: var(--ink-muted) !important;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.facts li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-3);
  align-items: start;
}

.facts .icon {
  color: var(--spruce);
  margin-top: 2px;
}

/* Coverage */
.coverage .grade h3 {
  margin-bottom: var(--space-3);
}

.coverage details {
  border-top: 1px solid var(--line);
}

.coverage summary {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

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

.coverage summary::after {
  content: '';
  grid-column: 4;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(-45deg);
  margin-left: var(--space-2);
}

.coverage details[open] summary::after {
  transform: rotate(45deg);
}

.coverage summary {
  grid-template-columns: 12px 1fr auto auto;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
}

.math .dot {
  background: var(--subject-math);
}
.ela .dot {
  background: var(--subject-ela);
}
.sci .dot {
  background: var(--subject-science);
}
.soc .dot {
  background: var(--subject-social);
}

.subject-name {
  font-weight: 600;
}

.count {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.coverage details ul {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-5);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.coverage + .note {
  margin-top: var(--space-5);
}

.grade.later {
  background: transparent;
  border-style: dashed;
}

/* Paper to progress */
.flow {
  width: 100%;
  margin-top: var(--space-6);
}

.paper {
  fill: #fff;
  stroke: var(--line-strong);
}

.margin-rule {
  stroke: #d98a86;
  stroke-width: 2;
}

.ruled {
  stroke: #c7d3dc;
  stroke-width: 1.5;
}

.tick,
.cross {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tick {
  stroke: #25704f;
}

.cross {
  stroke: #a8332f;
}

.flow-arrow {
  fill: none;
  stroke: var(--larch);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-arrow.small {
  stroke-width: 2.5;
}

.phone {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 2;
}

.phone-label {
  font-weight: 600;
  font-size: 15px;
}

.phone-small {
  font-size: 14px;
  fill: var(--ink-muted) !important;
}

.score {
  fill: var(--surface);
  stroke: var(--line-strong);
}

.score.on {
  fill: var(--spruce);
  stroke: var(--spruce);
}

.score-text {
  font-weight: 600;
  font-size: 15px;
}

.score-text.on {
  fill: var(--on-spruce) !important;
}

.topic-name {
  font-family: var(--font-display) !important;
  font-weight: 600;
  font-size: 18px;
}

.track {
  fill: var(--surface);
  stroke: var(--line);
}

.fill {
  fill: var(--good);
}

.status {
  font-weight: 600;
  font-size: 15px;
  fill: var(--warn) !important;
}

.status.strong {
  fill: var(--good) !important;
}

/* Grows with your child */
.grows .phone-shot {
  justify-self: center;
  width: min(300px, 70%);
  border-radius: 28px;
  border: 8px solid var(--ink);
  box-shadow: 0 24px 48px -24px rgb(20 38 36 / 0.45);
}

/* Plans */
.plan h3 {
  font-size: 1.5rem;
}

.ticks {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.ticks li {
  position: relative;
  padding-left: var(--space-6);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.3em;
  width: 7px;
  height: 13px;
  border-right: 3px solid var(--spruce);
  border-bottom: 3px solid var(--spruce);
  transform: rotate(45deg);
}

/* Questions */
.faq {
  max-width: 760px;
  margin-top: var(--space-5);
}

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

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-3) 0;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--spruce);
}

.faq details[open] summary::after {
  content: '−';
}

.faq p {
  color: var(--ink-muted);
  max-width: 65ch;
}

/* Join: the larch photo under a spruce wash. */
.join {
  position: relative;
  overflow: hidden;
  padding: var(--space-8) 0;
  color: #fff;
  isolation: isolate;
}

.join-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  z-index: -2;
}

.join::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgb(22 56 50 / 0.92),
    rgb(22 56 50 / 0.6) 55%,
    rgb(22 56 50 / 0.1)
  );
  z-index: -1;
}

/* On a phone the words run across the whole photo, so the wash is even. */
@media (max-width: 639px) {
  .join::after {
    background: rgb(22 56 50 / 0.86);
  }
}

.join h2 {
  color: #fff;
}

.join .lead,
.join .note {
  color: #e2ece8;
}

/* Footer */
.site-footer {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
}

.footer-row p {
  margin: 0;
}
