:root {
  --cream: #f5ecd6;
  --paper: #f8f1df;
  --ink: #2b2a2e;
  --ink-soft: #5d574d;
  --mint: #9fe3d2;
  --mint-ink: #134a43;
  --wood-top: #c99662;
  --wood-edge: #e0b07a;
  --wood-front: #9e6a3e;
  --desk-h: clamp(96px, 15vh, 150px);
  --ground: calc(var(--desk-h) - 22px);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  position: relative;
  min-height: 100svh;
  background:
    radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(150, 105, 55, .16)),
    var(--cream);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .22 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 50;
}

.hero {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px calc(var(--desk-h) + 170px);
  text-align: center;
}

.app-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 14px 30px -12px rgba(80, 52, 25, .45), 0 2px 6px rgba(80, 52, 25, .15);
}

h1 {
  margin: 14px 0 0;
  font-size: clamp(64px, 11vw, 104px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.02em;
}

.tagline {
  margin: 10px 0 0;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 800;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.pills li {
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 800;
  font-size: 15px;
}

.how {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  max-width: 520px;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
}
.how-text { flex-basis: 100%; }
.key {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 10px;
  background: #c6f2e7;
  color: var(--mint-ink);
  font: 600 13px "JetBrains Mono", ui-monospace, monospace;
  box-shadow: 0 0 0 1.5px #7fcfbd inset, 0 3px 0 #7fcfbd, 0 8px 18px -6px rgba(60, 170, 150, .55);
}
.key-opt { width: 50px; }
.key-opt span { font-size: 18px; line-height: 1; }
.key-opt small { font-size: 9px; margin-top: 2px; }
.key-space { width: 128px; }
.plus { font-weight: 900; color: var(--ink-soft); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px 16px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fbf4e2;
  font-weight: 900;
  font-size: 19px;
  text-decoration: none;
  box-shadow: 0 4px 0 #000, 0 16px 30px -12px rgba(43, 42, 46, .6);
  transition: transform .15s ease, box-shadow .15s ease;
}
.download svg { width: 22px; height: 22px; color: var(--mint); }
.download:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #000, 0 20px 34px -12px rgba(43, 42, 46, .6); }
.download:active { transform: translateY(3px); box-shadow: 0 1px 0 #000, 0 8px 18px -10px rgba(43, 42, 46, .6); }
.download:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 4px; }

.watch-video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px 14px 18px;
  border: 2px solid var(--ink-soft);
  border-radius: 999px;
  background: rgba(255, 250, 240, .55);
  color: var(--ink);
  font: 800 18px "Nunito", ui-rounded, system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.watch-video svg { width: 22px; height: 22px; }
.watch-video:hover { background: var(--paper); transform: translateY(-2px); }
.watch-video:active { transform: translateY(1px); }
.watch-video:focus-visible, .video-close:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 4px; }

.video-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .4);
}
.video-dialog::backdrop { background: rgba(30, 25, 22, .78); }
body:has(.video-dialog[open]) { overflow: hidden; }
.video-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.video-heading h2 { margin: 0; font-size: 22px; font-weight: 900; }
.video-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--mint); color: var(--mint-ink); font-size: 20px; cursor: pointer; }
.video-dialog video { display: block; width: 100%; max-height: calc(100dvh - 120px); aspect-ratio: 16 / 9; border-radius: 10px; background: #161616; }

.site-nav { position: absolute; top: 24px; right: 32px; z-index: 6; }
.features-link { padding: 10px 0 10px 14px; border: 0; background: none; color: var(--ink); font: 800 16px "Nunito", ui-rounded, system-ui, sans-serif; cursor: pointer; }
.features-link span { display: inline-block; margin-left: 4px; color: var(--ink-soft); transition: transform .2s ease; }
.features-link:hover span { transform: translate(2px, -2px); }
.features-link:focus-visible, .drawer-close:focus-visible, .note:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 4px; border-radius: 4px; }
.features-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(480px, 100%);
  height: 100dvh;
  max-width: 100%;
  max-height: none;
  margin: 0;
  padding: 32px 32px max(32px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-left: 1px solid rgba(93, 87, 77, .16);
  background: var(--paper);
  color: var(--ink);
  box-shadow: -16px 0 70px rgba(50, 35, 20, .18);
  cursor: auto;
}
.features-drawer::backdrop { background: rgba(43, 37, 30, .32); }
body:has(.features-drawer[open]) { overflow: hidden; }
.drawer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 36px; }
.drawer-eyebrow { margin: 0 0 8px; color: var(--ink-soft); font-size: 13px; }
.drawer-heading h2 { margin: 0; font-size: 29px; line-height: 1.15; font-weight: 900; letter-spacing: -.03em; }
.drawer-close { flex: 0 0 36px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--mint); color: var(--mint-ink); font-size: 18px; cursor: pointer; }
.features-drawer h3 { margin: 0 0 16px; font-size: 21px; font-weight: 900; }
.feature-list, .model-list { margin: 0; padding: 0; list-style: none; }
.feature-list { display: grid; gap: 12px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(93, 87, 77, .09);
  border-radius: 18px;
  background: #fffaf0;
  box-shadow: 0 2px 3px rgba(80, 52, 25, .025), 0 8px 20px -16px rgba(80, 52, 25, .2);
}
.feature-list li > div { min-width: 0; }
.feature-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; background: #d9eee3; color: var(--mint-ink); }
.feature-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.features-drawer strong { font-size: 16px; font-weight: 900; }
.feature-list p, .model-list p, .section-intro, .drawer-footnote { margin: 5px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.features-drawer kbd { font: 500 11px "JetBrains Mono", ui-monospace, monospace; white-space: nowrap; }
.models-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid rgba(93, 87, 77, .2); }
.models-section h3 { margin-bottom: 8px; }
.section-intro { margin-bottom: 20px; }
.model-list li { padding: 13px 0; border-bottom: 1px solid rgba(93, 87, 77, .12); }
.model-list li:first-child { padding-top: 0; }
.model-list li > div { display: flex; align-items: center; gap: 10px; }
.model-list p { margin-top: 2px; font-size: 13px; }
.included-tag { padding: 3px 8px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font-size: 11px; font-weight: 900; }
.drawer-footnote { margin-top: 20px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .features-link span { transition: none; } }

