/* ═══════════════════════════════════════════════════
   Marmot-Apps Design System — shared/style.css
   Brand: #7869EE purple → #4A90D9 blue
   ═══════════════════════════════════════════════════ */

:root {
  --bg:        #030305;
  --bg-alt:    #06060A;
  --surface:   rgba(255, 255, 255, 0.02);
  --surface-2: rgba(255, 255, 255, 0.04);
  --border:    rgba(255, 255, 255, 0.06);
  --purple:    #8b7cfa;
  --blue:      #60a5fa;
  --red:       #FF3B30;
  --green:     #34C759;
  --amber:     #E8A854;
  --text:      #F8F8FC;
  --text-2:    rgba(240, 240, 248, 0.70);
  --text-3:    rgba(240, 240, 248, 0.45);
  --grad:      linear-gradient(135deg, #8b7cfa 0%, #60a5fa 100%);
  --grad-glow: radial-gradient(ellipse 70% 60% at 68% 40%, rgba(139,124,250,0.15) 0%, transparent 68%);
  --r-card:    24px;
  --r-sm:      14px;
  --shadow:    0 10px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  --max-w:     1140px;
}

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

html { scroll-behavior: smooth; }

/* ── Custom Scrollbar ────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(120, 105, 238, 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 105, 238, 0.6);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI',
               Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }

/* ── Navigation ─────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,7,15,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-brand span {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.btn-nav {
  background: var(--grad) !important;
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-nav:hover { opacity: 0.88; }

/* ── Hero ────────────────────────────────────────── */

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-glow);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-text { 
  max-width: 520px; 
  transform: translateY(calc(var(--scroll-y, 0px) * 0.35));
  opacity: calc(1 - (var(--scroll-y, 0) / 700));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(120,105,238,0.14);
  border: 1px solid rgba(120,105,238,0.28);
  color: #9d93f3;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 22px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(36px, 4.8vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 440px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 100px;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg) !important;
  padding: 13px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: -0.2px;
}

.btn-appstore:hover { opacity: 0.90; transform: translateY(-1px); }

/* ── DOM Parallax Components ── */
.hero-phones {
  transform: translateY(calc(var(--scroll-y, 0px) * 0.15));
}
.stats-strip {
  position: relative;
  z-index: 10;
  transform: translateY(calc(var(--scroll-y, 0px) * -0.1));
}

.btn-appstore svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-secondary {
  color: var(--text-2) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: color 0.2s;
}

.btn-secondary:hover { color: var(--text) !important; }

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 100%;
  max-width: 360px;
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(120,105,238,0.28));
  animation: float 5.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

/* ── Features Section ───────────────────────────── */

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
  line-height: 1.15;
}

.section-sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 52px;
  line-height: 1.65;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px 24px;
  transition: border-color 0.25s, transform 0.2s, background 0.2s;
}

.feature-card:hover {
  border-color: rgba(120,105,238,0.32);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  object-fit: contain;
}

.feature-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Footer ─────────────────────────────────────── */

footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 44px 0 32px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.footer-brand span {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text-2); }

.footer-copy {
  font-size: 12px;
  color: var(--text-3);
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  margin-top: 8px;
}

/* ── Legal pages ────────────────────────────────── */

.legal-hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border);
}

.legal-hero .container { max-width: 800px; }

.legal-tag {
  display: inline-block;
  background: rgba(120,105,238,0.12);
  border: 1px solid rgba(120,105,238,0.24);
  color: #9d93f3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.legal-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 12px;
  line-height: 1.1;
}

.legal-meta {
  font-size: 14px;
  color: var(--text-3);
}

.legal-body {
  padding: 56px 0 100px;
}

.legal-body .container { max-width: 800px; }

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px 28px;
  margin-bottom: 52px;
}

.legal-toc h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}

.legal-toc ol {
  list-style: decimal;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  column-count: 2;
  column-gap: 32px;
}

.legal-toc a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}

.legal-toc a:hover { color: var(--purple); }

.legal-section {
  margin-bottom: 52px;
}

.legal-section h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 18px;
  padding-top: 8px;
  scroll-margin-top: 84px;
}

.legal-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 8px;
}

.legal-section p {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.75;
}

.legal-section ul, .legal-section ol {
  margin: 8px 0 18px 20px;
}

.legal-section li {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 7px;
  line-height: 1.7;
}

.legal-section a { color: var(--blue); }

.legal-highlight {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 18px 20px;
  margin: 20px 0 24px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ── Scroll Reveal Animations ───────────────────── */
.r {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.r.on {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.r-1 { transition-delay: 0.10s; }
.r-2 { transition-delay: 0.18s; }
.r-3 { transition-delay: 0.28s; }
.r-4 { transition-delay: 0.40s; }

/* ── Responsive ─────────────────────────────────── */

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .hero-text { max-width: 100%; }
  .hero-sub  { max-width: 100%; }
  .hero-pills  { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-image { order: -1; }
  .hero-image img { max-width: 220px; }

  .features-grid { grid-template-columns: 1fr 1fr; }

  nav { flex-wrap: wrap; justify-content: center; }
  .nav-inner { width: 100%; justify-content: space-between; margin-bottom: 12px; }
  .nav-links { 
      gap: 12px; 
      width: 100%; 
      justify-content: center; 
      font-size: 13px;
  }

  .legal-toc ol { column-count: 1; }

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

  section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .hero { padding: 48px 0 40px; min-height: auto; }
  .features-grid { grid-template-columns: 1fr; }
}
