/* ==========================================================================
   El canto del jilguero — estilos
   ========================================================================== */

:root {
  --color-bg: #faf6ee;
  --color-bg-paper: #f3ead9;
  --color-forest: #2f4a3c;
  --color-forest-dark: #21332a;
  --color-olive: #6f7d4f;
  --color-brown: #9c8266;
  --color-carbon: #33312e;
  --color-red: #b5432f;
  --color-gold: #cf9e3a;
  --color-cream-text: #f6f1e6;

  --font-title: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-title-alt: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --max-width: 1120px;
  --radius: 6px;
  --transition: 0.4s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-carbon);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 760px; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(51, 49, 46, 0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-forest);
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--color-brown);
}

.site-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.88rem;
  color: var(--color-carbon);
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-forest);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--color-forest);
  color: var(--color-cream-text);
}
.btn-primary:hover { background: var(--color-forest-dark); }

.btn-outline {
  border-color: var(--color-forest);
  color: var(--color-forest);
  background: transparent;
}
.btn-outline:hover { background: var(--color-forest); color: var(--color-cream-text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  padding: 60px 24px 50px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(207, 158, 58, 0.14), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(47, 74, 60, 0.12), transparent 50%),
    var(--color-bg);
  z-index: -1;
}

.hero-inner { max-width: var(--max-width); margin: 0 auto; grid-column: 1; padding-left: calc((100% - var(--max-width) + 48px) / 2); }

@media (min-width: 1200px) {
  .hero { grid-template-columns: none; }
  .hero-inner { padding-left: 0; margin: 0 auto; max-width: 640px; }
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-olive);
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 600;
  color: var(--color-forest);
  margin: 0 0 8px;
  line-height: 1.05;
}

.hero-subtitle {
  font-family: var(--font-title-alt);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--color-brown);
  margin: 0 0 20px;
}

.hero-text {
  max-width: 46ch;
  color: #4a473f;
  margin-bottom: 30px;
}

.hero-signature {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--color-gold);
  padding-left: 16px;
  margin-bottom: 34px;
}

.hero-name { font-family: var(--font-title); font-size: 1.1rem; color: var(--color-forest); }
.hero-note { font-size: 0.85rem; color: var(--color-brown); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.soundwave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
}

.soundwave span {
  width: 3px;
  background: var(--color-gold);
  border-radius: 2px;
  height: 8px;
  opacity: 0.55;
  transition: height 0.3s ease;
}

.soundwave.is-active span {
  animation: wave 1.1s ease-in-out infinite;
}

.soundwave span:nth-child(1) { animation-delay: 0s; }
.soundwave span:nth-child(2) { animation-delay: 0.1s; }
.soundwave span:nth-child(3) { animation-delay: 0.2s; }
.soundwave span:nth-child(4) { animation-delay: 0.3s; }
.soundwave span:nth-child(5) { animation-delay: 0.4s; }
.soundwave span:nth-child(6) { animation-delay: 0.3s; }
.soundwave span:nth-child(7) { animation-delay: 0.2s; }
.soundwave span:nth-child(8) { animation-delay: 0.1s; }
.soundwave span:nth-child(9) { animation-delay: 0s; }

@keyframes wave {
  0%, 100% { height: 8px; opacity: 0.55; }
  50% { height: 28px; opacity: 1; }
}

.hero-media { grid-column: 2; }
@media (min-width: 1200px) { .hero-media { display: none; } }

.photo-frame {
  position: relative;
  background: var(--color-bg-paper);
  border: 1px solid rgba(51, 49, 46, 0.1);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.photo-frame--hero { min-height: 340px; justify-content: center; }

.bird-illustration { width: 70%; }

.frame-caption {
  font-size: 0.75rem;
  color: var(--color-brown);
  text-align: center;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--paper { background: var(--color-bg-paper); }
.section--dark { background: var(--color-forest-dark); color: var(--color-cream-text); }

.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-olive);
  margin: 0 0 10px;
}
.section-kicker--light { color: var(--color-gold); }

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--color-forest);
  margin: 0 0 20px;
  font-weight: 600;
}
.section-title--light { color: var(--color-cream-text); }

.section-lead {
  max-width: 62ch;
  font-size: 1.05rem;
  color: #4a473f;
  margin-bottom: 40px;
}
.section-lead--light { color: rgba(246, 241, 230, 0.85); }

