/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Georgia', serif; background: #0d0d0d; color: #e8e0d0; line-height: 1.7; }
a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 56px;
  background: rgba(10,10,10,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s;
}
.nav-logo { font-size: 1.1rem; letter-spacing: 0.05em; color: #c9a84c; font-style: italic; }
.nav-links { display: flex; gap: 1.4rem; list-style: none; }
.nav-links a { font-family: 'Helvetica Neue', sans-serif; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #aaa; transition: color 0.2s; }
.nav-links a:hover { color: #c9a84c; }

/* ===== PARALLAX ===== */
.parallax { position: relative; overflow: hidden; }
.parallax-bg {
  position: absolute; left: 0; right: 0; top: -20vh; bottom: -20vh;
  background-size: cover; background-position: center;
  will-change: transform;
}
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; }
.hero-content {
  position: relative; z-index: 2; text-align: center; padding: 2rem;
  max-width: 800px;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%);
}
.hero-sub { font-family: 'Helvetica Neue', sans-serif; font-size: 0.85rem; letter-spacing: 0.3em; text-transform: uppercase; color: #c9a84c; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1; margin-bottom: 1.5rem; color: #fff; }
.hero-desc { font-size: 1.1rem; color: rgba(255,255,255,0.75); max-width: 560px; margin: 0 auto 2.5rem; }
.btn {
  display: inline-block; padding: 0.85rem 2.5rem;
  border: 1px solid #c9a84c; color: #c9a84c;
  font-family: 'Helvetica Neue', sans-serif; font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
  transition: all 0.3s;
}
.btn:hover { background: #c9a84c; color: #000; }

.parallax-divider { height: 50vh; display: flex; align-items: center; justify-content: center; }
.parallax-divider::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: rgba(0,0,0,0.6);
}
.parallax-quote { position: relative; z-index: 2; text-align: center; padding: 2rem; }
.parallax-quote blockquote { font-size: clamp(1.4rem, 3vw, 2.2rem); font-style: italic; color: #fff; max-width: 700px; }
.parallax-quote cite { display: block; margin-top: 1rem; font-family: 'Helvetica Neue', sans-serif; font-size: 0.85rem; letter-spacing: 0.1em; color: #c9a84c; font-style: normal; }

/* ===== SECTIONS ===== */
.section-dark { padding: 6rem 0; background: #0d0d0d; }
.section-light { padding: 6rem 0; background: #111; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; margin-bottom: 1rem; color: #fff; }
.lead { font-size: 1.1rem; color: #999; max-width: 680px; margin-bottom: 3rem; }

/* ===== INTRO STATS ===== */
.intro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.intro-card {
  display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02);
}
.intro-num { font-size: 3rem; color: #c9a84c; line-height: 1; }
.intro-label { font-family: 'Helvetica Neue', sans-serif; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: #666; margin-top: 0.5rem; }

/* ===== TIMELINE ===== */
.section-light#timeline { background: #f5f3ee; }
.section-light#timeline h2 { color: #1a1a1a; }
.section-light#timeline .lead { color: #666; }

.tl-controls {
  display: flex; gap: 0.5rem; padding: 0 2rem 0.75rem;
}
.tl-controls button {
  width: 32px; height: 32px; border: 1px solid #ccc;
  background: #fff; border-radius: 6px; font-size: 1rem;
  cursor: pointer; color: #555; line-height: 1;
  transition: background 0.15s;
}
.tl-controls button:hover { background: #eee; }

.tl-viewport {
  position: relative;
  height: 700px;
  overflow: hidden;
  cursor: grab;
  background: #f5f3ee;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  user-select: none;
}
.tl-viewport:active { cursor: grabbing; }

.tl-axis-row {
  position: relative; height: 28px;
  transform-origin: top left;
  pointer-events: none;
}

.tl-axis-label {
  position: absolute; transform: translateX(-50%);
  font-family: 'Helvetica Neue', sans-serif; font-size: 0.7rem;
  color: #aaa; top: 6px; pointer-events: none;
}

.tl-world {
  position: relative;
  transform-origin: top left;
}

.tl-blob {
  position: absolute;
  background: rgba(210, 205, 190, 0.5);
  border-radius: 60px;
}

.tl-era-label {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.85rem; color: #999;
  padding: 10px 20px 4px;
  pointer-events: none;
}

.tl-composer-row {
  position: absolute; left: 0; right: 0; height: 22px;
  cursor: pointer;
}
.tl-composer-row:hover .tl-composer-name { color: #222; }
.tl-composer-row:hover .tl-composer-bar { filter: brightness(1.25); }

.tl-composer-name {
  position: absolute; top: 6px;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.72rem; color: #555;
  white-space: nowrap; pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* Hide all names at low zoom — only era labels visible */
.tl-zoom-low .tl-composer-name { opacity: 0; }

/* At mid zoom show names but slightly muted */
.tl-zoom-mid .tl-composer-name { opacity: 0.75; }

/* At high zoom show full names clearly */
.tl-zoom-high .tl-composer-name { opacity: 1; font-size: 0.72rem; }

/* Era label scales up at low zoom to stay readable */
.tl-zoom-low .tl-era-label { font-size: 1rem; color: #777; font-weight: 600; }
.tl-zoom-mid .tl-era-label { font-size: 0.85rem; color: #999; }
.tl-zoom-high .tl-era-label { font-size: 0.85rem; color: #999; }

.tl-composer-bar {
  position: absolute; top: 14px; height: 5px;
  background: #7a8fa6; border-radius: 3px;
  pointer-events: none;
}

.timeline-tooltip {
  position: fixed; z-index: 2000; pointer-events: none;
  background: rgba(10,10,10,0.95); border: 1px solid rgba(201,168,76,0.4);
  padding: 0.75rem 1rem; max-width: 220px; display: none;
}
.timeline-tooltip .tt-name { font-size: 0.95rem; color: #fff; margin-bottom: 0.2rem; }
.timeline-tooltip .tt-dates { font-family: 'Helvetica Neue', sans-serif; font-size: 0.75rem; color: #c9a84c; }
.timeline-tooltip .tt-work { font-size: 0.8rem; color: #888; margin-top: 0.3rem; font-style: italic; }

/* ===== ERAS GRID ===== */
.eras-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.05); }
.era-card {
  display: block; padding: 2.5rem 2rem; background: #0d0d0d;
  border-top: 3px solid var(--era-color);
  transition: background 0.3s, transform 0.3s;
  position: relative; overflow: hidden;
}
.era-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--era-color); opacity: 0; transition: opacity 0.3s;
}
.era-card:hover { background: #161616; }
.era-card:hover::before { opacity: 0.04; }
.era-years {
  font-family: 'Helvetica Neue', sans-serif; font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--era-color);
  margin-bottom: 0.75rem;
}
.era-card h3 { font-size: 1.4rem; font-weight: 400; color: #fff; margin-bottom: 0.75rem; }
.era-card p { font-size: 0.9rem; color: #777; line-height: 1.6; margin-bottom: 1rem; }
.era-composers { font-family: 'Helvetica Neue', sans-serif; font-size: 0.72rem; color: #555; letter-spacing: 0.05em; }

/* ===== GRAPH ===== */
.graph-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 2rem; margin-bottom: 1.5rem; align-items: center; }
.graph-btn {
  font-family: 'Helvetica Neue', sans-serif; font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.15); background: transparent; color: #666;
  cursor: pointer; transition: all 0.2s;
}
.graph-btn:hover, .graph-btn.active { border-color: #c9a84c; color: #c9a84c; background: rgba(201,168,76,0.05); }
.graph-zoom-btns { display: flex; gap: 0.4rem; margin-left: auto; }
.graph-zoom-btns button {
  width: 32px; height: 32px; border: 1px solid rgba(255,255,255,0.15);
  background: transparent; border-radius: 6px; font-size: 1rem;
  cursor: pointer; color: #666; line-height: 1; transition: all 0.2s;
}
.graph-zoom-btns button:hover { border-color: #c9a84c; color: #c9a84c; }
#graphCanvas {
  display: block; width: 100%; height: 650px;
  cursor: grab; background: #0d0d0d;
}
#graphCanvas:active { cursor: grabbing; }
.graph-tooltip {
  position: fixed; z-index: 2000; pointer-events: none;
  background: rgba(10,10,10,0.95); border: 1px solid rgba(201,168,76,0.4);
  padding: 0.75rem 1rem; display: none;
}
.graph-tooltip .gt-name { font-size: 1rem; color: #fff; }
.graph-tooltip .gt-era { font-family: 'Helvetica Neue', sans-serif; font-size: 0.72rem; color: #c9a84c; margin-top: 0.2rem; }
.graph-tooltip .gt-work { font-size: 0.82rem; color: #888; margin-top: 0.3rem; font-style: italic; }

/* ===== FOOTER ===== */
.footer { padding: 3rem 0; background: #080808; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; }
.footer p { font-family: 'Helvetica Neue', sans-serif; font-size: 0.75rem; color: #444; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.footer-links a { font-family: 'Helvetica Neue', sans-serif; font-size: 0.72rem; color: #555; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.footer-links a:hover { color: #c9a84c; }

/* ===== ERA PAGES ===== */
.era-hero { height: 70vh; display: flex; align-items: flex-end; padding-bottom: 4rem; }
.era-hero-content { position: relative; z-index: 2; padding: 0 3rem; }
.era-hero-content .era-tag {
  font-family: 'Helvetica Neue', sans-serif; font-size: 0.75rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--era-color); margin-bottom: 0.75rem;
}
.era-hero-content h1 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 400; color: #fff; line-height: 1; }
.era-hero-content .era-span { font-family: 'Helvetica Neue', sans-serif; font-size: 1rem; color: rgba(255,255,255,0.5); margin-top: 0.5rem; }
.era-hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.5) 100%);
}

.era-nav { display: flex; gap: 1rem; padding: 1rem 2rem; background: #0a0a0a; border-bottom: 1px solid rgba(255,255,255,0.05); flex-wrap: wrap; align-items: center; }
.era-nav a { font-family: 'Helvetica Neue', sans-serif; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #555; transition: color 0.2s; }
.era-nav a:hover { color: #c9a84c; }
.era-nav .sep { color: #333; }

.era-body { max-width: 900px; margin: 0 auto; padding: 5rem 2rem; }
.era-body h2 { font-size: 1.8rem; font-weight: 400; color: #fff; margin: 3rem 0 1rem; }
.era-body h2:first-child { margin-top: 0; }
.era-body p { color: #999; margin-bottom: 1.2rem; font-size: 1rem; }
.era-body .listen-box {
  border-left: 3px solid var(--era-color); padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.02); margin: 2rem 0; font-style: italic; color: #aaa;
}

/* Composer cards on era pages */
.composers-section { background: #0a0a0a; padding: 5rem 0; }
.composers-section .container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.composers-section h2 { font-size: 2rem; font-weight: 400; color: #fff; margin-bottom: 2.5rem; }
.composers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1px; background: rgba(255,255,255,0.05); }
.composer-card {
  background: #0a0a0a; padding: 2rem;
  border-top: 2px solid var(--era-color);
  transition: background 0.2s;
}
.composer-card:hover { background: #111; }
.composer-card .c-name { font-size: 1.2rem; color: #fff; margin-bottom: 0.2rem; }
.composer-card .c-dates { font-family: 'Helvetica Neue', sans-serif; font-size: 0.72rem; color: var(--era-color); letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.composer-card .c-bio { font-size: 0.88rem; color: #777; line-height: 1.6; margin-bottom: 1rem; }
.composer-card .c-works { list-style: none; }
.composer-card .c-works li { font-size: 0.82rem; color: #555; padding: 0.3rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); display: flex; justify-content: space-between; gap: 1rem; }
.composer-card .c-works li:last-child { border-bottom: none; }
.composer-card .c-works .w-title { color: #888; font-style: italic; }
.composer-card .c-works .w-year { color: #444; font-family: 'Helvetica Neue', sans-serif; font-size: 0.75rem; flex-shrink: 0; }
.composer-card .c-start { margin-top: 1rem; font-size: 0.82rem; color: #555; font-style: italic; }
.composer-card .c-start strong { color: #c9a84c; font-style: normal; }

/* Era page prev/next nav */
.era-pagination { display: flex; justify-content: space-between; padding: 3rem 2rem; background: #080808; border-top: 1px solid rgba(255,255,255,0.05); }
.era-pagination a { font-family: 'Helvetica Neue', sans-serif; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: #555; transition: color 0.2s; }
.era-pagination a:hover { color: #c9a84c; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .eras-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .eras-grid { grid-template-columns: 1fr; }
  .intro-grid { grid-template-columns: repeat(2, 1fr); }
  .era-hero-content { padding: 0 1.5rem; }
}
