/* ── CSS 变量 ───────────────────────────────────────────── */
:root {
  --hist-gutter: clamp(24px, 5vw, 96px);
}

/* ── Hero ───────────────────────────────────────────────── */
.hist-hero {
  position: relative;
  min-height: clamp(560px, 78vh, 820px);
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(64px, 8vw, 112px);
  overflow: hidden;
}

.hist-hero__bg {
  position: absolute;
  inset: 0;
  background:radial-gradient(ellipse 65% 50% at 80% 30%, rgba(0, 168, 138, 0.22), transparent 55%),        linear-gradient(155deg, #001512 0%, var(--rm-color-brand-800) 45%, #005a4a 100%);
}

.hist-hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 65% at 12% 35%, rgba(0, 133, 111, 0.28), transparent 55%),
        linear-gradient(160deg, rgba(0, 18, 15, 0.92) 0%, rgba(0, 50, 42, 0.78) 55%, rgba(0, 90, 74, 0.55) 100%);
  pointer-events: none;
}

.hist-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.32;
}

.hist-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 920px !important;
  margin: 0 auto;
  padding: 0 var(--hist-gutter);
  /* margin-left: calc((100% - 920px) / 2 - 30px); */
}

.hist-hero__breadcrumb {
  margin: 0 0 28px;
}

/* 面包屑 — 与 demo.reemoon.com/history 一致 */
.hist-breadcrumb,
.hist-hero__breadcrumb .techd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.hist-breadcrumb a,
.hist-hero__breadcrumb .techd-breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13px;
}

.hist-breadcrumb a:hover,
.hist-hero__breadcrumb .techd-breadcrumb a:hover { color: #fff; }

.hist-breadcrumb span[aria-hidden],
.hist-hero__breadcrumb .techd-breadcrumb span[aria-hidden] {
  color: rgba(255, 255, 255, 0.55);
  user-select: none;
}

.hist-breadcrumb span[aria-current],
.hist-hero__breadcrumb .techd-breadcrumb span[aria-current] {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.hist-hero__eyebrow {
  margin: 0 0 16px;
  font-size: clamp(0.75rem, 0.85vw, 0.8125rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hist-brand-bright);
}

.hist-hero__title {
  margin: 0 0 20px;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
}

.hist-hero__tagline {
  margin: 0;
  max-width: 720px;
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.hist-hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-family: inherit;
}

.hist-hero__scroll:hover {
  color: #fff;
}

.hist-hero__scroll-icon {
  transform: rotate(90deg);
  filter: brightness(0) invert(1);
}

/* ── Stats / Milestones ──────────────────────────────────── */
.hist-stats {
  position: relative;
  z-index: 2;
  margin-top: -32px;
  padding-bottom: clamp(48px, 6vw, 72px);
}

.hist-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(0, 133, 111, 0.12);
  box-shadow:
    0 24px 60px rgba(0, 77, 65, 0.12),
    0 0 0 1px rgba(0, 133, 111, 0.08);
}

.hist-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 24px 16px;
  text-align: center;
  background: #fff;
}

.hist-stat-card__num {
  font-size: clamp(2rem, 3.2vw, 2.375rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--hist-brand);
}

.hist-stat-card__lbl {
  font-size: 13px;
  line-height: 1.45;
  color: var(--rm-color-neutral-500);
}

/* ── Sticky Nav ──────────────────────────────────────────── */
.hist-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.25px solid rgba(0, 133, 111, 0.1);
  padding: 10px 0;
}

.hist-nav__list {
  display: flex;
  flex-direction: row;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hist-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hist-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hist-nav__link:hover {
  color: var(--hist-brand);
  background: var(--hist-brand-muted);
}

.hist-nav__link.is-active {
  color: #fff;
  background: var(--hist-brand);
  box-shadow: 0 4px 14px rgba(0, 133, 111, 0.28);
}

.hist-nav__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(0, 133, 111, 0.08);
  color: var(--hist-brand);
  flex-shrink: 0;
}

.hist-nav__link.is-active .hist-nav__num {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hist-nav__text {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Timeline Main ───────────────────────────────────────── */
.hist-main {
  background: #fff;
  padding-top: clamp(48px, 8vw, 80px);
  padding-bottom: 0;
}

.hist-container {
  max-width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 var(--hist-gutter);
}

.hist-container--narrow {
  max-width: 1100px;
}

/* ── Era Sections ────────────────────────────────────────── */
.hist-era {
  position: relative;
  padding: clamp(64px, 10vw, 96px) 0;
  scroll-margin-top: 60px;
}

.hist-era:first-child { padding-top: 0; }

.hist-era__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hist-era__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}

.hist-era__head {
  /* no sticky */
}

.hist-era__head::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hist-brand), rgba(0, 133, 111, 0.15));
}

.hist-era__index {
  display: block;
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(0, 133, 111, 0.14);
}

.hist-era__title {
  margin: 12px 0 0;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--rm-color-neutral-800);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ── Era alternating backgrounds ─────────────────────────── */
