:root {
  --paper: #ede4ce;
  --label-paper: #f8f3e4;
  --ink: #2e3440;
  --graphite: #5a5a65;
  --teal: #9fc1c6;
  --blue: #60b3d3;
  --mauve: #b48da8;
  --pink: #d5a6c6;
  --tape: #f0d97d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Fredoka", "Nunito", "Quicksand", system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body { overflow-x: hidden; }

#grain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

section, footer { position: relative; z-index: 2; }

/* ===== Typography ===== */
h1, h2, h3 { margin: 0; color: var(--ink); font-family: inherit; }
p { margin: 0; color: var(--graphite); line-height: 1.55; }

.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-sub {
  text-align: center;
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 48px;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}

/* ===== Paper card primitive ===== */
.paper-card {
  position: relative;
  display: inline-block;
  transform: rotate(var(--rot, 0deg));
  filter: drop-shadow(0 4px 6px rgba(46, 52, 64, 0.18));
  transition: transform 260ms cubic-bezier(.2,.7,.3,1.2), filter 260ms ease;
}

.paper-card-edge {
  position: absolute;
  inset: 2px 0 0 1.5px;
  background: color-mix(in srgb, var(--bg) 78%, #000);
  border-radius: 14px;
  z-index: 0;
}

.paper-card-face {
  position: relative;
  background: var(--bg);
  border-radius: 14px;
  padding: 28px;
  z-index: 1;
}

/* hover lift — only on interactive cards */
a.paper-card:hover,
a.paper-btn:hover,
.tier-card:hover,
.category-card:hover {
  transform: rotate(var(--rot, 0deg)) translateY(-3px) scale(1.02);
  filter: drop-shadow(0 8px 12px rgba(46, 52, 64, 0.22));
}

/* ===== Washi tape primitive ===== */
.washi-tape {
  position: absolute;
  height: 22px;
  background-color: var(--tape-color);
  background-image:
    linear-gradient(to bottom, rgba(46,52,64,0.12), transparent 30%, transparent 70%, rgba(46,52,64,0.12)),
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 5px,
      rgba(255,255,255,0.18) 5px,
      rgba(255,255,255,0.18) 6px
    );
  opacity: 0.92;
  transform: rotate(var(--rot, -6deg));
  box-shadow: 0 1px 2px rgba(46, 52, 64, 0.15);
  border-radius: 1px;
}

.washi-tape.corner {
  width: 90px;
  top: -10px;
  right: 16px;
}

.washi-tape.category-tape {
  width: 110px;
  top: -10px;
  left: 50%;
  margin-left: -55px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
  z-index: 2;
}

.hero-inner {
  position: relative;
  max-width: 720px;
  width: 100%;
  text-align: center;
  z-index: 3;
}

.hero-title-card { margin-bottom: 28px; }

.wordmark {
  font-size: clamp(56px, 10vw, 112px);
  font-weight: 700;
  letter-spacing: 6px;
  line-height: 1;
  padding: 18px 12px 10px;
  color: var(--ink);
}

.hero-tagline {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-ctas {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.app-store-badge { text-decoration: none; }
.app-store-face {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
}
.app-store-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  color: var(--label-paper);
  line-height: 1.1;
}
.app-store-text small { font-size: 11px; opacity: 0.85; font-weight: 500; }
.app-store-text strong { font-size: 19px; font-weight: 700; }

.paper-btn {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  transform: rotate(var(--rot, 0deg));
  filter: drop-shadow(0 4px 6px rgba(46, 52, 64, 0.18));
  transition: transform 260ms cubic-bezier(.2,.7,.3,1.2), filter 260ms ease;
}
.paper-btn .paper-card-edge {
  position: absolute; inset: 2px 0 0 1.5px;
  background: color-mix(in srgb, var(--bg) 78%, #000);
  border-radius: 14px; z-index: 0;
}
.paper-btn .paper-card-face {
  position: relative; z-index: 1;
  background: var(--bg); border-radius: 14px;
  padding: 14px 24px;
}

/* Coming soon tape on hero title card */
.coming-soon-tape {
  position: absolute;
  top: -16px;
  right: -18px;
  padding: 7px 18px;
  background-color: var(--tape-color);
  background-image:
    linear-gradient(to bottom, rgba(46,52,64,0.12), transparent 30%, transparent 70%, rgba(46,52,64,0.12)),
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 5px,
      rgba(255,255,255,0.22) 5px,
      rgba(255,255,255,0.22) 6px
    );
  opacity: 0.95;
  transform: rotate(var(--rot, 6deg));
  box-shadow: 0 2px 4px rgba(46, 52, 64, 0.18);
  z-index: 4;
}
.coming-soon-tape span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Notify section ===== */
.notify-section { max-width: 640px; }
.notify-card { display: block; }
.notify-card .paper-card-face {
  padding: 40px 36px 36px;
  text-align: center;
}
.notify-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}
.notify-card > .paper-card-face > p {
  font-size: 16px;
  color: var(--graphite);
  margin-bottom: 24px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.notify-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.notify-form input[type="email"] {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid color-mix(in srgb, var(--graphite) 30%, transparent);
  border-radius: 10px;
  padding: 0 16px;
  height: 48px;
  min-width: 240px;
  outline: none;
  transition: border-color 180ms ease;
}
.notify-form input[type="email"]:focus {
  border-color: var(--blue);
}
.notify-form input::placeholder { color: var(--graphite); opacity: 0.6; }

.notify-form button.paper-btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
}
.notify-form button.paper-btn .paper-card-face {
  padding: 0 22px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.notify-form button.paper-btn:focus-visible {
  filter: drop-shadow(0 0 0 3px color-mix(in srgb, var(--blue) 55%, transparent))
          drop-shadow(0 4px 6px rgba(46, 52, 64, 0.18));
}

.notify-fineprint {
  font-size: 13px;
  color: var(--graphite);
  opacity: 0.75;
}

/* scattered letter tiles in hero */
.letter-scatter {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.letter-tile {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 28px;
  border-radius: 10px;
  transform: rotate(var(--rot, 0deg));
  box-shadow:
    1.5px 2px 0 color-mix(in srgb, var(--bg) 78%, #000),
    0 4px 6px rgba(46, 52, 64, 0.18);
}

.letter-tile.small {
  width: 42px; height: 42px;
  font-size: 20px; border-radius: 8px;
}

/* ===== Feature cards (3-col) ===== */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
  align-items: start;
  justify-items: center;
}

.feature-card { max-width: 320px; }
.feature-card .paper-card-face { padding: 32px 28px; }

.feature-icon { margin-bottom: 14px; }
.feature-card h3 {
  font-size: 22px; font-weight: 700; margin-bottom: 10px;
}
.feature-card p { font-size: 15px; color: var(--ink); opacity: 0.78; }

/* ===== Tiers ===== */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 28px;
  justify-items: center;
}

.tier-card { width: 100%; max-width: 240px; }
.tier-card .paper-card-face { padding: 26px 22px; text-align: center; }
.tier-icon { margin-bottom: 8px; }
.tier-label { font-size: 22px; font-weight: 700; color: var(--ink); }
.tier-age {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.65;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.tier-card p { font-size: 14px; color: var(--ink); opacity: 0.8; }

/* ===== Categories ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px 24px;
  justify-items: center;
  padding-top: 20px;
}

.category-card { width: 100%; max-width: 200px; }
.category-card .paper-card-face {
  padding: 28px 18px 22px;
  text-align: center;
}
.category-icon { margin: 6px auto 12px; }
.category-card h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 10px;
}

.pill {
  display: inline-block;
  background: var(--pill);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

/* ===== Screenshots / polaroids ===== */
.screenshot-row {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-top: 20px;
}

.polaroid {
  position: relative;
  transform: rotate(var(--rot, 0deg));
  filter: drop-shadow(0 10px 18px rgba(46, 52, 64, 0.22));
}

.polaroid-frame {
  background: var(--label-paper);
  padding: 12px 12px 48px;
  border-radius: 6px;
  border: 1px solid rgba(46,52,64,0.06);
}

.polaroid-tape {
  width: 90px;
  top: -10px;
  left: 50%;
  margin-left: -45px;
}

.screenshot-mock {
  width: 240px;
  height: 420px;
  background: var(--paper);
  border-radius: 4px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.mock-title {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  margin-top: 10px;
}
.mock-title.small { font-size: 18px; letter-spacing: 1px; }
.mock-subtitle {
  text-align: center; font-size: 13px;
  color: var(--graphite); margin-bottom: 20px;
}

.mock-btn {
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 1.5px 2px 0 color-mix(in srgb, var(--bg) 78%, #000);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.lvl {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg, var(--paper));
  color: var(--ink);
  font-weight: 700; font-size: 20px;
  border-radius: 10px;
  box-shadow: 1.5px 2px 0 color-mix(in srgb, var(--bg, var(--graphite)) 78%, #000);
}
.lvl.locked {
  background: #d8cfb7;
  color: var(--graphite);
  box-shadow: 1.5px 2px 0 #b8ad92;
}

.mock-clue {
  background: var(--label-paper);
  color: var(--ink);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 1px 1.5px 0 rgba(46,52,64,0.15);
}
.mock-grid {
  flex: 1;
  background:
    linear-gradient(to right, rgba(46,52,64,0.1) 1px, transparent 1px) 0 0 / calc(100%/8) 100%,
    linear-gradient(to bottom, rgba(46,52,64,0.1) 1px, transparent 1px) 0 0 / 100% calc(100%/8),
    var(--label-paper);
  border-radius: 6px;
  border: 1.5px solid rgba(46,52,64,0.15);
  min-height: 200px;
}
.mock-tray {
  display: flex; gap: 5px; justify-content: center;
  flex-wrap: wrap;
}
.mock-tray span {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--ink);
  font-weight: 700; font-size: 14px;
  border-radius: 6px;
  box-shadow: 1px 1.5px 0 color-mix(in srgb, var(--blue) 78%, #000);
}

/* ===== Features list (sticker notes) ===== */
.feature-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.feature-note {
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 17px;
  padding: 14px 28px;
  border-radius: 6px;
  transform: rotate(var(--rot, 0deg));
  box-shadow:
    2px 2px 0 color-mix(in srgb, var(--bg) 78%, #000),
    0 4px 6px rgba(46, 52, 64, 0.18);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 5px,
    rgba(255,255,255,0.14) 5px,
    rgba(255,255,255,0.14) 6px
  );
  position: relative;
}

/* ===== FAQ ===== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 32px;
  max-width: 960px;
  margin: 0 auto;
}
.faq-card .paper-card-face { padding: 26px 28px; }
.faq-card h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--ink);
}
.faq-card p { font-size: 15px; color: var(--graphite); }

/* ===== Footer ===== */
.footer {
  max-width: 520px;
  margin: 40px auto 80px;
  padding: 0 24px;
  text-align: center;
}
.footer-card { display: block; }
.footer-card .paper-card-face {
  padding: 28px 32px 44px;
  text-align: center;
}
.made-with { color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.heart { color: var(--pink); }
.contact { font-size: 14px; color: var(--graphite); }
.contact a { color: var(--graphite); text-decoration: none; font-weight: 600; }
.contact a:hover { color: var(--ink); }
.dot { margin: 0 8px; opacity: 0.5; }

.footer-tape {
  width: 140px;
  bottom: -10px;
  left: 50%;
  margin-left: -70px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-tape .stamp {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .three-col { grid-template-columns: 1fr; gap: 60px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tier-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .letter-tile { width: 44px; height: 44px; font-size: 22px; }
  .letter-tile.small { width: 32px; height: 32px; font-size: 16px; }
  .section { padding: 60px 20px; }
  .wordmark { letter-spacing: 3px; }
}
