/* What every chapter shares: the time bands between them, the text column
   (time, moment, heading, body, points), and the chapters that are mostly
   text: Before Stocklabel, the day index, the AI, details, coming next, the
   questions, and the footer. Each scene's own CSS sits beside its JS. */

.chapter { position: relative; padding-block: var(--section-pad); }

/* ── time bands: the hour, huge, between chapters ── */
.timeband {
  display: grid; place-items: center;
  height: clamp(220px, 40vh, 420px);
  overflow: hidden;
  color: var(--ink);
}
/* Where the light goes (17:30): tall enough that dusk falls with no text on
   screen (day.js changes the ground while the band fills the middle). */
.timeband.turn { height: 90vh; }
.timeband span {
  font-family: var(--font-mono); font-weight: 400;
  font-size: clamp(96px, 18vw, 240px); line-height: 1;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  opacity: .1;
}

/* ── the text column ── */
.chapter-grid {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
}
.chapter.flip .chapter-text { order: 2; }
.chapter-text .eyebrow { display: block; }
.moment { margin-top: 10px; font-family: var(--font-mono); font-size: 15px; color: var(--muted); }
.chapter-text h2 { margin-top: 22px; font-size: clamp(34px, 4.2vw, 56px); }
.chapter-text .body { margin-top: 24px; font-size: 19px; color: var(--muted); }
.points { margin-top: 28px; display: grid; gap: 12px; }
.points li { position: relative; padding-left: 30px; font-size: 17px; }
.points li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-tint);
}
.points li::after {
  content: ""; position: absolute; left: 5px; top: calc(.3em + 5px);
  width: 8px; height: 5px;
  border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}
.closing { margin-top: 56px; font-size: 20px; font-weight: 600; max-width: none; }
.fine-print { margin-top: 20px; font-size: 14px; color: var(--muted); }
.chip-dev {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.dev-line { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }

/* ── Before Stocklabel ── */
.before .eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .14em; line-height: 1.4; font-stretch: 100%; }
.statement {
  margin-top: 28px; max-width: 900px;
  font-size: clamp(30px, 4.2vw, 48px); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.2;
}
.statement.answer { color: var(--accent); }

/* ── the day index ── */
.day h2 { font-size: clamp(32px, 4vw, 48px); }
.day-index {
  position: relative; margin-top: 48px;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.day-index a {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 22px 8px 8px 0; min-height: 44px;
  text-decoration: none; color: var(--muted);
  transition: color .3s var(--ease);
}
.day-index a::before {
  content: ""; position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ground, var(--ground-morning)); border: 1.5px solid var(--field);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.day-index .t { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.day-index .n { font-size: 17px; font-weight: 600; color: var(--ink); }
.day-index a:hover .n, .day-index a[aria-current] .n { color: var(--accent); }
.day-index a[aria-current]::before { background: var(--accent); border-color: var(--accent); }

/* ── the till's text sits above its full-bleed scene ── */
.till-text .body { max-width: 640px; }
.try { margin-top: 28px; font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.try .coarse { display: none; }
@media (pointer: coarse) { .try .fine { display: none; } .try .coarse { display: inline; } }

/* ── the AI ── */
.ai h2 { max-width: 16ch; }
.lead { margin-top: 24px; font-size: 20px; color: var(--muted); }
.ai-cols { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ai-col { padding: 36px; border-radius: var(--r-panel); }
.ai-col h3 { font-size: 22px; }
.ai-col ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.ai-col li { position: relative; padding-left: 32px; font-size: 17px; }
.ai-col li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 14px; height: 1.6px; background: var(--accent); }
.ai-col.does { background: var(--surface); }
.ai-col.does li::before {
  top: .32em; width: 8px; height: 5px; left: 4px; background: none;
  border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}
.ai-col.never { border: 1px solid var(--line); }

/* ── details: the bento ── */
.details h2 { max-width: 14ch; }
.bento { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile {
  display: flex; flex-direction: column;
  padding: 24px 28px 28px; border-radius: var(--r-panel);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.tile.wide { grid-column: span 2; }
.tile-visual { height: 168px; margin-bottom: 20px; position: relative; }
.tile h3 { font-size: 20px; }
.tile p { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ── what's coming next ── */
.next h2 { margin-top: 16px; }
.next-cards { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.next-card { padding: 28px; border-radius: var(--r-card); border: 1px solid var(--line); }
.next-card h3 { margin-top: 20px; font-size: 20px; }
.next-card p { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ── questions ── */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 48px 22px 0; min-height: 44px;
  font-size: 19px; font-weight: 600;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 14px; height: 1.6px; background: var(--accent);
  transition: transform .3s var(--ease);
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list details p { padding: 0 48px 24px 0; font-size: 17px; color: var(--muted); }

/* ── early access (the form and the sign arrive in access.css) ── */
.access-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.access-text h2 { margin-top: 16px; }

/* ── footer ── */
.footer { padding: 72px 0 40px; border-top: 1px solid var(--line-soft); }
html:not(.motion) .footer { background-color: var(--ground); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.footer-brand p { margin-top: 16px; color: var(--muted); font-size: 16px; }
.footer-links { display: flex; flex-direction: column; }
.footer-links h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--accent); }
.footer-base {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13px; color: var(--muted);
}

@media (max-width: 899px) {
  .chapter-grid, .access-grid, .faq-grid, .ai-cols { grid-template-columns: minmax(0, 1fr); }
  .chapter.flip .chapter-text { order: 0; }
  .bento, .next-cards { grid-template-columns: minmax(0, 1fr); }
  .tile.wide { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .day-index {
    display: flex; overflow-x: auto; scroll-snap-type: x proximity;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
    border-top: 0; scrollbar-width: none;
  }
  .day-index a { flex: 0 0 auto; width: 128px; scroll-snap-align: start; border-top: 1px solid var(--line); }
  .ai-col { padding: 28px; }
  .footer-base { flex-direction: column; }
}
