/* Plorp — a warm, hand-made landing page for a warm, hand-made game.
   The bakery at golden hour: cream parchment, chocolate ink, pastel
   bunting, and the game's own kawaii candy sprites as the only ornament.
   Light-only by design (the game IS warm daylight); deliberately the
   opposite pole from Kajai's dark aurora. */

:root {
  color-scheme: light;
  --bg:        #fdf6ea;
  --bg-2:      #fbeeda;
  --card:      #fffaf1;
  --border:    rgba(91, 58, 36, 0.16);
  --ink:       #4a2a1b;   /* dark chocolate, 11.9:1 on cream */
  --ink-2:     #7a5843;   /* cocoa, 5.9:1 */
  --ink-3:     #82624a;   /* latte, ≥4.9:1 even on the footer tint */
  --pink:      #f06e9c;   /* frosting (ornament only, never text) */
  --pink-text: #c23368;   /* berry, 4.9:1 — links & accents */
  --mint:      #7fd4ad;
  --butter:    #f7c948;
  --lavender:  #b9a3e3;
  --choc:      #56331d;
  --maxw: 900px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
                "Arial Rounded MT Bold", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Sticky footer: short pages (the 404) must not leave the footer floating
   mid-viewport with raw background below it. No effect on long pages. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-round);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }

::selection { background: rgba(240, 110, 156, 0.24); color: var(--ink); }

/* ── Bakery atmosphere ───────────────────────────────────── */
/* Candy stripes (the app icon's backdrop) whisper across the page under
   three soft pastel glows, and a sprinkle field — Plorp's answer to a
   star field — fades out below the hero. All static: cozy, not busy. */
.bakery { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bakery__base {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 46% at 12% -6%, rgba(244, 169, 184, 0.28), transparent 62%),
    radial-gradient(58% 42% at 94% 4%, rgba(247, 201, 72, 0.16), transparent 60%),
    radial-gradient(52% 40% at 4% 62%, rgba(127, 212, 173, 0.13), transparent 62%),
    radial-gradient(64% 44% at 96% 88%, rgba(185, 163, 227, 0.14), transparent 62%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 44%, #fcf2df 100%);
}
.bakery__stripes {
  position: absolute; inset: 0; opacity: 0.5;
  background: repeating-linear-gradient(
    118deg,
    rgba(240, 110, 156, 0.055) 0 26px,
    transparent 26px 62px
  );
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.15));
}
/* sprinkles: two offset layers of tiny pastel dashes so the repeat never
   reads as a grid */
