/* getsmudge.io — matches the 2026-10-07 ad: warm paper, graphite type, blue only for Smudge. */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #F5F0E9;
  --sheet: #FEFCFA;
  --well: #FAF7F2;
  --graphite: #2E2D30;
  --lead: #77746E;
  --blue: #4A86C8;
  --blue-wash: rgba(74, 134, 200, .11);
  --blue-edge: rgba(74, 134, 200, .38);
  --line: rgba(46, 45, 48, .12);
  --card-edge: #D9DEE4;
  --shadow: 0 18px 44px rgba(46, 45, 48, .11), 0 2px 6px rgba(46, 45, 48, .05);
  --gutter: 16px;
  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(--graphite);
  font: 500 17px/1.45 "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, p { margin: 0; }
.blue { color: var(--blue); }
.muted { color: var(--lead); }
.nowrap { white-space: nowrap; }

/* ---------- Hero: the ad's end card ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: max(44px, env(safe-area-inset-top)) var(--gutter) 0;
  overflow: hidden;
}
.mascot { position: relative; width: 148px; }
.mascot .check {
  position: absolute;
  width: 34%;
  right: -22%;
  top: -14%;
  fill: none;
  stroke: var(--blue);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 160;
  stroke-dashoffset: 0;
}
.hero > .mascot .check { animation: draw .5s .35s ease-out both; }
@keyframes draw { from { stroke-dashoffset: 160; } }

.wordmark {
  margin-top: 14px;
  font-size: clamp(72px, 22vw, 132px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .95;
}
.tagline {
  margin-top: 18px;
  font-size: clamp(21px, 5.6vw, 30px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.join { width: 100%; max-width: 480px; margin-top: 30px; }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  background: var(--graphite);
  color: var(--paper);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  box-shadow: 0 10px 24px rgba(46, 45, 48, .2);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:hover { box-shadow: 0 14px 30px rgba(46, 45, 48, .24); }
.cta:active { transform: scale(.98); }
.cta:focus-visible, .choice:focus-visible, .share:focus-visible, .link:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.cta[disabled] { opacity: .6; cursor: progress; }
.for { margin-top: 12px; color: var(--lead); font-size: 17px; }

.ipad {
  width: calc(100% + 2 * var(--gutter));
  max-width: 640px;
  height: clamp(250px, 66vw, 430px);
  margin: 40px calc(-1 * var(--gutter)) 0;
  overflow: hidden;
  /* the ad lets the iPad run off the screen; here it sinks into the paper */
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 98%);
}
.ipad img { width: 96%; margin-left: 9%; transform: rotate(-5deg); transform-origin: 30% 0; }

/* ---------- The waitlist card ---------- */
.join-card { text-align: left; }
.join-card .card { animation: grow .32s .08s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 0; }
@keyframes grow { from { opacity: 0; transform: scale(.96) translateY(-6px); } }

.card {
  background: var(--sheet);
  border: 1.5px solid var(--card-edge);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px 20px 22px;
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar { width: 46px; height: auto; }
.label {
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.steps { margin-left: auto; display: flex; gap: 6px; }
.steps i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.join-card[data-step="device"] .steps i:first-child,
.join-card[data-step="details"] .steps i { background: var(--graphite); }
.join-card[data-step="done"] .steps { display: none; }

.question { font-size: 23px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin-bottom: 14px; }
.choices { display: grid; gap: 10px; }
.choice {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 15px 18px;
  text-align: left;
  background: var(--well);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  transition: border-color .12s ease, transform .12s ease;
}
.choice:hover { border-color: rgba(46, 45, 48, .35); }
.choice:active { transform: scale(.985); }
.choice-title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.choice-sub { font-size: 14.5px; color: var(--lead); }
.choice[data-device="ipad_pencil"] .choice-sub { color: var(--blue); }

/* Only the copy and fields for the chosen device show. */
.join-card:not([data-device="ipad_pencil"]) [data-for="ipad_pencil"],
.join-card:not([data-device="ipad_only"]) [data-for="ipad_only"],
.join-card:not([data-device="other"]) [data-for="other"] { display: none; }

.lead { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 16px; }
.lead-sub { display: block; margin-top: 6px; font-size: 16px; font-weight: 500; letter-spacing: 0; line-height: 1.45; color: var(--lead); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span, .chips legend { font-size: 14px; font-weight: 600; color: var(--lead); }
.field em, .chips em { font-style: normal; font-weight: 500; opacity: .75; }
.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  font-size: 18px; /* 16px+ keeps iOS from zooming in */
  background: var(--well);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input::placeholder { color: #A9A59E; }
.field input:focus { border-color: var(--graphite); box-shadow: 0 0 0 4px rgba(46, 45, 48, .08); }
.field input[aria-invalid="true"] { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-wash); }

.chips { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { padding: 0; margin-bottom: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-block;
  padding: 9px 15px;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--well);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.chips input:checked + span { background: var(--graphite); border-color: var(--graphite); color: var(--paper); }
.chips input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: var(--blue-wash);
  font-size: 15px;
  font-weight: 600;
}
.cta-small { width: 100%; min-height: 56px; font-size: 19px; }
.form-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--lead);
}
.link { padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--graphite); }

