/* ============================================================
   Peekture, peekture.app
   One stylesheet, no frameworks, no webfonts (system rounded stack).
   Palette mirrors the app: sky→cream ground, ink text, CTA orange
   #E07800, navy, teal, and the results purple. Sticker callouts,
   dot-grid pads, outlined mega-numerals, and springy scroll
   reveals give it the playful indie energy.
   Legacy tokens/classes (--muted, --radius, --shadow, .wrap, .page,
   .cta, details) are preserved for p.html + privacy/terms/support.
   ============================================================ */

:root {
  /* Core tokens (app palette) */
  --ink:    #24223c;
  --ink-90: rgba(23, 20, 42, 0.9);
  --muted:  #585372;          /* matches the app's accessible mutedText */
  --orange: #e07800;          /* CTA orange, white text passes 3:1 */
  --amber:  #f2a43a;          /* decorative brand amber */
  --aqua:   #17b3a0;
  --teal:   #137e71;
  --navy:   #1d3557;
  --purple-1: #504684;        /* results/weekend gradient */
  --purple-2: #39316a;
  --sky:    #c1d6ec;
  --cream:  #f0ebda;
  --lavender: #e8d9f0;
  --mint:   #cde8da;
  --peach:  #f6d8c4;
  --card:   #ffffff;

  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 2px 10px rgba(36, 34, 60, 0.12);
  --shadow-lift: 0 12px 34px rgba(36, 34, 60, 0.18);

  /* The springy bounce that makes everything feel like a toy. */
  --boing: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Dot-grid pad texture, pure CSS (no asset, CSP-clean). */
  --dots: radial-gradient(rgba(36, 34, 60, 0.16) 1.2px, transparent 1.3px);

  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
          "Segoe UI", system-ui, sans-serif;
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(to bottom, var(--sky), var(--cream)) fixed;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;              /* stickers poke past edges on purpose */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 0; z-index: 100; font-weight: 700;
}
.skip:focus { left: 0; }