.bakery__sprinkles {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    radial-gradient(3px 1.6px at 31px 44px, rgba(240, 110, 156, 0.5), transparent 100%),
    radial-gradient(1.6px 3px at 142px 101px, rgba(127, 212, 173, 0.5), transparent 100%),
    radial-gradient(3px 1.6px at 227px 61px, rgba(247, 201, 72, 0.55), transparent 100%),
    radial-gradient(1.6px 3px at 87px 189px, rgba(185, 163, 227, 0.5), transparent 100%),
    radial-gradient(3px 1.6px at 189px 235px, rgba(240, 110, 156, 0.4), transparent 100%),
    radial-gradient(1.6px 3px at 268px 158px, rgba(127, 212, 173, 0.4), transparent 100%);
  background-size: 300px 280px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 46%, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 46%, transparent 78%);
  animation: sprinkle-breathe 10s ease-in-out infinite alternate;
}
@keyframes sprinkle-breathe { to { opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bakery__sprinkles { animation: none; }
}

/* ── Bunting (the game's pastel pennants, straight off the menu) ── */
.bunting {
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='232' height='30' viewBox='0 0 232 30'%3E%3Cpath d='M0 0h232v3H0z' fill='%23a97c5b'/%3E%3Cpath d='M8 2h40L28 28z' fill='%23f4a9b8'/%3E%3Cpath d='M64 2h40L84 28z' fill='%23f4d78a'/%3E%3Cpath d='M120 2h40l-20 26z' fill='%23bfe3c2'/%3E%3Cpath d='M176 2h40l-20 26z' fill='%23cbb7e0'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center top;
}

/* ── Layout & type ───────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
section { padding: clamp(40px, 6.5vw, 76px) 0; }

h1, h2 { line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
p { margin: 0; color: var(--ink-2); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 52ch; }
.lead em { font-style: normal; color: var(--pink-text); }

a { color: var(--pink-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--pink-text); outline-offset: 3px; border-radius: 6px; }

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

.wordmark {
  display: inline-block;
  font-family: var(--font-round);
  font-weight: 800; letter-spacing: -0.01em;
  /* room for the p descender under background-clip:text */
  line-height: 1.18; padding-bottom: 0.1em;
  background: linear-gradient(105deg, #6b3a20, #a0392f 48%, var(--pink-text));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--font-round);
  font-weight: 700; font-size: 1rem; padding: 13px 22px; border-radius: 16px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
/* the chocolate button: cream lettering on a chocolate-bar slab */
.btn--primary {
  background: linear-gradient(180deg, #6b4527, var(--choc) 55%, #46281a);
  background-origin: border-box;
  color: #fdf3e4;
  box-shadow: 0 6px 18px rgba(86, 51, 29, 0.28), inset 0 1px 0 rgba(255, 245, 230, 0.22);
}
.btn--primary:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.07); }
.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { text-decoration: none; background: #fff4e2; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ── Header (brand + quiet page links, warm hairline) ────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(253, 246, 234, 0.72);
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 58, 36, 0.18) 30%, rgba(91, 58, 36, 0.18) 70%, transparent);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand .wordmark { padding-bottom: 0; line-height: 1.3; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { color: var(--ink-2); font-weight: 700; font-size: 0.95rem; }
.site-nav a:hover { color: var(--pink-text); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding-top: clamp(36px, 5.5vw, 56px); text-align: center; }
/* The candy-letter logo IS the h1 (each letter is one of the game's own
   candies). Cap width so it stays a wordmark, not a mural. */
.hero__logo {
  width: min(480px, 82vw); height: auto;
  filter: drop-shadow(0 10px 26px rgba(190, 100, 130, 0.28));
  animation: logo-bob 7s ease-in-out infinite alternate;
}
@keyframes logo-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) { .hero__logo { animation: none; } }
.hero__tag { font-size: clamp(1.25rem, 4vw, 1.6rem); color: var(--ink); font-weight: 700; margin: 18px 0 24px; }
.hero .lead { margin-inline: auto; }
.hero__cta { margin-top: 28px; }
.hero__note { font-size: 0.88rem; color: var(--ink-3); margin-top: 14px; letter-spacing: 0.01em; }

/* The merge, acted out ONCE: two candy drops slide together, pop, and the
   gummy bear they make bounces in and STAYS. The game's one rule, in one
   breath — it never repeats (a looping animation here fights the lead text
   below). Real game sprites, pure CSS one-shot, ~4.5s. Decorative. */
