/* neem.willful.in: the Chalk world, on the web.
   Colours are the app's own (mobile/src/theme/colors.ts); the board carries
   times and questions, the paper carries answers, marigold is only ever
   something you can press. */

@font-face { font-family: Fraunces; font-weight: 600; font-display: swap; src: url(fonts/Fraunces-600.ttf) format('truetype'); }
@font-face { font-family: Fraunces; font-weight: 700; font-display: swap; src: url(fonts/Fraunces-700.ttf) format('truetype'); }

:root {
  color-scheme: light;
  --board: #19382A; --board-hi: #1E4132; --board-lo: #153024;
  --chalk: #F4EFE3; --chalk-dim: #C9D3CB; --chalk-accent: #F2D2A6;
  --marigold: #D38C3F; --ledge: #A96A26; --on-marigold: #2A1B08;
  --paper: #FBF7EE; --paper-2: #F3EDDF; --line: #E2D9C6;
  --ink: #1F2A24; --muted: #4E5B53;
  --coral: #B4462D;
  --tint: #E6EEE7;           /* the parent's lane: paper, washed with board */
  --serif: Fraunces, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --rail: 132px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); overflow-x: hidden; }
img { display: block; }
ul { list-style: none; }
::selection { background: rgba(211, 140, 63, .32); color: inherit; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }

.board {
  color: var(--chalk);
  background:
    radial-gradient(60% 45% at 50% 38%, rgba(245, 243, 241, .09), transparent 70%),
    linear-gradient(170deg, var(--board), var(--board-hi) 46%, var(--board-lo));
}

/* ---- top ---------------------------------------------------------------- */

.top { padding: 0 clamp(16px, 4vw, 48px) 0; }
.bar { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 2px; text-decoration: none; margin-left: -10px; }
.brand span { font: 700 1.9rem/1 var(--serif); color: var(--chalk-accent); letter-spacing: -.01em; }

.cta {
  display: inline-block; text-decoration: none; white-space: nowrap;
  background: var(--marigold); color: var(--on-marigold); font-weight: 650; font-size: .95rem;
  padding: 11px 20px; border-radius: 18px; box-shadow: 0 3px 0 var(--ledge);
  transition: transform .12s cubic-bezier(.2, .8, .2, 1), box-shadow .12s cubic-bezier(.2, .8, .2, 1), filter .2s;
}
.cta:hover { filter: brightness(1.05); }
.cta:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ledge); }

.hero { max-width: 1180px; margin: 0 auto; padding: clamp(24px, 5vw, 64px) 0 clamp(24px, 3.5vw, 40px); }
.hero h1 {
  font: 600 clamp(2.3rem, 5.4vw, 4.6rem)/1.06 var(--serif); letter-spacing: -.025em;
  max-width: 17ch; text-wrap: balance;
}
.lede { margin-top: 22px; max-width: 58ch; font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--chalk-dim); }

.lanes-head {
  max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr var(--rail) 1fr;
  align-items: end;
}
.lanes-head span { font-size: .8rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-dim); padding-bottom: 16px; width: min(440px, 100%); }
.lanes-head span:first-child { grid-column: 1; justify-self: end; margin-right: 8px; }
.lanes-head span:last-child { grid-column: 3; justify-self: start; margin-left: 8px; }
.lanes-head .clock {
  justify-self: center; transform: translateY(50%); position: relative; z-index: 2;
  background: var(--board); color: var(--chalk-accent); border: 3px solid var(--paper);
  font: 700 1.5rem/1 var(--serif); padding: 12px 16px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.clock small, .time small { font: 600 .55em var(--sans); letter-spacing: .08em; margin-left: .3em; }

/* ---- the evening --------------------------------------------------------- */

.day { position: relative; max-width: 1180px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 48px) 40px; --p: 1; }
.rail { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 8px, transparent 8px 16px); }
.rail .chalk { position: absolute; inset: 0 0 auto; height: calc(var(--p) * 100%); background: var(--board); border-radius: 2px; }

.moment {
  position: relative; display: grid; grid-template-columns: 1fr var(--rail) 1fr;
  align-items: start; padding: 28px 0 56px;
}
.time {
  grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 1;
  font: 700 1.25rem/1 var(--serif); font-variant-numeric: tabular-nums;
  padding: 10px 14px; border-radius: 999px; background: var(--board); color: var(--chalk-accent);
  border: 3px solid var(--paper); transition: background .5s cubic-bezier(.16, 1, .3, 1), color .5s;
}
.drawn .time:not(.lit) { background: var(--paper-2); color: var(--muted); }

