/* Colors: makePalette(BUCKET_THEMES.birthday) from src/lib/palette.ts, so the site matches the app. */
:root {
  --primary: #e8253a;
  --secondary: #ffc24a;
  --bg-top: #fad3d8;
  --bg-bottom: #fff5e2;
  --ink: #33080d;
  --muted: #785458;
  --accent: #ba1e2e;
  --on-primary: #ffffff;
  --card: rgba(255, 255, 255, 0.72);
  --font: ui-rounded, 'Nunito', system-ui, sans-serif;
}

/* Apple devices use SF Rounded (ui-rounded); everyone else gets Nunito, like the Android app. */
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url(fonts/Nunito_400Regular.ttf) format('truetype'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(fonts/Nunito_800ExtraBold.ttf) format('truetype'); }

* { box-sizing: border-box; }
html { background: var(--bg-bottom); }
body {
  margin: 0;
  min-height: 100vh;
  font: 17px/1.55 var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom) 70vh) no-repeat, var(--bg-bottom);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; font-weight: 800; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: var(--accent); font-weight: 800; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 20px; }
.brand img { width: 36px; height: 36px; }
/* The wordmark: lowercase, "party" in ink, "buckets" in the bucket's red (as in the first home screen). */
.wordmark { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.wordmark span { color: var(--accent); }

/* Pills and buttons */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font-weight: 800; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(51, 8, 13, 0.08);
}
.pill.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.pill small { font-weight: 400; opacity: 0.8; }

/* Hero */
.hero { display: grid; gap: 24px; align-items: center; padding: 24px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(38px, 9vw, 64px); letter-spacing: -0.02em; }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 32em; margin: 0 auto 24px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.1fr 1fr; text-align: left; padding: 48px 0 72px; }
  .hero .lead { margin-left: 0; }
  .ctas { justify-content: flex-start; }
}

/* The bucket: back layer, cards, front layer (same layering as src/components/bucket.tsx). */
.bucket { position: relative; width: min(380px, 84vw); aspect-ratio: 780 / 685; margin: 96px auto 0; } /* room for the cards sticking out and the one dropping in */
.bucket > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.card {
  position: absolute; left: 50%; top: -14%; width: 24%; aspect-ratio: 540 / 731;
  margin-left: -12%; border-radius: 5% / 3.7%;
  background: url(img/polaroid.webp) 0 0 / 100% 100% no-repeat, var(--photo);
  box-shadow: 0 6px 14px rgba(51, 8, 13, 0.18);
  transform: translateX(var(--x, 0)) rotate(var(--r, 0deg));
}
.card.a { --x: -62%; --r: -14deg; --photo: linear-gradient(160deg, #ffc24a, #e8253a); top: -6%; }
.card.b { --x: 4%; --r: 5deg; --photo: linear-gradient(200deg, #7a3cf0, #ff4fa3); top: -18%; }
.card.c { --x: 66%; --r: 16deg; --photo: linear-gradient(180deg, #18a7a0, #ffb45c); top: -8%; }
.card.drop { --photo: linear-gradient(170deg, #22305a, #d98e5f); animation: drop 4.2s cubic-bezier(0.45, 0, 0.55, 1) infinite; opacity: 0; }
@keyframes drop {
  0% { opacity: 0; transform: translate(-20%, -110%) rotate(-14deg) scale(1.15); }
  15% { opacity: 1; }
  48% { transform: translate(0, -40%) rotate(4deg) scale(1); }
  62%, 100% { opacity: 1; transform: translate(0, 140%) rotate(0deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .card.drop { display: none; } }

/* Sections */
section { padding: 48px 0; }
section > h2 { font-size: clamp(28px, 6vw, 40px); text-align: center; }
section > .sub { text-align: center; color: var(--muted); max-width: 34em; margin: 0 auto 32px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--card); border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 28px; padding: 24px; box-shadow: 0 10px 28px rgba(51, 8, 13, 0.07); }
.tile h3 { font-size: 22px; margin-top: 12px; }
.tile p { color: var(--muted); margin: 0; }
.num {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 20px;
}

/* Sizes */
.size { text-align: center; display: flex; flex-direction: column; }
.size .art { height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.size .art img { height: auto; }
.size .price { font-size: 32px; font-weight: 800; margin: 4px 0 8px; }
.size ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.size.featured { border: 2px solid var(--primary); }
.note { text-align: center; color: var(--muted); font-size: 15px; margin-top: 20px; }

/* Footer */
footer { padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }

/* Text pages: Terms, Privacy, Delete account */
.doc { max-width: 680px; margin: 0 auto; padding: 8px 16px 48px; }
.doc h1 { font-size: clamp(32px, 8vw, 44px); margin-top: 16px; }
.doc h2 { font-size: 22px; margin-top: 2em; }
.doc .updated { color: var(--muted); }
.doc li { margin-bottom: 0.4em; }
.draft { background: #fff3c4; border: 1px solid #e3c35a; border-radius: 16px; padding: 12px 16px; font-size: 15px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 1em; }
.doc th, .doc td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px solid rgba(51, 8, 13, 0.12); vertical-align: top; }

/* Early access form */
.gate { display: grid; gap: 10px; margin: 24px 0 8px; }
.gate label { font-weight: 800; }
.gate input {
  font: inherit; color: var(--ink); min-height: 48px; padding: 10px 16px; border-radius: 16px;
  border: 1px solid rgba(51, 8, 13, 0.18); background: rgba(255, 255, 255, 0.85);
}
.gate input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.gate .error { color: var(--accent); font-weight: 800; margin: 0; }
.gate button { font: inherit; font-weight: 800; cursor: pointer; justify-self: start; }
