/* JabCue waitlist
   One typeface (Archivo, with its width axis doing the work of a second
   family), white paper, black film, and one wax-pencil red. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --red: #d9261c;
  --red-deep: #b01c13;
  --gray: #595959;
  --rule: #d8d8d8;
  --film-text: #b9b9b9;

  --pad: 20px;
  --measure: 34rem;
  color-scheme: light;
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.skip:focus { top: 0.75rem; }

/* ----- Type ----- */

h1, h2, .wordmark, .joined-title {
  font-stretch: 62%;
  font-weight: 800;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(3.1rem, 14.6vw, 4.4rem);
  line-height: 0.9;
}
h1 span { display: block; text-wrap: balance; }
h1 span + span { margin-top: 0.14em; }

h2 {
  font-size: clamp(2.1rem, 9.4vw, 3.5rem);
  line-height: 0.96;
  max-width: 14em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 680;
}

/* ----- Page frame ----- */

.top,
main > section,
.foot {
  padding-left: var(--pad);
  padding-right: var(--pad);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 18px;
  padding-bottom: 6px;
}

.wordmark {
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
}

.status {
  font-size: 0.9375rem;
  color: var(--gray);
}

main > section { margin-top: 76px; }
main > section.hero { margin-top: 30px; }

/* ----- Hero ----- */

.lede {
  margin-top: 22px;
  max-width: var(--measure);
}

.hero-copy .join { margin-top: 26px; }

.sheet { margin-top: 44px; max-width: 560px; }
.sheet-art { display: block; width: 100%; height: auto; }
.sheet figcaption {
  margin-top: 12px;
  max-width: var(--measure);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--gray);
}

