:root {
  --ink: #071a34;
  --ink-soft: #33425a;
  --line: rgba(7, 26, 52, 0.22);
  --line-lit: rgba(186, 132, 58, 0.92);
  --gold: #b9823f;
  --focus: #174d86;
  --progress: 0%;
  --backdrop-focus: 8%;
  --backdrop-x: 50px;
  --backdrop-y: 0px;
  --hero-shift: 0px;
  --timeline-shift: 32px;
  --timeline-opacity: 0.9;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: #eef3f8;
  font-family: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
  letter-spacing: 0;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

button,
a {
  font: inherit;
}

.anniversary-demo {
  min-height: 100vh;
}

.milestone-scroll {
  height: 300vh;
  position: relative;
}

.sticky-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(340px, 1fr) auto minmax(64px, auto);
  align-items: center;
  padding: clamp(24px, 4vw, 56px) clamp(18px, 3vw, 46px) 26px;
}

.mountain-backdrop {
  position: absolute;
  inset: -7vh -16vw;
  z-index: -3;
  background-image: url("https://commons.wikimedia.org/wiki/Special:FilePath/Mountain_Panorama.jpg?width=3840");
  background-size: auto 122%;
  background-position: var(--backdrop-focus) center;
  transform: translate3d(var(--backdrop-x), var(--backdrop-y), 0) scale(1.04);
  filter: saturate(0.82) contrast(0.98) brightness(1.08);
  will-change: transform;
}

.atmosphere {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.88) 0%, rgba(250, 252, 255, 0.58) 37%, rgba(250, 252, 255, 0.18) 57%, rgba(250, 252, 255, 0.78) 100%),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.hero-copy {
  width: min(760px, 92vw);
  justify-self: center;
  text-align: center;
  transform: translate3d(0, var(--hero-shift), 0);
}

.kicker {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: clamp(0.86rem, 1.2vw, 1rem);
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Optima, "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: clamp(4rem, 9.6vw, 8.2rem);
  line-height: 0.88;
  font-weight: 500;
  text-transform: uppercase;
}

.intro {
  width: min(660px, 92vw);
  margin: clamp(18px, 2.8vw, 30px) auto 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.65;
}

.hero-actions {
  margin-top: clamp(24px, 3vw, 36px);
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  min-width: 194px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(7, 26, 52, 0.13);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:focus-visible,
.nav-button:focus-visible,
.milestone-dot:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(7, 26, 52, 0.18);
}

.button-primary {
  background: linear-gradient(180deg, #f2bf73, #c99348);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(7, 26, 52, 0.12);
  backdrop-filter: blur(10px);
}

.timeline-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  min-height: 162px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  gap: clamp(12px, 2vw, 26px);
  align-items: center;
  transform: translate3d(0, var(--timeline-shift), 0);
  opacity: var(--timeline-opacity);
}

.timeline-viewport {
  position: relative;
  min-height: 128px;
  padding: 16px 0 4px;
}

.timeline-line {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--line) 7%, var(--line) 93%, transparent 100%);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.8);
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(244, 192, 106, 0.86) 12%, var(--line-lit) 100%);
  box-shadow: 0 0 28px rgba(244, 192, 106, 0.55);
}

.milestones {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, minmax(74px, 1fr));
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.milestone {
  position: relative;
  min-width: 0;
  text-align: center;
  color: var(--ink);
}

.milestone-dot {
  width: 26px;
  height: 26px;
  margin: 14px auto 16px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  background: transparent;
  position: relative;
  transition: transform 260ms ease;
}

.milestone-dot::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.85);
  border: 3px solid var(--ink);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.7),
    0 10px 22px rgba(7, 26, 52, 0.22);
}

.milestone-dot::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.6);
  background: radial-gradient(circle, rgba(244, 192, 106, 0.88), rgba(185, 130, 63, 0.28) 42%, transparent 68%);
  transition: opacity 260ms ease, transform 260ms ease;
  z-index: -1;
}

.milestone.is-active .milestone-dot {
  transform: translateY(-5px) scale(1.18);
}

.milestone.is-active .milestone-dot::before {
  width: 18px;
  height: 18px;
  background:
    radial-gradient(circle at 48% 45%, #05080d 0 42%, #946127 46%, #f8d891 62%, rgba(255, 255, 255, 0.9) 68%);
  border-color: rgba(249, 211, 139, 0.98);
  box-shadow:
    0 0 0 8px rgba(244, 192, 106, 0.25),
    0 0 0 17px rgba(255, 255, 255, 0.45),
    0 14px 34px rgba(185, 130, 63, 0.55);
}

.milestone.is-active .milestone-dot::after {
  opacity: 1;
  transform: scale(1);
}

.year {
  display: block;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  font-weight: 900;
}

.label {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: clamp(0.7rem, 1vw, 0.78rem);
  line-height: 1.2;
}

.milestone.is-active .year,
.milestone.is-active .label {
  color: var(--gold);
}

.nav-button {
  width: 54px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 38px rgba(7, 26, 52, 0.13);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.nav-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.78);
}

.nav-button span {
  font-size: 2.4rem;
  line-height: 1;
  transform: translateY(-1px);
}

.scroll-cue {
  margin: 10px auto 0;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
  min-height: 52px;
}

.mouse-icon {
  width: 17px;
  height: 31px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  position: relative;
  background: rgba(255, 255, 255, 0.42);
}

.mouse-icon::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 3px;
  height: 7px;
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%);
  animation: wheel 1.4s ease-in-out infinite;
}

.after-panel {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(48px, 8vw, 110px);
  background: #f8fafc;
  color: var(--ink);
}

.after-panel h2 {
  margin: 0;
  font-family: Optima, Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-weight: 500;
}

.after-panel p {
  width: min(680px, 100%);
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 1.05rem;
}

@keyframes wheel {
  0%, 100% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  35%, 65% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 9px);
  }
}

@media (max-width: 860px) {
  .sticky-stage {
    grid-template-rows: minmax(310px, 1fr) auto minmax(70px, auto);
    padding-inline: 16px;
  }

  .hero-actions {
    gap: 10px;
  }

  .button {
    min-width: min(240px, 100%);
  }

  .timeline-shell {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .nav-button {
    width: 44px;
  }

  .timeline-viewport {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-inline: 8px;
  }

  .timeline-viewport::-webkit-scrollbar {
    display: none;
  }

  .milestones {
    width: 860px;
    grid-template-columns: repeat(9, 1fr);
  }

  .timeline-line {
    left: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
