/* Caluru Legal Pages — GitHub Pages */

:root {
  --accent: #8FB996;
  --accent-dark: #6a9a74;
  --background: #F5F6F8;
  --card: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --divider: #E5E7EB;
  --shadow: 0 1px 3px rgba(26, 26, 46, 0.08), 0 4px 12px rgba(26, 26, 46, 0.04);
  --radius: 12px;
  --max-width: 720px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

/* Language visibility — scoped to body so <html lang="..."> is never hidden */
body [lang="en"],
body [lang="es"] {
  display: none;
}

html[data-lang="en"] body [lang="en"],
html[data-lang="es"] body [lang="es"] {
  display: revert;
}

/* Inline elements need special handling */
html[data-lang="en"] body span[lang="en"],
html[data-lang="en"] body a[lang="en"]:not(.doc-link),
html[data-lang="es"] body span[lang="es"],
html[data-lang="es"] body a[lang="es"]:not(.doc-link) {
  display: inline;
}

/* Block-level bilingual content */
html[data-lang="en"] body h1[lang="en"],
html[data-lang="en"] body h2[lang="en"],
html[data-lang="en"] body h3[lang="en"],
html[data-lang="en"] body p[lang="en"],
html[data-lang="en"] body li[lang="en"],
html[data-lang="en"] body div[lang="en"],
html[data-lang="es"] body h1[lang="es"],
html[data-lang="es"] body h2[lang="es"],
html[data-lang="es"] body h3[lang="es"],
html[data-lang="es"] body p[lang="es"],
html[data-lang="es"] body li[lang="es"],
html[data-lang="es"] body div[lang="es"] {
  display: block;
}

html[data-lang="en"] body a.back-link[lang="en"],
html[data-lang="es"] body a.back-link[lang="es"] {
  display: inline-flex;
}

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--divider);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  background: var(--background);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--card);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}

.card h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
}

.card h2 {
  margin: 28px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card h2:first-of-type {
  margin-top: 0;
}

.card h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.card ul {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-secondary);
}

.card li {
  margin-bottom: 6px;
}

.card a {
  color: var(--accent-dark);
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

.meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Landing page */
.hero {
  text-align: center;
  padding: 48px 28px;
}

.hero-icon {
  width: 72px;
  height: 72px;
  background: var(--accent);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 12px;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
}

.doc-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.15s, box-shadow 0.15s;
}

.doc-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(26, 26, 46, 0.1), 0 8px 24px rgba(26, 26, 46, 0.06);
}

.doc-link-icon {
  width: 44px;
  height: 44px;
  background: rgba(143, 185, 150, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.doc-link-text h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.doc-link-text p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.doc-link-arrow {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 18px;
}

.contact-card {
  text-align: center;
  padding: 24px;
}

.contact-card a {
  color: var(--accent-dark);
  font-weight: 600;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--divider);
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-dark);
}

/* Back link on legal pages */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 20px;
}

.back-link:hover {
  color: var(--accent-dark);
}

/* Responsive */
@media (max-width: 480px) {
  .hero {
    padding: 32px 16px;
  }

  .card {
    padding: 20px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }
}
