/* =============================================================
   Glimp Design System — "Velvet Ember"
   Dark-mode native. No light mode. No greys. No 90° corners.
   ============================================================= */

/* ---- Google Fonts ----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Manrope:wght@400;600&display=swap');

/* ---- Tokens ----------------------------------------------- */
:root {
  /* Surfaces — warm brown */
  --surface-lowest:           #35201D;
  --surface:                  #3D241F;
  --surface-container-low:    #462B24;
  --surface-container:        #503329;
  --surface-container-high:   #5A3D2F;
  --surface-container-highest:#664A39;
  --surface-bright:           #7E593F;

  /* Primary — Ember Orange */
  --primary:                  #D46A2E;
  --primary-container:        #E08A52;
  --primary-glow:             rgba(212,106,46,0.22);
  --on-primary:               #FFF8F0;
  --surface-tint:             #E8B088;

  /* Secondary — Warm Amber */
  --secondary:                #D4914A;
  --on-secondary:             #1A0E08;

  /* Text */
  --on-surface:               #FFF8F0;
  --on-surface-variant:       #C4A882;

  /* Outline */
  --outline:                  #A88868;
  --outline-variant:          #6D5248;

  /* Error */
  --error:                    #CF6659;
  --on-error:                 #1A0500;

  /* Glass */
  --glass-bg:                 rgba(70,43,36,0.60);

  /* Spacing scale (8pt) */
  --sp-2:  2px;  --sp-3:  3px;  --sp-4:  4px;  --sp-6:  6px;
  --sp-8:  8px;  --sp-12: 12px; --sp-16: 16px; --sp-20: 20px;
  --sp-24: 24px; --sp-32: 32px; --sp-40: 40px; --sp-48: 48px;
  --sp-56: 56px; --sp-64: 64px; --sp-80: 80px; --sp-100:100px;
  --sp-120:120px;--sp-160:160px;--sp-200:200px;

  /* Radius */
  --r-pill: 999px;
  --r-card: 24px;
  --r-modal: 32px;
  --r-btn:  24px;
  --r-input:24px;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--surface-lowest);
  color: var(--on-surface);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

/* ---- Skip link -------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--sp-16);
  background: var(--primary);
  color: var(--on-primary);
  padding: var(--sp-8) var(--sp-16);
  border-radius: var(--r-pill);
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { left: var(--sp-16); }

/* ---- Typography scale ------------------------------------- */
.display-xl {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.0;
  color: var(--on-surface);
}
.display-lg {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.0;
}
.display-md {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1.0px;
  line-height: 1.1;
}
.headline-lg {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.headline-md {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.25px;
  line-height: 1.25;
}
.title-lg {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.body-lg {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}
.body-md {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.label-md {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.0px;
  line-height: 1.0;
  text-transform: uppercase;
}

/* ---- Components ------------------------------------------- */

/* GlimpButton primary */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  background: var(--primary);
  color: var(--on-primary);
  height: 56px;
  padding: 0 var(--sp-32);
  border-radius: var(--r-btn);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: background 0.18s, transform 0.12s;
  white-space: nowrap;
}
.btn-primary:hover  { background: var(--primary-container); }
.btn-primary:active { transform: translateY(1px); }

/* GlimpButton ghost */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  background: transparent;
  color: var(--on-surface);
  height: 56px;
  padding: 0 var(--sp-32);
  border-radius: var(--r-btn);
  border: 1px solid rgba(168,136,104,0.32);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s;
}
.btn-ghost:hover { background: rgba(168,136,104,0.08); border-color: rgba(168,136,104,0.56); }

/* GlimpButton small */
.btn-sm {
  height: 40px;
  padding: 0 var(--sp-20);
  font-size: 13px;
  border-radius: 20px;
}

/* GlimpCard */
.glimp-card {
  background: var(--surface-container);
  border-radius: var(--r-card);
}

/* GlimpInput */
.glimp-input {
  width: 100%;
  background: var(--surface-container-high);
  color: var(--on-surface);
  border: none;
  border-radius: var(--r-input);
  height: 56px;
  padding: 0 var(--sp-24);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  outline: none;
  transition: box-shadow 0.18s;
}
.glimp-input:focus {
  box-shadow: 0 0 0 1.5px var(--primary);
}
.glimp-input::placeholder { color: var(--on-surface-variant); }

textarea.glimp-input {
  height: auto;
  padding: var(--sp-16) var(--sp-24);
  resize: vertical;
}

/* GlimpSelect */
select.glimp-input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* Chip / Pill */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  background: var(--surface-container-high);
  color: var(--on-surface);
  border-radius: var(--r-pill);
  padding: var(--sp-4) var(--sp-16);
  font-size: 14px;
  font-weight: 600;
}
.chip.active { background: var(--primary); color: var(--on-primary); }

