/* ═══════════════════════════════════════════════════
   Appi Palavra Viva — Legal Pages Design System
   Dark celestial theme matching the app identity
   ═══════════════════════════════════════════════════ */

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

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #04060A;
  --bg-body: #0A0E17;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --bg-surface: #1E293B;
  --gold-primary: #E5C158;
  --gold-light: #F0D77A;
  --gold-dim: #B8993E;
  --gold-glow: rgba(229, 193, 88, 0.15);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-subtle: rgba(229, 193, 88, 0.12);
  --border-active: rgba(229, 193, 88, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(229, 193, 88, 0.08);
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background Pattern ── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(229, 193, 88, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(229, 193, 88, 0.03), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav-brand .logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dim));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--bg-deep);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

/* ── Mobile Nav Toggle ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  font-size: 20px;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(4, 6, 10, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 12px 16px;
  }
}

/* ── Page Hero ── */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120px 24px 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-glow);
  border: 1px solid var(--border-active);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero .update-date {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 16px;
}

/* ── Main Content ── */
.content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Legal Sections ── */
.legal-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.legal-section:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
}

.legal-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gold-glow);
  border: 1px solid var(--border-active);
  color: var(--gold-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

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

.legal-section ul,
.legal-section ol {
  padding-left: 0;
  list-style: none;
  margin-bottom: 14px;
}

.legal-section li {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 10px;
  padding-left: 24px;
  position: relative;
  line-height: 1.65;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  opacity: 0.6;
}

.legal-section ol {
  counter-reset: step;
}

.legal-section ol li {
  counter-increment: step;
}

.legal-section ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-primary);
  opacity: 0.7;
}

.legal-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-section em {
  color: var(--gold-dim);
  font-style: normal;
}

/* ── Warning / Highlight Box ── */
.highlight-box {
  background: rgba(229, 193, 88, 0.06);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0;
}

.highlight-box strong {
  color: var(--gold-primary);
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.highlight-box p {
  margin-bottom: 0;
  font-size: 14px;
}

.warning-box {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0;
}

.warning-box strong {
  color: #f87171;
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.warning-box p {
  margin-bottom: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── Index Page Cards ── */
.cards-grid {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  background: var(--bg-card-hover);
}

.doc-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gold-glow);
  border: 1px solid var(--border-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.doc-card .card-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.doc-card .card-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

.doc-card .card-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 18px;
  align-self: center;
  transition: var(--transition-fast);
}

.doc-card:hover .card-arrow {
  color: var(--gold-primary);
  transform: translateX(4px);
}

/* ── Contact Bar ── */
.contact-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.contact-bar p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.contact-bar a {
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 20px;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.contact-bar a:hover {
  background: var(--gold-glow);
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border-subtle);
  max-width: 900px;
  margin: 0 auto;
}

.footer p {
  color: var(--text-muted);
  font-size: 13px;
}

.footer a {
  color: var(--gold-dim);
  text-decoration: none;
}

.footer a:hover {
  color: var(--gold-primary);
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.legal-section,
.doc-card,
.contact-bar {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.legal-section:nth-child(2) { animation-delay: 0.06s; }
.legal-section:nth-child(3) { animation-delay: 0.12s; }
.legal-section:nth-child(4) { animation-delay: 0.18s; }
.legal-section:nth-child(5) { animation-delay: 0.24s; }
.legal-section:nth-child(6) { animation-delay: 0.30s; }
.legal-section:nth-child(7) { animation-delay: 0.36s; }

.doc-card:nth-child(2) { animation-delay: 0.08s; }
.doc-card:nth-child(3) { animation-delay: 0.16s; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero {
    padding-top: 100px;
  }
  .legal-section {
    padding: 24px 20px;
  }
  .doc-card {
    padding: 20px;
  }
  .contact-bar {
    flex-direction: column;
    text-align: center;
  }
}
