/* ============================================================
   RONDALLA SAN JUAN — Rediseño Nivel 3
   Paleta: negro cálido · oro bronce · crema · borgoña · noche
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  color-scheme: dark;

  /* Paleta principal */
  --negro:      #0a0705;
  --negro2:     #110d09;
  --negro3:     #1a1410;
  --oro:        #c9983a;
  --oro-bright: #e8b84b;
  --oro-dim:    #8a6820;
  --crema:      #f5e6c8;
  --crema-dim:  #c8b48a;
  --bordo:      #7a1f2e;
  --bordo-bright: #a82840;
  --noche:      #1a2744;
  --ink:        #f0e8d8;
  --muted:      #9a8a72;
  --soft:       #d4c4a8;

  /* Tipografía */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --mono:  'Courier New', monospace;

  /* Decoración */
  --shadow-cálida: 0 32px 88px rgba(0,0,0,0.72), 0 0 0 1px rgba(201,152,58,0.08);
  --glow-oro:     0 0 48px rgba(201,152,58,0.22);
  --line-oro:     rgba(201,152,58,0.28);
  --line-oro-fuerte: rgba(201,152,58,0.52);
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

#historia, #contacto { scroll-margin-top: 88px; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--negro);
  font-family: var(--sans);
  font-weight: 400;
  cursor: none; /* Reemplazado por cursor personalizado */
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── Cursor personalizado ──────────────────────────────────── */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

#cursor-dot {
  width: 6px; height: 6px;
  background: var(--oro);
}

#cursor-ring {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(201,152,58,0.6);
  transition: transform 0.12s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
}

body.cursor-hover #cursor-ring {
  width: 48px; height: 48px;
  border-color: var(--oro);
}

/* ── Partículas musicales ──────────────────────────────────── */
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

/* ── Pentagrama animado (hero background) ──────────────────── */
.pentagrama {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.pentagrama-linea {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,152,58,0.15), rgba(201,152,58,0.22), rgba(201,152,58,0.15), transparent);
  animation: pentagrama-move 18s linear infinite;
  opacity: 0;
}

.pentagrama-linea:nth-child(1) { top: 28%; animation-delay: 0s;    animation-duration: 22s; }
.pentagrama-linea:nth-child(2) { top: 36%; animation-delay: 2.4s;  animation-duration: 18s; opacity: 0; }
.pentagrama-linea:nth-child(3) { top: 44%; animation-delay: 4.8s;  animation-duration: 20s; }
.pentagrama-linea:nth-child(4) { top: 52%; animation-delay: 7.2s;  animation-duration: 24s; }
.pentagrama-linea:nth-child(5) { top: 60%; animation-delay: 9.6s;  animation-duration: 19s; }

@keyframes pentagrama-move {
  0%   { opacity: 0; transform: translateX(-5%); }
  8%   { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateX(5%); }
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(10, 7, 5, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(201,152,58,0.12);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 7, 5, 0.96);
  box-shadow: 0 4px 32px rgba(0,0,0,0.6);
  border-bottom-color: rgba(201,152,58,0.22);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-dim), var(--bordo), var(--oro-dim), transparent);
  opacity: 0.5;
}

.brand, .nav, .hero-actions, .site-footer { display: flex; align-items: center; }

.brand { min-width: 190px; }

.brand img {
  width: 176px; height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(201,152,58,0.18));
  transition: filter 0.2s;
}

.brand:hover img { filter: drop-shadow(0 4px 20px rgba(201,152,58,0.36)); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  gap: 5px; flex-direction: column;
  padding: 0;
  border: 1px solid var(--line-oro);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(201,152,58,0.06);
}

.menu-toggle span {
  display: block; width: 19px; height: 2px;
  border-radius: 999px; background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav {
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  min-height: 40px;
  display: inline-flex; align-items: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  letter-spacing: 0.01em;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--crema);
  border-color: var(--line-oro);
  background: rgba(201,152,58,0.08);
}

/* ── Botones ───────────────────────────────────────────────── */
.button, .nav-cta, .tool-link, .close-button {
  position: relative;
  display: inline-flex;
  align-items: center; justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.button, .nav-cta { padding: 0 22px; }

/* Shimmer dorado en hover */
.button::after, .nav-cta::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.button:hover::after, .nav-cta:hover::after { left: 160%; }

.nav-cta, .button-primary {
  color: #0a0705;
  background: linear-gradient(135deg, var(--oro-bright), var(--oro));
  border-color: var(--oro);
  box-shadow: 0 8px 28px rgba(201,152,58,0.28);
}

.nav-cta:hover, .button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(201,152,58,0.42);
}

