/* ═══════════════════════════════════════════════════
   Niva — Shared Stylesheet
   ═══════════════════════════════════════════════════ */

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

/* ── TOKENS ── */
:root {
  --bg:           #07030f;
  --surface:      #0f0820;
  --surface-2:    #19103a;
  --surface-3:    #221548;
  --border:       #271750;
  --border-light: #3a228a;
  --primary:      #7c3aed;
  --primary-h:    #6d28d9;
  --primary-l:    #a78bfa;
  --glow:         rgba(124, 58, 237, 0.18);
  --accent:       #d946ef;
  --text:         #edeaff;
  --text-muted:   #9080ba;
  --text-subtle:  #524570;
  --success:      #34d399;
  --warning:      #fbbf24;
  --danger:       #f87171;
  --radius:       10px;
  --radius-lg:    18px;
  --radius-xl:    26px;
  --nav-h:        64px;
  --max-w:        1080px;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition:   0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary-l); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }
button { font-family: var(--font); cursor: pointer; }

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(7, 3, 15, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text) !important;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.nav__brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  list-style: none;
}
.nav__links li a {
  display: block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav__links li a:hover,
.nav__links li a.active {
  color: var(--text);
  background: var(--surface-2);
}
.nav__links .nav-cta a {
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
  padding: 7px 16px;
}
.nav__links .nav-cta a:hover {
  background: var(--primary-h);
}

/* ── PAGE WRAPPER ── */
.page-wrapper {
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── CONTAINER ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.container-sm {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-h);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.38);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-light);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--primary-l);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn-lg { padding: 15px 34px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 18px 44px; font-size: 1.05rem; border-radius: var(--radius-lg); }

/* ── HERO ── */
.hero {
  position: relative;
  padding: 96px 0 80px;
  text-align: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.14) 0%, transparent 65%);
}
.hero__glow-2 {
  position: absolute;
  top: 0; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(217,70,239,0.06) 0%, transparent 60%);
}
.hero__icon {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  margin: 0 auto 28px;
  box-shadow:
    0 20px 60px rgba(124,58,237,0.45),
    0 0 0 1px rgba(255,255,255,0.07);
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px 5px 10px;
  font-size: 0.78rem;
  color: var(--primary-l);
  font-weight: 500;
  margin-bottom: 22px;
  letter-spacing: 0.01em;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2.2s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.7); }
}
.hero__title {
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin-bottom: 18px;
  background: linear-gradient(130deg, #edeaff 30%, #c4b5fd 62%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
  font-weight: 400;
}
.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── TRUST STRIP ── */
.trust-strip {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-strip__items {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.trust-item span:first-child { font-size: 1rem; }

/* ── SECTION ── */
.section { padding: 80px 0; }
.section--alt { background: var(--surface); }
.section__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-l);
  margin-bottom: 10px;
}
.section__title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 14px;
}
.section__desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  line-height: 1.72;
}

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; }
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s ease;
}
.card:hover {
  border-color: rgba(124,58,237,0.45);
  box-shadow: 0 12px 48px var(--glow);
  transform: translateY(-2px);
}
.card__icon { font-size: 2rem; margin-bottom: 16px; }
.card__title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.card__desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.68; }

/* ── PRIVACY PLEDGE ── */
.pledge-box {
  background: linear-gradient(135deg, var(--surface-2) 0%, rgba(124,58,237,0.08) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 56px;
}
.pledge-list {
  list-style: none;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 14px;
}
.pledge-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.pledge-list li::before {
  content: '✓';
  color: var(--primary-l);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 1px;
}
@media (max-width: 600px) {
  .pledge-list { grid-template-columns: 1fr; }
  .pledge-box { padding: 32px 24px; }
}

/* ── CTA SECTION ── */
.cta-section {
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  bottom: -80px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.12) 0%, transparent 65%);
  pointer-events: none;
}

