:root {
  --color-primary: #8b2500;
  --color-primary-deep: #6b1c00;
  --color-secondary: #d4a017;
  --color-background: #fdf6e3;
  --color-surface: #ffffff;
  --color-text: #2c1810;
  --color-text-muted: #6b5b4f;
  --color-dark-bg: #1a0f0a;
  --color-dark-surface: #2b1710;
  --color-line: rgba(139, 37, 0, 0.16);
  --shadow-sm: 0 4px 12px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 16px 40px rgba(44, 24, 16, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --shell: min(1180px, calc(100% - 3rem));
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  min-width: 300px;
  color: var(--color-text);
  background: var(--color-background);
  font-family: "Open Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
body.menu-open, body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { border: 0; }
:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 4px; }

.layout-shell {
  width: var(--shell);
  margin: 0 auto;
}
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 3000;
  padding: 0.75rem 1rem; border-radius: var(--radius-sm); background: var(--color-secondary); color: var(--color-dark-bg);
  font-weight: 700; text-decoration: none; transform: translateY(-180%); transition: transform 160ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }
.eyebrow {
  margin: 0 0 0.85rem; color: var(--color-primary); font-size: 0.75rem;
  font-weight: 700; letter-spacing: 0.13em; line-height: 1.3; text-transform: uppercase;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--color-text); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { margin-bottom: 1rem; font-size: clamp(2.05rem, 4.8vw, 3.2rem); font-weight: 700; letter-spacing: -0.035em; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* Navegación: oculta al entrar al Hero, presente a partir de las demás secciones. */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 1000; pointer-events: none;
  transform: translateY(-115%); transition: transform 260ms var(--ease-out);
}
.site-header.is-visible { pointer-events: auto; transform: translateY(0); }
.site-nav {
  min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 0.75rem; padding: 0.55rem 0.75rem 0.55rem 0.9rem;
  border: 1px solid rgba(44, 24, 16, 0.08); border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: rgba(255, 255, 255, 0.96); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.nav-brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--color-text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.nav-logo-slot { width: 26px; height: 26px; border: 1px solid rgba(139, 37, 0, 0.58); border-radius: 3px; background: linear-gradient(135deg, transparent 47%, rgba(139, 37, 0, 0.44) 48%, rgba(139, 37, 0, 0.44) 52%, transparent 53%); }
.nav-logo { display: block; width: 90px; object-fit: contain; }
.site-menu { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex: 1; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: clamp(0.75rem, 1.65vw, 1.6rem); }
.nav-links a { color: var(--color-text); font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: color 160ms var(--ease-out); }
.nav-links a:hover, .nav-links a[aria-current="location"] { color: var(--color-primary); }
.language-switch { display: flex; gap: 0.25rem; }
.language-button {
  min-width: 38px; padding: 0.37rem 0.55rem; border: 1px solid var(--color-primary); border-radius: 5px;
  background: transparent; color: var(--color-primary); cursor: pointer; font-size: 0.78rem; font-weight: 700;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.language-button:hover, .language-button.is-active { background: var(--color-primary); color: #fff; }
.language-button:active { transform: scale(0.97); }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 40px; padding: 0; background: transparent; color: var(--color-primary); cursor: pointer; }
.menu-toggle-lines { display: grid; gap: 4px; width: 24px; }
.menu-toggle-lines i { display: block; width: 100%; height: 2px; background: currentColor; transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:first-child { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:last-child { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { position: relative; isolation: isolate; min-height: 100svh; display: grid; overflow: hidden; background: var(--color-dark-bg); }
.hero-media, .hero-overlay { position: absolute; inset: 0; }
.hero-media { z-index: -2; background: var(--color-dark-bg) center/cover no-repeat; transform: scale(1.01); }
.hero-overlay { z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.34) 50%, rgba(0, 0, 0, 0.58) 100%); }
.hero-copy { align-self: end; max-width: min(1180px, calc(100% - 3rem)); padding-bottom: clamp(9rem, 18vh, 13rem); }
.hero-eyebrow { color: #fce8b3; }
.hero h1 { max-width: 14ch; margin: 0; color: #fff; font-size: clamp(2.7rem, 5.8vw, 5.2rem); font-weight: 700; letter-spacing: -0.05em; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55); }
.hero-logo-wrap { position: absolute; left: clamp(1.25rem, 4vw, 3rem); bottom: clamp(1.5rem, 4vw, 3rem); width: clamp(150px, 21vw, 280px); }
.hero-logo-slot { display: block; width: min(140px, 38vw); height: 54px; border: 1px solid rgba(255, 255, 255, 0.52); border-radius: 2px; background: linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, 0.45) 49%, rgba(255, 255, 255, 0.45) 51%, transparent 52%); }
.temporary-label { display: inline-block; margin-top: 0.45rem; color: rgba(255, 255, 255, 0.88); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1.35; text-transform: uppercase; }
.scroll-cue { position: absolute; bottom: clamp(1.3rem, 3vw, 2.5rem); left: 50%; display: grid; gap: 0.2rem; color: #fff; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; text-align: center; text-decoration: none; transform: translateX(-50%); }
.scroll-cue svg { width: 22px; justify-self: center; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }

/* Semblanza */
.proposal { background: var(--color-background); }
.proposal-grid { display: grid; grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1.3fr); gap: clamp(2.75rem, 8vw, 8rem); align-items: start; }
.section-intro { position: sticky; top: 7rem; }
.section-rule { display: block; width: 76px; height: 3px; margin-top: 1.65rem; background: var(--color-secondary); }
.proposal-copy { max-width: 680px; }
.proposal-copy p { margin-bottom: 1.35rem; }
.proposal-copy p:last-child { margin-bottom: 0; }
.remote-status { color: var(--color-text-muted); font-style: italic; }

/* Miembros */
.member-card {
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.members-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1.5rem; }
.member-card:hover, .member-card:focus-within { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); transform: translateY(-4px); }
.member-summary {
  display: block; width: 100%; padding: 1.25rem; border: 0; background: transparent; color: inherit;
  cursor: pointer; list-style: none; text-align: left;
}
.member-summary:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: -3px; }
.member-photo { display: block; width: 100%; height: auto; max-height: 60vh; border-radius: 12px; object-fit: contain; object-position: center; }
.member-name { margin: 1rem 0 0.25rem; color: #2c1810; font-size: 1.2rem; font-weight: 700; }
.member-role { margin: 0; color: #8b2500; font-size: 0.95rem; font-weight: 600; }

/* Videos */
.videos { background: var(--color-surface); }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; }
.video-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.video-card:hover, .video-card:focus-within { box-shadow: 0 10px 26px rgba(44, 24, 16, 0.15); transform: translateY(-4px); }
.video-frame { aspect-ratio: 16 / 9;}
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-card h3 { margin: 0; padding: 1.1rem 1.2rem 1.3rem; font-size: 1rem; line-height: 1.35; }

/* Discografía */
.discography { background: var(--color-background); }
.album-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.album-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-top: 3px solid var(--color-secondary); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.album-card:hover, .album-card:focus-within { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); transform: translateY(-4px); }
.album-cover { position: relative; display: grid; aspect-ratio: 1; place-items: center; overflow: hidden; background: linear-gradient(135deg, #a23511, #8b2500 52%, #451606); }
.album-card:nth-child(2) .album-cover { background: linear-gradient(135deg, #3b2017, #1a0f0a 56%, #60411e); }
.album-card:nth-child(3) .album-cover { background: linear-gradient(135deg, #d4a017, #9e6810 55%, #542d08); }
.album-card:nth-child(4) .album-cover { background: linear-gradient(135deg, #714321, #8b2500 55%, #35140a); }
.album-cover.has-image { background: #e8e0d4; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover::before { position: absolute; width: 72%; height: 72%; border: 1px solid rgba(255, 255, 255, 0.35); content: ""; transform: rotate(45deg); }
.album-cover.has-image::before { display: none; }
.album-placeholder { z-index: 1; max-width: 13ch; padding: 0 1rem; color: #fff; font-size: 0.84rem; font-weight: 700; line-height: 1.35; text-align: center; }
.album-body { display: flex; flex: 1; flex-direction: column; padding: 1.25rem; }
.album-body h3 { margin-bottom: 0.35rem; }
.album-year { margin-bottom: 1.2rem; color: var(--color-text-muted); font-size: 0.875rem; }
.album-links { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: auto; }
.album-link { display: inline-flex; align-items: center; justify-content: center; gap: 0.42rem; min-height: 36px; padding: 0.46rem 0.7rem; border: 1px solid var(--color-primary); border-radius: 6px; color: var(--color-primary); font-size: 0.78rem; font-weight: 700; text-decoration: none; transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.album-link:hover { background: var(--color-primary); color: #fff; }
.album-link:active { transform: scale(0.97); }
.album-link svg { width: 16px; height: 16px; fill: currentColor; }

/* Contacto */
.contact { background: var(--color-surface); }
.contact-panel { display: grid; grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr); overflow: hidden; border-radius: var(--radius-md); background: var(--color-dark-bg); box-shadow: var(--shadow-lg); }
.contact-copy { padding: clamp(2rem, 6vw, 5rem); color: #fdf6e3; }
.contact-copy .eyebrow { color: #f6c83a; }
.contact-copy h2, .contact-copy h3 { color: #fff; }
.contact-copy > p { max-width: 40ch; color: rgba(253, 246, 227, 0.76); }
.contact-copy h3 { margin: 2.1rem 0 1rem; }
.social-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.social-link { display: inline-flex; align-items: center; gap: 0.62rem; min-height: 44px; color: #fff; font-weight: 700; text-decoration: none; transition: color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.social-link:hover { color: #f6c83a; transform: translateY(-1px); }
.social-link svg { width: 26px; height: 26px; fill: currentColor; }
.map-frame { position: relative; min-height: 400px; background: #e2dacd; }
.map-frame iframe { width: 100%; height: 100%; min-height: 400px; border: 0; filter: saturate(0.82) contrast(0.96); }
.map-link { position: absolute; right: 1rem; bottom: 1rem; padding: 0.54rem 0.75rem; border-radius: 5px; background: rgba(255, 255, 255, 0.95); color: var(--color-primary); font-size: 0.78rem; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-sm); }
.map-link:hover { background: var(--color-primary); color: #fff; }

.site-footer { padding: 1.35rem 0; background: var(--color-primary); color: rgba(255, 255, 255, 0.94); font-size: 0.875rem; }
.site-footer p { margin: 0; }
.asset-empty { display: grid; width: 100%; min-height: inherit; place-items: center; padding: 1.5rem; background: linear-gradient(135deg, rgba(212, 160, 23, 0.16), rgba(139, 37, 0, 0.14)); color: var(--color-text-muted); font-size: 0.85rem; font-weight: 600; text-align: center; }
.timeline-image .asset-empty { color: rgba(253, 246, 227, 0.78); background: rgba(255, 255, 255, 0.08); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out); }
.reveal.is-revealed { opacity: 1; transform: translateY(0); }

/* Modal de integrantes */
.member-modal {
  position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity 220ms var(--ease-out), visibility 0s linear 220ms;
}
.member-modal[aria-hidden="false"] { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
.member-modal-overlay { position: absolute; inset: 0; background: rgba(20, 10, 5, 0.72); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity 260ms var(--ease-out); }
.member-modal[aria-hidden="false"] .member-modal-overlay { opacity: 1; }
.member-modal-panel {
  position: relative; z-index: 2; width: min(820px, calc(100% - 2rem)); max-height: min(88vh, 860px); overflow-y: auto;
  overscroll-behavior: contain; scrollbar-gutter: stable; border: 1px solid rgba(139, 37, 0, 0.12); border-radius: 20px;
  background: var(--color-surface); box-shadow: 0 24px 80px rgba(18, 7, 2, 0.32), 0 5px 20px rgba(18, 7, 2, 0.12);
  padding: clamp(2rem, 5vw, 3.5rem); transform: translateY(18px) scale(0.96); opacity: 0;
  transition: transform 320ms var(--ease-out), opacity 240ms var(--ease-out);
}
.member-modal[aria-hidden="false"] .member-modal-panel { transform: translateY(0) scale(1); opacity: 1; }
.member-modal-close {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 3; display: grid; width: 42px; height: 42px; place-items: center;
  border: 1px solid rgba(139, 37, 0, 0.16); border-radius: 50%; background: rgba(253, 246, 227, 0.92);
  color: var(--color-primary); cursor: pointer; font-size: 1.7rem; line-height: 1;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.member-modal-close:hover { background: var(--color-primary); color: #fff; transform: rotate(8deg); }
.member-modal-body { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.member-modal-media { min-width: 0; }
.member-modal-image { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow-sm); }
.member-modal-content { min-width: 0; padding-top: 0.35rem; }
.member-modal-name { margin: 0 2.5rem 0.45rem 0; color: var(--color-text); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; }
.member-modal-role { margin: 0 0 1.5rem; color: var(--color-primary); font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; }
.member-modal-bio-title { margin: 0 0 0.75rem; color: var(--color-text); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.member-modal-trajectory { color: var(--color-text-muted); font-size: 1rem; line-height: 1.75; }
.member-modal-trajectory p { margin: 0 0 1.15rem; }
.member-modal-trajectory p:last-child { margin-bottom: 0; }

@media (max-width: 1199px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .site-nav { min-height: 56px; }
  .menu-toggle { display: inline-flex; }
  .site-menu {
    position: absolute; top: calc(100% + 0.45rem); right: 0; left: 0; display: grid; gap: 1.1rem;
    padding: 1.3rem; border: 1px solid rgba(44, 24, 16, 0.08); border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.98); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  }
  .site-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-links { display: grid; justify-content: start; gap: 0; }
  .nav-links a { padding: 0.65rem 0; }
  .language-switch { justify-content: flex-start; }
  .proposal-grid { grid-template-columns: 1fr; }
  .members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-intro { position: static; }
  .section-heading { margin-bottom: 2.5rem; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-panel { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  :root { --shell: min(100% - 2rem, 1180px); }
  html { scroll-padding-top: 76px; }
  .site-nav { margin-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
  .hero-copy { padding-bottom: 9.5rem; }
  .hero-logo-wrap { right: 1rem; left: 1rem; bottom: 1.65rem; width: auto; display: flex; flex-direction: column; align-items: center; }
  .hero-logo-slot { width: min(145px, 42vw); }
  .temporary-label { text-align: center; }
  .scroll-cue { bottom: 7.15rem; }
  .members-grid, .video-grid { grid-template-columns: 1fr; }
  .member-photo { height: auto; max-height: 40vh; }
  .album-grid { grid-template-columns: 1fr; gap: 1rem; }
  .album-card { display: grid; grid-template-columns: 115px 1fr; }
  .album-cover { aspect-ratio: auto; min-height: 100%; }
  .album-body { min-height: 170px; }
  .map-frame, .map-frame iframe { min-height: 300px; }
}

@media (max-width: 600px) {
  .member-modal-panel { width: min(100% - 1rem, 820px); max-height: 92vh; border-radius: 16px; padding: 3rem 1.25rem 1.5rem; }
  .member-modal-body { grid-template-columns: 1fr; gap: 1.5rem; }
  .member-modal-image { width: min(220px, 100%); margin: 0 auto; }
  .member-modal-content { padding-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-cue svg { animation: cue-bounce 1.8s var(--ease-in-out) infinite; }
}
@keyframes cue-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .member-modal-panel { transform: none; }
}
