/* ── Tappit promo site — bento "gummy" design system ──────────────────────
   Palette mirrors TimerBattle/constants/bentoColors.ts */

:root {
  --bg: #fbf8ff;
  --surface: #ffffff;
  --surface-low: #f4f2ff;
  --surface-container: #ececff;

  --pink: #9f376f;
  --pink-light: #ff85c1;
  --pink-container: #ffd8e7;
  --pink-dark: #811d57;

  --mint: #006b5f;
  --mint-light: #82f6e3;
  --mint-container: #64d9c7;
  --mint-dark: #005047;

  --yellow: #705d00;
  --yellow-light: #ffe173;
  --yellow-container: #cdab00;

  --text: #161a32;
  --text-sub: #544249;
  --border: #d9c0c9;
  --border-light: #dee0ff;

  --radius: 24px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-timer: "Orbitron", "Inter", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

/* ── Pills (uppercase labels, as in the app) ── */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.pill--pink   { background: var(--pink-container);  color: var(--pink-dark); }
.pill--mint   { background: var(--mint-light);      color: var(--mint-dark); }
.pill--yellow { background: var(--yellow-light);    color: var(--yellow); }

/* ── Gummy cards: solid offset shadow, springy press ── */
.gummy {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(159, 55, 111, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.gummy:active, button.gummy:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(159, 55, 111, 0.18);
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-light);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
  max-width: 1080px;
  margin: 0 auto;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  color: var(--pink-dark);
  text-decoration: none;
}
.nav__logo img { width: 36px; height: 36px; border-radius: 12px; }
.nav__links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  align-items: center;
}
.nav__links a {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  text-decoration: none;
}
.nav__links a:hover { color: var(--pink); }
.nav__cta {
  background: var(--pink-light);
  color: var(--pink-dark) !important;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--pink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nav__cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pink); }

/* ── Hero ── */
.hero {
  padding: 72px 0 56px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
}
.hero h1 .hl-pink { color: var(--pink); }
.hero h1 .hl-mint { color: var(--mint); }
.hero p.sub {
  margin-top: 18px;
  font-size: 18px;
  color: var(--text-sub);
  font-weight: 500;
  max-width: 44ch;
}
.hero__ctas { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  padding: 15px 28px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn--pink {
  background: var(--pink-light);
  color: var(--pink-dark);
  box-shadow: 0 5px 0 var(--pink);
}
.btn--pink:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--pink); }
.btn--mint {
  background: var(--mint-container);
  color: var(--mint-dark);
  box-shadow: 0 5px 0 var(--mint);
}
.btn--mint:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--mint); }

/* ── Timer demo card ── */
.demo {
  padding: 34px 30px;
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--border-light);
  user-select: none;
  -webkit-user-select: none;
}
.demo__target {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-sub);
}
.demo__clock {
  font-family: var(--font-timer);
  font-size: clamp(48px, 8vw, 64px);
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums;
}
.demo__clock.is-hidden { color: var(--border-light); }
.demo__result {
  min-height: 26px;
  font-size: 16px;
  font-weight: 800;
}
.demo__result--win  { color: var(--mint); }
.demo__result--ok   { color: var(--yellow); }
.demo__result--miss { color: var(--pink); }
.demo__btn {
  margin-top: 18px;
  width: 100%;
  font-size: 18px;
}
.demo__hint { margin-top: 14px; font-size: 12px; color: var(--text-sub); font-weight: 600; }

/* ── Sections ── */
.section { padding: 64px 0; }
.section__head { text-align: center; margin-bottom: 40px; }
.section__head h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.5px;
}
.section__head p { color: var(--text-sub); font-weight: 500; margin-top: 8px; }

/* ── Mode cards ── */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}
.mode {
  padding: 26px 24px;
  text-align: center;
}
.mode--pink   { background: var(--pink-container);   box-shadow: 0 6px 0 var(--pink); }
.mode--mint   { background: var(--mint-light);       box-shadow: 0 6px 0 var(--mint); }
.mode--yellow { background: var(--yellow-light);     box-shadow: 0 6px 0 var(--yellow-container); }
.mode--lav    { background: var(--surface-container); box-shadow: 0 6px 0 #8f8fd4; }
.mode img { width: 130px; height: 130px; object-fit: contain; margin: 0 auto 14px; }
.mode h3 { font-size: 20px; font-weight: 900; }
.mode p { font-size: 14px; color: var(--text-sub); font-weight: 600; margin-top: 6px; }

/* ── Feature grid ── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.feature { padding: 26px; display: flex; gap: 16px; align-items: flex-start; }
.feature__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.feature h3 { font-size: 17px; font-weight: 900; }
.feature p { font-size: 14px; color: var(--text-sub); font-weight: 500; margin-top: 4px; }

/* ── Big CTA banner ── */
.banner {
  background: var(--pink-light);
  box-shadow: 0 8px 0 var(--pink);
  border-radius: 32px;
  padding: 56px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.banner::before, .banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}
.banner::before { width: 220px; height: 220px; top: -70px; right: -60px; }
.banner::after  { width: 150px; height: 150px; bottom: -50px; left: -40px; }
.banner h2 {
  color: #fff;
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 900;
  letter-spacing: -0.5px;
  position: relative;
}
.banner p { color: rgba(255, 255, 255, 0.9); font-weight: 600; margin-top: 8px; position: relative; }
.banner .btn { margin-top: 26px; position: relative; background: #fff; color: var(--pink-dark); box-shadow: 0 5px 0 var(--pink-dark); }
.banner .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--pink-dark); }