.button-ghost, .tool-link {
  color: var(--ink);
  border-color: rgba(201,152,58,0.32);
  background: rgba(201,152,58,0.05);
}

.button-ghost:hover, .tool-link:hover {
  transform: translateY(-2px);
  border-color: rgba(201,152,58,0.6);
  background: rgba(201,152,58,0.1);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  padding: 120px clamp(18px, 6vw, 88px) 80px;
}

.hero-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 1;
  filter: saturate(0.85) contrast(1.08);
  will-change: transform;
}

/* Capas de sombra del hero */
.hero-shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10,7,5,0.55) 0%,
      rgba(10,7,5,0.25) 30%,
      rgba(10,7,5,0.35) 60%,
      rgba(10,7,5,0.96) 100%),
    linear-gradient(90deg, rgba(10,7,5,0.72), rgba(10,7,5,0.2) 60%, rgba(10,7,5,0.1));
}

/* Viñeta dorada en esquinas */
.hero::before {
  content: '';
  position: absolute; z-index: 3; inset: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(122,31,46,0.32), transparent 60%),
    radial-gradient(ellipse at 85% 20%, rgba(201,152,58,0.14), transparent 50%);
  pointer-events: none;
}

/* Transición inferior con curva */
.hero::after {
  content: '';
  position: absolute; z-index: 4;
  bottom: -2px; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--negro));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 5;
  width: min(860px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--oro);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-logo {
  width: clamp(400px, 33vw, 540px);
  max-width: 84vw;
  margin: 0 auto 20px;
  border: 1px solid rgba(201,152,58,0.22);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.5);
  box-shadow:
    0 24px 72px rgba(0,0,0,0.72),
    0 0 0 1px rgba(255,255,255,0.04),
    var(--glow-oro);
  backdrop-filter: blur(4px);
}

/* Barras de ritmo animadas */
.rhythm-strip, .tools-rhythm-strip {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 7px; height: 36px;
  margin: 0 auto 24px;
}

.rhythm-strip span, .tools-rhythm-strip span {
  width: 4px; border-radius: 999px;
  background: linear-gradient(180deg, var(--oro-bright), var(--bordo));
  box-shadow: 0 0 12px rgba(201,152,58,0.3);
  opacity: 0.9;
}

.rhythm-strip span:nth-child(1) { height: 10px; }
.rhythm-strip span:nth-child(2) { height: 22px; }
.rhythm-strip span:nth-child(3) { height: 15px; }
.rhythm-strip span:nth-child(4) { height: 30px; }
.rhythm-strip span:nth-child(5) { height: 20px; background: linear-gradient(180deg, var(--bordo-bright), var(--oro)); }
.rhythm-strip span:nth-child(6) { height: 28px; }
.rhythm-strip span:nth-child(7) { height: 14px; }
.rhythm-strip span:nth-child(8) { height: 24px; }
.rhythm-strip span:nth-child(9) { height: 11px; }

.tools-rhythm-strip {
  justify-content: flex-start;
  margin: 20px 0 0;
}
.tools-rhythm-strip span:nth-child(1) { height: 16px; }
.tools-rhythm-strip span:nth-child(2) { height: 28px; }
.tools-rhythm-strip span:nth-child(3) { height: 20px; background: linear-gradient(180deg, var(--bordo-bright), var(--oro)); }
.tools-rhythm-strip span:nth-child(4) { height: 34px; }
.tools-rhythm-strip span:nth-child(5) { height: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .rhythm-strip span, .tools-rhythm-strip span {
    animation: level 2.8s ease-in-out infinite;
  }
  .rhythm-strip span:nth-child(2), .tools-rhythm-strip span:nth-child(2) { animation-delay: 0.22s; }
  .rhythm-strip span:nth-child(4), .tools-rhythm-strip span:nth-child(4) { animation-delay: 0.44s; }
  .rhythm-strip span:nth-child(6) { animation-delay: 0.66s; }

  @keyframes level {
    0%, 100% { transform: scaleY(0.65); }
    50%       { transform: scaleY(1); }
  }
}

