/*
 * Coming-soon page styles. Values come from tokens.css, a verbatim copy of
 * education-app/src/styles/tokens.css; the base rules (type, buttons, fields,
 * chips, focus) are copied from education-app base.css and app.css so this page
 * matches the LMS. Fonts: Montserrat and Source Serif 4, self-hosted
 * (@fontsource-variable files). Never Gotham or Plantin.
 */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Montserrat Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/montserrat-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/montserrat-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/assets/fonts/source-serif-4-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url(/assets/fonts/source-serif-4-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* ---------- base (from education-app base.css) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
}
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--heading);
  line-height: var(--lh-tight);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
strong { font-weight: 500; color: var(--primary); }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--focus-on-dark); }
.on-dark .register-card :focus-visible { outline-color: var(--focus); } /* the card is white */
::selection { background: var(--mint); color: var(--primary); }

.skip-link {
  position: absolute;
  left: var(--s-2);
  top: -64px;
  z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-2); }

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* type helpers */
.overline {
  font-family: var(--font-sans);
  font-size: var(--fs-overline);
  font-weight: 500;
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
}
.display { font-size: var(--fs-display); line-height: 1.08; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
.h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }
.lead { font-size: var(--fs-lead); line-height: 1.6; }
.small { font-size: var(--fs-small); line-height: 1.55; }
.micro { font-size: var(--fs-micro); line-height: 1.5; }
.muted { color: var(--text-muted); }
.num { font-variant-numeric: tabular-nums; }
.on-dark { color: var(--on-dark); }
.on-dark .overline { color: var(--on-dark-muted); }

/* buttons */
.btn {
  --btn-bg: var(--primary);
  --btn-fg: var(--white);
  --btn-border: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 48px;
  padding: 0 var(--s-3);
  border: 1px solid var(--btn-border);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { --btn-bg: var(--secondary); --btn-border: var(--secondary); }
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn[disabled]:hover { --btn-bg: var(--primary); --btn-border: var(--primary); }
.btn-lg { min-height: 56px; padding: 0 var(--s-4); font-size: var(--fs-body); }
.btn-block { width: 100%; }

.link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dur) var(--ease);
}
.link:hover { text-decoration-color: currentColor; }

/* chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-micro);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  background: var(--neutral);
  color: var(--base);
}

/* fields (from education-app app.css) */
.field { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-3); }
.field label { font-size: var(--fs-small); font-weight: 500; color: var(--primary); }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px var(--s-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: var(--fs-body);
  line-height: 1.5;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:hover { border-color: var(--gray); }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--mint); outline: none; }
.field input[aria-invalid='true'] { border-color: var(--wrong); }
.field input[aria-invalid='true']:focus { box-shadow: 0 0 0 3px var(--wrong-wash); }
.field-error { font-size: var(--fs-micro); color: var(--wrong); line-height: 1.5; }
.field-hint { font-size: var(--fs-micro); color: var(--text-muted); line-height: 1.5; order: 3; }
.field-error { order: 4; }

/* ---------- the brand's rotating circles (from education-app brand.css) ---------- */
.circles { position: absolute; pointer-events: none; user-select: none; }
.circles-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  will-change: transform;
}
.circles-cw { animation: spin-cw 60s linear infinite; }
.circles-ccw { animation: spin-ccw 90s linear infinite; }
@keyframes spin-cw { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .circles-cw, .circles-ccw { animation: none; }
}

/* ======================================================================
   Page
   ====================================================================== */

/* header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; height: var(--header-h); }
.brand-link { display: inline-block; border-radius: 4px; }
.brand-link img { width: 200px; height: auto; }

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  overflow: clip; /* clip, not a scroll box: scripts can't scroll the hero's contents */
  background: var(--primary);
}
.hero-circles {
  width: 1100px;
  height: 1100px;
  left: 50%;
  top: 50%;
  margin-left: 30px;
  margin-top: -550px;
  opacity: 0.5;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items: center;
  gap: var(--s-8);
  padding-top: var(--s-12);
  padding-bottom: var(--s-12);
}
.hero-copy { padding-bottom: var(--s-4); }
.hero-copy .overline { color: var(--mint); margin-bottom: var(--s-3); }
.hero-title {
  max-width: 640px;
  color: var(--mint);
  letter-spacing: -0.015em;
}
.hero-tag { margin-top: var(--s-4); }
.chip-soon {
  background: var(--line-on-dark);
  color: var(--mint);
  letter-spacing: 0.04em;
}
/* a static dot, as the LMS's .chip-dot */
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }

.hero-lede { margin-top: var(--s-4); max-width: 600px; color: var(--on-dark-muted); }
.hero-facts {
  display: flex;
  gap: var(--s-6);
  list-style: none;
  max-width: 600px;
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-on-dark);
}
.hero-facts li { display: flex; flex-direction: column; gap: var(--s-0); }
.hero-facts strong {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--white);
}
.hero-facts span { font-size: var(--fs-micro); color: var(--on-dark-muted); }

