/* =========================================================
   Hero Timeline — 1980s / 2000s / 2090s
   Round 1: desktop layout + hover expand + crop + copy
   ========================================================= */

.hero-timeline {
  --ht-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ht-w: 800ms;
  --ht-img: 1000ms;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100svh;
  min-height: 720px;
  overflow: hidden;
  background: #0a0908;
}

.hero-timeline__track {
  display: flex;
  width: 100%;
  height: 100%;
}

.timeline-panel {
  position: relative;
  flex: 30 1 0;
  min-width: 0;
  overflow: hidden;
  cursor: default;
  transition: flex var(--ht-w) var(--ht-ease);
}

.timeline-panel--00s {
  flex: 40 1 0;
}

.hero-timeline.is-hover .timeline-panel {
  flex: 20 1 0;
}

.hero-timeline.is-hover .timeline-panel.is-active {
  flex: 60 1 0;
}

/* Seam / time cut — no gutter cards */
.timeline-panel--80s::after,
.timeline-panel--00s::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
  z-index: 4;
  pointer-events: none;
}

.timeline-panel--80s::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07));
  z-index: 3;
  pointer-events: none;
}

.timeline-panel--00s::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 36px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14));
  z-index: 3;
  pointer-events: none;
}

/* Media */
.timeline-panel__media {
  position: absolute;
  inset: 0;
}

.timeline-panel__media picture,
.timeline-panel__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  transform: scale(1.035);
  transform-origin: center center;
  transition:
    transform var(--ht-img) var(--ht-ease),
    filter var(--ht-img) var(--ht-ease);
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.timeline-panel--80s .timeline-panel__media img {
  object-position: 25% center;
}

.timeline-panel--00s .timeline-panel__media img {
  object-position: 50% center;
  filter: saturate(0.9);
}

.timeline-panel--90s .timeline-panel__media img {
  object-position: 80% center;
  filter: brightness(0.985);
}

.timeline-panel.is-active .timeline-panel__media img {
  transform: scale(1);
}

.timeline-panel--00s.is-active .timeline-panel__media img {
  filter: saturate(1);
}

.timeline-panel--90s.is-active .timeline-panel__media img {
  filter: brightness(1);
}

/* Shade overlays */
.timeline-panel__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity var(--ht-w) var(--ht-ease), transform var(--ht-img) var(--ht-ease);
}

.timeline-panel--80s .timeline-panel__shade {
  background: rgba(0, 0, 0, 0.12);
  opacity: 1;
}

.timeline-panel--80s.is-active .timeline-panel__shade {
  opacity: 0;
}

.timeline-panel--00s .timeline-panel__shade {
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.38) 100%);
  opacity: 1;
}

.timeline-panel--90s .timeline-panel__shade {
  background: transparent;
}

.timeline-panel--90s.is-active .timeline-panel__shade {
  /* soft floor shadow drifts down slightly */
  box-shadow: inset 0 -18px 28px -18px rgba(20, 19, 17, 0.18);
  transform: translateY(2px);
}

/* Copy */
.timeline-panel__copy {
  position: absolute;
  z-index: 5;
  max-width: 16em;
  pointer-events: none;
}

.timeline-panel--80s .timeline-panel__copy {
  left: clamp(1.1rem, 2.2vw, 2rem);
  bottom: clamp(3.5rem, 7vh, 5.5rem);
  color: #f2efe8;
}

.timeline-panel--00s .timeline-panel__copy {
  left: clamp(1.1rem, 2.2vw, 2rem);
  bottom: clamp(3.5rem, 7vh, 5.5rem);
  color: #f2efe8;
}

.timeline-panel--90s .timeline-panel__copy {
  right: clamp(1.25rem, 3vw, 2.75rem);
  left: auto;
  bottom: clamp(3.5rem, 7vh, 5.5rem);
  color: #171717;
  text-align: right;
  max-width: 14em;
}

.timeline-panel__era {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0 0 0.65rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.82;
}

.timeline-panel--90s .timeline-panel__era {
  align-items: flex-end;
}

.timeline-panel__tag {
  font-family: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: none;
  opacity: 0.9;
}

.timeline-panel__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.timeline-panel__title-short {
  display: block;
}

.timeline-panel__title-full {
  display: none;
}

