:root {
  color-scheme: light;
  --paper: #f4f2e9;
  --ink: #2b2f28;
  --quiet: #6b706a;
  --accent: #ee4b2b;
  --pencil: #3f463d;
  --pencil-soft: #7b7f72;
  --card: #fffdf6;
  font-family: 'Manrope', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-width: 280px; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
::selection { background: #ffc8b7; color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }

/* ---- the sheet: one page torn from a notebook ---- */
.notebook { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.notebook > * { position: absolute; display: block; }
.notebook__margin { left: 47px; top: 0; bottom: 0; width: 1px; background: linear-gradient(#ee4b2b52, #ee4b2b21 22%, #ee4b2b21 78%, #ee4b2b45); }
.notebook__holes {
  left: 0; top: 0; bottom: 0; width: 26px;
  background-image: radial-gradient(circle at 13px 34px, #0000 4.1px, #dcd8c8 4.1px, #dcd8c8 5px, #0000 5.2px);
  background-size: 26px 68px; background-repeat: repeat-y;
  box-shadow: inset -14px 0 18px -14px #4a44342e;
}
.notebook__stain {
  right: 2%; bottom: -12%; width: clamp(240px, 26vw, 380px); height: clamp(240px, 26vw, 380px);
  border: 2px solid #b08b4a24; border-radius: 50%;
  box-shadow: inset 0 0 0 9px #b08b4a0d, inset 0 0 30px #b08b4a0f;
  transform: rotate(-7deg);
}

.shell { position: relative; z-index: 1; width: min(100%, 1600px); min-height: 100svh; margin-inline: auto; padding: 0 clamp(24px, 5vw, 88px); display: flex; flex-direction: column; }
.masthead { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 2px; padding-block: 6px; color: var(--ink); text-decoration: none; }
.brand__scribble { display: block; width: 166px; height: auto; transform: rotate(-3deg); }
.brand__note { padding-left: 4px; color: var(--quiet); font-size: 10px; font-weight: 500; line-height: 1.5; }
.launch-status { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.launch-status .status-dot { box-shadow: 0 0 0 4px #ee4b2b0d; }

.hero { position: relative; flex: 1; display: grid; grid-template-columns: 1.08fr 1fr; align-items: start; gap: clamp(36px, 5vw, 80px); padding: 18px 0 48px; }

/* ---- left leaf: the note ---- */
.intro { display: flex; flex-direction: column; justify-content: center; padding-block: 40px 14px; min-width: 0; }
.opening { display: flex; align-items: center; gap: 10px; margin: 0 0 26px; color: var(--quiet); font-family: 'Caveat', cursive; font-size: 24px; font-weight: 600; line-height: 1.2; }
.opening__rule { width: 22px; height: 3px; border-radius: 2px; background: var(--accent); transform: rotate(-2deg) translateY(-2px); }

h1 {
  margin: 0; padding-block: 2px 0;
  font-family: 'Caveat', cursive; font-size: clamp(58px, 7.2vw, 106px); font-weight: 700;
  line-height: 1; letter-spacing: 0;
}
.scribble-rule { display: block; width: min(100%, 420px); height: auto; margin: 10px 0 0 -2px; color: var(--pencil); transform: rotate(-.5deg); }
.description { max-width: 400px; margin: 24px 0 0; color: var(--quiet); font-size: 15px; line-height: 1.85; text-wrap: pretty; }
.signature { width: fit-content; margin: 15px 0 0; color: var(--ink); font-family: 'Caveat', cursive; font-size: 27px; font-weight: 600; line-height: 1.2; transform: rotate(-1.2deg); }

/* ---- the index card, taped down ---- */
.waitlist {
  position: relative; width: min(100%, 460px); margin-top: clamp(22px, 2.8vw, 38px);
  padding: 22px 24px 20px;
  border: 1.5px solid #e3ddc5; border-radius: 18px 24px 15px 22px / 24px 15px 22px 18px;
  background: var(--card); box-shadow: 0 18px 30px -26px #3d38245e;
  transform: rotate(-.4deg);
}
.waitlist::after { content: ''; position: absolute; inset: 4px 3px 5px 4px; border: 1px solid #4a443414; border-radius: inherit; pointer-events: none; }
.tape { position: absolute; z-index: 3; width: 74px; height: 21px; background: #f4e4a4b0; box-shadow: 0 1px 2px #4a443426; pointer-events: none; }
.tape--a { left: -13px; top: -9px; transform: rotate(-8deg); }
.tape--b { right: -13px; top: -8px; transform: rotate(7deg); }
.tape--c { left: 50%; top: -10px; margin-left: -37px; transform: rotate(-2deg); }
.waitlist__clip { position: absolute; left: -13px; top: 34px; width: 20px; height: auto; color: #a8ada9; transform: rotate(-7deg); }

.waitlist__controls { display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 14px; border: 1.5px solid #d0cbb3; border-radius: 13px 17px 12px 16px / 17px 12px 16px 13px; background: #fff; transition: border-color 180ms, box-shadow 180ms; }
.waitlist__controls:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #ee4b2b12; }
.waitlist__env { flex: 0 0 auto; width: 21px; height: auto; color: #9a9d8e; }
.waitlist input { width: 100%; min-width: 0; min-height: 50px; padding: 0 4px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 16px; }
.waitlist input:focus-visible { outline: 0; }
.waitlist input::placeholder { color: #7d8178; font-size: 15px; }
.waitlist button { flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 20px; min-height: 50px; border: 0; border-radius: 9px 12px 8px 11px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; transform: rotate(-.5deg); transition: background 180ms; }
.waitlist button svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms; }
.waitlist__note { margin: 13px 2px 0; color: #8a8572; font-family: 'Caveat', cursive; font-size: 19px; line-height: 1.35; }
.waitlist__trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.waitlist__message { margin: 0; color: #a53520; font-size: 12px; line-height: 1.6; }
.waitlist__message[data-visible='true'] { margin-top: 10px; }
.waitlist__message[data-state='pending'] { color: var(--quiet); }
.waitlist__message[data-state='success'] { color: #3d6b45; }
.waitlist button:disabled { cursor: progress; opacity: .68; }

/* ---- marginalia ---- */
.scrawl { position: absolute; z-index: 2; font-family: 'Caveat', cursive; color: #8f8a78; pointer-events: none; user-select: none; }
.scrawl--side { top: 44%; left: calc(50% + 22px); font-size: 21px; transform: translate(-50%, -50%) rotate(-90deg); }
.scrawl--foot { position: static; display: flex; align-items: center; gap: 10px; width: min(100%, 460px); margin-top: clamp(24px, 3vw, 44px); font-size: 21px; transform: rotate(-2.5deg); }
.scrawl__plane { flex: 0 0 auto; width: 32px; height: auto; color: #a9a48f; }
.scrawl--corner { top: -6px; right: 50%; display: flex; gap: 3px; margin-right: 14px; color: #d8c98f; transform: rotate(12deg); }
.scrawl__star { width: 17px; height: 17px; }
.scrawl__star--sm { width: 10px; height: 10px; align-self: flex-end; margin-bottom: 2px; }

/* ---- right leaf: the classified page ---- */
.sketch-panel { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-width: 0; min-height: 628px; padding: 26px 26px 24px; border: 1.5px solid #e5dfc9; border-radius: 22px 16px 24px 18px / 18px 24px 16px 22px; background: #fbf7ea; box-shadow: 0 24px 46px -34px #3d382455; }
.sketch-panel::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .3; background-image: linear-gradient(#c9c2a2 1px, transparent 1px), linear-gradient(90deg, #c9c2a2 1px, transparent 1px); background-size: 21px 21px; background-position: 8px 8px; pointer-events: none; }
.sketch-panel::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(115% 85% at 76% 6%, #f4ecd2f2, transparent 60%), radial-gradient(90% 70% at 12% 96%, #f3ead3a8, transparent 62%); pointer-events: none; }
.panel-top { position: relative; z-index: 2; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: #5f6357; font-family: 'Caveat', cursive; font-size: 20px; line-height: 1.3; }
.margin-note { color: #98937f; font-size: 18px; }
.sketch-art { position: relative; z-index: 1; display: block; width: min(100%, 420px); height: auto; margin: -6px auto -6px; flex-shrink: 0; filter: drop-shadow(0 16px 18px #4a44341a); }
.sketch-art text { fill: var(--pencil); font-family: 'Caveat', cursive; }
.countdown-card { position: relative; z-index: 2; margin-inline: 4px; padding: 23px 24px 18px; border: 1.5px solid #e6dfc8; border-radius: 9px 14px 8px 13px / 14px 8px 13px 9px; background: #fffdf4; box-shadow: 0 14px 26px -20px #3d38245c; transform: rotate(-.6deg); }
.countdown-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.countdown-heading h2 { margin: 0; font-family: 'Caveat', cursive; font-size: 23px; font-weight: 700; line-height: 1.2; }
.countdown-state { color: var(--pencil-soft); font-size: 10px; }
.countdown { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: start; margin-top: 16px; }
.countdown__unit { display: grid; gap: 6px; text-align: center; }
.countdown__unit strong { font-size: clamp(30px, 3.3vw, 50px); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.06em; line-height: 1.1; }
.countdown__unit > span { color: var(--pencil-soft); font-size: 10px; }
.countdown__colon { padding: 3px 5px 0; font-size: clamp(21px, 2.4vw, 34px); font-weight: 400; color: #c9c3b2; line-height: 1.1; }
.launch-date { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 20px; padding-top: 14px; border-top: 1px dashed #ddd5bd; color: #63675f; font-size: 9px; }
.launch-date > span:last-child { color: #73776f; margin-left: auto; }
.launch-date .status-dot { width: 4px; height: 4px; }
.noscript-note { margin: 10px 0 0; font-size: 11px; text-align: center; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px; border-radius: 6px; background: #fff; color: var(--ink); }

/* ---- 404: the page that wandered off ---- */
.notfound { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 26px 0 64px; }
.notfound__card {
  position: relative; isolation: isolate; width: min(100%, 540px); padding: 40px 34px 34px; text-align: center;
  border: 1.5px solid #e5dfc9; border-radius: 24px 18px 22px 17px / 18px 23px 17px 24px;
  background: #fbf7ea; box-shadow: 0 24px 46px -34px #3d382455; transform: rotate(-.7deg);
}
.notfound__card::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .3; background-image: linear-gradient(#c9c2a2 1px, transparent 1px), linear-gradient(90deg, #c9c2a2 1px, transparent 1px); background-size: 21px 21px; background-position: 8px 8px; pointer-events: none; }
.notfound__card::after { content: ''; position: absolute; inset: 5px 4px 6px 5px; border: 1px solid #4a443414; border-radius: inherit; pointer-events: none; }
.notfound__code { position: relative; margin: 0; color: var(--pencil-soft); font-family: 'Caveat', cursive; font-size: clamp(74px, 13vw, 118px); font-weight: 700; line-height: 1; }
.notfound__strike { position: absolute; left: 50%; top: 53%; width: 1.45em; height: auto; color: var(--accent); opacity: .78; transform: translate(-50%, -50%) rotate(-1.5deg); }
.notfound h1 { margin: 12px 0 0; font-family: 'Caveat', cursive; font-size: clamp(36px, 6.4vw, 54px); font-weight: 700; line-height: 1.04; }
.notfound__note { margin: 14px 0 0; color: var(--quiet); font-size: 14px; line-height: 1.75; }
.notfound__back { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 12px 22px; border: 1.5px solid #d0cbb3; border-radius: 12px 16px 11px 15px / 16px 11px 15px 12px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; transition: background 180ms, border-color 180ms; }
.notfound__back svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms; }

@media (hover: hover) {
  .notfound__back:hover { background: #f1eee0; border-color: #bcb69c; }
  .notfound__back:hover svg { transform: translateX(-3px); }
  .waitlist button:hover { background: #41483d; }
  .waitlist button:hover svg { transform: translateX(3px); }
}
@media (min-width: 1600px) {
  .hero { align-items: center; padding-block: 32px 56px; }
  .sketch-panel { min-height: 700px; }
  .intro { padding-bottom: 40px; }
}
@media (max-width: 1200px) {
  .notebook__stain { width: 260px; height: 260px; }
}
@media (max-width: 1050px) and (min-width: 761px) {
  .shell { padding-inline: 32px; }
  .hero { gap: 28px; grid-template-columns: 1fr 1fr; }
  h1 { font-size: clamp(52px, 7.4vw, 74px); }
  .scribble-rule { width: min(100%, 330px); }
  .sketch-panel { min-height: 570px; padding: 20px 16px 18px; justify-content: center; }
  .panel-top { margin-bottom: auto; }
  .sketch-art { width: min(100%, 380px); }
  .countdown-card { padding-inline: 14px; margin-top: auto; }
  .countdown-heading h2 { font-size: 20px; }
  .waitlist { width: min(100%, 100%); padding: 20px 20px 18px; }
  .waitlist__note { font-size: 18px; }
  .waitlist button { padding-inline: 12px; gap: 9px; }
  .launch-date > span:last-child { margin-left: 0; }
  .scrawl--side, .scrawl--corner, .scrawl--foot { display: none; }
}
@media (max-width: 760px) {
  .notebook { display: none; }
  .shell { padding-inline: clamp(20px, 5.5vw, 40px); }
  .masthead { min-height: 90px; }
  .brand__scribble { width: 145px; }
  .brand__note { font-size: 9px; }
  .launch-status { max-width: 140px; font-size: 10px; gap: 7px; line-height: 1.5; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 22px 0 36px; }
  .intro { display: contents; }
  .intro__copy { padding: 12px 0 0; }
  .opening { margin-bottom: 20px; font-size: 21px; }
  h1 { font-size: clamp(50px, 13vw, 92px); }
  .scribble-rule { width: min(100%, 300px); margin-top: 8px; }
  .description { margin-top: 20px; max-width: 390px; font-size: 14px; line-height: 1.8; }
  .signature { margin-top: 14px; font-size: 24px; }
  .scrawl--side, .scrawl--corner, .scrawl--foot { display: none; }
  .sketch-panel { min-height: 0; padding: 20px 18px 22px; }
  .panel-top { font-size: 18px; }
  .margin-note { font-size: 16px; }
  .sketch-art { width: min(86%, 360px); margin-block: 8px 14px; }
  .countdown-card { padding: 20px 20px 16px; }
  .countdown-heading h2 { font-size: 21px; }
  .countdown__unit strong { font-size: clamp(34px, 8vw, 48px); }
  .countdown__colon { font-size: 26px; }
  .waitlist { width: 100%; margin-top: 0; }
  .waitlist__note { font-size: 18px; }
  .notfound { padding: 18px 0 44px; }
  .notfound__card { padding: 32px 24px 28px; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 18px; }
  .launch-status { max-width: 132px; font-size: 9px; }
  .brand__scribble { width: 125px; }
  .brand__note { font-size: 8px; }
  h1 { font-size: clamp(44px, 12.4vw, 56px); }
  .opening { font-size: 18px; }
  .scribble-rule { width: 240px; }
  .signature { font-size: 21px; }
  .sketch-panel { padding: 14px 14px 18px; }
  .panel-top { font-size: 16px; }
  .margin-note { font-size: 14px; }
  .sketch-art { width: 100%; margin-block: 6px 10px; }
  .countdown-card { padding-inline: 12px; }
  .countdown-heading h2 { font-size: 19px; }
  .countdown__unit strong { font-size: 30px; }
  .launch-date { font-size: 8px; }
  .launch-date > span:last-child { margin-left: 0; }
  .waitlist { padding: 16px 16px 14px; }
  .tape { width: 62px; height: 17px; }
  .tape--a { left: -10px; top: -8px; transform: rotate(-5deg); }
  .tape--b { right: -10px; top: -7px; transform: rotate(4deg); }
  .waitlist__note { font-size: 16px; }
  .waitlist button { padding-inline: 10px; gap: 6px; font-size: 11px; }
  .waitlist button svg { width: 14px; }
  .waitlist input { padding-inline: 8px; }
  .notfound__card { padding: 26px 16px 24px; }
  .notfound h1 { font-size: clamp(30px, 10.5vw, 38px); }

  .notfound__note { font-size: 13px; }
  .notfound__back { padding: 11px 16px; font-size: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero { animation: arrive 650ms both; }
  .notfound__card { animation: arrive 650ms both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