.hist-era--midnight .hist-era__bg {
  background:
    radial-gradient(70% 55% at 0% 100%, rgba(0, 133, 111, 0.12), transparent 55%),
    linear-gradient(180deg, #fff 0%, #f4faf8 100%);
}
.hist-era--ocean .hist-era__bg {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(0, 168, 138, 0.08), transparent 55%),
    linear-gradient(180deg, #f4faf8 0%, #fff 100%);
}
.hist-era--teal .hist-era__bg {
  background: linear-gradient(180deg, #fff 0%, rgba(0, 133, 111, 0.06) 100%);
}
.hist-era--forest .hist-era__bg {
  background: linear-gradient(180deg, var(--hist-brand-muted) 0%, #fff 100%);
}
.hist-era--emerald .hist-era__bg {
  background: linear-gradient(180deg, #fff 0%, var(--hist-brand-muted) 100%);
}

/* ── Timeline line (right side of events) ────────────────── */
.hist-era__events {
  position: relative;
  margin: 0;
  padding: 0;
  padding-left: 4px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
}

.hist-era__events::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(0, 133, 111, 0.4), rgba(0, 133, 111, 0.08));
  pointer-events: none;
}

.hist-era__events li {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  align-items: stretch;
}

/* Timeline marker + dot */
.hist-event__marker {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 22px;
}

.hist-event__dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hist-brand);
  box-shadow: 0 0 0 4px rgba(0, 133, 111, 0.15);
  flex-shrink: 0;
}

.hist-event__card {
  border-radius: var(--rm-radius-2xl);
  background: #fff;
  border: 1.25px solid rgba(0, 133, 111, 0.1);
  box-shadow:
    0 12px 32px rgba(0, 77, 65, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.hist-event__card:hover {
  border-color: rgba(0, 133, 111, 0.2);
  box-shadow:
    0 20px 48px rgba(0, 77, 65, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.hist-event__card-inner {
  display: flex;
  flex-direction: column;
}

/* photo area */
.hist-event__photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  padding: 20px 20px 0;
}

.hist-event__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--hist-brand-muted);
  transition: opacity 0.4s ease;
}

.hist-lazy-img {
  opacity: 0;
}

.hist-lazy-img.is-loaded {
  opacity: 1;
}

.hist-event__photo-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.hist-event__photo-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: rgba(0, 77, 65, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.hist-event__photo:hover .hist-event__photo-hint {
  opacity: 1;
  transform: translateY(0);
}

.hist-event__photo-hint svg,
.hist-event__photo-hint img,
.hist-event__photo-hint picture {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

/* 透明底图标自动转白，和文字颜色一致 */
.hist-event__photo-hint img {
  background: transparent;
  filter: brightness(0) contrast(3) invert(1);
}

/* ── Lightbox ────────────────────────────────────────────── */
.hist-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 18, 15, 0.88);
}

.hist-lightbox[hidden] {
  display: none;
}

.hist-lightbox__img {
  max-width: 70vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.hist-lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  transition: background 0.2s;
}

.hist-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* content area */
.hist-event__content {
  padding: clamp(22px, 2.5vw, 28px) clamp(22px, 2.5vw, 32px);
}

.hist-event__year {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--hist-brand);
  background: var(--hist-brand-muted);
}

.hist-event__body {
  margin: 0;
  font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
  line-height: 1.85;
  color: var(--hist-text-muted);
}

.hist-event__body p { margin: 0; }

/* ── CTA ─────────────────────────────────────────────────── */
.hist-cta {
  position: relative;
  padding: 52px 0;
  overflow: hidden;
}

.hist-cta__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 50%, rgba(0, 168, 138, 0.2), transparent 55%),
    linear-gradient(135deg, var(--support-brand-dark, #003a34) 0%, var(--support-brand, #00856f) 50%, var(--support-brand-deep, #006b59) 100%);
  pointer-events: none;
}

.hist-cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hist-cta__copy {
  flex: 1;
  min-width: min(100%, 520px);
}

.hist-cta__title {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
}

.hist-cta__desc {
  margin: 0;
  max-width: 640px;
  font-size: clamp(0.9375rem, 1vw, 1rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
}

.hist-cta__actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.hist-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.hist-cta__btn:focus-visible {
  outline: 2px solid var(--hist-brand-bright);
  outline-offset: 2px;
}

.hist-cta__btn--primary {
  background: #fff;
  color: var(--hist-brand-800);
  border: 1.25px solid #fff;
  box-shadow: none;
}

.hist-cta__btn--primary img {
  filter: brightness(0) saturate(100%);
  opacity: 0.75;
}

.hist-cta__btn--primary:hover,
.hist-cta__btn--primary:focus-visible {
  color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 133, 111, 0.12);
}

.hist-cta__btn--primary:hover img,
.hist-cta__btn--primary:focus-visible img {
  filter: brightness(0) saturate(100%) invert(16%) sepia(98%) saturate(3500%) hue-rotate(207deg);
  opacity: 1;
}

.hist-cta__btn--outline {
  background: transparent;
  color: #fff;
  border: 1.25px solid rgba(255, 255, 255, 0.45);
}

.hist-cta__btn--outline:hover,
.hist-cta__btn--outline:focus-visible {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  color: #0056b3;
}

/* remove white hr line */
.hist-cta + hr,
.hist-main + hr,
main + hr { display: none; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hist-nav__text {
    max-width: 140px;
  }
}

@media (max-width: 768px) {
  .hist-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hist-hero {
    min-height: clamp(420px, 70vh, 560px);
    padding-bottom: clamp(48px, 8vw, 80px);
  }

  .hist-era__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hist-era__head {
    position: static;
  }

  .hist-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hist-cta__actions {
    width: 100%;
    flex-direction: column;
  }

  .hist-cta__btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hist-stats__grid {
    grid-template-columns: 1fr;
  }

  .hist-event__content {
    padding: 16px 18px;
  }
}


.hist-nav__list::-webkit-scrollbar {
    width: 0;          /* 垂直滚动条宽度 */
    height: 0;         /* 水平滚动条高度 */
    background: transparent;
}
