/* Asterox website. One family (Archivo): narrow widths for headings and times,
   normal width for reading. Amber marks one thing only: when the brief arrives. */

:root {
  --paper: #FFFFFF;
  --ink: #172033;
  --muted: #566174;
  --rule: #D9DEE6;
  --wash: #F1F3F7;
  --hatch: #C3CAD6;
  --amber: #D08410;
  --up: #0E7A43;
  --down: #B42318;
  --error: #B42318;
  --button: #172033;
  --on-button: #FFFFFF;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --page: 70rem;
  --measure: 36rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1726;
    --ink: #E8ECF2;
    --muted: #A3ADBD;
    --rule: #2A3548;
    --wash: #172235;
    --hatch: #3A4760;
    --amber: #F2A93B;
    --up: #4CC38A;
    --down: #FF8A7A;
    --error: #FF9C8F;
    --button: #E8ECF2;
    --on-button: #0F1726;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1.125rem;
  font-stretch: 100%; line-height: 1.55; margin: 0; overflow-wrap: break-word;
}
h1, h2, h3 { font-stretch: 75%; font-weight: 600; line-height: 1.05; margin: 0; text-wrap: balance; }
p, dl, dd, ol { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.skip {
  background: var(--ink); color: var(--paper); left: 16px; padding: 10px 14px; position: absolute;
  text-decoration: none; top: -80px; z-index: 10;
}
.skip:focus { top: 16px; }

/* Content width. No side padding, so rules and borders line up with the text. */
.wrap { margin-left: auto; margin-right: auto; width: min(var(--page), 100% - 2 * var(--gutter)); }

.bar { padding-top: 24px; padding-bottom: 24px; }
.wordmark { font-size: 1.375rem; font-stretch: 75%; font-weight: 700; letter-spacing: 0.01em; text-decoration: none; }

/* Hero: the promise and the form, nothing else. */
.hero { display: grid; gap: 48px; padding-top: clamp(24px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero h1 { font-size: clamp(2.75rem, 8.5vw, 6rem); letter-spacing: -0.015em; line-height: 0.95; max-width: 11ch; }
.lead { color: var(--muted); font-size: clamp(1.125rem, 2.2vw, 1.3125rem); margin-top: 24px; max-width: var(--measure); }

/* Sign-up form */
form { margin-top: 32px; max-width: 34rem; }
.field-label { display: block; font-weight: 600; margin-bottom: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
input[type=email] {
  background: var(--paper); border: 1.5px solid var(--muted); border-radius: 6px; color: var(--ink);
  flex: 1 1 15rem; font: inherit; min-height: 52px; min-width: 0; padding: 12px 14px;
}
input[type=email]::placeholder { color: var(--muted); opacity: 0.8; }
input[aria-invalid=true] { border-color: var(--error); }
button {
  background: var(--button); border: 0; border-radius: 6px; color: var(--on-button); cursor: pointer; flex: 0 0 auto;
  font: inherit; font-weight: 600; min-height: 52px; padding: 12px 22px; touch-action: manipulation;
}
button:disabled { cursor: progress; opacity: 0.7; }
fieldset { border: 0; margin: 20px 0 0; min-width: 0; padding: 0; }
legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.choices { display: grid; gap: 0 20px; grid-template-columns: repeat(2, minmax(0, max-content)); }
.choice { align-items: center; display: inline-flex; gap: 8px; min-height: 44px; }
.choice input { accent-color: var(--ink); height: 18px; margin: 0; width: 18px; }
.hint, .fine { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.fine { margin-top: 16px; }
.error { color: var(--error); font-weight: 600; margin-top: 12px; }
.error:empty { display: none; }
.cf-turnstile { margin-top: 16px; }
.trap { height: 1px; left: -9999px; overflow: hidden; position: absolute; width: 1px; }
.done { border-left: 4px solid var(--amber); margin-top: 32px; max-width: 34rem; padding: 4px 0 4px 16px; }
.done h2 { font-size: 1.75rem; margin-bottom: 6px; }

/* Sections below the hero */
.block { border-top: 1px solid var(--rule); padding-top: clamp(40px, 6vw, 64px); padding-bottom: clamp(40px, 6vw, 64px); }
.block h2 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); letter-spacing: -0.01em; max-width: 18ch; }
.block .intro { color: var(--muted); margin-top: 12px; max-width: var(--measure); }

/* The session bar: drawn like the extended-hours shading on a price chart.
   It shows what each brief covers, in order, so it is an ordered list. */
.session { display: grid; gap: 20px; list-style: none; margin-top: 36px; padding: 0; }
.session li { padding-left: 28px; position: relative; }
.session li::before { /* the bar, running down the left on phones */
  background: var(--ink); bottom: -20px; content: ""; left: 6px; position: absolute; top: 4px; width: 8px;
}
.session li:last-child::before { bottom: auto; height: 8px; }
.session .news::before {
  background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, var(--wash) 2px 7px);
}
.session .brief::before { background: var(--amber); }
.session .time { display: block; font-stretch: 75%; font-size: 1.375rem; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1.2; }
.session .what { color: var(--muted); display: block; margin-top: 2px; max-width: 22rem; }
.next { margin-top: 28px; }
.next strong { font-weight: 600; }

/* A sample of the email, beside the form */
.specimen { margin: 0; min-width: 0; }
.specimen figcaption { color: var(--muted); font-size: 0.9375rem; margin-bottom: 10px; }
.sheet { background: var(--wash); border-radius: 10px; padding: clamp(18px, 3vw, 28px); }
.sheet .label { font-weight: 600; }
.sheet .happened { margin-top: 4px; }
table { border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; margin-top: 20px; width: 100%; }
th, td { padding: 10px 0 10px 12px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; text-align: left; white-space: normal; }
thead th { border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
tbody th { font-weight: 500; }
tbody tr + tr > * { border-top: 1px solid var(--rule); }
.up { color: var(--up); }
.down { color: var(--down); }

.covers { margin-top: 24px; }
.covers div { padding: 14px 0; }
.covers div + div { border-top: 1px solid var(--rule); }
.covers dt { font-weight: 600; }
.covers dd { color: var(--muted); }

.checks p { margin-top: 16px; max-width: var(--measure); }

/* Reading pages: terms, privacy, thanks */
.page { margin: 0 auto; max-width: calc(var(--measure) + 2 * var(--gutter)); padding: 40px var(--gutter) 72px; }
.page h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); margin-bottom: 24px; }
.page h2 { font-size: 1.5rem; margin: 32px 0 6px; }
.page p + p { margin-top: 12px; }
.draft { border-left: 4px solid var(--amber); margin-bottom: 8px; padding-left: 16px; }

footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9375rem; line-height: 1.5; padding-top: 24px; padding-bottom: 48px; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
footer nav a { align-items: center; display: inline-flex; min-height: 44px; }
footer p { max-width: 44rem; }
footer p + p { margin-top: 8px; }

@media (max-width: 479px) {
  button { flex: 1 1 100%; }
  .choices { grid-template-columns: 1fr; }
  .sheet { padding: 16px; }
  th, td { padding-left: 8px; }
}

/* Wider screens: the bar runs across, like a chart's time axis. */
@media (min-width: 760px) {
  .session { gap: 0; grid-template-columns: 1fr 2fr 1.1fr 1fr; }
  .session li { padding: 30px 20px 0 0; }
  .session li::before { bottom: auto; height: 10px; left: 0; right: 0; top: 0; width: auto; }
  .session li:first-child::before { border-radius: 5px 0 0 5px; }
  .session li:last-child::before { border-radius: 0 5px 5px 0; height: 10px; }
  .session .brief::before { height: 22px; top: -6px; }
  .split { align-items: start; column-gap: 56px; display: grid; grid-template-columns: 5fr 7fr; }
  .split .covers { margin-top: 0; }
  .covers div:first-child { padding-top: 4px; }
}
@media (min-width: 1000px) {
  .hero { align-items: center; column-gap: 72px; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* One moment of motion: when the bar scrolls into view, it draws from the close
   to the open. Without JavaScript it is simply there. */
@media (prefers-reduced-motion: no-preference) {
  .js .session li::before { transform: scaleX(0); transform-origin: left center; }
  .js .session.in-view li::before { animation: draw 500ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .js .session.in-view li:nth-child(2)::before { animation-delay: 150ms; }
  .js .session.in-view li:nth-child(3)::before { animation-delay: 350ms; }
  .js .session.in-view li:nth-child(4)::before { animation-delay: 450ms; }
  @media (max-width: 759px) {
    .js .session li::before { transform: scaleY(0); transform-origin: center top; }
    .js .session.in-view li::before { animation-name: drop; }
  }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes drop { from { transform: scaleY(0); } to { transform: none; } }
