/* StickyFridge — site styles. Tokens mirror the app's shipped dark system
   (lib/theme/colors.js): surface-50 ground, surface-100 cards, stone
   neutrals, orange accent with the brand glow. */

:root {
  --bg: #0a0a0c;          /* surface-50 — the app's page bg */
  --card: #15151a;        /* surface-100 */
  --card-2: #1f1f26;      /* surface-200 */
  --line: #26262e;        /* surface-300 */
  --line-strong: #3a3a44; /* surface-400 */
  --text: #fafaf9;        /* primary-900 */
  --body: #c7c7cc;        /* neutral-600 dark */
  --muted: #a8a29e;       /* neutral-500 dark */
  --faint: #71717a;       /* neutral-400 dark */
  --accent: #f97316;      /* accent-500 */
  --accent-deep: #ea580c; /* accent-600 */
  --accent-soft: #fdba74; /* accent-300 */
  --glow: rgba(249, 115, 22, 0.28);
  --note: #fff7ed;        /* accent-50 — the sticky note is the one light object */
  --note-ink: #1c1917;
  --note-muted: #78716c;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent-soft); }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

h1, h2, h3 { color: var(--text); line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem;
}
.wordmark .mag {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 18px var(--glow);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.nav .btn { padding: 10px 18px; font-size: 0.9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1rem;
  padding: 15px 28px; border: 0; border-radius: 14px;
  box-shadow: 0 8px 30px var(--glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 36px var(--glow); }
.btn.ghost {
  background: transparent; color: var(--body);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.btn-note { font-size: 0.82rem; color: var(--faint); margin-top: 10px; }

/* ---------- hero: the fridge door ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px;
  align-items: center; padding: 48px 0 72px;
}
.hero-copy .eyebrow { margin-bottom: 14px; }
.hero-copy h1 span { color: var(--accent); }
.hero-sub { margin: 22px 0 30px; font-size: 1.12rem; max-width: 34rem; color: var(--muted); }
.hero-sub strong { color: var(--body); font-weight: 600; }

/* The fridge panel: a door of the app's dark metal, with a magnet-pinned note */
.fridge {
  position: relative;
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 20% 0%, #1a1a20 0%, var(--card) 45%, #101014 100%);
  border: 1px solid var(--line);
  min-height: 420px;
  overflow: hidden;
}
.fridge::before { /* door handle */
  content: "";
  position: absolute; right: 26px; top: 44px; bottom: 44px; width: 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--line-strong), var(--line));
}
.fridge::after { /* brushed sheen */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 42%, rgba(250,250,249,0.025) 47%, transparent 55%);
  pointer-events: none;
}

.note {
  position: absolute; left: 8%; top: 13%;
  width: 74%;
  background: var(--note); color: var(--note-ink);
  border-radius: 6px;
  padding: 42px 22px 20px;
  transform: rotate(-2.2deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.note .magnet {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--accent-soft), var(--accent) 45%, var(--accent-deep));
  box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 22px var(--glow);
}
.note-head { display: flex; align-items: center; gap: 10px; }
.note-emoji { font-size: 1.7rem; }
.note-title { font-weight: 800; font-size: 1.05rem; }
.note-day { font-size: 0.78rem; color: var(--note-muted); }
.note-grid {
  display: flex; gap: 7px; margin: 16px 0 6px;
}
.note-grid .cell {
  width: 30px; height: 30px; border-radius: 8px;
  background: #f1e8dc;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.note-grid .cell.done { background: var(--accent); }
.note-foot { font-size: 0.82rem; color: var(--note-muted); margin-top: 10px; }

/* The supporter's reaction — the page's one orchestrated entrance */
.reaction {
  position: absolute; right: 6%; bottom: 12%;
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700; font-size: 0.95rem;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(14px) scale(0.92);
  animation: pop-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 1.1s forwards;
}
.reaction .who { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
@keyframes pop-in { to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .reaction { animation: none; opacity: 1; transform: none; }
  .btn { transition: none; }
}

/* ---------- sections ---------- */
section { padding: 64px 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 40rem; margin-bottom: 40px; }
.sec-head .eyebrow { display: block; margin-bottom: 12px; }
.sec-head p { margin-top: 14px; color: var(--muted); }

/* steps — a real sequence, numbered honestly */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px;
}
.step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(249, 115, 22, 0.12); color: var(--accent);
  font-weight: 800; margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.95rem; color: var(--muted); }

/* why rows */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.why-row {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
}
.why-row .ico { font-size: 1.5rem; }
.why-row p { font-size: 0.95rem; color: var(--muted); }

/* template band */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 18px; }
.chip {
  background: var(--card-2); border: 1px solid var(--line-strong);
  color: var(--text); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; font-size: 0.95rem;
}
.ai-line {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
  color: var(--muted); max-width: 38rem;
}
.ai-line strong { color: var(--body); }