/* register card (as the LMS home's continue card) */
.register-card {
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-radius: var(--r-lg);
  background: var(--white);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(4, 43, 3, 0.35);
  scroll-margin-top: var(--s-3);
}
.register-card:focus { outline: none; }
.register-card h2 { color: var(--primary); }
.register-intro { margin-top: var(--s-1); margin-bottom: var(--s-4); }
.form-error { margin: calc(var(--s-1) * -1) 0 var(--s-2); }
.register-form .btn { margin-top: var(--s-1); }
.register-form .btn[aria-busy='true'] { opacity: 0.7; cursor: progress; }
.register-note { margin-top: var(--s-2); text-align: center; }
.link-inline { font-weight: 500; }

/* honeypot: off-screen, out of the tab order, hidden from screen readers */
.hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* thank-you (as the LMS's contact-sent) */
.register-thanks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-4) 0 var(--s-5);
}
.register-thanks h2:focus { outline: none; }
.thanks-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--primary);
  margin-bottom: var(--s-1);
}
.register-thanks p { font-size: var(--fs-lead); line-height: 1.6; color: var(--text); }

/* what's inside */
.inside { background: var(--neutral); padding: var(--s-12) 0; }
.inside-head { max-width: 640px; margin-bottom: var(--s-8); }
.inside-head .overline { margin-bottom: var(--s-2); }
.inside-intro { margin-top: var(--s-2); }
.parts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  list-style: none;
}
.part {
  display: flex;
  flex-direction: column;
  padding-top: var(--s-3);
  border-top: 2px solid var(--primary);
}
.part-num { margin-bottom: var(--s-1); }
.part-title { min-height: 2.6em; margin-bottom: var(--s-3); }
.modules { list-style: none; display: flex; flex-direction: column; }
.modules li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: var(--s-1);
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--base);
}
.modules li:first-child { border-top: 0; padding-top: 0; }
.module-num {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--primary);
}

/* footer */
.site-footer { background: var(--white); border-top: 1px solid var(--line); }
.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding-top: var(--s-4);
  padding-bottom: var(--s-4);
  color: var(--text-muted);
}
.footer-brand { font-family: var(--font-serif); font-weight: 600; font-size: var(--fs-small); color: var(--primary); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }

/* privacy (as the LMS's Legal page) */
.legal { max-width: 760px; padding-top: var(--s-10); padding-bottom: var(--s-12); }
.legal .overline { margin-bottom: var(--s-2); }
.legal .h1 { margin-bottom: var(--s-3); }
.legal h2 { margin-top: var(--s-4); margin-bottom: var(--s-2); }
.legal p, .legal li { max-width: 68ch; }
.legal p + p { margin-top: var(--s-3); }
.legal ul { margin: var(--s-2) 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--s-1); }
.legal .lead { margin-top: var(--s-3); }
.legal .updated { margin-top: var(--s-6); }
.draft-banner {
  border: 1px dashed var(--line-strong);
  background: var(--mint-wash);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
}
.back-link { display: inline-flex; align-items: center; gap: var(--s-1); margin-bottom: var(--s-5); font-size: var(--fs-small); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 420px; gap: var(--s-5); }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-6); }
  .part-title { min-height: 0; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: var(--s-8); padding-bottom: var(--s-8); gap: var(--s-6); }
  .hero-copy { padding-bottom: 0; }
  /* Below the copy, behind the form: the arcs never cross the text. */
  .hero-circles { width: 820px; height: 820px; left: auto; right: -470px; top: auto; bottom: -260px; margin: 0; }
  /* After the thank-you the card is shorter: drop the arcs so they stay clear of the text. */
  .hero:has(.is-done) .hero-circles { bottom: -540px; }
  .register-card { max-width: 560px; }
}
@media (max-width: 720px) {
  .site-header-inner { height: 64px; }
  .brand-link img { width: 168px; }
  .hero-inner { padding-top: var(--s-6); padding-bottom: var(--s-6); }
  .hero-copy .overline { margin-bottom: var(--s-2); }
  .hero-tag { margin-top: var(--s-3); }
  .hero-lede { margin-top: var(--s-3); font-size: var(--fs-body); }
  .hero-facts { display: none; }
  .register-card { padding: var(--s-4) var(--s-3) var(--s-3); }
  .inside { padding: var(--s-8) 0; }
  .inside-head { margin-bottom: var(--s-5); }
  .parts { grid-template-columns: 1fr; row-gap: var(--s-5); }
  .site-footer-inner { flex-direction: column; align-items: flex-start; }
  .legal { padding-top: var(--s-6); padding-bottom: var(--s-8); }
}
