@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #1565C0;
  --primary-light: #1976D2;
  --primary-dark: #0D47A1;
  --accent: #42A5F5;
  --accent-light: #90CAF9;
  --bg: #F0F6FF;
  --surface: #FFFFFF;
  --surface-2: #EAF2FF;
  --text: #0D1B2A;
  --text-muted: #5A6A7A;
  --border: #D0E0F0;
  --shadow: rgba(21, 101, 192, 0.12);
  --shadow-hover: rgba(21, 101, 192, 0.22);
}

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

html {
  scroll-padding-top: 80px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

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

.nav-brand span {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--surface-2);
}

/* Support button */
.btn-support {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
  box-shadow: 0 2px 8px var(--shadow);
}

.btn-support:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--shadow-hover) !important;
}

/* ── SUPPORT MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 60, 0.45);
  z-index: 500;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 80px 20px 20px;
}

.modal-overlay.active {
  display: flex;
}

.support-modal {
  background: var(--surface);
  border-radius: 16px;
  width: 300px;
  box-shadow: 0 8px 40px rgba(10, 30, 60, 0.25);
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  background: var(--primary);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}

.modal-close:hover { color: #fff; }

.modal-body {
  padding: 16px 0;
}

.modal-body p {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0 20px 10px;
}

.support-option {
  display: block;
  padding: 13px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  border-top: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}

.support-option:hover {
  background: var(--surface-2);
  color: var(--primary);
}

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 72px 24px 60px;
  background: linear-gradient(175deg, #dceeff 0%, #f0f6ff 60%, #f5faff 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(66,165,245,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(21,101,192,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.hero-icon {
  width: 130px;
  height: 130px;
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(21,101,192,0.25), 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.store-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.store-badge-link {
  display: inline-block;
  transition: transform 0.15s, opacity 0.15s;
}

.store-badge-link:hover {
  transform: translateY(-2px);
  opacity: 0.88;
}

.store-badge {
  height: 52px;
  width: auto;
  display: block;
}

/* ── LEGAL PAGES ── */
.legal-hero {
  background: linear-gradient(135deg, #1565C0, #42A5F5);
  color: #fff;
  text-align: center;
  padding: 52px 24px;
}

.legal-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-hero p {
  opacity: 0.85;
  font-size: 0.95rem;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  flex: 1;
}

.legal-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 36px 0 12px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-content li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--primary);
}

.last-updated {
  display: inline-block;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 32px;
}

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 24px;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .nav-links a {
    font-size: 0.85rem;
    padding: 5px 10px;
  }

  .hero h1 { font-size: 1.7rem; }
  .support-modal { width: calc(100vw - 40px); }
  .modal-overlay { justify-content: center; }
}

/* Short screens (iPhone SE etc.) — scale down to keep footer on-screen */
@media (max-height: 700px) {
  /* Tighter nav rows without removing the double-row layout */
  .nav-inner {
    padding: 7px 16px;
    gap: 6px;
  }

  .hero-icon {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    margin-bottom: 10px;
  }

  .hero h1 {
    font-size: 1.35rem;
    margin-bottom: 6px;
  }

  .hero p {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }

  .store-badge {
    height: 38px;
  }

  .store-buttons {
    gap: 8px;
  }

  footer {
    padding: 16px 24px;
  }
}