/* ---- Navigation ------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 var(--sp-24);
  transition: background 0.25s, backdrop-filter 0.25s, border-color 0.25s;
}
.nav.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(168,136,104,0.12);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: var(--sp-32);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-32);
  margin-left: auto;
}
.nav-links a {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--on-surface); }
.nav-cta { margin-left: var(--sp-16); height: 44px; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  color: var(--on-surface);
  margin-left: auto;
}
.nav-toggle:hover { background: var(--surface-container); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--surface-container-low);
  border-bottom: 1px solid rgba(168,136,104,0.12);
  padding: var(--sp-16) var(--sp-24) var(--sp-24);
  z-index: 99;
  flex-direction: column;
  gap: var(--sp-4);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: block;
  padding: var(--sp-12) var(--sp-16);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--on-surface-variant);
  border-radius: 16px;
}
.nav-mobile a:hover { color: var(--on-surface); background: var(--surface-container); }
.nav-mobile .btn-primary { width: 100%; margin-top: var(--sp-8); justify-content: center; }

/* ---- Footer ----------------------------------------------- */
.footer {
  background: var(--surface-container-low);
  border-top: 1px solid rgba(168,136,104,0.10);
  padding: var(--sp-64) var(--sp-24) var(--sp-40);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 200px repeat(4, 1fr);
  gap: var(--sp-48);
  margin-bottom: var(--sp-48);
}
.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  margin-bottom: var(--sp-16);
}
.footer-tagline {
  font-size: 13px;
  color: var(--on-surface-variant);
  line-height: 1.5;
  max-width: 160px;
}
.footer-col-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: var(--sp-16);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}
.footer-links a {
  font-size: 14px;
  color: var(--on-surface-variant);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--on-surface); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-32);
  border-top: 1px solid rgba(168,136,104,0.10);
  gap: var(--sp-16);
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 13px;
  color: var(--on-surface-variant);
}
.footer-legal-links {
  display: flex;
  gap: var(--sp-24);
}
.footer-legal-links a {
  font-size: 13px;
  color: var(--on-surface-variant);
  transition: color 0.15s;
}
.footer-legal-links a:hover { color: var(--on-surface); }

/* ---- Section base ----------------------------------------- */
.section {
  padding: var(--sp-100) var(--sp-24);
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-eyebrow {
  color: var(--primary);
  margin-bottom: var(--sp-12);
}
.section-title {
  margin-bottom: var(--sp-48);
}

/* ---- Store badges ----------------------------------------- */
.badge-store {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-12);
  background: var(--surface-container);
  color: var(--on-surface);
  border-radius: var(--r-btn);
  padding: var(--sp-12) var(--sp-24);
  transition: background 0.18s, transform 0.12s;
  border: 1px solid rgba(168,136,104,0.16);
}
.badge-store:hover { background: var(--surface-container-high); transform: translateY(-1px); }
.badge-store:active { transform: translateY(0); }
.badge-store svg { flex-shrink: 0; }
.badge-text { display: flex; flex-direction: column; }
.badge-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--on-surface-variant);
  letter-spacing: 0.3px;
  line-height: 1;
}
.badge-name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

