/* Learning Everywhere — landing page.
 *
 * Token layer is lifted from the app (frontend/src/styles/tokens.css) so the
 * page and the product are visibly the same thing: violet/mint, EB Garamond for
 * anything a parent wrote, IBM Plex Sans for anything the app measured or
 * decided. Coral is reserved for draft/unfinished states and is never an accent.
 *
 * The app switches Day/Dusk from a stored preference. A landing page has no
 * settings screen, so here it follows the operating system and nothing else.
 *
 * No font, stylesheet, or image is fetched from a third party. That is a claim
 * the page makes in section 05, so it has to be true of the page itself.
 */

/* --- Fonts (self-hosted, latin subset) -------------------------------------
 * One file per style. These are variable-weight woff2, which is why the same
 * file is declared across a weight range instead of shipping a file per weight.
 */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/eb-garamond-400i.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400.woff2') format('woff2');
}

/* --- Tokens ---------------------------------------------------------------- */

:root {
  --violet: #5B3BE8;
  --violet-deep: #3B21B8;
  --peri: #8B7CFF;
  --lilac: #C9BCFF;
  --mint: #8FE3CB;
  --coral: #FF9C7A;

  --plex: 'IBM Plex Sans', -apple-system, Helvetica, Arial, sans-serif;
  --prose: 'EB Garamond', Georgia, serif;

  /* Day */
  color-scheme: light;
  --bg: #FBFAFF;
  --outer: #E9E4F8;
  --ink: #241B4B;
  --ink2: rgba(36, 27, 75, 0.62);
  --ink3: rgba(36, 27, 75, 0.45);
  --line: rgba(36, 27, 75, 0.12);
  --mine-bg: #EFE9FF;
  --mine-bd: #DCD2FB;
  --bub: #FFFFFF;
  --bub-bd: rgba(36, 27, 75, 0.1);
  --act: #5B3BE8;
  --act-ink: #FFFFFF;
  --sec: #EDE9FC;
  --sec-ink: #3B21B8;
  --chip: #F1EEFC;
  --chip-bd: rgba(91, 59, 232, 0.28);
  --draft-ink: #8A3A1E;
  --draft-bd: #FF9C7A;
  --hatch: repeating-linear-gradient(135deg, #FFF4F0, #FFF4F0 7px, #FFEBE4 7px, #FFEBE4 14px);
  --shadow: 0 1px 2px rgba(36, 27, 75, 0.04), 0 8px 28px rgba(36, 27, 75, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dusk. --act becomes mint because violet is illegible on the night ground. */
    color-scheme: dark;
    --bg: #150C33;
    --outer: #0D0722;
    --ink: #EFEAFF;
    --ink2: rgba(239, 234, 255, 0.62);
    --ink3: rgba(239, 234, 255, 0.45);
    --line: rgba(255, 255, 255, 0.14);
    --mine-bg: rgba(201, 188, 255, 0.18);
    --mine-bd: rgba(201, 188, 255, 0.28);
    --bub: rgba(255, 255, 255, 0.07);
    --bub-bd: rgba(255, 255, 255, 0.14);
    --act: #8FE3CB;
    --act-ink: #150C33;
    --sec: rgba(255, 255, 255, 0.1);
    --sec-ink: #EFEAFF;
    --chip: rgba(255, 255, 255, 0.1);
    --chip-bd: rgba(255, 255, 255, 0.2);
    --draft-ink: #FFC9B4;
    --draft-bd: rgba(255, 156, 122, 0.55);
    --hatch: repeating-linear-gradient(135deg, rgba(255, 156, 122, 0.1), rgba(255, 156, 122, 0.1) 7px, rgba(255, 156, 122, 0.24) 7px, rgba(255, 156, 122, 0.24) 14px);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 34px rgba(0, 0, 0, 0.28);
  }
}

/* --- Base ----------------------------------------------------------------- */

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--plex);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Wide content (the demo cards) scrolls inside its own box; the page never
     scrolls sideways. */
  overflow-x: hidden;
}

::selection { background: color-mix(in srgb, var(--lilac) 45%, transparent); }

a { color: var(--act); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--peri); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; margin: 0; }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--act);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1.5rem; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--act);
  color: var(--act-ink);
  border-radius: 999px;
}