/* Texto hero */
.hero p {
  max-width: 640px;
  margin: 0 auto 0;
  color: var(--soft);
  font-size: 1.15rem;
  line-height: 1.65;
  text-wrap: balance;
}

.hero-actions {
  flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* ── Wave divider SVG ──────────────────────────────────────── */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  margin-bottom: -2px;
}

/* ── Animación de entrada al hacer scroll ──────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* ── Tipografía ────────────────────────────────────────────── */
h1, h2, h3, p, figure { margin-top: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }

h1 {
  max-width: 780px;
  margin: 0 auto 20px;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 8vw, 7rem);
  font-weight: 600;
  line-height: 0.92;
}

h2 {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: 0.96;
}

h3 { margin-bottom: 12px; font-size: 1.45rem; }

.section-heading { max-width: 820px; margin-bottom: 36px; }
.section-heading p, .story-copy p, .songbook-card p, .contact-section p {
  color: var(--muted); font-size: 1.08rem; line-height: 1.65;
}

/* ── Sección Historia ──────────────────────────────────────── */
.story-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(400px, 1fr);
  gap: clamp(34px, 6vw, 80px);
  align-items: center;
  overflow: hidden;
  padding: clamp(72px, 9vw, 120px) clamp(18px, 6vw, 88px);
  background: linear-gradient(160deg, #0e0a07, #160f09, #0a0705);
}

/* Textura sutil de madera */
.story-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(201,152,58,0.03) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(201,152,58,0.02) 0 1px, transparent 1px 80px),
    radial-gradient(ellipse at 0% 50%, rgba(122,31,46,0.18), transparent 60%);
  pointer-events: none;
}

.story-copy, .story-panel, .contact-copy, .contact-panel, .tools-section > * {
  position: relative; z-index: 1;
}

.story-copy {
  max-width: 720px;
  padding-left: 24px;
  border-left: 3px solid var(--oro);
}

.story-copy h2 { color: var(--crema); }

/* Contador de años */
.stat-row {
  display: flex; gap: 28px; flex-wrap: wrap;
  margin-top: 24px;
}

.stat-item { text-align: center; }

.stat-num {
  display: block;
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--oro);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Panel de foto con decoración */
.story-panel {
  position: relative;
  border: 1px solid var(--line-oro);
  border-radius: 16px;
  background: var(--negro2);
  box-shadow: var(--shadow-cálida);
  overflow: hidden;
}

.story-panel::before {
  content: '';
  position: absolute; z-index: -1;
  inset: 20px -20px -20px 20px;
  border: 1px solid rgba(201,152,58,0.36);
  border-radius: 16px;
}

.story-panel img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  transition: transform 0.6s ease;
}

.story-panel:hover img { transform: scale(1.03); }

/* ── Wave SVG entre secciones ──────────────────────────────── */
.section-wave {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin: 0;
  pointer-events: none;
}

/* ── Sección Herramientas ──────────────────────────────────── */
.tools-section {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 118px) clamp(18px, 6vw, 88px);
  background: linear-gradient(180deg, #0a0705 0%, #130e0a 50%, #0a0705 100%);
}

.tools-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(201,152,58,0.06), transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(122,31,46,0.1), transparent 50%),
    repeating-linear-gradient(90deg, rgba(201,152,58,0.03) 0 1px, transparent 1px 88px);
  pointer-events: none;
}

.tools-page-section { min-height: calc(100vh - 120px); min-height: calc(100svh - 120px); }

.tools-heading { max-width: 880px; margin-bottom: 44px; }

.tools-title {
  margin-bottom: 14px;
  font-size: clamp(3rem, 6vw, 4.75rem);
}

.tools-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.46fr);
  gap: 20px;
  align-items: stretch;
}

/* Glass cards ─────────────────────────────────────────────── */
.tool-card, .contact-panel {
  border: 1px solid var(--line-oro);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(201,152,58,0.06), rgba(10,7,5,0.92));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-cálida), inset 0 1px 0 rgba(201,152,58,0.12);
}

.tool-card { overflow: hidden; }

.tool-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; padding: 24px;
  border-bottom: 1px solid var(--line-oro);
}

