:root {
  --bg: #ffffff;
  --paper: #fbf3e7;
  --paper-soft: #fdf8f0;
  --ink: #26201a;
  --ink-dim: #78694f;
  --cochineal: #c14c3d;
  --jade: #3d8571;
  --ochre: #c98a1f;

  --font-display: "DM Serif Display", serif;
  --font-body: "Work Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;

  --shadow-soft: 0 6px 20px rgba(38, 32, 26, 0.06);
  --shadow-lift: 0 10px 28px rgba(38, 32, 26, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, audio { max-width: 100%; }

a { color: inherit; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
}

.brand span { color: var(--cochineal); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.site-nav a.navlink {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-dim);
  letter-spacing: 0.01em;
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a.navlink:hover { color: var(--cochineal); background: var(--paper-soft); }

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 76px;
  position: relative;
  overflow: hidden;
}

.hero .eyebrow, .about-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--jade);
  background: #e8f2ee;
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 1.08;
  margin: 0 0 24px;
  max-width: 14ch;
  color: var(--ink);
}

.hero h1 em {
  font-style: italic;
  color: var(--cochineal);
}

.hero p.lede {
  font-size: 1.18rem;
  max-width: 54ch;
  color: var(--ink-dim);
  margin: 0 0 36px;
}

.hero .cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--cochineal);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { transform: translateY(-2px); background: #ab3f31; box-shadow: var(--shadow-lift); }

.btn-ghost {
  border-color: rgba(38, 32, 26, 0.18);
  color: var(--ink);
  background: #fff;
}
.btn-ghost:hover { border-color: var(--ochre); color: var(--ochre); transform: translateY(-2px); }

/* Voice-bars signature element */
.voice-bars {
  margin-top: 60px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 116px;
}

.voice-bars .bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.voice-bars .bar {
  width: 100%;
  max-width: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ochre), var(--cochineal));
  animation: sway 3.4s ease-in-out infinite;
}

.voice-bars .bar-group:nth-child(odd) .bar { background: linear-gradient(180deg, var(--jade), var(--ochre)); }

.bar-1 { height: 70%; animation-delay: 0s; }
.bar-2 { height: 45%; animation-delay: .3s; }
.bar-3 { height: 90%; animation-delay: .6s; }
.bar-4 { height: 55%; animation-delay: .9s; }
.bar-5 { height: 75%; animation-delay: 1.2s; }
.bar-6 { height: 38%; animation-delay: 1.5s; }
.bar-7 { height: 82%; animation-delay: 1.8s; }
.bar-8 { height: 50%; animation-delay: 2.1s; }

.voice-bars .label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-dim);
  white-space: nowrap;
}

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

@media (prefers-reduced-motion: reduce) {
  .voice-bars .bar { animation: none; }
}

/* ---------- Section shell ---------- */

section { padding: 80px 0; }

.section-head { margin-bottom: 44px; max-width: 62ch; }

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ochre);
  background: #fbf0dd;
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0 0 16px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0 0 14px;
}

.section-head p { color: var(--ink-dim); margin: 0; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.about-grid p { color: var(--ink-dim); }

.about-eyebrow { margin-bottom: 14px; }
.about-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0 0 20px; }

.fact-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: var(--shadow-soft);
}

.fact-card dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--jade);
  margin-top: 20px;
}
.fact-card dt:first-child { margin-top: 0; }

.fact-card dd {
  margin: 4px 0 0;
  font-size: 1.6rem;
  font-family: var(--font-display);
  color: var(--ink);
}

/* ---------- Languages ---------- */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.lang-card {
  background: var(--paper-soft);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.lang-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); background: #fff; }

.lang-card .fam {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cochineal);
}

.lang-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 10px 0 6px;
}

.lang-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-dim);
}

.lang-more {
  margin-top: 26px;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.empty {
  color: var(--ink-dim);
  font-size: 0.9rem;
}

/* ---------- Gallery (carteles) ---------- */

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

.poster-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.poster-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.poster-thumb {
  aspect-ratio: 3 / 4;
  background: linear-gradient(155deg, #e8f2ee, #fbe6e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--ink-dim);
  text-align: center;
  padding: 16px;
}

.poster-thumb.has-image {
  padding: 0;
  background: #fff;
}

.poster-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-card .cap { padding: 16px 18px; }
.poster-card .cap h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.08rem; }
.poster-card .cap p { margin: 0; font-size: 0.84rem; color: var(--ink-dim); }

/* ---------- Audio ---------- */

.audio-list { display: flex; flex-direction: column; gap: 14px; }

.audio-row {
  background: var(--paper-soft);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: center;
  transition: box-shadow 0.2s ease;
}
.audio-row:hover { box-shadow: var(--shadow-soft); }

.audio-row .meta h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.08rem; font-weight: 400; }
.audio-row .meta span { font-size: 0.76rem; font-weight: 600; color: var(--jade); text-transform: uppercase; letter-spacing: 0.02em; }
.audio-row audio { width: 260px; max-width: 100%; }

.empty-note {
  font-size: 0.92rem;
  color: var(--ink-dim);
  padding: 26px 24px;
  background: var(--paper-soft);
  border-radius: var(--radius-md);
  text-align: center;
}

/* ---------- DSpace ---------- */

.dspace-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-soft);
}

.dspace-panel h3 { font-family: var(--font-display); font-size: 1.65rem; margin: 0 0 12px; }
.dspace-panel p { color: var(--ink-dim); margin: 0 0 22px; }
.dspace-panel .fact-card { background: #fff; }

/* ---------- Footer ---------- */

footer {
  padding: 44px 0 56px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer a { color: var(--cochineal); text-decoration: none; font-weight: 600; }

.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: 100%; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .about-grid, .dspace-panel { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 44px; }
  section { padding: 52px 0; }
  .audio-row { grid-template-columns: 1fr; }
  .audio-row audio { width: 100%; }
}

/* ---------- Focus visibility ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
  border-radius: 6px;
}