/* --- Shared bits ---------------------------------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--sec-ink);
  background: var(--chip);
  border: 1px solid var(--chip-bd);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  margin: 0 0 1.25rem;
}

.kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink3);
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.kicker:after { content: ""; height: 1px; flex: 1; background: var(--line); }

.lede {
  font-family: var(--prose);
  font-size: 1.32rem;
  line-height: 1.5;
  color: var(--ink2);
}

.note {
  font-family: var(--prose);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink2);
}

.btn {
  font-family: var(--plex);
  font-size: 15px;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  background: var(--act);
  color: var(--act-ink);
  min-height: 48px;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.45; cursor: default; }

/* --- Header --------------------------------------------------------------- */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1.75rem;
  flex-wrap: wrap;
}
.mark { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.mark:hover { color: var(--act); }
.by { font-size: 12px; color: var(--ink3); text-decoration: none; }
.by:hover { color: var(--ink2); }

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

.hero { padding: 4.5rem 0 0; }
.hero h1 { font-size: clamp(2.15rem, 6vw, 3.4rem); }
.hero .lede { margin-top: 1.5rem; max-width: 34rem; }

.hero-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-actions .btn { text-decoration: none; display: inline-grid; place-items: center; }
.hero-actions .quiet { font-size: 14px; color: var(--ink2); }

/* --- Section rhythm ------------------------------------------------------- */

section { padding: 4.25rem 0; }
section > .wrap > h2 { font-size: clamp(1.5rem, 3.6vw, 2.05rem); max-width: 26rem; margin-bottom: 1.1rem; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --- The two jobs --------------------------------------------------------- */

.jobs { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 2rem; }
.job {
  background: var(--bub);
  border: 1px solid var(--bub-bd);
  border-radius: 22px;
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}
.job h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.job p { font-size: 15px; color: var(--ink2); margin: 0; }
.job .tag { font-size: 11px; font-weight: 600; color: var(--sec-ink); margin-bottom: 0.6rem; }

/* --- Demo (a note becoming drafts) --------------------------------------- */

.demo { margin: 2.25rem 0 0; display: grid; gap: 0.75rem; }

.mine {
  margin-left: 2rem;
  padding: 0.95rem 1.15rem;
  border-radius: 22px 22px 6px 22px;
  background: var(--mine-bg);
  border: 1px solid var(--mine-bd);
  font-family: var(--prose);
  font-size: 1.1rem;
  line-height: 1.5;
}

.arrow { font-size: 12px; font-weight: 600; color: var(--ink3); text-align: center; padding: 0.15rem 0; }

.draft {
  position: relative;
  margin-right: 1.75rem;
  padding: 0.95rem 1.1rem 0.95rem 1.6rem;
  border-radius: 6px 22px 22px 22px;
  background: var(--bub);
  border: 1px solid var(--draft-bd);
  overflow: hidden;
}
.draft:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 9px;
  background: var(--hatch);
}
.draft .tag { font-size: 11px; font-weight: 600; color: var(--draft-ink); margin-bottom: 0.3rem; }
.draft .title { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.chip.miss { border-color: var(--draft-bd); color: var(--draft-ink); }

/* --- Reports ------------------------------------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0.75rem; margin: 2rem 0 1.5rem; }
.tile {
  background: var(--bub);
  border: 1px solid var(--bub-bd);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.tile b { display: block; font-size: 1.8rem; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile span { font-size: 12px; color: var(--ink3); }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.bars li { display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center; gap: 0.75rem; font-size: 14px; }
.bars .name { font-weight: 600; }
.bars .track { height: 8px; border-radius: 999px; background: var(--sec); overflow: hidden; }
.bars .fill { display: block; height: 100%; border-radius: 999px; background: var(--act); }
.bars .min { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- Waitlist card ------------------------------------------------------- */

.join { padding-top: 1rem; }
.card {
  background: var(--bub);
  border: 1px solid var(--bub-bd);
  border-radius: 26px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.card > p { font-size: 15px; color: var(--ink2); }

.field { display: block; margin-top: 1.1rem; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); margin-bottom: 0.4rem; }
.field input,
.field select {
  width: 100%;
  font-family: var(--plex);
  /* 16px minimum, or iOS Safari zooms the page on focus. */
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  min-height: 48px;
  appearance: none;
}
.field select {
  /* Chevron drawn as an inline data URI. An external image would be a
     third-party request, which this page does not make. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238B7CFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}
.field input:focus,
.field select:focus { border-color: var(--act); outline: none; }

/* The honeypot. Off-screen rather than display:none, because some bots skip
   hidden inputs but not positioned ones. aria-hidden + tabindex keep it away
   from screen readers and the keyboard. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.turnstile { margin-top: 1.1rem; min-height: 65px; }

.submit { margin-top: 1.2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.submit .btn { flex: 1 1 12rem; }

.msg { margin: 1rem 0 0; font-size: 14px; min-height: 1.4rem; }
.msg.work { color: var(--ink2); }
.msg.done { color: var(--ink); font-weight: 600; }
.msg.error { color: var(--draft-ink); }

.fine { margin-top: 1.1rem; font-size: 13px; color: var(--ink3); line-height: 1.55; }

/* --- Beta strip ---------------------------------------------------------- */

.beta {
  background: var(--sec);
  border-radius: 22px;
  padding: 1.4rem 1.5rem;
  margin-top: 2rem;
}
.beta h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.beta p { font-size: 14px; color: var(--ink2); margin: 0; }

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

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 2.25rem 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink3);
}
.site-foot .links { display: flex; gap: 1.15rem; flex-wrap: wrap; }

/* --- Phones -------------------------------------------------------------- */

@media (max-width: 640px) {
  .wrap { padding: 0 1.15rem; }
  .hero { padding-top: 3rem; }
  section { padding: 3.25rem 0; }
  .mine { margin-left: 0.75rem; }
  .draft { margin-right: 0.5rem; }
  .bars li { grid-template-columns: 4.5rem 1fr auto; font-size: 13px; }
  .card { padding: 1.25rem; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
