:root {
  --bg: #0a1630;
  --bg-soft: #101f42;
  --card: #14264e;
  --text: #e8eefc;
  --text-muted: #a9b8d8;
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --gold: #facc15;
  --border: #223a6b;
  --radius: 14px;
  --nav-height: 68px;
  --side-band: 100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  position: relative;
}

/* ---------- Side bands ---------- */
.band {
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--side-band);
  z-index: 0;
  pointer-events: none;
}

.band-left {
  left: 0;
  background: linear-gradient(180deg, #14532d 0%, #166534 40%, #65a30d 100%);
  opacity: 0.25;
}

.band-right {
  right: 0;
  background: linear-gradient(180deg, #2e1065 0%, #6d28d9 50%, #a855f7 100%);
  opacity: 0.4;
}

@media (max-width: 1300px) {
  .band { display: none; }
}

/* ---------- Content wrapper ---------- */
.page {
  position: relative;
  z-index: 1;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 22, 48, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.nav-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--cyan);
  margin-right: 24px;
  white-space: nowrap;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--cyan);
  background-color: rgba(34, 211, 238, 0.1);
}

/* ---------- Sections ---------- */
section {
  padding: 70px 24px;
  max-width: 1100px;
  margin: 0 auto;
  scroll-margin-top: calc(var(--nav-height) + 8px);
}

.hero {
  padding-top: calc(var(--nav-height) + 70px);
  text-align: center;
}

/* h1 general: sin degradado, color claro (solo .hero h1 lleva degradado) */
h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.25;
  margin: 0 0 36px;
  padding-bottom: 0.1em;
  color: var(--text);
}

/* Degradado SOLO en la portada */
.hero h1 {
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin: 0 0 24px;
  color: var(--text-muted);
  padding-bottom: 14px;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
  color: var(--cyan);
}

p { color: var(--text); }

.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--cyan);
  font-style: italic;
  max-width: 720px;
  margin: 0 auto 28px;
  font-weight: 500;
}

.cta {
  display: inline-block;
  margin-top: 12px;
  padding: 14px 28px;
  background: var(--cyan);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3px;
  border-radius: 999px;
  transition: background-color 0.2s, transform 0.2s;
}

.cta:hover {
  background: var(--violet);
  transform: translateY(-2px);
}

.lead {
  font-size: 1.15rem;
  color: var(--text);
  max-width: 680px;
  margin: 0 auto 28px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 24px;
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.25s, border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  background: var(--bg-soft);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.card p { margin: 0 0 16px; font-size: 0.95rem; color: var(--text); }

.card .emoji { font-size: 1.6rem; display: block; margin-bottom: 10px; }

/* Tarjeta clicable: el enlace del título cubre toda la tarjeta */
.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-link {
  margin-top: auto;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
  z-index: 2;
}

.card-link:hover {
  color: var(--violet);
}

.card-coming {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.7;
}

/* ---------- Choice list ---------- */
.choice-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.choice-list li {
  background: var(--bg-soft);
  border-left: 3px solid var(--violet);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 0.98rem;
}

/* ---------- Final ---------- */
.final {
  text-align: center;
  padding-bottom: 60px;
}

.final blockquote {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
  margin: 20px auto 0;
  max-width: 760px;
  color: var(--text);
  border: 0;
  border-left: 0;
  padding: 0;
}

.final blockquote span { color: var(--cyan); }

/* ---------- Beyond (Choice + FAQ) ---------- */
.beyond-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 36px;
}

.beyond h3 {
  font-size: 1.4rem;
  color: var(--text);
  margin: 48px 0 16px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 0 20px;
  transition: border-color 0.2s;
}

.faq details[open] {
  border-color: var(--violet);
}

.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  content: "−";
}

.faq summary:hover {
  color: var(--cyan);
}

.faq details p {
  margin: 0 0 20px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer a { color: var(--cyan); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--bg);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background-color 0.25s;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #fde047;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
  :root { --nav-height: 60px; }
  .nav { padding: 0 14px; }
  .nav-brand { font-size: 0.95rem; margin-right: 14px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.85rem; }
  section { padding: 50px 18px; }
  .hero { padding-top: calc(var(--nav-height) + 50px); }
}

/* ---------- Article pages ---------- */
.article {
  max-width: 780px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* Título de artículo: sin degradado, color claro */
.article h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 16px;
  padding-bottom: 0.1em;
  color: var(--text);
}

.article .article-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 40px;
  opacity: 0.8;
}

/* Subtítulo interno: azul apagado, tamaño subido */
.article h2 {
  font-size: 1.5rem;
  margin: 40px 0 16px;
  padding-bottom: 0;
  color: var(--text-muted);
}

.article h2::after {
  display: none;
}

/* Texto de artículo: claro, tamaño subido */
.article p {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.75;
  margin: 0 0 20px;
}

.article ul, .article ol {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.75;
  padding-left: 24px;
  margin: 0 0 20px;
}

.article li {
  margin-bottom: 10px;
}

.article .references {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article .references h3 {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 16px;
}

.article .references p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 12px;
}

/* Enlaces dentro de las referencias */
.article .references p a {
  color: var(--cyan);
  text-decoration: none;
  word-break: break-word;
}

.article .references p a:hover {
  text-decoration: underline;
  color: var(--violet);
}

.article .back-link {
  display: inline-block;
  margin-top: 40px;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.article .back-link:hover {
  color: var(--violet);
}
