/* Eduligence — landing page
   Colors are sampled from the logo: the wordmark navy and the diamond blue. */

:root {
  --ink: #07162c;          /* wordmark navy */
  --ink-soft: #33405a;
  --spark: #0758fb;        /* the diamond */
  --spark-deep: #0646c9;
  --spark-wash: #ecf2ff;
  --paper: #f6f8fc;
  --sheet: #ffffff;
  --rule: #d8e0ee;
  --graphite: #3a4251;     /* student handwriting */
  --muted: #566176;
  --highlighter: #ffe27a;
  --margin-line: #f2b6bf;
  --error: #b42318;

  --display: "Lexend", ui-sans-serif, system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --row: 40px;             /* one ruled line on the worksheet */

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h, 80px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

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

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-family: var(--display); font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* The diamond from the logo marks everything Eduligence itself says. */
.dia {
  display: inline-block; flex: none;
  width: 0.5em; height: 0.5em;
  background: var(--spark);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px;
  border: 0; border-radius: 10px;
  background: var(--spark); color: #fff;
  font-family: var(--display); font-size: 1rem; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--spark-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.7; cursor: progress; }
.btn--small { height: 40px; padding: 0 16px; font-size: 0.95rem; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn--ghost:hover { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--ink-soft); }

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

/* Stays at the top while scrolling. At the top of the page it is invisible against the
   paper; once scrolled it frosts over whatever passes beneath and gains a rule. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 248, 252, 0.84);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--paper); }
}
.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 8px 24px -18px rgba(7, 22, 44, 0.35);
}

.nav-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(7, 22, 44, 0.32);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.nav-scrim.is-visible { opacity: 1; visibility: visible; transition: opacity 0.2s ease; }

/* Menu button: only on phones, and only when JavaScript can run the menu */
.nav-toggle { display: none; }
.nav-toggle__bar {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 20px;
}
.brand { display: block; flex: none; padding: 9px 0; margin: -9px 0; border-radius: 6px; }
.brand img { height: 30px; width: auto; max-width: none; }

.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(12px, 3vw, 28px); min-width: 0; }
.btn__short { display: none; }
.site-nav__link {
  display: inline-flex; align-items: center; min-height: 40px;
  font-family: var(--display); font-size: 0.95rem; font-weight: 400;
  color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.site-nav__link:hover { color: var(--spark-deep); }
.site-nav__link[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline 2px var(--spark);
  text-underline-offset: 6px;
}

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

.hero {
  position: relative;
  padding: clamp(24px, 5vw, 64px) 0 clamp(40px, 6vw, 72px);
}
/* Faint graph paper behind the hero, fading out toward the fold */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(7, 88, 251, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(7, 88, 251, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.eyebrow {
  display: flex; align-items: center; gap: 0.6em;
  font-family: var(--display); font-size: 0.95rem; font-weight: 500;
  color: var(--spark-deep);
}

.hero__title {
  margin: 0.45em 0 0.4em;
  font-family: var(--display);
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 4.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

/* A highlighter stroke, drawn once on load */
.hl {
  background-image: linear-gradient(transparent 60%, var(--highlighter) 60%, var(--highlighter) 94%, transparent 94%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  padding: 0 0.06em; margin: 0 -0.06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: swipe 0.7s 0.4s cubic-bezier(0.6, 0.1, 0.3, 1) forwards;
}

.hero__lede {
  max-width: 34em;
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Waitlist form ---------- */

.waitlist { margin-top: 32px; max-width: 580px; }

.waitlist__row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(7, 22, 44, 0.05), 0 10px 28px -14px rgba(7, 22, 44, 0.22);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.waitlist__row:focus-within {
  border-color: var(--spark);
  box-shadow: 0 0 0 4px rgba(7, 88, 251, 0.14), 0 10px 28px -14px rgba(7, 22, 44, 0.22);
}

.waitlist__email,
.waitlist__role {
  height: 48px;
  border: 0; background-color: transparent;
  font: inherit; font-size: 1rem; color: var(--ink);
}
.waitlist__email { flex: 1 1 auto; min-width: 0; padding: 0 12px; }
.waitlist__email::placeholder { color: #8b95a8; }
.waitlist__email:focus,
.waitlist__role:focus { outline: none; }

.waitlist__role {
  flex: none;
  padding: 0 30px 0 14px;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23566176' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.waitlist__role option { color: var(--ink); }

.waitlist__status { min-height: 1.6em; margin: 10px 4px 0; font-size: 0.95rem; }
.waitlist__status.is-success { color: var(--ink); font-weight: 700; }
.waitlist__status.is-success::before { content: "✓ "; color: var(--spark); }
.waitlist__status.is-error { color: var(--error); }
.waitlist__note { margin: 0 4px; font-size: 0.875rem; color: var(--muted); }

/* Honeypot: invisible to people, tempting to bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Dark variant, used in the closing section */
.waitlist--dark { margin-left: auto; margin-right: auto; }
.waitlist--dark .waitlist__row {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}
.waitlist--dark .waitlist__row:focus-within {
  border-color: #6f9dff;
  box-shadow: 0 0 0 4px rgba(111, 157, 255, 0.22);
}
.waitlist--dark .waitlist__email { color: #fff; }
.waitlist--dark .waitlist__email::placeholder { color: #8796b0; }
.waitlist--dark .waitlist__role {
  color: #c3cde0;
  border-left-color: rgba(255, 255, 255, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23c3cde0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.waitlist--dark .waitlist__status { color: #dbe3f2; }
.waitlist--dark .waitlist__status.is-success { color: #fff; }
.waitlist--dark .waitlist__status.is-success::before { color: #8fb4ff; }
.waitlist--dark .waitlist__status.is-error { color: #ffb4ab; }

/* ---------- The worksheet (hero demo) ---------- */

.notebook {
  position: relative;
  isolation: isolate;
  width: 100%; max-width: 540px;
  margin: 0; justify-self: end;
}

.notebook__tabs {
  position: relative; z-index: 1;
  display: flex; gap: 4px;
  padding-left: 72px;
  margin-bottom: -1px;
}
.notebook__tab {
  padding: 8px 14px 9px;
  border: 1px solid var(--rule); border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #e8edf6;
  color: var(--muted);
  font-family: var(--display); font-size: 0.875rem; font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.notebook__tab:hover { color: var(--ink); }
.notebook__tab[aria-selected="true"] { background: var(--sheet); color: var(--ink); }
.notebook__tab:focus-visible { outline-offset: -3px; }

.notebook__page {
  position: relative;
  min-height: 452px;
  padding: 26px 28px 28px 84px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 4px 14px 14px 14px;
  box-shadow:
    0 1px 0 rgba(7, 22, 44, 0.03),
    0 4px 12px -6px rgba(7, 22, 44, 0.12),
    0 28px 56px -28px rgba(7, 22, 44, 0.32);
}
/* The red margin line of a school exercise book */
.notebook__page::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 62px;
  width: 2px; background: var(--margin-line);
}
/* A second sheet peeking out underneath */
.notebook__page::after {
  content: "";
  position: absolute; inset: 10px -8px -10px 8px; z-index: -1;
  background: #fbfcfe;
  border: 1px solid var(--rule);
  border-radius: inherit;
  transform: rotate(1.4deg);
}

.notebook__caption {
  margin-top: 18px; padding-left: 4px;
  font-size: 0.875rem; color: var(--muted);
}

.ex { position: relative; }
.ex[hidden] { display: none; }

.ex__q {
  min-height: var(--row);
  font-family: var(--display); font-size: 1rem; font-weight: 500;
  line-height: 1.45; color: var(--ink);
  padding-top: 8px;
}
/* Question numbers sit in the margin, as on an exam paper */
.ex__qnum {
  position: absolute; left: -74px; top: 8px;
  width: 42px; text-align: right;
  font-size: 0.875rem; font-weight: 600; color: var(--muted);
}

.ex__work {
  list-style: none; margin: 8px 0 0; padding: 0;
  font-family: var(--hand); font-size: 1.5rem; line-height: var(--row);
  color: var(--graphite);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row) - 1px), var(--rule) calc(var(--row) - 1px), var(--rule) var(--row));
}
/* Nudge the writing down so it sits on the rule instead of floating between rules */
.ex__work li { position: relative; top: 6px; height: var(--row); white-space: nowrap; }

.ex__work mark {
  color: inherit;
  background-image: linear-gradient(transparent 14%, var(--highlighter) 14%, var(--highlighter) 86%, transparent 86%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-color: transparent;
  border-radius: 0.2em;
  padding: 0 0.14em; margin: 0 -0.14em;
}

.ex__note {
  position: relative;
  margin: 22px 0 0;
  padding: 12px 16px 14px;
  background: var(--spark-wash);
  border-left: 3px solid var(--spark);
  border-radius: 2px 12px 12px 2px;
  font-size: 0.98rem; line-height: 1.5; color: var(--ink);
}
.ex__note-head {
  display: flex; align-items: center; gap: 0.55em;
  margin-bottom: 4px;
  font-family: var(--display); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--spark-deep);
}
.ex__note-head .dia { width: 0.6em; height: 0.6em; }

.ex__retry {
  margin-top: 18px;
  border-bottom: 1px solid var(--rule);
}
.ex__retry-label {
  display: block;
  font-family: var(--display); font-size: 0.8rem; font-weight: 500; color: var(--muted);
}
.ex__retry-work {
  display: inline-block; position: relative; top: 2px;
  font-family: var(--hand); font-size: 1.5rem; line-height: var(--row); color: var(--graphite);
}
.ex__tick {
  display: inline-block; margin-left: 8px;
  font-family: var(--hand); font-size: 1.6rem; line-height: 1; color: var(--spark);
}
.nw { white-space: nowrap; }

/* Playback. Without JavaScript everything above is simply shown, finished.
   With it, app.js adds .js to <html> and .is-playing to the visible example. */
.js .ex__work li,
.js .ex__retry-work { clip-path: inset(-8px 100% -8px 0); }
.js .ex__work mark { background-size: 0% 100%; }
.js .ex__note,
.js .ex__retry-label { opacity: 0; transform: translateY(6px); }
.js .ex__tick { opacity: 0; transform: scale(0.4) rotate(-12deg); }

.js .ex.is-playing .ex__work li { animation: write 0.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards; }
.js .ex.is-playing .ex__work li:nth-child(1) { animation-delay: 0.2s; }
.js .ex.is-playing .ex__work li:nth-child(2) { animation-delay: 0.8s; }
.js .ex.is-playing .ex__work li:nth-child(3) { animation-delay: 1.4s; }
.js .ex.is-playing .ex__work li:nth-child(4) { animation-delay: 2.0s; }
.js .ex.is-playing .ex__work mark { animation: swipe 0.45s 2.7s cubic-bezier(0.6, 0.1, 0.3, 1) forwards; }
.js .ex.is-playing .ex__note { animation: rise 0.5s 3.3s ease-out forwards; }
.js .ex.is-playing .ex__retry-label { animation: rise 0.4s 4.6s ease-out forwards; }
.js .ex.is-playing .ex__retry-work { animation: write 0.8s 4.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards; }
.js .ex.is-playing .ex__tick { animation: tick 0.35s 5.7s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }

@keyframes write { to { clip-path: inset(-8px 0 -8px 0); } }
@keyframes swipe { to { background-size: 100% 100%; } }
@keyframes rise  { to { opacity: 1; transform: none; } }
@keyframes tick  { to { opacity: 1; transform: none; } }

/* ---------- Thesis ---------- */

.thesis { padding: clamp(56px, 8vw, 112px) 0 clamp(56px, 8vw, 104px); }

.thesis__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}

/* The brand line gains weight word by word, from light to bold:
   education growing into intelligence. */
.thesis__title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.thesis__w1 { font-weight: 300; }
.thesis__w2 { font-weight: 350; }
.thesis__w3 { font-weight: 450; }
.thesis__w4 { font-weight: 700; color: var(--spark); }

.thesis__body { display: grid; gap: 1em; color: var(--ink-soft); font-size: 1.1rem; max-width: 30em; }

/* ---------- Audiences ---------- */

.audiences { padding: 0 0 clamp(72px, 10vw, 128px); }

.section-label {
  display: flex; align-items: center; gap: 0.6em;
  margin-bottom: 28px;
  font-family: var(--display); font-size: 0.95rem; font-weight: 500; color: var(--muted);
}

.audiences__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.audience { padding-top: 22px; border-top: 2px solid var(--ink); }
.audience__who {
  margin-bottom: 10px;
  font-family: var(--display); font-size: 0.9rem; font-weight: 500; color: var(--spark-deep);
}
.audience__title {
  margin-bottom: 10px;
  font-family: var(--display); font-size: 1.4rem; font-weight: 500;
  line-height: 1.25; letter-spacing: -0.02em;
  text-wrap: balance;
}
.audience p:last-child { color: var(--ink-soft); }

/* ---------- Beliefs ---------- */

.beliefs {
  padding: clamp(64px, 9vw, 120px) 0;
  background: var(--sheet);
  border-top: 1px solid var(--rule);
}
.beliefs__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.beliefs__title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 500; line-height: 1.1; letter-spacing: -0.035em;
  text-wrap: balance;
}
.beliefs__list { list-style: none; margin: 0; padding: 0; }
.belief { padding: 22px 0; border-top: 1px solid var(--rule); }
.belief:first-child { padding-top: 0; border-top: 0; }
.belief__title {
  display: flex; align-items: flex-start; gap: 0.7em;
  margin-bottom: 6px;
  font-family: var(--display); font-size: 1.25rem; font-weight: 500; letter-spacing: -0.015em;
}
.belief__title .dia { width: 0.45em; height: 0.45em; margin-top: 0.62em; }
.belief p { padding-left: calc(0.45em * 1.414 + 0.7em); color: var(--ink-soft); max-width: 36em; }

/* ---------- Closing call to action ---------- */

.join {
  position: relative;
  padding: clamp(80px, 11vw, 144px) 0;
  background: var(--ink);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.join::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
}
.join__inner { position: relative; }
.join__title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 1.4rem + 4vw, 4.25rem);
  font-weight: 600; line-height: 1.04; letter-spacing: -0.045em;
}
.join__lede { margin: 16px auto 0; max-width: 32em; font-size: 1.15rem; color: #c3cde0; }
.join__schools { margin: 28px auto 0; max-width: 36em; font-size: 0.975rem; color: #a9b5ca; }
.join__schools a { color: #fff; text-underline-offset: 3px; }
.join__schools a:hover { color: #8fb4ff; }

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

.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #93a0b8;
  font-size: 0.9rem;
}
.site-footer__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-top: 40px; padding-bottom: 40px;
}
.site-footer__brand img { height: 24px; width: auto; margin-bottom: 12px; }
.site-footer__meta { display: grid; gap: 4px; text-align: right; }
.site-footer__meta a { display: inline-block; padding: 6px 0; color: #dbe3f2; text-underline-offset: 3px; }
.site-footer__meta a:hover { color: #fff; }
.site-footer__type { max-width: 30em; color: #6f7d97; font-size: 0.825rem; }

/* ---------- Products page: two big product cards in one row ---------- */

.products {
  position: relative;
  padding: clamp(32px, 6vw, 72px) 0 clamp(72px, 9vw, 120px);
}
.products::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(7, 88, 251, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(7, 88, 251, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 20%, transparent 70%);
  pointer-events: none;
}
.products__inner { position: relative; }
.products__title {
  margin: 0.4em 0 0.3em;
  font-family: var(--display);
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 4.75rem);
  font-weight: 600; line-height: 1.02; letter-spacing: -0.045em;
}
.products__lede {
  max-width: 34em;
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  color: var(--ink-soft);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  margin-top: clamp(40px, 5vw, 64px);
}

/* Each card is a worksheet sheet, as in the home page's hero: an index tab naming
   where the product lives, and a second sheet underneath that stays put on hover. */
.pcard-wrap { position: relative; isolation: isolate; display: flex; padding-top: 38px; }
.pcard-wrap::before {
  content: "";
  position: absolute; top: 48px; right: -8px; bottom: -10px; left: 8px; z-index: -1;
  background: #fbfcfe;
  border: 1px solid var(--rule);
  border-radius: 4px 20px 20px 20px;
  transform: rotate(1.2deg);
}
.pcard {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 4px 20px 20px 20px;
  box-shadow:
    0 1px 0 rgba(7, 22, 44, 0.03),
    0 4px 12px -6px rgba(7, 22, 44, 0.12),
    0 28px 56px -28px rgba(7, 22, 44, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
@media (hover: hover) {
  .pcard:hover {
    transform: translateY(-6px) rotate(-0.4deg);
    box-shadow:
      0 2px 0 rgba(7, 22, 44, 0.03),
      0 8px 18px -8px rgba(7, 22, 44, 0.16),
      0 40px 72px -32px rgba(7, 22, 44, 0.4);
  }
  .pcard:hover .pcard__arrow { transform: translate(2px, -2px); }
  .pcard:hover .pcard__link { color: var(--spark); }
}
.pcard { -webkit-tap-highlight-color: transparent; }
.pcard:focus-within { outline: 3px solid var(--spark); outline-offset: 4px; }
.pcard__tab {
  position: absolute; bottom: 100%; left: -1px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: -1px;
  padding: 8px 16px 9px;
  background: var(--sheet);
  border: 1px solid var(--rule); border-bottom: 0;
  border-radius: 10px 10px 0 0;
  font-family: var(--display); font-size: 0.85rem; font-weight: 500; color: var(--ink-soft);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px #e6f5ec; }

/* Each product's own logo, on the site's graph paper */
.pcard__logo {
  display: grid; place-items: center;
  height: clamp(220px, 24vw, 320px);
  padding: 40px;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(7, 88, 251, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(7, 88, 251, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center;
  border-bottom: 1px solid var(--rule);
  border-radius: 3px 19px 0 0;
}
.pcard__img { width: auto; height: auto; max-width: 100%; }
.pcard__img--fairmark { max-height: clamp(84px, 9vw, 120px); }
.pcard__img--reader { max-height: clamp(44px, 4.6vw, 62px); }

.pcard__body { display: flex; flex-direction: column; flex: 1; padding: clamp(28px, 3vw, 40px); }
.pcard__title {
  font-family: var(--display);
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.25rem);
  font-weight: 600; line-height: 1.1; letter-spacing: -0.035em;
}
.pcard__desc { margin-top: 12px; max-width: 34em; font-size: 1.08rem; line-height: 1.6; color: var(--ink-soft); }

.pcard__link {
  display: block;
  margin-top: auto; padding-top: 28px;
  font-family: var(--display); font-size: 1rem; font-weight: 500; line-height: 1.5;
  color: var(--spark-deep); text-decoration: none;
}
/* Keep the address in one piece (no break at its hyphen) with the arrow attached */
.pcard__domain { display: inline-block; max-width: 100%; white-space: nowrap; overflow-wrap: anywhere; }
.pcard__link:focus-visible { outline: none; }
/* The whole card is the link */
.pcard__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pcard__arrow { display: inline-block; vertical-align: -1px; margin-left: 2px; transition: transform 0.2s ease; }

/* ---------- Standalone pages (404, form result without JavaScript) ---------- */

.result-page {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px;
  max-width: 560px; margin: 0 auto; padding: 48px var(--gutter);
}
.result-page .brand { margin-bottom: 24px; }
.result-page__title {
  font-family: var(--display); font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 600; line-height: 1.08; letter-spacing: -0.04em;
}
.result-page__text { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .notebook { justify-self: center; }
  .thesis__inner,
  .beliefs__inner { grid-template-columns: minmax(0, 1fr); }
  .audiences__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

@media (max-width: 760px) {
  .pcard__logo { height: 200px; padding: 28px; }
  .pcard__body { padding: 24px; }
}

@media (max-width: 639px) {
  .products__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pcard__logo { height: clamp(170px, 48vw, 220px); }
}

@media (max-width: 600px) {
  .site-nav__link--wide { display: none; }
  .brand img { height: 26px; }
  .notebook { justify-self: stretch; }

  .waitlist__row { flex-wrap: wrap; padding: 8px; }
  .waitlist__email { flex-basis: 100%; }
  .waitlist__role { flex: 1 1 auto; border-left: 0; border-top: 1px solid var(--rule); padding-left: 12px; }
  .waitlist--dark .waitlist__role { border-top-color: rgba(255, 255, 255, 0.16); }
  .waitlist__submit { flex: 1 1 100%; }

  .notebook__tabs { padding-left: 52px; }
  .notebook__tab { padding: 11px 12px 10px; font-size: 0.85rem; }
  .notebook__page { padding: 22px 18px 24px 60px; min-height: 0; }
  .notebook__page::before { left: 44px; }
  .ex__qnum { left: -56px; width: 32px; }
  .ex__work, .ex__retry-work { font-size: 1.3rem; }
  .ex__work li { white-space: normal; height: auto; min-height: var(--row); }

  .site-footer__meta { text-align: left; }
}

/* Phones: the navigation folds into a menu sheet under a ☰ button */
@media (max-width: 600px) {

  .js .nav-toggle {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-right: -10px;
    border: 0; border-radius: 10px;
    background: transparent; color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .js .nav-toggle:hover { background: rgba(7, 22, 44, 0.05); }
  .js .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .js .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .js .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* The menu is a sheet of the same paper as the worksheet and product cards */
  .js .site-nav {
    position: absolute; top: calc(100% + 6px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px 20px 20px;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: 0 4px 12px -6px rgba(7, 22, 44, 0.14), 0 28px 56px -24px rgba(7, 22, 44, 0.38);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .js .site-header.is-open .site-nav {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .js .site-header.is-open { border-bottom-color: var(--rule); }

  .js .site-nav .site-nav__link {
    display: flex; align-items: center; gap: 0.7em;
    min-height: 56px;
    border-bottom: 1px solid var(--rule);
    font-size: 1.15rem; font-weight: 500; color: var(--ink);
  }
  .js .site-nav .site-nav__link[aria-current="page"] { text-decoration: none; }
  .js .site-nav .site-nav__link[aria-current="page"]::before {
    content: ""; width: 0.42em; height: 0.42em; border-radius: 1px;
    background: var(--spark); transform: rotate(45deg);
  }
  .js .site-nav .btn--small {
    display: inline-flex;
    height: 48px; margin-top: 18px; padding: 0 20px;
    font-size: 1rem;
  }
  .js .site-nav .btn__long { display: inline; }
  .js .site-nav .btn__short { display: none; }
}

/* Small phones: the header has to fit a logo, Products and the button in ~350px */
@media (max-width: 480px) {
  .site-header__inner { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .brand img { height: 22px; }
  .site-nav { gap: 14px; }
  .site-nav .btn--small { padding: 0 14px; font-size: 0.9rem; }
  .btn__long { display: none; }
  .btn__short { display: inline; }
}

/* Very small phones (under 360px): the hero's own form is right below, so the
   header keeps just the logo and Products */
@media (max-width: 359px) {
  .site-nav .btn--small { display: none; }
  .notebook__tabs { gap: 3px; padding-left: 40px; }
  .notebook__tab { padding: 11px 9px 10px; font-size: 0.8rem; }
  .ex__work, .ex__retry-work { font-size: 1.2rem; }
  .pcard__link { font-size: 0.9rem; }
}

/* Short landscape phones: keep the header from eating the screen */
@media (max-height: 480px) and (orientation: landscape) {
  .site-header__inner { padding-top: 10px; padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header, .nav-toggle__bar, .nav-scrim, .js .site-nav, .js .site-header.is-open .site-nav { transition: none; }
  .pcard, .pcard__arrow { transition: none; }
  .pcard:hover { transform: none; }
  .hl { animation: none; background-size: 100% 100%; }
  .js .ex__work li,
  .js .ex__retry-work,
  .js .ex.is-playing .ex__work li,
  .js .ex.is-playing .ex__retry-work { animation: none; clip-path: none; }
  .js .ex__work mark,
  .js .ex.is-playing .ex__work mark { animation: none; background-size: 100% 100%; }
  .js .ex__note, .js .ex__retry-label, .js .ex__tick,
  .js .ex.is-playing .ex__note,
  .js .ex.is-playing .ex__retry-label,
  .js .ex.is-playing .ex__tick { animation: none; opacity: 1; transform: none; }
}
