/* ===================================================================
   MagicReader — hoja de estilos compartida
   =================================================================== */

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

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #147A78 0%, #1D3E58 100%);
  font-family: 'Outfit', sans-serif;
}

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

.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

.divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
}

footer {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 200;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
}

/* ===================================================================
   Página de inicio (index.html) — body.home
   =================================================================== */
body.home {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.home::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.logo-wrap img {
  width: clamp(80px, 14vw, 120px);
  height: clamp(80px, 14vw, 120px);
  object-fit: contain;
  display: block;
}

.home .brand-name {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-top: -2rem;
}

.main-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.coming-soon {
  font-family: 'Outfit', sans-serif;
  font-weight: 200;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 0.6rem;
}

/* Language selector */
.lang-selector {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.lang-toggle {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.lang-toggle svg {
  width: 18px;
  height: 18px;
}

.lang-dropdown {
  display: none;
  flex-direction: column;
  background: rgba(20, 22, 60, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  backdrop-filter: blur(10px);
}

.lang-dropdown.open {
  display: flex;
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  font-family: 'Outfit', sans-serif;
  font-weight: 200;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  padding: 8px 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  text-transform: uppercase;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.lang-btn.active {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}

.home footer {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  width: 100%;
  line-height: 1.6;
}

.footer-beta {
  display: block;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer-links {
  display: block;
  margin: 0.35rem 0;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: #fff; }

.footer-links span { margin: 0 0.4rem; color: rgba(255,255,255,0.25); }

/* ===================================================================
   Páginas legales (terms-of-service.html, privacy-policy.html) — body.legal
   =================================================================== */
body.legal {
  background-attachment: fixed;
  font-weight: 200;
  color: rgba(255,255,255,0.75);
  line-height: 1.75;
  padding: 4rem 1.5rem 6rem;
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.legal .doc-logo {
  display: block;
  width: clamp(64px, 12vw, 96px);
  height: auto;
  margin: 0 auto;
}

.legal .divider {
  margin: 1rem auto 1.25rem;
}

.legal h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: #ffffff;
  text-align: center;
  margin-bottom: 0.5rem;
}

.legal .updated {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 3rem;
}

.legal h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.92);
  margin: 2.5rem 0 0.75rem;
}

.legal p { margin-bottom: 1rem; }

.legal ul { margin: 0 0 1rem 1.4rem; }
.legal li { margin-bottom: 0.4rem; }

.legal a { color: #7fd4d2; text-decoration: none; }
.legal a:hover { text-decoration: underline; }

.legal .placeholder {
  font-style: italic;
  color: rgba(255,255,255,0.45);
}

.legal .back {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.legal .back:hover { color: #fff; text-decoration: none; }

.legal footer {
  max-width: 760px;
  margin: 4rem auto 0;
}
