/* ==========================================================================
   ggates1020 app sites — shared styles (CardSnap, Scatterbox, Upkeep)
   Palette: Chrome Black #0D0D0D · Digital Lilac #D9B8FF  (matches ggates1020.com)
   ========================================================================== */

:root {
  --black: #0D0D0D;
  --black-2: #151515;
  --black-3: #1E1E1E;
  --lilac: #D9B8FF;
  --lilac-deep: #B48CF0;
  --lilac-soft: rgba(217, 184, 255, 0.14);
  --lilac-line: rgba(217, 184, 255, 0.22);
  --text: #F4EEFB;
  --text-muted: #9B94A6;
  --hairline: rgba(255, 255, 255, 0.06);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 24px;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1160px;
  --prose: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--lilac); color: var(--black); }

a { color: var(--lilac); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; }

img, svg { max-width: 100%; }

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--black);
  font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac);
}

.muted { color: var(--text-muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s, color 0.3s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn span { transition: transform 0.3s var(--ease-out); }
.btn--primary { background: var(--lilac); color: var(--black); }
.btn--primary:hover { box-shadow: 0 12px 40px -8px rgba(217, 184, 255, 0.55); }
.btn--primary:hover span { transform: translateX(4px); }
.btn--ghost { border: 1px solid var(--lilac-line); color: var(--text); }
.btn--ghost:hover { border-color: var(--lilac); color: var(--lilac); }
.btn--lg { font-size: clamp(16px, 2.4vw, 20px); padding: 18px 32px; }
.btn .apple { width: 15px; height: 18px; margin-top: -3px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-block: 14px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
}
.nav__brand:hover { text-decoration: none; }
.nav__brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); font-size: 15px; font-weight: 500; }
.nav__links a { color: var(--text-muted); }
.nav__links a:hover { color: var(--lilac); text-decoration: none; }
.nav__links .btn { padding: 9px 18px; font-size: 14px; color: var(--black); }

@media (max-width: 720px) {
  .nav__links a:not(.btn) { display: none; }
}

/* ---------- Page sections ---------- */

.section { padding-block: clamp(80px, 12vw, 140px); border-top: 1px solid var(--hairline); }
.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section__head h2 { font-size: clamp(36px, 6vw, 64px); }
.section__head p { margin: 18px 0 0; color: var(--text-muted); font-size: clamp(17px, 1.8vw, 20px); }

/* ---------- Card grid ---------- */

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--black-2);
  border: 1px solid var(--hairline);
}
.card h3 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 10px; }
.card p { margin: 0; color: var(--text-muted); font-size: 16px; }
.card__num {
  display: block;
  margin-bottom: 18px;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--lilac);
}

/* ---------- FAQ ---------- */

.faq { max-width: var(--prose); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--lilac);
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 24px; color: var(--text-muted); }

/* ---------- Closing CTA ---------- */

.cta { text-align: center; }
.cta h2 { font-size: clamp(48px, 10vw, 120px); font-weight: 900; margin-bottom: 36px; }
.cta .actions { justify-content: center; }

/* ---------- Inner pages (support, legal) ---------- */

.page { max-width: var(--prose); margin: 0 auto; padding: clamp(60px, 10vw, 110px) var(--gutter) clamp(80px, 12vw, 130px); }
.page__title { font-size: clamp(40px, 7vw, 68px); margin-bottom: 18px; }
.page__lede { margin: 0 0 12px; font-size: clamp(18px, 2vw, 21px); color: var(--text-muted); }
.page__date { margin: 0; font-size: 15px; color: var(--text-muted); }

.prose h2 { font-size: 24px; letter-spacing: -0.02em; margin: 48px 0 12px; }
.prose p, .prose li { color: rgba(244, 238, 251, 0.86); }
.prose p { margin: 0 0 16px; }
.prose h3 { font-size: 19px; letter-spacing: -0.01em; margin: 32px 0 10px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--lilac); }

/* Contact options on support pages */
.contact-list { display: grid; gap: 12px; margin: 40px 0 16px; }
.contact-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--black-2);
  border: 1px solid var(--hairline);
}
.contact-item h3 { font-size: 19px; letter-spacing: -0.01em; }
.contact-item p { margin: 4px 0 0; font-size: 15px; color: var(--text-muted); overflow-wrap: anywhere; }
.contact-item .btn { padding: 11px 20px; font-size: 15px; }
.contact-note { margin: 0; font-size: 15px; color: var(--text-muted); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--hairline); font-size: 14px; color: var(--text-muted); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px;
}
.footer p { margin: 0; max-width: 460px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--lilac); }
.footer__family a { color: var(--text); }

/* ---------- Motion ---------- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  body { font-size: 17px; }
  .card { padding: 24px; }
  .faq summary { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Scroll progress + reveal (driven by shared/site.js) ---------- */

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 100; pointer-events: none; }
.progress__bar {
  display: block;
  height: 100%;
  background: var(--lilac);
  transform-origin: left;
  transform: scaleX(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 120ms);
}
.js .card.reveal { transform: translateY(80px) scale(0.94); }
.js .reveal.is-visible { opacity: 1; transform: none; }
