/* TapLog website. Palette matches the app (TapLogTheme). */
:root {
  --bg: #ffffff;
  --soft: #f5f6fa;
  --text: #000a38;
  --text-2: #4a5070;
  --text-3: #7a7f99;
  --primary: #192b8a;
  --vivid: #3557ff;
  --navy: #000a38;
  --navy-2: #0d1a52;
  --lime: #eced4c;
  --line: rgba(0, 10, 56, 0.1);
  --max: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vivid); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 21px; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.logo i { font-style: normal; color: #c9ca2a; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; font-weight: 600; }
.nav-links a { color: var(--text-2); text-decoration: none; }
.nav-links a:hover { color: var(--text); }

/* Store button (pre-launch: not Apple's badge, which is only for live apps) */
.store {
  display: inline-flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 24px 0 20px;
  border-radius: 16px;
  background: #000000; color: #ffffff;
  text-decoration: none; text-align: left;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; opacity: 0.8; line-height: 1.1; }
.store b { display: block; font-size: 19px; line-height: 1.15; font-weight: 700; }
.store.sm { height: 44px; padding: 0 16px 0 14px; border-radius: 12px; gap: 8px; }
.store.sm svg { width: 18px; height: 18px; }
.store.sm b { font-size: 14px; }
.store.light { background: #ffffff; color: #000000; }
.cta-note { margin-top: 12px; font-size: 14px; color: var(--text-3); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 0; background: radial-gradient(1200px 520px at 80% 0%, #eef1ff 0%, rgba(238, 241, 255, 0) 70%); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.hero .copy { padding-bottom: 72px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2.2rem, 10.5vw, 3.6rem); font-weight: 800; margin: 18px 0 18px; }
h1 .line { white-space: nowrap; }
h1 em { font-style: normal; background: linear-gradient(transparent 60%, var(--lime) 60%); }
.sub { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--text-2); max-width: 30ch; margin-bottom: 30px; }

/* Cropped phone mockups: the top of the real screen, faded out */
.phones { position: relative; height: 560px; width: 100%; max-width: 500px; margin-left: auto; }
.phone {
  position: absolute; width: 270px; height: 540px;
  border: 10px solid #0b0f24; border-bottom: 0;
  border-radius: 48px 48px 0 0;
  overflow: hidden; background: #0b0f24;
  box-shadow: 0 30px 70px rgba(0, 10, 56, 0.25);
}
.phone img { width: 100%; height: auto; }
.phone.front { right: 0; bottom: 0; z-index: 2; }
.phone.back { right: 210px; bottom: -50px; transform: rotate(-7deg); }

.shot {
  width: 300px; max-width: 100%; margin: 0 auto;
  aspect-ratio: 300 / 430;
  border: 10px solid #0b0f24; border-radius: 46px;
  overflow: hidden; background: #0b0f24;
  box-shadow: 0 28px 60px rgba(0, 10, 56, 0.22);
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}
.shot img { width: 100%; height: auto; }

/* Sections */
section { padding: 96px 0; }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; margin-bottom: 16px; }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 34ch; }
.tag { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vivid); margin-bottom: 12px; }
.center { text-align: center; }
.center .lead { margin: 0 auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; text-align: left; }
.step { background: var(--soft); border-radius: 26px; padding: 28px; }
.step .emoji { font-size: 34px; line-height: 1; }
.step h3 { font-size: 1.35rem; margin: 18px 0 6px; }
.step p { color: var(--text-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev .text { order: 2; }

.dark { background: var(--navy); color: #ffffff; }
.dark .lead { color: #c3c8dc; }
.dark .tag { color: var(--lime); }
.dark .shot { border-color: #1c2a66; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { border-top: 2px solid var(--text); padding-top: 18px; }
.stat b { display: block; font-family: var(--display); font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 8px; color: var(--text-2); font-size: 1.05rem; }

.faq { max-width: 720px; margin: 36px auto 0; text-align: left; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--text-3); }
.faq details[open] summary::after { content: "×"; }
.faq details p { margin-top: 10px; color: var(--text-2); }

.final { background: var(--navy); color: #ffffff; border-radius: 36px; padding: 72px 24px; text-align: center; }
.final h2 { margin-bottom: 14px; }
.final p { color: #c3c8dc; margin-bottom: 28px; font-size: 1.15rem; }

footer { padding: 40px 0 56px; font-size: 14px; color: var(--text-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 14px 24px; }
footer a { color: var(--text-2); text-decoration: none; }

/* Legal + support pages */
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 740px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin: 0 0 8px; }
.doc h2 { font-size: 1.35rem; margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc .meta { color: var(--text-3); font-size: 15px; margin-bottom: 24px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--text); }
.callout { background: var(--soft); border-radius: 18px; padding: 18px 20px; margin: 20px 0; }

@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; }
  .hero .copy { padding-bottom: 8px; text-align: center; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .phones { height: 430px; max-width: 380px; width: 100%; margin: 0 auto; }
  .phone { width: 230px; height: 430px; border-width: 8px; border-radius: 40px 40px 0 0; }
  .phone.front { right: 12px; }
  .phone.back { right: auto; left: 0; bottom: -30px; }
  section { padding: 64px 0; }
  .steps, .stats { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .split .lead { margin: 0 auto; }
  .split.rev .text { order: 0; }
  .shot { width: 260px; }
  .nav-links .hide-sm { display: none; }
}

@media (max-width: 600px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc table tr:first-child { display: none; }
  .doc tr { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
  .doc td { border: 0; padding: 3px 0; }
  .doc td:first-child { color: var(--text); font-weight: 700; }
}

.nav-links a.store { color: #ffffff; }

/* Live founding-member counter */
.spots { margin-top: 22px; max-width: 340px; }
.spots[hidden], .final-spots[hidden] { display: none; }
.spots-row { display: flex; align-items: center; font-size: 15px; color: var(--text-2); }
.spots-row b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.spots-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 8px; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); animation: spots-pulse 1.8s ease-in-out infinite; }
@keyframes spots-pulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.05); } }
.spots-bar { height: 8px; border-radius: 999px; background: var(--soft); margin: 10px 0 8px; overflow: hidden; }
.spots-bar i { display: block; height: 100%; width: 2%; border-radius: 999px; background: var(--primary); transition: width 0.8s ease; }
.spots-note { font-size: 13px; color: var(--text-3); }
.final .final-spots { color: var(--lime); font-weight: 700; margin: -14px 0 26px; font-size: 1.05rem; }
.final-spots b { font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .spots { margin-left: auto; margin-right: auto; text-align: center; }
  .spots-row { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .spots-dot { animation: none; } }

/* Utility classes (no inline styles: the CSP forbids them) */
.tinted { background: var(--soft); }
.tight-top { padding-top: 24px; }
.support-lead { max-width: none; margin: 12px 0; }
.faq-tight { margin-top: 8px; }

/* reCAPTCHA (App Check for the live counter): badge hidden, attribution in the footer as Google requires */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note { flex-basis: 100%; order: 3; font-size: 12px; color: var(--text-3); }
.recaptcha-note a { color: var(--text-3); text-decoration: underline; }
