/* ==========================================================================
   Dozy — design primitives
   Palette sampled directly from the shipped app icon (assets/1024x1024.png),
   so the site and the product are the same object.
   ========================================================================== */

/* Pixelify Sans (SIL OFL 1.1) — see /fonts/OFL-NOTICE.txt.
   Deliberately NOT the app's light_pixel-7.ttf: that face is licensed
   "freeware for personal use only" and cannot ship on a commercial site. */
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/fonts/pixelifysans-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('/fonts/pixelifysans-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Brand — exact values from the app icon */
  --cream: #f5d7b1;
  --cream-lift: #fbe6cb;
  --cream-deep: #e8c396;
  --orange: #ff9d27;
  --orange-deep: #c2761e;
  --ink: #010101;
  --paper: #fefffe;
  --grey: #ababaa;
  --grey-light: #dedfde;

  /* Semantic */
  --bg: var(--cream);
  --text: #241c12;
  --text-soft: #6b5a45;
  --rule: rgba(1, 1, 1, 0.12);

  /* Type */
  --font-display: 'Pixelify Sans', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Rhythm */
  --measure: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 10vw, 7.5rem);

  --radius: 14px;
  --shadow-hard: 0 4px 0 0 var(--ink);
}

/* Deliberately single-theme. The palette is sampled from the app icon and the
   sprites are a fixed four-colour warm world; a dark variant would need every
   token re-derived (cards, the desktop mock, the ghost button) and would import
   hues that exist nowhere in the artwork. Pinning color-scheme also stops the
   OS restyling the email input out from under the design. */
:root { color-scheme: light; }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
canvas {
  max-width: 100%;
  display: block;
}

/* Pixel art must never be smoothed by the browser. */
.pixel,
canvas.pixel,
img.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0;
}

h1 { font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); }

p { margin: 0; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: var(--section-y); }

/* --- Buttons: chunky, hard-shadowed, physical ---------------------------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.85em 1.6em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--ink);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 0 var(--ink); }

.btn--primary { --btn-bg: var(--orange); --btn-fg: var(--ink); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); }

:focus-visible {
  outline: 3px solid var(--orange-deep);
  outline-offset: 3px;
}

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