/* ── Footer ── */
.footer {
  border-top: 2px solid var(--border-light);
  margin-top: 72px;
  padding: 32px 0 44px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.footer p { font-size: 13px; color: var(--text-sub); font-weight: 500; }
.footer nav { display: flex; gap: 18px; }
.footer a { font-size: 13px; font-weight: 700; color: var(--pink); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Privacy page ── */
.prose { max-width: 720px; margin: 0 auto; padding: 56px 20px 40px; }
.prose h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 900; letter-spacing: -0.5px; }
.prose .updated { color: var(--text-sub); font-size: 14px; font-weight: 600; margin-top: 6px; }
.prose h2 { font-size: 20px; font-weight: 900; margin-top: 36px; }
.prose p, .prose li { font-size: 15px; color: var(--text-sub); font-weight: 500; margin-top: 10px; }
.prose ul { padding-left: 22px; }
.prose li { margin-top: 6px; }
.prose strong { color: var(--text); }
.prose a { color: var(--pink); font-weight: 700; }
.prose .card {
  background: var(--surface-low);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 16px;
}

/* ── Invite landing pages (friend.html / room.html / party.html) ──────────
   One card per invite kind; the kind only swaps the accent trio below, so all
   three pages stay the same layout as the rest of the site. */
.invite {
  display: grid;
  place-items: center;
  padding: 56px 0 40px;
}
.invite__card {
  width: 100%;
  max-width: 440px;
  padding: 38px 30px;
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--border-light);
  border-radius: 28px;
  box-shadow: 0 8px 0 rgba(159, 55, 111, 0.18);
}
.invite__logo { width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 18px; }
.invite__card h1 {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.invite__sub { margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--text-sub); }

/* Code shown as squishy per-character tiles, like CodeTiles in the app. */
.invite__code-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-sub);
}
.code-tiles {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}
.code-tile {
  font-family: var(--font-timer);
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 700;
  width: 44px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--inv-tile-bg);
  color: var(--inv-tile-fg);
  box-shadow: 0 4px 0 var(--inv-accent-dark);
}
.invite__copy {
  margin-top: 14px;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  color: var(--inv-accent-dark);
  cursor: pointer;
  text-decoration: underline;
}

.invite__actions { display: grid; gap: 12px; margin-top: 26px; }
.btn--block { width: 100%; justify-content: center; }
.btn--open {
  background: var(--inv-accent);
  color: var(--inv-accent-dark);
  box-shadow: 0 5px 0 var(--inv-accent-dark);
}
.btn--open:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--inv-accent-dark); }
.btn--store {
  background: var(--surface-low);
  color: var(--text);
  font-size: 14px;
  padding: 13px 20px;
  border: 2px solid var(--border-light);
  box-shadow: 0 4px 0 var(--border-light);
}
.btn--store:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border-light); }

.invite__foot { margin-top: 22px; font-size: 13px; font-weight: 600; color: var(--text-sub); }
.invite__foot a { color: var(--pink); font-weight: 800; text-decoration: none; }
.invite__foot a:hover { text-decoration: underline; }

/* Accent trio per invite kind — set on <body>. */
.invite--friend { --inv-accent: var(--pink-light); --inv-accent-dark: var(--pink-dark); --inv-tile-bg: var(--pink-container); --inv-tile-fg: var(--pink-dark); }
.invite--room   { --inv-accent: var(--mint-container); --inv-accent-dark: var(--mint-dark); --inv-tile-bg: var(--mint-light); --inv-tile-fg: var(--mint-dark); }
.invite--party  { --inv-accent: var(--yellow-light); --inv-accent-dark: var(--yellow); --inv-tile-bg: var(--yellow-light); --inv-tile-fg: var(--yellow); }

@media (max-width: 380px) {
  .invite__card { padding: 30px 20px; }
  .code-tile { width: 38px; height: 50px; }
}

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Mobile ── */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0 40px; gap: 36px; }
  .nav__links a:not(.nav__cta) { display: none; }
}