.tool-card-header h3, .songbook-card h3 { margin-bottom: 0; }

.tool-link {
  min-height: 38px; padding: 0 16px; font-size: 0.9rem;
}

.tuner-card { border: 0; background: transparent; box-shadow: none; }

/* ── Afinador ──────────────────────────────────────────────── */
.tuner-widget {
  min-height: 720px;
  display: grid; place-items: center;
  padding: 24px;
  border: 1px solid var(--line-oro);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,152,58,0.08), transparent 60%),
    linear-gradient(180deg, rgba(201,152,58,0.04), rgba(122,31,46,0.04)),
    #0e0905;
  box-shadow: var(--shadow-cálida);
}

.tuner-inner {
  width: min(520px, 100%);
  padding: 38px 32px;
  border: 1px solid rgba(201,152,58,0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(201,152,58,0.06), transparent 32%),
    #13100a;
  box-shadow:
    inset 0 1px 0 rgba(201,152,58,0.1),
    0 30px 90px rgba(0,0,0,0.6);
}

.tuner-head { margin-bottom: 32px; text-align: center; }

.tuner-head > span, .tuner-volume-label, .tuner-footer {
  color: var(--oro-dim);
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tuner-head > span { display: block; margin-bottom: 14px; font-size: 0.78rem; }

.tuner-head strong {
  display: block; color: var(--crema);
  font-family: var(--serif); font-size: 2.3rem;
  font-weight: 600; line-height: 1.05;
}

.tuner-head strong em { color: var(--oro); font-style: italic; }

.tuner-divider {
  position: relative; height: 1px; margin: 24px auto 0;
  background: linear-gradient(90deg, transparent, rgba(201,152,58,0.28), transparent);
}

.tuner-divider::after {
  content: '';
  position: absolute; top: -3px; left: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--oro);
  transform: translateX(-50%);
}

.tuner-strings { display: flex; gap: 10px; margin-bottom: 30px; }

.tuner-string {
  flex: 1; min-height: 66px;
  display: grid; place-items: center;
  padding: 8px 2px;
  border: 1px solid rgba(201,152,58,0.12);
  border-radius: var(--radius);
  background: rgba(201,152,58,0.03);
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.tuner-string span, .tuner-string strong {
  display: block; font-family: var(--mono);
}

.tuner-string span { color: rgba(201,152,58,0.35); font-size: 0.64rem; }

.tuner-string strong {
  color: rgba(201,152,58,0.4);
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
}

.tuner-display {
  min-height: 340px;
  display: grid; align-content: center;
  margin-bottom: 26px;
  padding: 24px 20px;
  border: 1px solid rgba(201,152,58,0.1);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 100%, rgba(201,152,58,0.04), transparent 60%),
    #090705;
  text-align: center;
  box-shadow: inset 0 16px 48px rgba(0,0,0,0.4);
}

.tuner-note {
  height: 64px; margin-bottom: 6px;
  color: rgba(201,152,58,0.5);
  font-family: var(--mono); font-size: 4rem; font-weight: 900; line-height: 1;
}