.done { text-align: center; padding: 6px 0 4px; outline: none; }
.mascot-small { width: 112px; margin: 4px auto 10px; }
.done .check { animation: draw .45s .2s ease-out both; }
.done-title { font-size: 30px; font-weight: 700; letter-spacing: -.025em; }
.done-sub { margin: 8px auto 18px; max-width: 30ch; color: var(--lead); font-size: 17px; }
.share {
  min-height: 50px;
  padding: 0 22px;
  border: 1.5px solid var(--graphite);
  border-radius: 999px;
  background: transparent;
  font-size: 17px;
  font-weight: 700;
}
.share:active { transform: scale(.98); }

/* ---------- Beats from the ad ---------- */
.beat {
  max-width: 640px;
  margin: 0 auto;
  padding: 76px var(--gutter) 0;
}
.beat h2 {
  font-size: clamp(40px, 11.5vw, 64px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.02;
}
.beat .sub { margin-top: 14px; font-size: clamp(21px, 5.6vw, 28px); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.beat .fine { margin-top: 18px; font-size: 13px; color: var(--lead); }
.beat u { text-decoration-thickness: 3px; text-underline-offset: 5px; }

.page {
  position: relative;
  margin: 30px calc(-1 * var(--gutter)) 0;
  padding-bottom: 26px;
  background: var(--sheet);
  border-top: 7px solid #58575A;
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -1px 0 rgba(46, 45, 48, .06);
}
.page > img { width: 100%; border-radius: 22px 22px 0 0; }
.hint { position: relative; margin: -6px 18px 0; }
.hint-text { font-size: 20px; line-height: 1.45; }
.hint .katex { font-size: 1.12em; }
.math.display { margin: 8px 0 14px; overflow-x: auto; overflow-y: hidden; }
.math.display .katex-display { margin: 0; text-align: left; }
.math.display .katex { font-size: clamp(1.45em, 6vw, 1.9em); }
.cite {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--blue-edge);
  border-radius: 999px;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 16px;
  font-weight: 500;
}
.cite svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.hint-text + .math.display { margin-top: 12px; }

.folder {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  color: var(--lead);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.folder svg { width: 28px; height: 22px; fill: #DED6C5; }
.stack { margin: 18px calc(-1 * var(--gutter)) 0; width: calc(100% + 2 * var(--gutter)); max-width: none; }

.beat-end { text-align: center; padding-top: 96px; padding-bottom: 24px; }
.end-title { font-size: clamp(48px, 14vw, 80px) !important; }
.beat-end .sub { color: var(--lead); max-width: 22ch; margin: 14px auto 28px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  padding: 56px var(--gutter) max(32px, env(safe-area-inset-bottom));
  color: var(--lead);
  font-size: 14px;
}
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- Wide screens: text beside the page ---------- */
@media (min-width: 900px) {
  .hero { padding-top: 72px; }
  .mascot { width: 176px; }
  .beat:not(.beat-problem):not(.beat-end) {
    max-width: 1100px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: 72px;
    align-content: start;
    padding-top: 128px;
  }
  .beat:not(.beat-problem):not(.beat-end) > * { grid-column: 1; }
  .beat > .page, .beat > .stack { grid-column: 2 !important; grid-row: 1 / span 6; margin: 0; }
  .beat > .stack { width: 100%; }
  .page { border-radius: 30px; padding-bottom: 30px; box-shadow: var(--shadow); }
  .beat-problem { padding-top: 128px; text-align: center; max-width: 820px; }
  .beat h2 { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