.mergeline {
  position: relative; height: 92px; margin: 6px auto 20px;
  width: 220px;
}
.mergeline img { position: absolute; bottom: 8px; }
.mergeline__drop {
  width: 34px; height: 34px; left: 50%;
  opacity: 0;
  animation: merge-drop 4.5s var(--ease) 1 both;
}
.mergeline__drop--b { animation-name: merge-drop-b; }
.mergeline__bear {
  width: 46px; height: 57px; left: 50%; margin-left: -23px;
  transform-origin: 50% 100%;
  opacity: 0;
  animation: merge-bear 4.5s var(--ease) 1 forwards;
}
.mergeline__pop {
  position: absolute; left: 50%; bottom: 24px; width: 10px; height: 10px;
  margin-left: -5px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 236, 246, 0.95), rgba(240, 110, 156, 0.5) 55%, transparent 72%);
  animation: merge-pop 4.5s ease-out 1 both;
}
@keyframes merge-drop {
  0%        { transform: translateX(-92px) scale(0.4); opacity: 0; }
  12%       { transform: translateX(-72px) scale(1); opacity: 1; }
  38%       { transform: translateX(-40px) scale(1); }
  52%       { transform: translateX(-17px) scale(1.05); opacity: 1; }
  56%, 100% { transform: translateX(-14px) scale(0.3); opacity: 0; }
}
@keyframes merge-drop-b {
  0%        { transform: translateX(58px) scale(0.4); opacity: 0; }
  12%       { transform: translateX(38px) scale(1); opacity: 1; }
  38%       { transform: translateX(6px) scale(1); }
  52%       { transform: translateX(-17px) scale(1.05); opacity: 1; }
  56%, 100% { transform: translateX(-20px) scale(0.3); opacity: 0; }
}
/* the bear lands with a bounce and never leaves (forwards fill holds 100%) */
@keyframes merge-bear {
  0%, 53%   { transform: scale(0); opacity: 0; }
  60%       { transform: scale(1.18); opacity: 1; }
  66%       { transform: scale(0.96); }
  72%       { transform: scale(1.04); }
  78%, 100% { transform: scale(1); opacity: 1; }
}
@keyframes merge-pop {
  0%, 53%   { transform: scale(0.4); opacity: 0; }
  57%       { transform: scale(5.5); opacity: 0.9; }
  66%, 100% { transform: scale(7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mergeline__drop, .mergeline__pop { animation: none; opacity: 0; }
  .mergeline__bear { animation: none; opacity: 1; transform: scale(1); }
}

/* ── App Store CTA ───────────────────────────────────────── */
/* Always the official Apple badge, artwork untouched (only sized).
   Pre-launch it's inert (no dead store links); live it's the real link. */
.appstore-badge { display: inline-block; line-height: 0; border-radius: 13px; }
.appstore-badge img { display: block; width: 180px; height: auto; }
.appstore-badge--nav img { width: 120px; }
a.appstore-badge:hover { filter: brightness(1.12); }
.appstore-badge--soon { cursor: default; }

/* ── Hero phone, floating in warm frosting light ─────────── */
.hero__shot { margin-top: clamp(44px, 6vw, 64px); position: relative; }
.hero__shot::before {
  content: ""; position: absolute; inset: -6% 18%;
  background: radial-gradient(50% 45% at 50% 42%, rgba(240, 110, 156, 0.18), rgba(247, 201, 72, 0.12) 55%, transparent 75%);
  filter: blur(24px); pointer-events: none;
}
.hero__shot .device { animation: float 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .hero__shot .device { animation: none; } }

/* ── Device frame (warm wood-and-chocolate, like the game's panels) ── */
.device {
  position: relative; width: 100%; max-width: 320px; margin: 0 auto;
  padding: 9px; border-radius: 44px;
  background: linear-gradient(160deg, #7c563a, #4a2a1b 42%, #6b4527 78%, #3d2314);
  border: 1px solid rgba(255, 240, 220, 0.35);
  box-shadow:
    0 24px 60px rgba(86, 51, 29, 0.35),
    inset 0 1px 0 rgba(255, 245, 230, 0.25);
}
.device img { display: block; width: 100%; height: auto; border-radius: 35px; }
/* a slow specular sheen drifts across the glass every few seconds */
.device::after {
  content: ""; position: absolute; inset: 9px; border-radius: 35px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.09) 50%, transparent 62%);
  background-size: 300% 100%;
  animation: sheen 11s ease-in-out infinite;
}
@keyframes sheen {
  0%, 58%   { background-position: 130% 0; }
  88%, 100% { background-position: -30% 0; }
}
@media (prefers-reduced-motion: reduce) { .device::after { animation: none; background-position: 50% 0; } }

/* ── The merge parade (the in-game reference bar, made of the real
      sprites): 11 candies, small to legendary) ─────────────── */
.parade { text-align: center; }
.parade h2 { margin-bottom: 8px; }
.parade > .wrap > p { margin-inline: auto; }
/* On narrow screens the strip scrolls sideways INSIDE its own box —
   the page itself must never scroll horizontally. */
.parade__scroll { overflow-x: auto; padding: 26px 8px 10px; -webkit-overflow-scrolling: touch; }
.parade__list {
  display: flex; align-items: flex-end; justify-content: safe center;
  gap: clamp(10px, 2vw, 20px);
  min-width: max-content; margin: 0 auto; padding: 0 16px;
  list-style: none;
}
.parade__item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 52px;
}
.parade__item img {
  height: var(--h); width: auto;
  filter: drop-shadow(0 4px 8px rgba(86, 51, 29, 0.18));
  transition: transform 0.25s var(--ease);
}
.parade__item:hover img { transform: translateY(-5px) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .parade__item:hover img { transform: none; } }
.parade__item span { font-size: 0.72rem; font-weight: 700; color: var(--ink-2); line-height: 1.25; }
.parade__item span b { display: block; color: var(--ink-3); font-weight: 600; }
.parade__item--goal span { color: var(--pink-text); }
.parade__arrow { align-self: center; color: var(--ink-3); font-weight: 700; padding-bottom: 34px; }

/* ── Features (each one wears its candy) ─────────────────── */
.features__list {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(22px, 3.5vw, 32px);
  max-width: 780px; margin-inline: auto;
}
.feature {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 8px 26px rgba(86, 51, 29, 0.09);
  text-align: left;
}
.feature h3 {
  font-size: 1.08rem; margin: 0 0 6px; color: var(--ink); letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 12px;
}
.feature__icon {
  flex: none; width: 40px; height: 40px; object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(86, 51, 29, 0.2));
  transition: transform 0.25s var(--ease);
}
.feature:hover .feature__icon { transform: translateY(-2px) rotate(-4deg) scale(1.1); }
@media (prefers-reduced-motion: reduce) { .feature:hover .feature__icon { transform: none; } }
.feature p { font-size: 0.96rem; color: var(--ink-2); }
@media (max-width: 600px) { .features__list { grid-template-columns: 1fr; } }