.tuner-frequency, .tuner-status {
  color: rgba(201,152,58,0.4);
  font-family: var(--mono); font-size: 0.82rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.tuner-meter { width: 100%; margin-top: 18px; }

.tuner-arc {
  fill: none;
  stroke-linecap: round; stroke-width: 5; opacity: 0.9;
}

.tuner-needle { transform-origin: 110px 112px; transition: transform 0.1s ease-out; }

.tuner-status { min-height: 20px; margin-top: 6px; font-weight: 700; }

.tuner-volume-label { margin-bottom: 12px; font-size: 0.72rem; text-align: center; }

.tuner-volume {
  height: 6px; overflow: hidden; margin-bottom: 28px;
  border: 1px solid rgba(201,152,58,0.08);
  border-radius: 999px; background: rgba(201,152,58,0.06);
}

.tuner-volume div {
  width: 0%; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #27ae60, var(--oro));
  transition: width 0.05s;
}

.tuner-button {
  width: 100%; min-height: 68px;
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  border: 1px solid rgba(201,152,58,0.42);
  border-radius: var(--radius);
  color: #e8d09a;
  background: linear-gradient(180deg, rgba(201,152,58,0.1), rgba(201,152,58,0.03));
  font-family: var(--mono); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.tuner-button:hover {
  border-color: rgba(201,152,58,0.7);
  box-shadow: 0 0 28px rgba(201,152,58,0.12);
}

.tuner-button span {
  width: 18px; height: 18px; border-radius: 5px;
  background: linear-gradient(135deg, var(--oro-bright), var(--oro));
  box-shadow: 0 0 14px rgba(201,152,58,0.4);
  transition: box-shadow 0.2s;
}

.tuner-button.active {
  color: #ffd0d8;
  border-color: rgba(168, 40, 64, 0.7);
  background: linear-gradient(180deg, rgba(122,31,46,0.22), rgba(40,8,12,0.9));
}

.tuner-footer {
  margin-top: 22px;
  color: rgba(201,152,58,0.2);
  font-size: 0.72rem; text-align: center;
}

/* ── Cancionero card ───────────────────────────────────────── */
.songbook-card {
  min-height: 360px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 36px;
  background: linear-gradient(145deg, rgba(122,31,46,0.18), rgba(201,152,58,0.06), rgba(10,7,5,0.92));
}

.songbook-card h2 { font-size: clamp(2.2rem, 4vw, 3rem); color: var(--crema); }

.songbook-card .button { align-self: flex-start; margin-top: 20px; }

/* ── Sección Contacto ──────────────────────────────────────── */
.contact-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.48fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  overflow: hidden;
  padding: clamp(72px, 9vw, 120px) clamp(18px, 6vw, 88px);
  background: #070504;
}

.contact-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,5,4,0.98), rgba(7,5,4,0.82) 48%, rgba(7,5,4,0.62)),
    url('assets/rondalla-san-juan-evento.jpg') center / cover no-repeat;
  opacity: 0.9;
  pointer-events: none;
}

/* Viñeta borgoña */
.contact-section::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 0% 50%, rgba(122,31,46,0.25), transparent 55%);
  pointer-events: none;
}

.contact-copy { max-width: 720px; position: relative; z-index: 1; }
.contact-copy h2 { color: var(--crema); }

.contact-panel {
  position: relative; z-index: 1;
  display: grid; gap: 1px; overflow: hidden;
  padding: 1px;
  background: var(--line-oro);
}

.contact-panel > img {
  width: 100%; padding: 18px 20px;
  background: rgba(10,7,5,0.96);
  border-bottom: 1px solid var(--line-oro);
}

.contact-panel div {
  padding: 20px;
  background: rgba(12,9,6,0.92);
}

.contact-panel span {
  display: block; margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}

.contact-panel strong { font-size: 1.35rem; color: var(--crema); }

.contact-panel .button { margin: 16px; }

/* ── Modal Cancionero ──────────────────────────────────────── */
.songbook-modal[hidden] { display: none; }

.songbook-modal {
  position: fixed; z-index: 80; inset: 0;
  display: grid; place-items: center; padding: 24px;
}

.songbook-backdrop {
  position: absolute; inset: 0; border: 0;
  background: rgba(0,0,0,0.82);
}

.songbook-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  max-height: min(760px, calc(100svh - 48px));
  overflow: auto; padding: 28px;
  border: 1px solid var(--line-oro-fuerte);
  border-radius: 16px;
  background: #0e0a07;
  box-shadow: var(--shadow-cálida), 0 0 60px rgba(201,152,58,0.08);
}

.songbook-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 24px;
}

.songbook-header h2 { margin-bottom: 0; }

.close-button {
  width: 46px; min-height: 46px; padding: 0;
  color: var(--ink);
  background: rgba(201,152,58,0.08);
  border-color: var(--line-oro);
  font-size: 1.7rem;
}

.close-button:hover { background: rgba(201,152,58,0.15); }

.songbook-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.song-placeholder {
  aspect-ratio: 3 / 4;
  display: grid; align-content: space-between;
  padding: 18px;
  border: 1px dashed rgba(201,152,58,0.32);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(201,152,58,0.06), rgba(122,31,46,0.04), rgba(10,7,5,0.9));
}

.song-placeholder span { color: var(--oro); font-weight: 600; }
.song-placeholder strong { color: var(--soft); font-size: 1.05rem; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  justify-content: space-between; gap: 16px;
  padding: 28px clamp(18px, 6vw, 88px);
  color: var(--muted);
  background: var(--negro);
  border-top: 1px solid var(--line-oro);
  font-size: 0.88rem;
}