.fnum {
  font-family: "Archivo", Arial, sans-serif;
  font-size: 8.2px;
  font-weight: 600;
  font-stretch: 80%;
  fill: #8f8f8f;
}
.fnum-marked { fill: #ffffff; }

/* The one moving thing on the page: the three marks get drawn when the sheet
   scrolls into view. Without JavaScript, or with reduced motion, they are
   simply there. */
.js .mark {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0;
  animation: mark-show 0.01s linear 6s forwards; /* safety net if the page script never runs */
}
.js .sheet.is-seen .mark {
  stroke-dashoffset: 1;
  animation: mark-draw 0.62s cubic-bezier(0.3, 0.55, 0.3, 1) forwards;
}
.js .sheet.is-seen .mark-1 { animation-delay: 0.35s; }
.js .sheet.is-seen .mark-2 { animation-delay: 1s; }
.js .sheet.is-seen .mark-3 { animation-delay: 1.65s; }

@keyframes mark-draw {
  from { stroke-dashoffset: 1; opacity: 1; }
  to { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes mark-show {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .js .mark,
  .js .sheet.is-seen .mark {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* ----- Join form ----- */

.join-form label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.9375rem;
  font-weight: 620;
}

.join-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-form input[type="email"] {
  width: 100%;
  height: 56px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.125rem;
  appearance: none;
}
.join-form input[type="email"]::placeholder { color: #8a8a8a; opacity: 1; }
.join-form input[aria-invalid="true"] { border-color: var(--red-deep); }

.join-form button {
  height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 3px;
  background: var(--red);
  color: #ffffff;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 720;
  white-space: nowrap;
  cursor: pointer;
}
.join-form button:hover { background: var(--red-deep); }
.join-form button:active { transform: translateY(1px); }
.join-form button[disabled] { opacity: 0.7; cursor: progress; }

.join-error {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 620;
  color: var(--red-deep);
}

.join-note {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--gray);
}

/* Trap for bots. People never see or reach this field. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.joined {
  padding: 4px 0 4px 16px;
  border-left: 6px solid var(--red);
  max-width: var(--measure);
}
.joined:focus { outline: none; }
.joined-title { font-size: 2.2rem; line-height: 1; }
.joined-detail { margin-top: 10px; }

/* ----- Example corrections ----- */

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

.cue-list { margin-top: 30px; }

.cue {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  align-content: start;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.cue:last-child { border-bottom: 1px solid var(--rule); }

.cue-art { display: block; width: 100%; height: auto; }

.cue-frame {
  font-size: 0.875rem;
  font-weight: 600;
  font-stretch: 85%;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}
.cue-text h3 { margin-top: 3px; }
.cue-text h3 + p { margin-top: 5px; }

.fine {
  margin-top: 16px;
  max-width: var(--measure);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--gray);
}

/* ----- How it will work: a real sequence, so it is numbered ----- */

.steps {
  margin-top: 28px;
  counter-reset: step;
  display: grid;
  gap: 26px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 12px;
  align-content: start;
}
.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font-stretch: 62%;
  font-weight: 800;
  font-size: 3.4rem;
  line-height: 0.82;
  color: var(--red);
}
.steps h3,
.steps p { grid-column: 2; }
.steps p { margin-top: 4px; max-width: 30rem; }

/* ----- Training alone ----- */

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

/* ----- Questions ----- */

.faq details {
  border-top: 1px solid var(--rule);
  max-width: 44rem;
}
.faq h2 + details { margin-top: 28px; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }

.faq summary {
  position: relative;
  padding: 17px 44px 17px 0;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 2.5px;
  margin-top: -1.25px;
  background: var(--ink);
}
.faq summary::after { transform: rotate(90deg); transition: transform 0.18s ease; }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p {
  padding: 0 44px 20px 0;
  max-width: var(--measure);
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ----- Closing band: film black ----- */

main > section.closing {
  max-width: none;
  margin-top: 84px;
  padding-top: 60px;
  padding-bottom: 64px;
  background: var(--ink);
  color: #ffffff;
}
.closing > * {
  max-width: calc(1180px - 2 * var(--pad));
  margin-left: auto;
  margin-right: auto;
}
.closing .join { margin-top: 26px; }
.closing .join-form input[type="email"] { border-color: #ffffff; }
.closing .join-note { color: var(--film-text); }
.closing .join-error { color: #ff8f86; }
.closing :focus-visible { outline-color: #ffffff; }

/* ----- Footer ----- */

.foot {
  padding-top: 28px;
  padding-bottom: 40px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--gray);
}
.foot p + p { margin-top: 6px; }
.foot a + a { margin-left: 16px; }

/* ----- Plain pages (privacy, not found) ----- */

.plain {
  padding: 34px var(--pad) 20px;
  max-width: 46rem;
  margin: 0 auto;
}
.plain h1 { font-size: clamp(2.6rem, 11vw, 4rem); }
.plain h2 {
  margin-top: 44px;
  font-size: 1.9rem;
  line-height: 1.02;
}
.plain p,
.plain ul { margin-top: 14px; }
.plain ul { padding-left: 1.2em; list-style: disc; }
.plain li + li { margin-top: 6px; }
.plain .updated { color: var(--gray); font-size: 0.9375rem; }
.plain .back { display: inline-block; margin-top: 40px; font-weight: 620; }

/* ----- Wider screens ----- */

@media (min-width: 620px) {
  :root { --pad: 32px; }

  .join-row { flex-direction: row; max-width: 34rem; }
  .join-row input[type="email"] { flex: 1 1 auto; min-width: 0; }

  .cue-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
  .cue,
  .cue:last-child {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 0;
    border: 0;
  }
  .cue-art { max-width: 240px; }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (min-width: 960px) {
  :root { --pad: 48px; }

  .top { padding-top: 26px; }
  .wordmark { font-size: 2rem; }

  main > section { margin-top: 128px; }
  main > section.hero {
    margin-top: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    column-gap: 72px;
    align-items: start;
  }

  h1 { font-size: clamp(4.1rem, 6.9vw, 5.6rem); }
  .lede { margin-top: 30px; font-size: 1.25rem; }
  .hero-copy .join { margin-top: 34px; }

  .sheet { margin-top: 6px; max-width: none; }

  .cue-list { gap: 48px; margin-top: 44px; }
  .steps { margin-top: 44px; gap: 48px; }

  main > section.closing {
    margin-top: 140px;
    padding-top: 96px;
    padding-bottom: 100px;
  }
}