.section-note {
  font-size: 0.88rem;
  color: var(--color-brown);
  max-width: 62ch;
  margin-top: 30px;
}

/* ---------- Bio ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 60px;
}

.photo-placeholder {
  background: rgba(51, 49, 46, 0.05);
  border: 1px dashed rgba(51, 49, 46, 0.25);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-brown);
  font-size: 0.78rem;
  text-align: center;
  padding: 10px;
}

.photo-hint { font-size: 0.78rem; color: var(--color-brown); margin-top: 10px; text-align: center; }

.bio-text p { max-width: 60ch; }

/* ---------- Timeline ---------- */
.timeline-title {
  font-family: var(--font-title);
  color: var(--color-forest);
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(111, 125, 79, 0.3);
}

.timeline-item {
  position: relative;
  padding: 0 0 30px 26px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-olive);
}

.timeline-item--highlight::before { background: var(--color-red); }

.timeline-year {
  display: block;
  font-family: var(--font-title-alt);
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: 4px;
}

.timeline-item p { margin: 0; color: #4a473f; }

/* ---------- Achievement ---------- */
.achievement-card {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  background: rgba(207, 158, 58, 0.08);
  border: 1px solid rgba(207, 158, 58, 0.35);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 20px;
}

.achievement-year {
  font-family: var(--font-title);
  font-size: 3.4rem;
  color: var(--color-gold);
  font-weight: 600;
}

.achievement-details { display: flex; flex-direction: column; gap: 6px; }
.achievement-line { color: rgba(246, 241, 230, 0.9); }
.achievement-points { font-family: var(--font-title); font-size: 1.6rem; color: var(--color-cream-text); }
.achievement-points small { font-size: 0.9rem; font-weight: 400; color: var(--color-brown); }
.achievement-place { color: var(--color-gold); font-weight: 600; }
.achievement-location { color: rgba(246, 241, 230, 0.7); font-size: 0.9rem; }

.source-note { font-size: 0.82rem; color: rgba(246, 241, 230, 0.6); }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.feature-card {
  background: rgba(51, 49, 46, 0.03);
  border: 1px solid rgba(51, 49, 46, 0.08);
  border-radius: var(--radius);
  padding: 24px;
}

.feature-card h4 {
  font-family: var(--font-title-alt);
  font-size: 1.15rem;
  color: var(--color-forest);
  margin: 0 0 8px;
}

.feature-card p { margin: 0; font-size: 0.92rem; color: #4a473f; }

.feature-grid--dark .feature-card {
  background: rgba(246, 241, 230, 0.04);
  border-color: rgba(246, 241, 230, 0.12);
}
.feature-grid--dark .feature-card h4 { color: var(--color-gold); }
.feature-grid--dark .feature-card p { color: rgba(246, 241, 230, 0.75); }

/* ---------- Value list ---------- */
.value-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0 0 30px;
}

.value-list li {
  font-size: 0.85rem;
  padding: 8px 16px;
  border: 1px solid rgba(111, 125, 79, 0.4);
  border-radius: 999px;
  color: var(--color-olive);
}

.pull-quote {
  font-family: var(--font-title-alt);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--color-forest);
  border-left: 3px solid var(--color-red);
  padding-left: 22px;
  margin: 30px 0;
}

/* ---------- Cabin ---------- */
.cabin-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 30px;
}

.cabin-brand img {
  max-width: 220px;
  border-radius: var(--radius);
  background: var(--color-cream-text);
  padding: 10px;
}

.cabin-brand-caption {
  font-size: 0.8rem;
  color: rgba(246, 241, 230, 0.6);
  margin: 0;
}

.cabin-visual { margin: 20px 0 40px; }
.cabin-svg { width: 100%; max-width: 520px; margin: 0 auto; }

/* ---------- Audio / fonoteca ---------- */
.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.audio-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-bg-paper);
  border: 1px solid rgba(51, 49, 46, 0.08);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.audio-play {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(51, 49, 46, 0.2);
  background: var(--color-bg);
  color: var(--color-brown);
  font-size: 0.95rem;
  cursor: not-allowed;
}