/* Legacy top bar used by the text pages (privacy/terms/support) and /p. */
.wrap > nav { display: flex; align-items: center; gap: 18px; padding: 18px 0; }
.wrap > nav a:not(.brand) {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
}
.wrap > nav a:not(.brand):hover { color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240, 235, 218, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(36, 34, 60, 0.08);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 22px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 800; color: var(--ink);
  text-decoration: none; margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav a:not(.brand):not(.nav-cta) {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px;
}
.nav a:not(.brand):not(.nav-cta):hover { color: var(--ink); }
.nav-cta {
  background: var(--orange); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 15px; padding: 9px 18px;
  border-radius: 999px; box-shadow: var(--shadow);
  transition: transform 0.25s var(--boing);
}
.nav-cta:hover { transform: scale(1.08); }
@media (max-width: 640px) { .nav-link-hide { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 44px 0 30px; text-align: center; }

/* The interactive peek demo: the rebus art under a grid of game tiles.
   site.js fills .peek-grid with tiles; without JS the art simply shows. */
.peek-demo { position: relative; max-width: 440px; margin: 0 auto; }
.peek-art { width: 100%; height: auto; }
.peek-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template: repeat(2, 1fr) / repeat(6, 1fr);
  gap: 3px;
  perspective: 700px;                  /* depth for the flip-away */
}
.peek-tile {
  background: linear-gradient(180deg, #4a4078, #3b3061);   /* the app's tile cover */
  border: 1px solid rgba(23, 20, 42, 0.55);
  border-radius: 8px;
  cursor: pointer;
  transform-origin: 4% 50%;            /* hinge on the side, like a gate */
  transition: transform 0.5s ease, opacity 0.32s ease 0.16s;
}
/* Alternate hinge sides so neighbors swing open like little double gates. */
.peek-tile:nth-child(even) { transform-origin: 96% 50%; }
.peek-tile.lifted {
  transform: rotateY(-100deg);         /* swings open away from you */
  opacity: 0;
  pointer-events: none;
}
.peek-tile.lifted:nth-child(even) { transform: rotateY(100deg); }
.peek-hint {
  font-size: 13px; font-weight: 800; color: var(--muted);
  text-transform: lowercase; letter-spacing: 0.04em;
  margin: 8px 0 2px;
}
/* No JS = no tiles = no hint needed either */
html:not(.js) .peek-hint { visibility: hidden; }

/* The wordmark IS the hero. */
.mega {
  font-size: clamp(64px, 14vw, 190px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-wrap: balance;
}

/* Wordmark intro: each letter starts under a purple game tile that flips
   away, staggered, like the board's opening flip. JS + motion-okay only. */
.mega.tiles { perspective: 700px; }
.mega.tiles .t { position: relative; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  html.js .mega.tiles .t::after {
    content: "";
    position: absolute; inset: 6% -1%;
    background: linear-gradient(180deg, #4a4078, #3b3061);
    border: 2px solid rgba(23, 20, 42, 0.55);
    border-radius: 12px;
    transform-origin: 8% 50%;          /* side hinge: swings open like a gate */
    animation: tileAway 0.45s ease forwards;
    animation-delay: calc(0.7s + var(--i) * 0.11s);
  }
  @keyframes tileAway {
    to { transform: rotateY(-100deg); opacity: 0; }
  }
}
.hero .tag {
  font-size: clamp(19px, 3vw, 27px); font-weight: 700; color: var(--muted);
  margin-top: 8px;
}

/* Phone + sticker cloud */
.hero-stage {
  position: relative;
  max-width: 560px;
  margin: 36px auto 0;
}

/* ---------- Sticker callouts (blobby, take turns popping in) ---------- */
.callout {
  position: absolute; z-index: 3;
  background: #fff; color: var(--ink);
  font-weight: 900; font-size: 15px; line-height: 1.15;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.9em 1.1em; display: inline-block;
  box-shadow: var(--shadow);
  transform-origin: center;
  transition: transform 0.3s var(--boing);
}
.callout:hover { transform: scale(1.15) !important; z-index: 4; }
.callout.teal { background: var(--teal); color: #fff; }
.callout.navy { background: var(--navy); color: #fff; }

/* Six hand-cut blob shapes + placements around the phone. */
.stick-1 { left: -6%;  top: 6%;   rotate: -9deg;
           border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%; }
.stick-2 { right: -8%; top: 1%;   rotate: 7deg;
           border-radius: 60% 60% 40% 40% / 30% 70% 30% 70%; }
.stick-3 { right: -14%; top: 38%; rotate: 12deg;
           border-radius: 60% 55% 40% 45% / 60% 40% 70% 30%; }
.stick-4 { left: -13%; top: 46%;  rotate: -6deg;
           border-radius: 45% 60% 55% 40% / 30% 60% 40% 70%; }
.stick-5 { left: -5%;  bottom: 8%; rotate: -12deg;
           border-radius: 60% 55% 45% 40% / 60% 70% 30% 40%; }
.stick-6 { right: -7%; bottom: 14%; rotate: 8deg;
           border-radius: 55% 45% 60% 40% / 40% 65% 35% 60%; }

/* Weekend section's lone sticker */
.weekend-head { position: relative; }
.stick-weekend {
  position: absolute; right: 4%; top: -22px; rotate: 8deg;
  border-radius: 60% 55% 40% 45% / 60% 40% 70% 30%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-stage .callout {
    visibility: hidden;
    animation: stickerPop 8s ease-in-out infinite;
  }
  .stick-1 { animation-delay: 0.4s; }
  .stick-2 { animation-delay: 1.7s; }
  .stick-3 { animation-delay: 3.0s; }
  .stick-4 { animation-delay: 4.3s; }
  .stick-5 { animation-delay: 5.6s; }
  .stick-6 { animation-delay: 6.9s; }
  @keyframes stickerPop {
    0%   { visibility: visible; transform: scale(0); }
    5%   { transform: scale(1.12); }
    8%   { transform: scale(1); }
    38%  { transform: scale(1); }
    43%  { transform: scale(1.08); }
    50%  { transform: scale(0); }
    100% { transform: scale(0); visibility: hidden; }
  }
}

/* ---------- Dot-grid pads ---------- */
.dotpad {
  background-image: var(--dots);
  background-size: 13px 13px;
  border-radius: 48px;
  padding: 20px;
  display: inline-block;
}
.dotpad.dark {
  --dots: radial-gradient(rgba(255, 255, 255, 0.22) 1.2px, transparent 1.3px);
}
.dotpad.wide { display: block; }

/* ---------- Device frames / screenshot placeholders ---------- */
/* Swap each .shot-placeholder for a real <img> when the shot is ready:
   <img class="shot" src="/assets/store/shot-1-board.png"
        width="1320" height="2868" alt="..." loading="lazy">          */
/* Just the layout + shadow; the stroke lives on the image itself (see .shot)
   so it traces the screenshot's edge without a bezel or overlapping pixels. */
.device {
  border-radius: 34px; box-shadow: var(--shadow-lift);
  aspect-ratio: 1320 / 2868; width: min(288px, 76vw); margin: 0 auto;
}
.device.small { width: min(186px, 52vw); border-radius: 26px; }
.device.landscape {
  aspect-ratio: 2752 / 2064; width: 100%; max-width: 640px; border-radius: 22px;
}
.shot-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 18px;
  background:
    repeating-linear-gradient(45deg, rgba(36,34,60,0.045) 0 12px, transparent 12px 24px),
    linear-gradient(to bottom, var(--sky), var(--cream));
  color: var(--muted); font-weight: 700; font-size: 13.5px;
}
.shot-placeholder .which { color: var(--ink); font-size: 15px; font-weight: 800; }
/* Thin stroke drawn on the image edge, outside the pixels, no bezel gap. */
.shot {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border: 3px solid var(--ink); border-radius: 34px;
}
.device.small .shot { border-radius: 26px; }
.device.landscape .shot { border-radius: 22px; }
.stepcard .shot { border-color: rgba(255, 255, 255, 0.9); }   /* light edge on the dark card */
.stepcard.alt .shot { border-color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section h2 {
  font-size: clamp(30px, 4.4vw, 42px); font-weight: 900;
  text-align: center; letter-spacing: -0.5px; margin-bottom: 10px;
  text-wrap: balance;
}
section .lead {
  text-align: center; color: var(--muted); font-size: 17.5px;
  max-width: 640px; margin: 0 auto 40px;
  text-wrap: pretty;
}

.band-purple {
  background: linear-gradient(135deg, var(--purple-1), var(--purple-2));
  color: #fff;
}
.band-purple h2 { color: #fff; }
.band-purple .lead { color: rgba(255, 255, 255, 0.85); }
.band-peach { background: linear-gradient(to bottom, var(--peach), var(--cream)); }
.band-mint  { background: linear-gradient(to bottom, var(--mint), var(--cream)); }

/* ---------- How it works: mega numerals + tilted step cards ---------- */
.howcard {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 56px;
}
.howcard.flip { flex-direction: row-reverse; }

.bignum {
  font-size: clamp(110px, 17vw, 240px);
  font-weight: 900; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
  letter-spacing: -0.06em;
  margin: 0 -0.12em 0 0;
  position: relative; z-index: 2;
  user-select: none;
}
.howcard.flip .bignum { margin: 0 0 0 -0.12em; }

.stepwrap { max-width: 640px; }
.stepcard {
  background: var(--ink); color: #fff;
  border-radius: 36px; padding: 32px;
  transition: transform 0.3s var(--boing), box-shadow 0.3s ease;
}
.stepcard:hover { transform: translateY(-10px); box-shadow: var(--shadow-lift); }
.stepcard.alt { background: #fff; color: var(--ink); }
.stepcols { display: flex; align-items: center; gap: 26px; }
.stepcard .device { flex-shrink: 0; }
.stepcopy h3 { font-size: 22px; margin-bottom: 8px; letter-spacing: -0.2px; }
.stepcopy p { font-size: 16px; line-height: 1.5; opacity: 0.92; }
.stepcopy small {
  display: block; margin-top: 12px;
  font-size: 12.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--amber);
}
.stepcard.alt .stepcopy small { color: var(--orange); }

/* ---------- Cards / grids (weekend, packs, create) ---------- */
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: transform 0.25s var(--boing), box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px) rotate(-0.5deg); box-shadow: var(--shadow-lift); }
.card h3 { font-size: 19px; margin-bottom: 6px; letter-spacing: -0.2px; color: var(--ink); }
.card p { font-size: 15.5px; color: var(--muted); }

.split {
  display: grid; grid-template-columns: 1fr 360px; gap: 44px; align-items: center;
}
.split.flip { grid-template-columns: 360px 1fr; }
@media (max-width: 860px) {
  .split, .split.flip { grid-template-columns: 1fr; }
  .split .dotpad { order: -1; margin: 0 auto; }
}
.steps { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Packs ---------- */
.pack-card { text-align: center; padding-bottom: 26px; }
.packs-grid .tilt-a { rotate: -1.6deg; }
.packs-grid .tilt-b { rotate: 1.4deg; }
.packs-grid .card:hover { transform: translateY(-6px) rotate(0deg) scale(1.02); }
.pack-emoji { font-size: 44px; line-height: 1; display: block; margin-bottom: 10px; }
.price {
  display: inline-block; margin-top: 14px;
  background: var(--orange); color: #fff;
  font-weight: 800; font-size: 15.5px;
  padding: 7px 18px; border-radius: 999px;
}
.unlock-all {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  background: var(--navy); color: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 30px; margin-top: 22px;
}
.unlock-all h3 { font-size: 22px; margin-bottom: 4px; }
.unlock-all p { color: rgba(255, 255, 255, 0.78); font-size: 15px; max-width: 520px; }
.price.big {
  font-size: 25px; padding: 12px 26px; flex-shrink: 0;
  display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.price.big small { font-size: 12px; font-weight: 600; opacity: 0.92; }
.center-note { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- ALSO: tilted fun facts ---------- */
.also { padding-top: 30px; }
.also-title {
  font-size: clamp(70px, 11vw, 150px) !important;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
  letter-spacing: 0.02em; margin-bottom: 4px !important;
}
.facts { list-style: none; max-width: 620px; margin: 0 auto; }
.facts li {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 800; text-align: center; line-height: 1.3;
  padding: 1em 1.4em; margin-bottom: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--boing);
}
.facts li:nth-child(odd)  { rotate: 1.8deg;
  border-radius: 55% 45% 50% 50% / 22% 30% 24% 28%; }
.facts li:nth-child(even) { rotate: -1.8deg;
  border-radius: 45% 55% 48% 52% / 28% 22% 30% 24%; }
.facts li:hover { transform: scale(1.05) rotate(-2deg); z-index: 2; }

/* ---------- Pledge + final CTA ---------- */
.pledge {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 40px 32px; text-align: center;
}
.pledge h2 { margin-bottom: 8px; }
.pledge p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 17px; }
.pledge a { color: var(--teal); font-weight: 700; }

.cta {
  display: inline-block;
  background: var(--orange); color: #fff;
  font-size: 18px; font-weight: 800;
  padding: 15px 30px; border-radius: var(--radius);
  text-decoration: none; box-shadow: var(--shadow);
}
.cta.secondary { background: var(--card); color: var(--ink);
                 border: 1.5px solid rgba(36, 34, 60, 0.15); }
.hero-ctas { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-note { display: block; margin-top: 12px; font-size: 13.5px; color: var(--muted); text-align: center; }

.boing { transition: transform 0.25s var(--boing), box-shadow 0.25s ease; }
.boing:hover { transform: scale(1.12); box-shadow: var(--shadow-lift); }

/* The cheeky final pill that flips case as it pulses. */
.goplay {
  display: block; width: fit-content;
  margin: 34px auto 0;
  font-size: 20px; font-weight: 700; color: var(--ink);
  text-decoration: none; line-height: 1;
  border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 0.65em 1.2em;
  background: rgba(255, 255, 255, 0.6);
  transition: transform 0.25s var(--boing), box-shadow 0.25s ease;
}
.goplay:hover { transform: scale(1.22); box-shadow: var(--shadow-lift); }
@media (prefers-reduced-motion: no-preference) {
  .goplay { animation: caseflip 2.4s steps(1) infinite; }
  @keyframes caseflip {
    0%, 100% { text-transform: lowercase; }
    50%      { text-transform: uppercase; }
  }
}

/* ---------- FAQ (support page) ---------- */
details {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 16px 20px; margin-bottom: 12px;
}
details summary { font-weight: 700; cursor: pointer; font-size: 16px; }
details p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---------- Text pages (privacy, terms, support) ---------- */
.page {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px; margin: 24px 0 48px;
}
.page h1 { font-size: 34px; margin-bottom: 4px; }
.page .updated { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.page h2 { font-size: 21px; margin: 26px 0 8px; }
.page p, .page li { font-size: 16px; color: #3a3752; }
.page ul { padding-left: 22px; margin: 8px 0; }
.page a { color: #9a5a00; }

/* ---------- Footer ---------- */
footer { padding: 40px 0 52px; text-align: center; color: var(--muted); font-size: 14px; }
footer .links {
  margin-bottom: 12px; display: flex; gap: 20px;
  justify-content: center; flex-wrap: wrap;
}
footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--ink); }

/* ---------- Scroll reveals (JS adds .reveal; no-JS stays visible) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0; transform: translateY(34px);
    transition: opacity 0.7s ease, transform 0.7s var(--boing);
  }
  html.js .howcard [data-reveal].stepwrap { transform: translateX(-24px) rotate(2deg); }
  html.js .howcard.flip [data-reveal].stepwrap,
  html.js [data-reveal].tilt-right { transform: translateX(24px) rotate(-2deg); }
  html.js [data-reveal].bignum { transform: translateY(46px) scale(0.9) rotate(-6deg); }
  html.js [data-reveal].reveal {
    opacity: 1; transform: none;
  }
  /* keep the packs' resting tilt after reveal */
  html.js .packs-grid [data-reveal].reveal.tilt-a { transform: rotate(-1.6deg); }
  html.js .packs-grid [data-reveal].reveal.tilt-b { transform: rotate(1.4deg); }

  .rise { animation: rise 0.6s ease-out both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .howcard, .howcard.flip { flex-direction: column; }
  .bignum, .howcard.flip .bignum {
    font-size: 34vw; margin: 0 0 -0.24em;
  }
  .stepcols { flex-direction: column; }
  .stepcopy { text-align: center; }
  .stepwrap { max-width: 100%; }

  /* Tuck the stickers inside the viewport */
  .stick-1 { left: -2%; }   .stick-2 { right: -2%; }
  .stick-3 { right: -3%; }  .stick-4 { left: -3%; }
  .stick-5 { left: -1%; }   .stick-6 { right: -2%; }
  .callout { font-size: 12.5px; }
  .stick-weekend { position: static; display: table; margin: 6px auto 14px; }
}
@media (max-width: 640px) {
  section { padding: 44px 0; }
  .page { padding: 24px; }
  .unlock-all { justify-content: center; text-align: center; }
  .dotpad { border-radius: 34px; padding: 14px; }
}

/* Pre-launch: CTA placeholders aren't links yet. */
.coming { cursor: default; }