/* ---- Inline link ------------------------------------------ */
.link-accent {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-accent:hover { color: var(--primary-container); }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .section { padding: var(--sp-64) var(--sp-20); }

  .display-xl { letter-spacing: -1px; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-32); }
  .footer-brand { grid-column: 1 / -1; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Prose (legal pages) ---------------------------------- */
.prose {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  max-width: 720px;
}
.prose h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.25px;
  line-height: 1.25;
  color: var(--on-surface);
  margin: var(--sp-48) 0 var(--sp-16);
  padding-top: var(--sp-16);
  scroll-margin-top: 100px;
}
.prose h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: var(--sp-32) 0 var(--sp-12);
}
.prose p { margin-bottom: var(--sp-16); }
.prose ul, .prose ol {
  padding-left: var(--sp-24);
  margin-bottom: var(--sp-16);
  list-style: disc;
}
.prose ol { list-style: decimal; }
.prose li { margin-bottom: var(--sp-8); }
.prose a { color: var(--primary); text-underline-offset: 3px; text-decoration: underline; }
.prose a:hover { color: var(--primary-container); }
.prose strong { font-weight: 600; color: var(--on-surface); }
.prose code {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  font-size: 13px;
  background: var(--surface-container);
  padding: 2px 8px;
  border-radius: 8px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-24) 0;
  font-size: 14px;
}
.prose th {
  text-align: left;
  padding: var(--sp-12) var(--sp-16);
  background: var(--surface-container-low);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.prose td {
  padding: var(--sp-12) var(--sp-16);
  border-bottom: 1px solid rgba(168,136,104,0.10);
  vertical-align: top;
}
.prose tr:last-child td { border-bottom: none; }

/* Legal layout */
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-64);
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-48) var(--sp-24);
  padding-top: 120px;
}
.legal-toc {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.legal-toc-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: var(--sp-16);
}
.legal-toc-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.legal-toc-links a {
  display: block;
  font-size: 13px;
  color: var(--on-surface-variant);
  padding: var(--sp-6) var(--sp-12);
  border-radius: 12px;
  transition: color 0.15s, background 0.15s;
  line-height: 1.4;
}
.legal-toc-links a:hover { color: var(--on-surface); background: var(--surface-container); }
.legal-toc-links a.active { color: var(--primary); background: var(--surface-container); }

.legal-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px var(--sp-24) 0;
}
.legal-version {
  font-size: 12px;
  color: var(--on-surface-variant);
  margin-top: var(--sp-8);
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    padding-top: 100px;
  }
  .legal-toc { display: none; }
}

/* ---- Anchor link copy icon -------------------------------- */
.anchor-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  color: inherit;
  text-decoration: none;
}
.anchor-link::after {
  content: '#';
  font-size: 16px;
  color: var(--outline-variant);
  opacity: 0;
  transition: opacity 0.15s;
  font-weight: 400;
}
.anchor-link:hover::after { opacity: 1; }

/* ---- Scroll reveal (GSAP-driven) -------------------------- */
/* `.js-anim` is added to <html> by a tiny head script ONLY when JS is on.
   These elements start hidden and are revealed by GSAP (js/glimp.js).
   If GSAP fails to load, glimp.js removes `.js-anim` so nothing stays hidden.
   Under reduced-motion, everything is shown instantly (no transforms). */
.js-anim :is(
  .reveal,
  [data-hero], [data-hero-video],
  .section-eyebrow, .section-title,
  .step-card, .privacy-card, .business-card,
  .moment,
  .biz-hub-card, .help-card, .feature-card, .how-card, .stat-item
) {
  opacity: 0;
  transform: translateY(26px);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .js-anim :is(
    .reveal,
    [data-hero], [data-hero-video],
    .section-eyebrow, .section-title,
    .step-card, .privacy-card, .business-card,
    .moment,
    .biz-hub-card, .help-card, .feature-card, .how-card, .stat-item
  ) {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- Scroll progress bar (GSAP) --------------------------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 200;
  pointer-events: none;
}

/* ---- Hero masked-line title reveal ------------------------ */
.ht-line { display: block; overflow: hidden; }
.ht-line > span { display: block; will-change: transform; }

/* ---- Venue marquee ---------------------------------------- */
.marquee {
  overflow: hidden;
  background: var(--surface-lowest);
  border-top: 1px solid rgba(168,136,104,0.12);
  border-bottom: 1px solid rgba(168,136,104,0.12);
  padding: var(--sp-20) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: var(--sp-48);
  width: max-content;
  will-change: transform;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-32);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--on-surface-variant);
  white-space: nowrap;
}
.marquee-item::after {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
  box-shadow: 0 0 0 4px var(--primary-glow);
}
@media (max-width: 640px) { .marquee-item { font-size: 17px; gap: var(--sp-24); } }

/* Elements that GSAP drives by scrub get GPU hints */
.moment-video, .moment { will-change: transform; }

/* Momentos reveal via clip-path (not translate), so cancel the shared
   translateY offset — keeps the bento cards perfectly level with each other. */
.js-anim .moment { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .ht-line > span { transform: none !important; }
  .marquee-track { transform: none !important; flex-wrap: wrap; }
}

/* ---- Utility ---------------------------------------------- */
.text-muted { color: var(--on-surface-variant); }
.text-primary { color: var(--primary); }
.mt-8  { margin-top: var(--sp-8); }
.mt-16 { margin-top: var(--sp-16); }
.mt-24 { margin-top: var(--sp-24); }
.mt-32 { margin-top: var(--sp-32); }
.mt-48 { margin-top: var(--sp-48); }