.note { grid-row: 1; max-width: 440px; }
.note.teacher { grid-column: 1; justify-self: end; margin-right: 8px; }
.note.parent { grid-column: 3; justify-self: start; margin-left: 8px; }
.note h2 { font: 600 clamp(1.4rem, 2.3vw, 1.75rem)/1.2 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.note > p { margin-top: 10px; color: var(--muted); max-width: 42ch; }

/* ---- the phones: the app's real screens, drawn ------------------------- */

.phone {
  margin-top: 26px; width: 252px; border: 9px solid #111814; border-radius: 34px;
  background: var(--paper); overflow: hidden; position: relative; padding-bottom: 16px;
  box-shadow: 0 24px 48px -22px rgba(21, 48, 36, .55), 0 2px 6px rgba(21, 48, 36, .18);
  font-size: 12.5px; line-height: 1.35;
}
.scr-board {
  background: linear-gradient(170deg, var(--board), var(--board-hi) 46%, var(--board-lo));
  color: var(--chalk); padding: 30px 16px 16px; display: grid; gap: 2px;
}
.scr-board small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-dim); font-weight: 650; }
.scr-board strong { font: 700 18px/1.25 var(--sans); letter-spacing: -.01em; }
.scr-board em { font-style: normal; color: var(--chalk-dim); font-size: 11.5px; }
.money { font-family: var(--serif); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.scr-board .money.big { font-size: 34px; line-height: 1.15; color: var(--chalk-accent); letter-spacing: -.02em; }

.scr-btn {
  display: block; margin: 14px 14px 0; text-align: center; background: var(--marigold); color: var(--on-marigold);
  font-weight: 650; padding: 10px; border-radius: 18px; box-shadow: 0 3px 0 var(--ledge);
}

.reg li { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.reg span { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #8A968E; position: relative; }
.reg span.on { background: var(--board); border-color: var(--board); }
.reg span.on::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--chalk); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.dues li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.dues span, .dues b { display: grid; }
.dues small { color: var(--muted); font-size: 10.5px; font-weight: 400; }
.dues b { font: 700 14px var(--serif); text-align: right; font-variant-numeric: tabular-nums; }
.dues b small { font-family: var(--sans); font-weight: 600; }
.dues .owed, .dues .owed small { color: var(--coral); }
.dues.hist { margin-top: 16px; border-top: 1px solid var(--line); }

.card-due { margin: 14px 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: grid; gap: 2px; }
.card-due small { color: var(--muted); font-size: 10.5px; }
.card-due strong { font-size: 24px; }
.card-due span { color: var(--muted); font-size: 11px; }

.claim { margin: 14px 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.claim .money { font-size: 14px; }
.claim-act { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.claim-act .scr-btn { margin: 0; flex: 1; padding: 8px; }
.claim-act .ghost { color: var(--board); font-weight: 650; padding: 8px; }

.listings li { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.listings b { font-weight: 650; }
.listings span { color: var(--muted); font-size: 11px; grid-row: 2; }
.listings em { font-style: normal; grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 14px; }
.listings em small { font: 500 10px var(--sans); color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 9px; height: 190px; padding: 26px 18px 30px; }
.bars i { flex: 1; height: calc(var(--h) * 100%); background: #C9D6CC; border-radius: 4px 4px 0 0; position: relative; }
.bars i.now { background: var(--board); }
.bars b { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-weight: 600; }

/* ---- underneath ----------------------------------------------------------- */

.also { max-width: 1180px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 88px; border-top: 1px solid var(--line); }
.also > h2 { font: 700 clamp(1.5rem, 2.6vw, 2rem)/1.2 var(--sans); letter-spacing: -.02em; margin: 40px 0 34px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.cols h3 { font: 700 1.05rem var(--sans); margin-bottom: 12px; }
.cols li { color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line); }
.cols li b { color: var(--ink); font-weight: 650; }

.play { text-align: center; padding: clamp(56px, 9vw, 104px) 16px; display: grid; justify-items: center; }
.play h2 { font: 700 clamp(1.7rem, 3.6vw, 2.7rem)/1.15 var(--sans); letter-spacing: -.025em; margin-top: 8px; text-wrap: balance; }
.play p { color: var(--chalk-dim); margin-top: 12px; }

.foot { text-align: center; padding: 28px 16px 40px; color: var(--muted); font-size: .9rem; display: grid; gap: 6px; }

/* ---- narrow: one lane, the rail down the left ----------------------------- */

@media (max-width: 860px) {
  :root { --rail: 64px; }
  .lanes-head { display: none; }
  .day { padding-left: 12px; padding-right: 16px; }
  .rail { left: calc(12px + var(--rail) / 2); }
  .moment { grid-template-columns: var(--rail) 1fr; padding-bottom: 36px; row-gap: 32px; }
  .time { grid-column: 1; font-size: .98rem; padding: 8px 7px; }
  .time small { display: block; margin: 2px 0 0; text-align: center; }
  .note.teacher, .note.parent { grid-column: 2; justify-self: stretch; margin: 0 0 0 10px; max-width: none; }
  .note.teacher, .note.parent { grid-row: auto; }
  .note.parent { background: var(--tint); border-radius: 6px; padding: 16px; margin-left: 10px; }
  .phone { margin-left: auto; margin-right: auto; }
  .cols { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 420px) {
  .cta { padding: 9px 14px; font-size: .85rem; }
  .brand img { width: 44px; height: 44px; }
  .brand span { font-size: 1.6rem; }
  .phone { width: 236px; }
}