/* ── Pledge (parchment card with a frosting edge) ────────── */
.pledge {
  max-width: 580px; margin-inline: auto; text-align: center;
  padding: clamp(28px, 5vw, 40px) clamp(24px, 5vw, 44px);
  border: 1.5px solid transparent; border-radius: 22px;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(120deg, rgba(240, 110, 156, 0.5), rgba(247, 201, 72, 0.45) 50%, rgba(127, 212, 173, 0.5)) border-box;
  box-shadow: 0 12px 40px rgba(86, 51, 29, 0.12);
}
.pledge p { font-size: 1.05rem; color: var(--ink-2); }
.pledge p b { color: var(--ink); }

/* ── Scroll reveals ──────────────────────────────────────── */
/* Only when JS is present (main.js tags <html class="js">), so nothing is
   ever hidden without it; reduced motion gets everything immediately.
   The hero phone reveals with opacity only: its bounding box is measured
   by the layout-geometry test and a translate would shift it. */
html.js [data-reveal] {
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0s;
}
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal].revealed { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; visibility: visible; transform: none; transition: none; }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 52px; background: rgba(251, 238, 218, 0.5); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between; }
.site-footer .brand { font-size: 1.05rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer__links a { color: var(--ink-2); font-weight: 700; }
.site-footer__legal { width: 100%; color: var(--ink-3); font-size: 0.85rem; margin-top: 6px; }

/* ── Content pages (privacy / support / press) ───────────── */
.prose { max-width: 70ch; }
.prose h1 { font-size: clamp(2rem, 6vw, 2.6rem); margin-bottom: 0.4em; }
.prose h2 { margin: 1.7em 0 0.4em; font-size: 1.3rem; }
.prose h3 { margin: 1.4em 0 0.3em; font-size: 1.05rem; color: var(--ink); }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; color: var(--ink-2); margin: 0 0 1em; }
.prose li { margin: 0.4em 0; }
.prose a { font-weight: 700; }
.page-hero { padding-top: 48px; }

/* press page bits */
.factsheet { width: 100%; border-collapse: collapse; margin: 0.6em 0 1em; }
.factsheet th, .factsheet td { text-align: left; padding: 9px 12px 9px 0; vertical-align: top; border-bottom: 1px solid var(--border); }
.factsheet th { color: var(--ink); font-weight: 700; white-space: nowrap; width: 9.5em; }
.factsheet td { color: var(--ink-2); }
/* narrow phones: let the label column wrap instead of pushing the table
   past the viewport */
@media (max-width: 480px) {
  .factsheet th { white-space: normal; width: 6.5em; padding-right: 8px; }
}
.presskit-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 20px;
  padding: 20px 22px; margin: 1.2em 0;
  box-shadow: 0 8px 26px rgba(86, 51, 29, 0.09);
}
.presskit-cta p { margin: 0; }
.assets-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px; margin: 0.8em 0 1.4em; padding: 0; list-style: none;
}
.asset-card {
  background: var(--card); border: 1.5px solid var(--border); border-radius: 18px;
  padding: 18px; text-align: center;
  box-shadow: 0 6px 20px rgba(86, 51, 29, 0.08);
}
.asset-card img {
  max-width: 100%; height: 96px; object-fit: contain; margin-bottom: 10px;
}
.asset-card--shot img { height: 180px; }
.asset-card figcaption { font-size: 0.85rem; color: var(--ink-2); }
.asset-card figcaption b { display: block; color: var(--ink); font-size: 0.95rem; margin-bottom: 2px; }

/* ── 404 ─────────────────────────────────────────────────── */
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.notfound .code {
  font-family: var(--font-round); font-weight: 800;
  font-size: clamp(4rem, 18vw, 8rem); line-height: 1.1; padding-bottom: 0.05em;
  background: linear-gradient(105deg, #f06e9c, #f7c948 55%, #7fd4ad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound__bear { width: 84px; height: auto; margin: 6px auto 2px; animation: bear-wobble 3s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bear-wobble { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .notfound__bear { animation: none; } }

.mt-32 { margin-top: 32px; }
