/* lumie beta signup. one family (lexend), lowercase. a warm wood room, green only as the accent.
   shape rule: everything is square, like the art. the card has pixel-stepped corners and a hard shadow.
   no smooth gradients and no blurred shadows anywhere: light is stepped in the art itself.
   z scale: scene 0, card 1, bar 2. */

@font-face { font-family: "Lexend"; font-weight: 300; font-style: normal; font-display: swap; src: url("assets/fonts/lexend-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/lexend-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/lexend-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  /* the room and the paper note are objects in the scene, so they do not change with the colour scheme */
  --room: #2F2017;
  --ceiling: #3E2A1E;
  --cream: #F6ECDB;
  --paper: #F6ECDB;
  --paper-text: #1A2018;
  --paper-muted: #56593F;
  --paper-line: #D8C9AC;
  --field: #FFFDF8;
  --field-line: #7D735C;
  --accent: #1E5C43;
  --accent-deep: #123B2B;
  --accent-text: #F6ECDB;
  --hl: #2F6B50;
  --error: #9B3B2A;
  --px: 6px;                          /* one step of the card's pixel corner */
  /* the rest of the page follows the visitor's scheme */
  --surface: #F3EBDD;
  --text: #1A2018;
  --muted: #5C5A48;
  --line: #DCCFB6;
  --label: #2F6B50;
}

@media (prefers-color-scheme: dark) {
  :root { --surface: #1F1712; --text: #F6ECDB; --muted: #BDB2A0; --line: #3A2C22; --label: #8FCFA8; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--text); font: 300 1rem/1.55 "Lexend", system-ui, sans-serif; text-transform: lowercase; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--label); outline-offset: 2px; }
.wrap { width: min(100% - 48px, 1080px); margin-inline: auto; }

/* bar: the wordmark sits on the dark ceiling */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 20px clamp(24px, 5vw, 72px); }
.bar { display: flex; justify-content: space-between; align-items: baseline; }
.bar-nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.bar-link { color: var(--cream); font-weight: 500; font-size: 0.9375rem; text-decoration: none; border-bottom: 2px solid transparent; }
.bar-link:hover { border-bottom-color: var(--cream); }
.bar :focus-visible { outline-color: var(--cream); }
.wordmark { color: var(--cream); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; text-decoration: none; }

/* stage: the scene is the background, the paper note is the only surface with text on it */
.stage { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; align-items: center; padding: 76px clamp(24px, 5vw, 72px) 40px; background: var(--room); overflow: hidden; }
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene-inner { position: absolute; right: 0; bottom: 0; width: max(100vw, calc(100vh * 16 / 9)); width: max(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9; }
.scene-inner > * { position: absolute; }
.px { inset: 0; width: 100%; height: 100%; image-rendering: crisp-edges; image-rendering: pixelated; user-select: none; -webkit-user-drag: none; }
.fire-b, .pose-celebrate { opacity: 0; }
.stage.is-done .pose-desk { opacity: 0; }
.stage.is-done .pose-celebrate { opacity: 1; }

/* steam: three art pixels rising off the mug */
.steam { left: 80.7%; top: 66.6%; width: calc(100% / 192); aspect-ratio: 1; background: var(--cream); opacity: 0; }
.steam-2 { left: 81.8%; }
.steam-3 { left: 81.25%; }

/* the paper note: stepped pixel corners, hard offset shadow, no blur */
.card-wrap { position: relative; z-index: 1; width: min(100%, clamp(420px, 33vw, 480px)); filter: drop-shadow(8px 8px 0 rgba(20, 12, 7, 0.62)); }
.card { color-scheme: light; color: var(--paper-text); background: var(--paper); padding: 32px 36px 28px;
  clip-path: polygon(
    calc(var(--px) * 2) 0, calc(100% - var(--px) * 2) 0, calc(100% - var(--px) * 2) var(--px), calc(100% - var(--px)) var(--px), calc(100% - var(--px)) calc(var(--px) * 2), 100% calc(var(--px) * 2),
    100% calc(100% - var(--px) * 2), calc(100% - var(--px)) calc(100% - var(--px) * 2), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px) * 2) calc(100% - var(--px)), calc(100% - var(--px) * 2) 100%,
    calc(var(--px) * 2) 100%, calc(var(--px) * 2) calc(100% - var(--px)), var(--px) calc(100% - var(--px)), var(--px) calc(100% - var(--px) * 2), 0 calc(100% - var(--px) * 2),
    0 calc(var(--px) * 2), var(--px) calc(var(--px) * 2), var(--px) var(--px), calc(var(--px) * 2) var(--px)); }
.card :focus-visible { outline-color: var(--hl); }
.hl { color: var(--hl); }
.eyebrow { font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--paper-muted); }
h1, .panel-done h2 { margin-top: 10px; font-weight: 500; font-size: clamp(1.75rem, 1.6vw + 0.9rem, 2.15rem); line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
.sub { margin-top: 12px; color: var(--paper-muted); font-size: 1.0625rem; line-height: 1.5; text-wrap: pretty; }

.form { margin-top: 20px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
label { font-weight: 500; font-size: 0.9375rem; }
input, textarea { width: 100%; padding: 10px 12px; font: inherit; font-weight: 300; color: var(--paper-text); background: var(--field); border: 2px solid var(--field-line); border-radius: 0; text-transform: none; }
textarea { resize: vertical; min-height: 60px; }
input:hover, textarea:hover { border-color: var(--paper-text); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; border-color: var(--hl); }
input[aria-invalid="true"] { border-color: var(--error); }
.help, .fine { color: var(--paper-muted); font-size: 0.8125rem; line-height: 1.45; }
.err, .status.is-error { color: var(--error); font-size: 0.8125rem; font-weight: 500; }
.status { font-size: 0.8125rem; color: var(--paper-muted); }
.status:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.noscript { margin-top: 16px; padding: 10px 12px; border: 2px solid var(--error); color: var(--error); font-weight: 500; font-size: 0.875rem; }

/* buttons press down into their own hard shadow */
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; margin-bottom: 4px; padding: 10px 20px; font: inherit; font-weight: 500; text-transform: lowercase; color: var(--accent-text); background: var(--accent); border: 2px solid var(--accent-deep); border-radius: 0; box-shadow: 0 4px 0 var(--accent-deep); cursor: pointer; }
.btn:hover { background: #24694D; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-deep); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-quiet { color: var(--paper-text); background: var(--field); border-color: var(--field-line); box-shadow: 0 4px 0 var(--field-line); white-space: nowrap; }
.btn-quiet:hover { background: #FFFFFF; }
.btn-quiet:active { box-shadow: 0 1px 0 var(--field-line); }

.share { margin-top: 24px; padding-top: 20px; border-top: 2px solid var(--paper-line); display: grid; gap: 10px; }
.share-lead { font-weight: 500; }
.share-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.share-link { font-size: 0.875rem; color: var(--paper-muted); }

/* how it works: pigeo's pattern. a sprite, a short heading and one line per step, each marked live or not yet */
.how { padding: clamp(64px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); scroll-margin-top: 16px; }
.how h2, .note h2 { font-weight: 500; font-size: clamp(1.6rem, 2vw + 0.8rem, 2.1rem); letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.lede { margin-top: 12px; max-width: 56ch; color: var(--muted); font-size: 1.0625rem; }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 44px clamp(32px, 6vw, 88px); }
.steps li { display: grid; grid-template-columns: 104px 1fr; gap: 20px; align-items: center; }
.sprite { width: 104px; height: 96px; object-fit: contain; object-position: center bottom; image-rendering: crisp-edges; image-rendering: pixelated; }
.steps h3 { font-weight: 500; font-size: 1.125rem; letter-spacing: -0.01em; }
.steps p { margin-top: 4px; color: var(--muted); max-width: 40ch; }
.steps .tag { display: inline-block; margin-top: 10px; padding: 1px 8px; border: 2px solid currentColor; font-weight: 500; font-size: 0.75rem; letter-spacing: 0.04em; }
.tag-live { color: var(--label); }
.tag-soon { color: var(--muted); }

/* the research: one row per study. the number, what was found, what lumie does with it, and the source */
.research { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 112px); scroll-margin-top: 16px; }
.research h2 { font-weight: 500; font-size: clamp(1.6rem, 2vw + 0.8rem, 2.1rem); letter-spacing: -0.02em; line-height: 1.15; }
.studies { list-style: none; margin: 40px 0 0; padding: 0; }
.studies li { display: grid; grid-template-columns: minmax(180px, 2fr) 5fr; gap: 12px clamp(24px, 5vw, 72px); padding: 28px 0; }
.studies li + li { border-top: 2px solid var(--line); }
.stat { display: grid; gap: 4px; align-content: start; }
.num { font-weight: 500; font-size: clamp(1.75rem, 2vw + 1rem, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; color: var(--label); }
.cap { color: var(--muted); font-size: 0.875rem; max-width: 22ch; }
.studies h3 { font-weight: 500; font-size: 1.125rem; letter-spacing: -0.01em; }
.studies p { max-width: 62ch; }
.studies h3 + p { margin-top: 6px; color: var(--muted); }
.applied { margin-top: 12px; }
.applied span { margin-right: 8px; padding: 1px 8px; border: 2px solid currentColor; color: var(--label); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.04em; }
.source { margin-top: 12px; color: var(--muted); font-size: 0.8125rem; }
.honest { margin-top: 28px; padding-top: 24px; border-top: 2px solid var(--line); max-width: 78ch; color: var(--muted); font-size: 0.875rem; }

/* the closing note: same paper, same stepped corners as the signup card */
.hook { padding: 0 24px clamp(64px, 9vw, 112px); }
.note-wrap { width: min(100%, 720px); margin: 0 auto; filter: drop-shadow(8px 8px 0 rgba(20, 12, 7, 0.35)); }
.note { color-scheme: light; color: var(--paper-text); background: var(--paper); padding: clamp(28px, 5vw, 48px); text-align: center;
  clip-path: polygon(
    calc(var(--px) * 2) 0, calc(100% - var(--px) * 2) 0, calc(100% - var(--px) * 2) var(--px), calc(100% - var(--px)) var(--px), calc(100% - var(--px)) calc(var(--px) * 2), 100% calc(var(--px) * 2),
    100% calc(100% - var(--px) * 2), calc(100% - var(--px)) calc(100% - var(--px) * 2), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px) * 2) calc(100% - var(--px)), calc(100% - var(--px) * 2) 100%,
    calc(var(--px) * 2) 100%, calc(var(--px) * 2) calc(100% - var(--px)), var(--px) calc(100% - var(--px)), var(--px) calc(100% - var(--px) * 2), 0 calc(100% - var(--px) * 2),
    0 calc(var(--px) * 2), var(--px) calc(var(--px) * 2), var(--px) var(--px), calc(var(--px) * 2) var(--px)); }
.note p { margin-top: 12px; color: var(--paper-muted); font-size: 1.0625rem; }
.note .btn { margin-top: 24px; text-decoration: none; }
.note :focus-visible { outline-color: var(--hl); }

.foot { padding: 28px 0 36px; border-top: 2px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* privacy page */
.legal { width: min(100% - 48px, 640px); margin: 0 auto; padding: 96px 0 72px; }
.legal h1 { font-size: 2rem; }
.legal h2 { margin-top: 36px; font-weight: 500; font-size: 1.125rem; }
.legal p, .legal ul { margin-top: 10px; color: var(--muted); }
.legal ul { padding-left: 1.2em; }
.legal li { margin-top: 6px; }

/* short laptop screens: tighten the note so the button stays above the fold */
@media (min-width: 1100px) and (max-height: 800px) {
  .stage { padding-top: 64px; padding-bottom: 24px; }
  .card { padding: 24px 32px 22px; }
  h1 { font-size: 1.75rem; margin-top: 6px; }
  .sub { margin-top: 8px; font-size: 1rem; }
  .form { margin-top: 16px; gap: 10px; }
  .field { gap: 4px; }
  input, textarea { padding: 8px 12px; }
  textarea { min-height: 52px; }
  .btn { min-height: 42px; }
}

/* stacked layout: scene on top, the note overlapping its bottom edge */
@media (max-width: 1099px) {
  .bar { position: static; background: var(--ceiling); padding: 14px 24px; }
  .stage { display: block; min-height: 0; padding: 0 0 40px; background: var(--surface); overflow: visible; }
  .scene { position: relative; inset: auto; height: min(52vh, 78vw); height: min(52dvh, 78vw); background: var(--room); }
  .scene-inner { width: auto; height: 100%; right: 0; }
  .card-wrap { width: min(100% - 32px, 520px); margin: -36px auto 0; filter: drop-shadow(6px 6px 0 rgba(20, 12, 7, 0.45)); }
  .card { padding: 28px 24px 24px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .studies li { grid-template-columns: 1fr; }
  .cap { max-width: none; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  /* wide enough to show the whole room: the scene box takes the art's own 16:9 shape, so nothing is cropped */
  .scene { height: auto; aspect-ratio: 16 / 9; }
  .scene-inner { width: 100%; height: 100%; }
}

/* motion, only when the visitor is fine with it. everything steps, the way pixel art moves */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .card-wrap { animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .fire-a { animation: frame-a 0.62s steps(1) infinite; }
  .fire-b { animation: frame-b 0.62s steps(1) infinite; }
  .glow { animation: cast 2.3s steps(1) infinite; }
  .stars-a { animation: twinkle 3.4s steps(1) infinite; }
  .stars-b { animation: twinkle 4.6s steps(1) -2s infinite; }
  .truck { animation: drive 50s steps(64) 6s infinite; }     /* the easter egg: one art pixel per step, then a long wait */
  .steam { animation: steam 4.2s steps(9) infinite; }
  .steam-2 { animation-delay: -1.4s; }
  .steam-3 { animation-delay: -2.8s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes frame-a { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes frame-b { 0% { opacity: 0; } 50% { opacity: 1; } }
@keyframes cast { 0% { opacity: 1; } 22% { opacity: 0.78; } 41% { opacity: 1; } 63% { opacity: 0.88; } 80% { opacity: 1; } }
@keyframes twinkle { 0% { opacity: 1; } 60% { opacity: 0.2; } 80% { opacity: 1; } }
/* parked behind the wall left of the window, 64 art pixels to clear it on the right (64 / 192 of the scene) */
@keyframes drive { 0% { transform: translateX(0); } 22% { transform: translateX(33.3333%); } 100% { transform: translateX(33.3333%); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(0); } 12% { opacity: 0.75; } 100% { opacity: 0; transform: translateY(-900%); } }