/* ── APPLE STORE BUTTON ── */
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: #07030f;
  padding: 13px 28px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.appstore-btn:hover {
  background: #c4b5fd;
  color: #07030f;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(196,181,253,0.25);
}
.appstore-btn svg { flex-shrink: 0; }
.appstore-btn__text { display: flex; flex-direction: column; line-height: 1.1; }
.appstore-btn__small { font-size: 0.68rem; font-weight: 500; opacity: 0.7; }
.appstore-btn__label { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }

/* ── FOOTER ── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.footer__brand img { width: 22px; height: 22px; border-radius: 5px; }
.footer__links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.footer__links a { font-size: 0.83rem; color: var(--text-subtle); }
.footer__links a:hover { color: var(--text-muted); }
.footer__copy { font-size: 0.78rem; color: var(--text-subtle); }

/* ── LEGAL PAGES ── */
.legal-header {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 44px;
}
.legal-header__meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 10px;
}
.legal-header__title {
  font-size: clamp(1.8rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 10px;
}
.legal-header__date {
  font-size: 0.83rem;
  color: var(--text-subtle);
}

.lang-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
}
.lang-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-btn.active,
.lang-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.legal-body { display: none; }
.legal-body.visible { display: block; }

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 44px;
}
.legal-toc__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: decimal;
  padding-left: 20px;
  columns: 2;
  column-gap: 24px;
  line-height: 2;
}
.legal-toc a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.legal-toc a:hover { color: var(--primary-l); }

.legal-article { padding-bottom: 60px; }

.legal-section {
  margin-bottom: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.legal-section:last-child { border-bottom: none; }

.legal-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  background: var(--primary);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  padding: 0 6px;
}
.legal-section h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-l);
  margin: 22px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.legal-section p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.78;
  margin-bottom: 12px;
}
.legal-section ul,
.legal-section ol {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.78;
  padding-left: 22px;
  margin: 8px 0 16px;
}
.legal-section li { margin-bottom: 6px; }
.legal-section strong { color: var(--text); font-weight: 600; }

.notice-box {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 16px 0;
}
.notice-box p { margin-bottom: 0; font-size: 0.9rem; }
.notice-box--info {
  background: rgba(124,58,237,0.09);
  border: 1px solid rgba(124,58,237,0.22);
}
.notice-box--warning {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
}
.notice-box--warning p { color: #fca5a5; }
.notice-box__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px !important;
}

/* ── SUPPORT PAGE ── */
.support-hero {
  padding: 80px 0 56px;
  text-align: center;
}
.support-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}
.support-hero__desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}
.contact-card {
  background: linear-gradient(135deg, var(--surface-2) 0%, rgba(124,58,237,0.08) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 52px 44px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto 56px;
}
.contact-card__icon { font-size: 3.5rem; margin-bottom: 20px; }
.contact-card__title { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.contact-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.68;
  margin-bottom: 28px;
}
.contact-card__email {
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-top: 14px;
  display: block;
}
.faq-grid { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}
.faq-item__q {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.faq-item__a {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.68;
}

/* ── BACK TO TOP ── */
.back-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 42px; height: 42px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  text-decoration: none;
  z-index: 50;
}
.back-top.visible { opacity: 1; pointer-events: all; }
.back-top:hover { color: #fff; transform: translateY(-2px); }

/* ── UTILITIES ── */
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-6  { margin-top: 24px; }
.mt-10 { margin-top: 40px; }
.mb-6  { margin-bottom: 24px; }
.mb-10 { margin-bottom: 40px; }
.divider { height: 1px; background: var(--border); margin: 56px 0; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav__links li:not(.nav-cta):not(:last-child) { display: none; }
  .legal-toc ol { columns: 1; }
  .pledge-box { padding: 32px 20px; }
  .contact-card { padding: 36px 24px; }
  .hero { padding: 72px 0 56px; }
}
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: center; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .trust-strip__items { gap: 18px; justify-content: flex-start; overflow-x: auto; }
  .legal-toc { padding: 18px; }
}