.site-footer::before {
  content: '';
  display: block; position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oro-dim), transparent);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .brand { min-width: auto; }
  .brand img { width: 154px; }

  .story-section, .tools-layout, .contact-section {
    grid-template-columns: 1fr 1fr;
  }

  .story-copy, .section-heading, .contact-section > div:first-child {
    grid-column: 1 / -1;
  }

  .songbook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  body { cursor: auto; }  /* En móvil el cursor personalizado no aplica */

  #cursor-dot, #cursor-ring { display: none; }

  .site-header {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    min-height: 64px; padding: 10px 14px;
  }

  .menu-toggle {
    display: inline-flex;
    grid-column: 1; grid-row: 1;
  }

  .site-header.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .site-header.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .brand { grid-column: 2; grid-row: 1; justify-self: center; }
  .brand img { width: 164px; height: 44px; }

  .nav {
    position: absolute;
    top: calc(100% + 8px); right: 14px; left: 14px; z-index: 30;
    display: grid; gap: 0; padding: 8px;
    border: 1px solid var(--line-oro);
    border-radius: var(--radius);
    background: rgba(10,7,5,0.98);
    box-shadow: var(--shadow-cálida);
    opacity: 0; pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .site-header.menu-open .nav {
    opacity: 1; pointer-events: auto; transform: translateY(0);
  }

  .nav a {
    min-height: 50px; justify-content: center;
    border-bottom: 1px solid rgba(201,152,58,0.12);
    border-radius: 0; color: var(--ink);
  }

  .nav a:last-child { border-bottom: 0; }
  .nav-cta { display: none; }

  .hero {
    min-height: 100vh; min-height: 100svh;
    padding: 84px 16px 48px;
    align-items: flex-end;
  }

  .hero-photo { object-position: 55% center; }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(10,7,5,0.99), rgba(10,7,5,0.78) 60%, rgba(10,7,5,0.42)),
      linear-gradient(135deg, rgba(201,152,58,0.12), transparent 44%);
  }

  .hero-logo { width: min(88vw, 360px); max-width: 92vw; }

  .hero-actions .button, .songbook-card .button { width: 100%; }

  .button, .nav-cta { min-height: 50px; padding: 0 18px; }

  .story-section, .tools-section, .contact-section {
    padding: 60px 16px;
  }

  .story-section, .tools-layout, .contact-section {
    grid-template-columns: 1fr;
  }

  .story-copy { padding-left: 18px; }
  .story-panel::before { inset: 12px -8px -8px 12px; }
  .story-panel img { aspect-ratio: 1 / 1; }

  .tools-rhythm-strip { justify-content: center; }

  .tool-card-header, .songbook-header { flex-direction: column; }
  .tool-link { width: 100%; }

  .tuner-widget { min-height: auto; padding: 12px; }
  .tuner-inner { padding: 26px 16px; }
  .tuner-head { margin-bottom: 24px; }
  .tuner-head strong { font-size: 1.9rem; }
  .tuner-strings { gap: 6px; margin-bottom: 20px; }
  .tuner-string { min-height: 58px; }
  .tuner-display { min-height: 300px; padding: 18px 12px; }
  .tuner-button { min-height: 62px; white-space: normal; }

  .songbook-card { min-height: 280px; padding: 28px; }
  .songbook-card h2 { font-size: 2.4rem; }

  .contact-section::before {
    background:
      linear-gradient(0deg, rgba(7,5,4,0.98), rgba(7,5,4,0.82)),
      url('assets/rondalla-san-juan-evento.jpg') center / cover no-repeat;
  }

  .contact-panel .button { width: calc(100% - 32px); }

  .songbook-modal { padding: 12px; }
  .songbook-dialog { max-height: calc(100vh - 24px); max-height: calc(100svh - 24px); padding: 18px; }
  .songbook-grid { grid-template-columns: 1fr; }

  .site-footer { align-items: flex-start; flex-direction: column; }

  .stat-row { gap: 20px; }
  .stat-num { font-size: 2.6rem; }
}

/* ── Reducción de movimiento ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pentagrama-linea { animation: none; display: none; }
  #particles-canvas { display: none; }
  .hero-photo { will-change: auto; }
}