/* proof band */
.proof {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px;
  max-width: 44rem;
}
.proof p { color: var(--body); }
.proof .who { color: var(--faint); font-size: 0.88rem; }

/* closing */
.closing { text-align: center; padding: 84px 0; }
.closing h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.closing p { color: var(--muted); margin: 16px auto 30px; max-width: 34rem; }

/* footer */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
  font-size: 0.85rem; color: var(--faint);
}
footer .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--body); }

/* ---------- invite page ---------- */
.invite-wrap { max-width: 560px; margin: 0 auto; padding: 24px; min-height: 100svh;
  display: flex; flex-direction: column; }
.invite-card {
  position: relative;
  background: var(--note); color: var(--note-ink);
  border-radius: 10px; padding: 52px 28px 30px;
  transform: rotate(-1.4deg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  margin: 48px 0 34px;
}
.invite-card .magnet {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--accent-soft), var(--accent) 45%, var(--accent-deep));
  box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 26px var(--glow);
}
.invite-card h1 { font-size: 1.6rem; color: var(--note-ink); line-height: 1.3; }
.invite-card h1 .name { color: var(--accent-deep); }
.invite-card .what { margin-top: 14px; color: var(--note-muted); font-size: 0.98rem; }
.invite-tracker {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.05); border-radius: 999px;
  padding: 6px 14px; margin-top: 18px;
  font-weight: 700; font-size: 0.95rem;
}
.invite-actions { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.code-box {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px dashed var(--line-strong);
  border-radius: 14px; padding: 14px 20px;
}
.code-box .code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.14em; color: var(--text);
}
.code-box button {
  background: var(--card-2); color: var(--body);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 14px; font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
}
.bridge {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; font-size: 0.92rem; color: var(--muted); margin-top: 10px;
}
.bridge strong { color: var(--body); }
.invite-foot { margin-top: auto; padding-top: 40px; text-align: center;
  font-size: 0.82rem; color: var(--faint); }
.invite-foot a { color: var(--muted); }

