/* DreamSleep – Legal pages shared styles */
/* Colors based on app palette: default blues + neutrals */

:root {
  --bg-primary: #001832;
  --bg-secondary: #00224a;
  --bg-card: #002e62;
  --text-primary: #e5f1ff;
  --text-secondary: #a3b0c1;
  --text-muted: #667b99;
  --accent: #0079ff;
  --accent-light: #65afff;
  --accent-gold: #ffd700;
  --border: #3d4a5b;
  --danger: #f7776d;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-light);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  transition: border-color 0.2s, color 0.2s;
}

.lang-toggle:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
}

/* Main content */
main {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
}

section {
  margin-bottom: 2.5rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.4rem;
}

li strong {
  color: var(--text-primary);
}

/* Links */
a {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-color: rgba(101, 175, 255, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s, color 0.2s;
}

a:hover {
  color: var(--accent-gold);
  text-decoration-color: var(--accent-gold);
}

/* Contact email highlight */
.contact-email {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  text-align: center;
  margin: 1rem 0;
}

.contact-email a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-light);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

thead th {
  background-color: var(--bg-card);
  color: var(--text-primary);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Card grid (index page) */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: block;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent-light);
}

/* Responsive */
@media (max-width: 600px) {
  nav {
    padding: 0.75rem 1rem;
  }

  main {
    padding: 1.5rem 1rem 3rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  table {
    font-size: 0.85rem;
  }

  thead th,
  tbody td {
    padding: 0.5rem 0.65rem;
  }
}