.audio-info h4 { margin: 0 0 4px; font-family: var(--font-title-alt); color: var(--color-forest); font-size: 1.05rem; }
.audio-meta { margin: 0; font-size: 0.8rem; color: var(--color-brown); }

.spectrogram-block h3 {
  font-family: var(--font-title);
  color: var(--color-forest);
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.spectrogram-block p { max-width: 62ch; color: #4a473f; }

.spectrogram {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 90px;
  margin: 26px 0;
  padding: 14px;
  background: var(--color-forest-dark);
  border-radius: var(--radius);
}

.spectrogram span {
  flex: 1;
  background: linear-gradient(to top, var(--color-gold), var(--color-red));
  border-radius: 2px;
  opacity: 0.85;
  animation: bars 2.4s ease-in-out infinite;
}

.spectrogram span:nth-child(3n) { animation-duration: 1.8s; }
.spectrogram span:nth-child(4n) { animation-duration: 3s; }
.spectrogram span:nth-child(5n) { animation-delay: 0.4s; }
.spectrogram span:nth-child(7n) { animation-delay: 0.8s; }

@keyframes bars {
  0%, 100% { height: 12%; }
  50% { height: 85%; }
}

/* ---------- Video embed ---------- */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 30px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-carbon);
  border: 1px solid rgba(51, 49, 46, 0.12);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Contest archive ---------- */
.contest-archive { margin-top: 24px; }

.contest-year {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 22px 0;
  border-bottom: 1px solid rgba(51, 49, 46, 0.1);
}

.contest-year-num {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--color-forest);
  min-width: 90px;
}

.contest-year-details { display: flex; flex-direction: column; gap: 4px; color: #4a473f; font-size: 0.92rem; }
.contest-medal { color: var(--color-red); font-weight: 600; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
}

.gallery-item { margin: 0; }
.gallery-item .photo-placeholder { aspect-ratio: 4 / 3; }
.gallery-item figcaption {
  margin-top: 10px;
  font-family: var(--font-title-alt);
  color: var(--color-forest);
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- Diary ---------- */
.diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.diary-card {
  background: var(--color-bg-paper);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 3px solid var(--color-olive);
}

.diary-card h4 { font-family: var(--font-title-alt); color: var(--color-forest); margin: 0 0 8px; font-size: 1.05rem; }
.diary-card p { margin: 0; font-size: 0.88rem; color: var(--color-brown); }

/* ---------- Sources ---------- */
.section--sources { padding: 60px 0; background: var(--color-bg); border-top: 1px solid rgba(51, 49, 46, 0.08); }
.sources-title { font-family: var(--font-title-alt); color: var(--color-forest); font-size: 1.2rem; margin-bottom: 14px; }
.sources-list { padding-left: 20px; color: #4a473f; font-size: 0.9rem; }
.sources-list a { color: var(--color-forest); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Contact ---------- */
.contact-email {
  display: inline-block;
  font-family: var(--font-title-alt);
  font-size: 1.3rem;
  color: var(--color-forest);
  border-bottom: 1px solid var(--color-gold);
  margin-top: 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-forest-dark);
  color: rgba(246, 241, 230, 0.75);
  padding: 60px 0 20px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(246, 241, 230, 0.1);
}

.footer-brand .brand-title { color: var(--color-cream-text); font-family: var(--font-title); }
.footer-brand p { margin: 6px 0 0; font-size: 0.85rem; }
.footer-name { color: var(--color-gold) !important; }

.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; align-self: flex-start; }
.footer-nav a { font-size: 0.85rem; }
.footer-nav a:hover { color: var(--color-gold); }

.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(246, 241, 230, 0.4);
  margin: 20px 0 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .bio-grid { grid-template-columns: 1fr; }
  .bio-photo { max-width: 260px; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    border-bottom: 1px solid rgba(51, 49, 46, 0.08);
  }
  .site-nav.is-open { max-height: 480px; }
  .site-nav a { padding: 14px 24px; border-top: 1px solid rgba(51, 49, 46, 0.06); }
  .nav-toggle { display: flex; }

  .hero { grid-template-columns: 1fr; padding-top: 40px; text-align: left; }
  .hero-inner { padding-left: 0; }
  .hero-media { display: none; }

  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .achievement-card { padding: 24px; gap: 20px; }
  .achievement-year { font-size: 2.6rem; }
}
