/* Importing Google Fonts - Bricolage Grotesque */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,700;12..96,800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Bricolage Grotesque", sans-serif;
}

:root {
  --bg: #0d1016;
  --card: #151a23;
  --card-border: #232a37;
  --text: #f3efe6;
  --muted: #959cab;
  --amber: #ffb547;
  --pink: #ff5d8f;
  --line: #262d3a;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 82vh;
  padding: 80px 20px 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 181, 71, 0.16), transparent 55%);
}

.eyebrow {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 16px 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--amber), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.scroll-hint {
  width: 26px;
  height: 42px;
  margin-top: 40px;
  border: 2px solid var(--line);
  border-radius: 999px;
}

.scroll-hint span {
  display: block;
  width: 4px;
  height: 8px;
  margin: 7px auto 0;
  border-radius: 4px;
  background: var(--amber);
  animation: hint 1.6s ease-in-out infinite;
}

@keyframes hint {
  60% {
    transform: translateY(14px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- Timeline ---------- */
.timeline-wrap {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  overflow-x: clip; /* hidden cards start off to the side */
}

/* Grey track + the fill that grows with scroll (height set in script.js) */
.track {
  position: absolute;
  top: 40px;
  bottom: 60px;
  left: 50%;
  width: 3px;
  border-radius: 3px;
  background: var(--line);
  transform: translateX(-50%);
}

.fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--amber), var(--pink));
  box-shadow: 0 0 18px rgba(255, 93, 143, 0.6);
  transform: scaleY(var(--progress, 0));
  transform-origin: top;
}

.timeline {
  position: relative;
  display: grid;
  gap: 34px;
  list-style: none;
}

.milestone {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 80px;
}

/* Node on the line */
.node {
  position: absolute;
  top: 26px;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  transform: translateX(-50%);
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s;
}

.node::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.4s;
}

.milestone.is-reached .node {
  border-color: var(--amber);
  box-shadow: 0 0 0 6px rgba(255, 181, 71, 0.15), 0 0 20px rgba(255, 181, 71, 0.5);
  transform: translateX(-50%) scale(1.1);
}

.milestone.is-reached .node::after {
  background: var(--amber);
}

/* Cards alternate sides */
.card {
  grid-column: 1;
  position: relative;
  padding: 24px 26px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--card);
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s;
}

.milestone:nth-child(even) .card {
  grid-column: 2;
  transform: translateX(40px);
}

.milestone.is-visible .card {
  opacity: 1;
  transform: none;
}

.milestone.is-reached .card {
  border-color: rgba(255, 181, 71, 0.35);
}

/* Little arrow pointing to the line */
.card::before {
  content: "";
  position: absolute;
  top: 28px;
  right: -8px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  background: var(--card);
  transform: rotate(45deg);
}

.milestone:nth-child(even) .card::before {
  right: auto;
  left: -8px;
  transform: rotate(-135deg);
}

/* Year shown on the opposite side of the card */
.year {
  grid-row: 1;
  grid-column: 2;
  padding-top: 18px;
  color: var(--line);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  transition: color 0.5s;
}

.milestone:nth-child(even) .year {
  grid-column: 1;
  text-align: right;
}

.milestone.is-reached .year {
  color: var(--text);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 181, 71, 0.12);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 700;
}

.emoji {
  font-size: 1.4rem;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.stat {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.stat b {
  color: var(--amber);
}

/* ---------- End ---------- */
.end {
  padding: 40px 20px 110px;
  text-align: center;
}

.end h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta {
  display: inline-block;
  margin-top: 22px;
  padding: 14px 26px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--amber), var(--pink));
  color: #1a1208;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s;
}

.cta:hover {
  transform: translateY(-3px);
}

/* ---------- Mobile: line on the left, all cards on the right ---------- */
@media (max-width: 760px) {
  .track {
    left: 30px;
  }

  .milestone {
    grid-template-columns: 1fr;
    padding-left: 44px;
  }

  .node {
    left: 10px;
  }

  .card,
  .milestone:nth-child(even) .card {
    grid-column: 1;
    grid-row: 2;
    transform: translateX(30px);
  }

  .card::before,
  .milestone:nth-child(even) .card::before {
    display: none;
  }

  .year,
  .milestone:nth-child(even) .year {
    grid-column: 1;
    padding: 18px 0 8px;
    font-size: 2rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    opacity: 1;
    transform: none !important;
    transition: none;
  }

  .scroll-hint span {
    animation: none;
  }
}