.timeline-panel.is-active .timeline-panel__title-short {
  display: none;
}

.timeline-panel.is-active .timeline-panel__title-full {
  display: block;
}

.timeline-panel.is-active .timeline-panel__title {
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
}

.timeline-panel__en,
.timeline-panel__body,
.timeline-panel__micro {
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}

.timeline-panel.is-active .timeline-panel__en,
.timeline-panel.is-active .timeline-panel__body,
.timeline-panel.is-active .timeline-panel__micro {
  opacity: 1;
  transform: none;
  max-height: 8em;
  overflow: visible;
}

.timeline-panel.is-active .timeline-panel__en {
  margin-top: 0.85rem;
  transition:
    opacity 520ms var(--ht-ease) 120ms,
    transform 520ms var(--ht-ease) 120ms;
}

.timeline-panel.is-active .timeline-panel__body {
  margin-top: 0.7rem;
  transition:
    opacity 560ms var(--ht-ease) 240ms,
    transform 560ms var(--ht-ease) 240ms;
}

.timeline-panel.is-active .timeline-panel__micro {
  margin-top: 0.85rem;
  transition:
    opacity 560ms var(--ht-ease) 300ms,
    transform 560ms var(--ht-ease) 300ms;
}

.timeline-panel__en {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}

.timeline-panel__body {
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0;
}

.timeline-panel--80s.is-active .timeline-panel__body,
.timeline-panel--00s.is-active .timeline-panel__body {
  color: rgba(242, 239, 232, 0.86);
}

.timeline-panel--90s.is-active .timeline-panel__body {
  color: rgba(23, 23, 23, 0.72);
}

.timeline-panel__micro {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  color: inherit;
  opacity: 0.55;
}

/* Global motto */
.hero-timeline__motto {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.72);
  pointer-events: none;
  transition: color 500ms var(--ht-ease);
}

.hero-timeline[data-theme="dark"] .hero-timeline__motto {
  color: rgba(23, 23, 23, 0.55);
}

/* Header over hero — transparent, theme by era */
.cdv1 .site-nav.nav-on-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
}

.cdv1 .site-nav.nav-on-hero.is-scrolled {
  border-bottom-color: transparent;
}

.cdv1 .site-nav.nav-theme-light .brand__cn,
.cdv1 .site-nav.nav-theme-light .nav-links a {
  color: #f2efe8;
}

.cdv1 .site-nav.nav-theme-light .brand__en {
  color: rgba(242, 239, 232, 0.65);
}

.cdv1 .site-nav.nav-theme-light .nav-links a:hover {
  color: #fff;
}

.cdv1 .site-nav.nav-theme-dark .brand__cn,
.cdv1 .site-nav.nav-theme-dark .nav-links a {
  color: #171717;
}

.cdv1 .site-nav.nav-theme-dark .brand__en {
  color: rgba(23, 23, 23, 0.55);
}

.cdv1 .site-nav.nav-theme-dark .nav-links a:hover {
  color: #000;
}

.cdv1 .site-nav.nav-theme-light .nav-toggle span {
  background: #f2efe8;
}

.cdv1 .site-nav.nav-theme-dark .nav-toggle span {
  background: #171717;
}

/* Mobile hero: remove paper square around menu — keep lines only */
@media (max-width: 820px) {
  .cdv1 .site-nav.nav-on-hero .nav-toggle {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .timeline-panel--80s::before,
  .timeline-panel--00s::before,
  .timeline-panel--80s::after,
  .timeline-panel--00s::after {
    display: none;
  }
}

/* After leaving hero (scrolled): restore solid nav via JS class removal */
.cdv1 .site-nav:not(.nav-on-hero) {
  position: sticky;
}

@media (prefers-reduced-motion: reduce) {
  .timeline-panel,
  .timeline-panel__media img,
  .timeline-panel__shade,
  .timeline-panel__en,
  .timeline-panel__body,
  .timeline-panel__micro {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}

/* Round 1: no mobile swipe yet — keep desktop panels readable if narrow */
@media (max-width: 768px) {
  .hero-timeline {
    min-height: 640px;
  }
  .timeline-panel__title {
    font-size: 0.95rem;
  }
  .timeline-panel.is-active .timeline-panel__title {
    font-size: 1.15rem;
  }
}
