@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 500 900; font-display: swap; src: url(../fonts/nunito-latin.woff2) format('woff2'); }

:root {
  --font: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --jade: #14A37F; --jade-d: #0E7C60; --jade-l: #D7F5EA; --jade-d-fixed: #0E7C60;
  --red: #E5484D; --gold: #F5B100; --gold-d: #C98C00; --gold-l: #FFF2CC;
  --ink: #243041; --muted: #7A8494; --faint: #AFB6C1; --line: #E4E7EB;
  --ivory: #FDF8EC; --spring: cubic-bezier(.2, 1.4, .4, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; font-family: var(--font); font-weight: 600; color: #fff;
  background: linear-gradient(160deg, #1BBE95 0%, #0B7559 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.hidden { display: none !important; }

/* faint scattered tiles behind everything */
.bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(800px 600px at 50% 18%, rgba(255,255,255,.2), transparent 70%); }
#scatter .t { position: absolute; width: 90px; opacity: .14; }
#scatter svg { width: 100%; display: block; }

.wrap { position: relative; max-width: 520px; margin: 0 auto; padding: 18px 20px calc(40px + env(safe-area-inset-bottom)); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; }
.brand img { border-radius: 10px; }

/* hero */
.hero { text-align: center; padding-top: 8px; }
.fan { position: relative; height: 104px; display: flex; justify-content: center; }
.fan .t { position: absolute; top: 8px; width: 54px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
  transform: translateX(calc(var(--k) * 48px)) translateY(calc(var(--a) * 10px)) rotate(calc(var(--k) * 11deg));
  animation: fan-in .7s var(--spring) backwards; animation-delay: calc(var(--i) * 70ms); }
.fan .t svg { width: 100%; display: block; }
@keyframes fan-in { from { opacity: 0; transform: translateY(40px) scale(.6); } }
.hero .pip { margin: -56px auto 0; width: 92px; position: relative; z-index: 1; }
.kicker { display: inline-block; margin: 8px 0 4px; padding: 7px 16px; border-radius: 99px; background: rgba(255,255,255,.18);
  font-size: 14px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; }
h1 { margin: 6px 0 10px; font-size: clamp(36px, 10vw, 50px); line-height: 1.05; font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.12); }
h1 span { color: #FFE38A; }
.lede { margin: 0 auto; max-width: 420px; font-size: 17px; line-height: 1.4; color: rgba(255,255,255,.9); }

/* countdown, drawn as mahjong tiles */
.countdown { text-align: center; margin: 22px 0 22px; }
.cd-label { margin: 0 0 14px; font-size: 18px; font-weight: 900; }
.cd-row { display: flex; justify-content: center; gap: 10px; }
.cd-tile { flex: 1; max-width: 104px; aspect-ratio: 60 / 66; border-radius: 16px; background: var(--ivory); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px #efe5cf, 0 5px 0 #d9cdb2, 0 10px 0 #127a60, 0 16px 20px rgba(0,0,0,.18); margin-bottom: 10px; }
.cd-tile b { font-size: clamp(34px, 11vw, 52px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-tile:first-child b { color: var(--red); }
.cd-tile span { margin-top: 4px; font-size: 13px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.cd-tile.tick b { animation: tick .35s var(--spring); }
@keyframes tick { from { transform: scale(.8); } }

/* signup card */
.card { background: #fff; color: var(--ink); border-radius: 28px; padding: 22px 20px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.offer { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--gold-l); }
.offer-badge { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; background: var(--gold); box-shadow: 0 4px 0 var(--gold-d); }
.offer b { display: block; font-size: 17px; line-height: 1.25; font-weight: 900; }
.offer span { display: block; margin-top: 3px; font-size: 14px; color: #8a6a10; }

.spots { margin: 16px 2px 2px; }
.spots-bar { height: 14px; border-radius: 99px; background: #F1F2F4; overflow: hidden; }
.spots-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold), #FF8A00); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.spots p { margin: 8px 0 0; font-size: 15px; font-weight: 800; color: var(--muted); text-align: center; }
.spots p b { color: var(--ink); }

form { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.field span { display: block; margin: 0 0 6px 4px; font-size: 14px; font-weight: 900; }
.field em { font-style: normal; color: var(--faint); font-weight: 700; }
.field input { width: 100%; height: 54px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--line); background: #F8F9FA;
  font: 700 17px var(--font); color: var(--ink); outline: none; transition: border-color .15s, background .15s; }
.field input:focus { border-color: var(--jade); background: #fff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { margin: 0; padding: 10px 14px; border-radius: 12px; background: #FDE2E1; color: #B93338; font-size: 15px; font-weight: 800; }

.btn { display: block; width: 100%; height: 60px; border: 0; border-radius: 18px; cursor: pointer; text-decoration: none; text-align: center; line-height: 60px;
  font: 900 19px var(--font); letter-spacing: .5px; color: #fff; background: var(--jade); box-shadow: 0 6px 0 var(--jade-d);
  transition: transform .1s, box-shadow .1s, opacity .2s; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--jade-d); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn.ghost { color: var(--jade-d); background: var(--jade-l); box-shadow: 0 5px 0 #b5e8d6; }
.btn.store { max-width: 360px; margin: 14px auto 0; color: var(--ink); background: #FFE38A; box-shadow: 0 6px 0 var(--gold-d); }
.fine { margin: 2px 4px 0; font-size: 13px; line-height: 1.4; color: var(--muted); text-align: center; }

.done { text-align: center; padding: 6px 0 2px; }
.done .pip { width: 110px; margin: 6px auto 0; }
.done h2 { margin: 6px 0 6px; font-size: 30px; font-weight: 900; }
.done p { margin: 0 0 18px; font-size: 17px; line-height: 1.4; color: var(--muted); }
.done p b { color: var(--ink); }

/* features */
.feats { display: grid; gap: 12px; margin-top: 26px; }
.feat { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: center; padding: 14px; border-radius: 20px; background: rgba(255,255,255,.14); }
.feat-ic { grid-row: span 2; width: 52px; }
.feat-ic svg { width: 100%; display: block; }
.feat b { font-size: 17px; font-weight: 900; }
.feat span { font-size: 14px; line-height: 1.35; color: rgba(255,255,255,.85); }

.foot { margin-top: 28px; text-align: center; font-size: 13px; line-height: 1.45; color: rgba(255,255,255,.75); }
.foot p { margin: 6px 0; }

/* Pip, the mascot (same animation as the app) */
.pip svg { width: 100%; height: auto; overflow: visible; }
.pip-body { transform-box: view-box; transform-origin: 50px 116px; animation: pip-breathe 2.85s ease-in-out infinite; }
.pip-sway { transform-box: view-box; transform-origin: 50px 116px; }
.pip-arm { transform: rotate(var(--a)); animation: pip-arm 2.85s ease-in-out infinite; }
.pip-arm.r { animation-direction: reverse; }
.pip-eye { animation: pip-blink 3.4s infinite; }
.pip-tail { transform-box: fill-box; transform-origin: 0 50%; animation: pip-tail 1.4s ease-in-out infinite; }
.pip-tail.b { animation-delay: -.5s; }
.mood-cheer .pip-sway { animation: pip-hop .9s ease-in-out infinite; }
.mood-cheer .pip-arm { animation: pip-cheer .9s ease-in-out infinite; }
.mood-wave .pip-sway { animation: pip-sway 2.1s ease-in-out infinite; }
.mood-wave .pip-arm.r { animation: pip-wave .7s ease-in-out infinite; }
@keyframes pip-breathe { 50% { transform: scale(.988, 1.012); } }
@keyframes pip-arm { 50% { transform: rotate(calc(var(--a) + 4deg)); } }
@keyframes pip-blink { 0%, 96%, 100% { transform: scaleY(1); } 98% { transform: scaleY(.1); } }
@keyframes pip-tail { 50% { transform: rotate(10deg); } }
@keyframes pip-hop { 0%, 100% { transform: translateY(0); } 40%, 60% { transform: translateY(-9px); } }
@keyframes pip-cheer { 50% { transform: rotate(calc(var(--a) + 12deg)); } }
@keyframes pip-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes pip-wave { 0%, 100% { transform: rotate(-162deg); } 50% { transform: rotate(-118deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* friend invite note on the signup page */
.note { margin: 14px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--jade-l); color: var(--jade-d); font-size: 15px; font-weight: 800; text-align: center; }

/* invite page */
.hero .inv-pip { width: 100px; margin: 14px auto 0; }
.reward { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: #F1F2F4; transition: background .4s; }
.reward-ic { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: #fff; box-shadow: 0 4px 0 var(--line); }
.reward b { display: block; font-size: 17px; line-height: 1.25; font-weight: 900; }
.reward span { display: block; margin-top: 3px; font-size: 14px; color: var(--muted); }
.reward.on { background: var(--gold-l); }
.reward.on .reward-ic { background: var(--gold); box-shadow: 0 4px 0 var(--gold-d); }
.reward.on span { color: #8a6a10; }
.reward.pop { animation: pop .6s var(--spring); }
@keyframes pop { 40% { transform: scale(1.06); } }

.friends { margin: 18px 0 6px; text-align: center; }
.slots { display: flex; justify-content: center; gap: 10px; }
.slot { width: 56px; aspect-ratio: 60 / 76; border-radius: 12px; border: 3px dashed var(--line); display: grid; place-items: center;
  font-size: 26px; font-weight: 900; color: var(--faint); }
.slot.on { border: 0; animation: fan-in .6s var(--spring); }
.slot svg { width: 100%; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.friends p { margin: 10px 0 0; font-size: 15px; font-weight: 800; color: var(--muted); }
.friends p b { color: var(--ink); }

.inv .field { display: block; margin: 14px 0 14px; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; height: 54px; padding: 0 14px; border-radius: 16px; border: 2px solid var(--line); background: #F8F9FA;
  font: 700 15px var(--font); color: var(--ink); outline: none; }
.linkbox button { flex: none; height: 54px; padding: 0 18px; border: 0; border-radius: 16px; cursor: pointer;
  font: 900 16px var(--font); color: var(--jade-d); background: var(--jade-l); }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.share-row .btn { height: 50px; line-height: 50px; font-size: 16px; }

.steps { margin: 20px 0 10px; padding: 0 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.steps li { margin: 6px 0; padding-left: 4px; }
.steps b { color: var(--ink); }
.steps li::marker { color: var(--jade); font-weight: 900; }
.cd-mini { margin: 18px 0 0; text-align: center; font-size: 16px; color: rgba(255,255,255,.9); }
.cd-mini b { color: #FFE38A; }