.fine {
  margin: 24px 0 0;
  font: 500 12.5px "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink-soft);
}

.note {
  position: relative;
  display: block;
  text-decoration: none;
  max-width: 400px;
  margin-top: 38px;
  padding: 18px 20px 16px;
  background: #fffaf0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  transform: rotate(-1.5deg);
  box-shadow: 0 10px 24px -14px rgba(80, 52, 25, .5), 0 1px 2px rgba(80, 52, 25, .15);
}
.note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}
.tape {
  position: absolute;
  top: -11px;
  width: 64px;
  height: 22px;
  background: rgba(159, 227, 210, .75);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.tape-l { left: -14px; transform: rotate(-24deg); }
.tape-r { right: -14px; transform: rotate(20deg); }

/* Desk */
.desk {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--desk-h);
  z-index: 1;
}
.desk-top {
  position: absolute;
  inset: 0 0 auto;
  height: 36px;
  background: linear-gradient(var(--wood-edge), var(--wood-top) 30%, #bd8a57);
  box-shadow: 0 -1px 0 rgba(90, 55, 25, .35);
}
.desk-front {
  position: absolute;
  inset: 36px 0 0;
  background:
    repeating-linear-gradient(176deg, transparent 0 22px, rgba(70, 40, 18, .07) 22px 24px),
    linear-gradient(#7f522c 0 4px, var(--wood-front) 4px, #8a5a33);
  display: flex;
  align-items: center;
  justify-content: center;
}
.psst {
  font: 500 12px "JetBrains Mono", ui-monospace, monospace;
  color: rgba(255, 238, 210, .55);
  letter-spacing: .02em;
}
.prop {
  position: absolute;
  bottom: calc(var(--desk-h) - 10px);
}
.mug { left: 7%; width: 62px; }
.books { left: calc(7% + 74px); width: 104px; }
.plant { right: 8%; width: 74px; }
.steam {
  fill: none;
  stroke: rgba(120, 90, 60, .35);
  stroke-width: 3;
  stroke-linecap: round;
  animation: steam 3.2s ease-in-out infinite;
}
.steam.s2 { animation-delay: 1.4s; }
@keyframes steam {
  0% { opacity: 0; transform: translateY(6px); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* Pup */
.pup-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--desk-h) + 340px);
  z-index: 4;
  pointer-events: none;
}
#pup {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bubble {
  position: fixed;
  z-index: 5;
  padding: 6px 14px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 900;
  font-size: 20px;
  pointer-events: none;
  box-shadow: 0 6px 14px -8px rgba(19, 74, 67, .6);
  animation: bubble 1.1s ease-out forwards;
}
@keyframes bubble {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.6) rotate(-6deg); }
  15% { opacity: 1; transform: translate(-50%, -4px) scale(1.06) rotate(-4deg); }
  70% { opacity: 1; transform: translate(-50%, -12px) scale(1) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -20px) scale(1) rotate(-4deg); }
}
.zzz {
  position: fixed;
  z-index: 5;
  font-weight: 900;
  color: var(--ink-soft);
  pointer-events: none;
  animation: zzz 2.4s ease-out forwards;
}
@keyframes zzz {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  25% { opacity: .8; }
  100% { opacity: 0; transform: translate(18px, -46px) scale(1.15); }
}

@media (max-width: 640px) {
  .hero { padding-top: 76px; padding-bottom: calc(var(--desk-h) + 130px); }
  .site-nav { top: 14px; right: 20px; }
  .features-drawer { padding: 24px 24px max(24px, env(safe-area-inset-bottom)); }
  .feature-list li { padding: 16px; gap: 12px; }
  .books { display: none; }
}

/* Share-card render: open with ?og at 1200×630 */
.og .how, .og .fine, .og .note, .og .psst, .og .watch-video, .og .site-nav { display: none; }
.og .hero { padding: 28px 16px 0; justify-content: flex-start; }
.og .app-icon { width: 96px; height: 96px; border-radius: 22px; }
.og .actions { margin-top: 22px; }

/* Straight-on model check: open with ?front=sit */
.front .hero, .front .desk { visibility: hidden; }
.front .pup-layer { height: 100vh; }
