/*
  Páginas de contenido (landings) de Cuerdario — /arreglos-vocales, /arreglos-para-coro,
  /arreglos-de-murga, /como-escribir-un-arreglo-vocal.

  Son HTML ESTÁTICO a propósito, fuera de la SPA: existen para que Google y los buscadores con
  IA (que no ejecutan JavaScript) lean texto real. Ver la sección "Landings" de CLAUDE.md.
  Misma tipografía y mismo rosa de marca que la app, sin Tailwind (no pasan por el build).
*/

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --border: #e2e8f0;
  --brand: #a71551;
  --brand-hover: #8e1245;
  --accent: #c0195d;
  --tint: rgba(167, 21, 81, 0.06);
  --tint-border: rgba(167, 21, 81, 0.2);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  color-scheme: light;
}

/*
  ⚠️ El tema es EL DE LA APP, no el del sistema: `.dark` en <html> lo pone el script inline del
  <head> leyendo `localStorage['dark-mode']`, la misma clave que `useDarkMode.ts`. Sin guardar
  nada, claro — igual que la app, que tampoco sigue `prefers-color-scheme`. Si siguiera al
  sistema, pasar de la landing a la app cambiaría de tema en el click.
*/
:root.dark {
  --bg: #0b1220;
  --surface: #121a28;
  --text: #f1f5f9;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --border: #1f2a3b;
  --brand: #a71551;
  --brand-hover: #c0195d;
  --accent: #e85aa0;
  --tint: rgba(232, 58, 130, 0.08);
  --tint-border: rgba(232, 58, 130, 0.28);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 760px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

/* Fijo arriba: la nav y "Abrir Cuerdario" quedan a mano en páginas largas como la guía. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: auto;
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.93rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
  text-decoration: underline;
}

/* Sol / luna: el mismo toggle que la Home de la app, y escribe en la misma clave. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  padding: 0;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--subtle);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun,
.dark .theme-toggle .icon-moon {
  display: none;
}

.dark .theme-toggle .icon-sun {
  display: block;
}

/* ── Botones ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-secondary:hover {
  border-color: var(--subtle);
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: 56px 0 40px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 44rem;
  margin-top: 18px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.cta-note {
  font-size: 0.9rem;
  color: var(--subtle);
  margin-top: 12px;
}

.shot {
  margin: 36px 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.shot figcaption {
  font-size: 0.85rem;
  color: var(--subtle);
  padding: 10px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ── Secciones ──────────────────────────────────────────────────────────── */

section {
  padding: 44px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

.section-intro {
  color: var(--muted);
  max-width: 44rem;
  margin-bottom: 26px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

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

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 20px 18px 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tint);
  border: 1px solid var(--tint-border);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps li p {
  margin: 0;
  color: var(--muted);
}

.prose h2 {
  margin-top: 2.2rem;
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
  margin: 0 0 1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose li::marker {
  color: var(--accent);
}

.callout {
  background: var(--tint);
  border: 1px solid var(--tint-border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 1.4rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.2rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  background: var(--surface);
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-family: 'Manrope', sans-serif;
}

/* ── Preguntas frecuentes ───────────────────────────────────────────────── */

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 20px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.faq summary::after {
  content: '+';
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
}

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

.faq details p {
  color: var(--muted);
  padding-bottom: 4px;
}

/* ── Cierre y footer ────────────────────────────────────────────────────── */

.closing {
  text-align: center;
}

.closing .cta-row {
  justify-content: center;
}

.related {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.related a span {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--subtle);
  margin-top: 2px;
}

.related a:hover {
  border-color: var(--tint-border);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  font-size: 0.9rem;
  color: var(--subtle);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}

.site-footer a {
  color: var(--subtle);
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-header .wrap {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    gap: 14px;
    font-size: 0.88rem;
  }

  .hero {
    padding-top: 36px;
  }

  .steps li {
    padding-left: 58px;
  }
}