/* ---------- legal pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 30px 24px 80px; }
.doc h1 { font-size: 1.9rem; margin: 24px 0 6px; }
.doc h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.doc h3 { font-size: 1.02rem; margin: 22px 0 8px; color: var(--text); }
.doc p, .doc li { color: var(--body); font-size: 0.97rem; }
.doc ul { padding-left: 22px; }
.doc .meta { color: var(--faint); font-size: 0.88rem; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 24px 0 48px; }
  .fridge { min-height: 360px; }
  .steps, .why { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
}

/* footer inner wrapper — main's layout without a second <main> landmark */
.foot-inner { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ================= motion v2 — the fridge comes alive ================= */

/* real app icon as the mark */
.wordmark img.mark {
  width: 42px; height: 42px; border-radius: 11px;
  box-shadow: 0 0 18px var(--glow);
}
.wordmark:hover img.mark { transform: rotate(-4deg) scale(1.05); }
.wordmark img.mark { transition: transform 0.2s ease; }

/* hero entrance: fridge fades, note sticks on, days fill, supporter reacts */
.fridge { opacity: 0; animation: fridge-in 0.6s ease-out forwards; }
@keyframes fridge-in { to { opacity: 1; } }

.note {
  opacity: 0;
  animation: note-stick 0.65s cubic-bezier(0.2, 1.3, 0.4, 1) 0.25s forwards;
}
@keyframes note-stick {
  0%   { opacity: 0; transform: translateY(-34px) rotate(-7deg); }
  70%  { opacity: 1; transform: translateY(3px) rotate(-1.4deg); }
  100% { opacity: 1; transform: translateY(0) rotate(-2.2deg); }
}
.note .magnet {
  animation: magnet-pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) 0.6s backwards,
             magnet-glow 5s ease-in-out 2s infinite;
}
@keyframes magnet-pop {
  0% { transform: translateX(-50%) scale(0); }
  70% { transform: translateX(-50%) scale(1.18); }
  100% { transform: translateX(-50%) scale(1); }
}
@keyframes magnet-glow {
  0%, 100% { box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 22px var(--glow); }
  50%      { box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 34px rgba(249,115,22,0.45); }
}
.note-grid .cell.done {
  animation: cell-fill 0.3s cubic-bezier(0.2, 1.5, 0.4, 1) backwards;
}
.note-grid .cell.done:nth-child(1) { animation-delay: 0.75s; }
.note-grid .cell.done:nth-child(2) { animation-delay: 0.86s; }
.note-grid .cell.done:nth-child(3) { animation-delay: 0.97s; }
.note-grid .cell.done:nth-child(4) { animation-delay: 1.08s; }
.note-grid .cell.done:nth-child(5) { animation-delay: 1.19s; }
@keyframes cell-fill {
  0% { transform: scale(0.3); background: #f1e8dc; }
  100% { transform: scale(1); background: var(--accent); }
}
.reaction { animation-delay: 1.5s; }

/* scroll reveals — classes are added by JS only (no-JS keeps everything visible) */
.rv {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 0.08s; }
.rv-d2 { transition-delay: 0.16s; }
.rv-d3 { transition-delay: 0.24s; }
.rv-d4 { transition-delay: 0.32s; }
.rv-d5 { transition-delay: 0.40s; }

/* hover life on cards, chips, buttons */
.step, .why-row, .chip, .proof {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.step:hover, .why-row:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent-deep);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.15);
}
.step:hover .n { background: rgba(249, 115, 22, 0.2); }

/* the closing CTA gets the warmest glow on approach */
.closing .btn { box-shadow: 0 10px 40px var(--glow); }
.closing .btn:hover { transform: translateY(-2px) scale(1.02); }

@media (prefers-reduced-motion: reduce) {
  .fridge, .note, .note .magnet, .note-grid .cell.done { animation: none; opacity: 1; }
  .note { transform: rotate(-2.2deg); }
  .rv { opacity: 1; transform: none; transition: none; }
  .step, .why-row, .chip, .proof, .wordmark img.mark, .closing .btn { transition: none; }
  .step:hover, .why-row:hover, .chip:hover, .closing .btn:hover, .wordmark:hover img.mark { transform: none; }
}

/* ---------- social proof: rating + real reviews ---------- */
.reviews { display: grid; grid-template-columns: 0.8fr 1.1fr 1.1fr; gap: 18px; }
.rating-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px; text-align: center;
}
.rating-num { font-size: 3.2rem; font-weight: 800; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.stars { color: var(--accent); font-size: 1.25rem; letter-spacing: 0.12em; text-shadow: 0 0 16px var(--glow); }
.rating-src { font-size: 0.85rem; color: var(--muted); }
.rating-link { font-size: 0.85rem; font-weight: 600; color: var(--accent-soft); text-decoration: none; margin-top: 6px; }
.rating-link:hover { color: var(--accent); }
.review-card {
  margin: 0; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.review-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 12px 32px rgba(0,0,0,0.45); }
.review-title { font-weight: 700; color: var(--text); }
.review-card blockquote { margin: 0; color: var(--muted); font-size: 0.95rem; }
.review-card figcaption { font-size: 0.82rem; color: var(--faint); }
.team-strip {
  margin-top: 18px; padding: 18px 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.team-strip p { font-size: 0.92rem; color: var(--muted); max-width: 60rem; }
@media (max-width: 860px) { .reviews { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .review-card { transition: none; } .review-card:hover { transform: none; } }
