/**
 * Antigravity Framework — Roadmap Timeline
 * Cinematic scroll-driven timeline for brand storytelling.
 * All rules scoped to .div-site to prevent Flatsome conflicts.
 */

/* ─────────────────────────────────────────────
   DESIGN TOKENS (roadmap-specific)
   ───────────────────────────────────────────── */
.div-site .div-roadmap {
  --rm-bg:            #0a0a0a;
  --rm-aura:          radial-gradient(ellipse 50% 40% at 50% 50%, rgba(201, 168, 76, 0.08), transparent 70%);
  --rm-bg-subtle:     #111111;
  --rm-accent:        #c5a55a;
  --rm-accent-glow:   rgba(197, 165, 90, 0.35);
  --rm-text:          #e8e4dc;
  --rm-text-muted:    #8a8578;
  --rm-card-bg:       rgba(255, 255, 255, 0.04);
  --rm-card-border:   rgba(255, 255, 255, 0.08);
  --rm-line-color:    rgba(197, 165, 90, 0.25);
  --rm-line-drawn:    #c5a55a;
  --rm-node-size:     18px;
  --rm-node-ring:     42px;
  --rm-card-radius:   12px;
  --rm-gutter:        clamp(24px, 4vw, 64px);
}

/* ─────────────────────────────────────────────
   SECTION CONTAINER
   Pinned full-viewport section.
   ───────────────────────────────────────────── */
.div-site .div-roadmap {
  position: relative;
  background: var(--rm-bg);
  color: var(--rm-text);
  overflow: hidden;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

/* Ambient gold aura — moves with scroll */
.div-site .div-roadmap__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--rm-aura);
  opacity: 0.5;
  transition: opacity 1.2s var(--div-ease-expo);
  animation: div-roadmap-aura 8s ease-in-out infinite alternate;
}

@keyframes div-roadmap-aura {
  0%   { background-position: 50% 30%; opacity: 0.3; }
  100% { background-position: 50% 70%; opacity: 0.6; }
}

/* ─────────────────────────────────────────────
   HEADER / INTRO
   ───────────────────────────────────────────── */
.div-site .div-roadmap__header {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(80px, 12vh, 160px) var(--rm-gutter) clamp(40px, 6vh, 80px);
}

.div-site .div-roadmap__title {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rm-text);
  margin: 0 0 0.4em;
  line-height: 1.1;
}

.div-site .div-roadmap__subtitle {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--rm-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

/* ─────────────────────────────────────────────
   TIMELINE TRACK (vertical center line)
   SVG path draws itself via JS strokeDashoffset.
   ───────────────────────────────────────────── */
.div-site .div-roadmap__track {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--rm-gutter) clamp(80px, 10vh, 160px);
}

.div-site .div-roadmap__line-svg {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.div-site .div-roadmap__line-bg {
  stroke: var(--rm-line-color);
  stroke-width: 2;
  fill: none;
}

.div-site .div-roadmap__line-progress {
  stroke: var(--rm-line-drawn);
  stroke-width: 3;
  fill: none;
  filter: drop-shadow(0 0 8px var(--rm-accent-glow)) drop-shadow(0 0 16px rgba(197, 165, 90, 0.2));
}

/* ─────────────────────────────────────────────
   MILESTONE NODE
   ───────────────────────────────────────────── */
.div-site .div-roadmap__milestone {
  position: relative;
  display: grid;
  grid-template-columns: 1fr var(--rm-node-ring) 1fr;
  align-items: start;
  gap: 0 clamp(16px, 3vw, 40px);
  padding-bottom: clamp(60px, 8vh, 120px);
  z-index: 3;
}

/* Node dot — center column */
.div-site .div-roadmap__node {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--rm-node-ring);
  height: var(--rm-node-ring);
  position: relative;
  align-self: start;
  margin-top: 8px;
}

.div-site .div-roadmap__node-dot {
  width: var(--rm-node-size);
  height: var(--rm-node-size);
  border-radius: 50%;
  background: var(--rm-bg);
  border: 2.5px solid rgba(224, 64, 48, 0.4);
  position: relative;
  z-index: 2;
  transition: border-color 0.6s var(--div-ease-expo),
              background 0.6s var(--div-ease-expo),
              box-shadow 0.6s var(--div-ease-expo);
}

/* Active state — set by JS when milestone scrolls into view */
.div-site .div-roadmap__node-dot.is-active {
  border-color: var(--rm-node-active, #e04030);
  background: var(--rm-node-active, #e04030);
  box-shadow: 0 0 20px rgba(224, 64, 48, 0.45),
              0 0 40px rgba(224, 64, 48, 0.2);
}

/* Pulse ring on active node */
.div-site .div-roadmap__node-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--rm-node-active, #e04030);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.div-site .div-roadmap__node-dot.is-active + .div-roadmap__node-pulse {
  animation: div-roadmap-pulse 2s var(--div-ease-expo) infinite;
}

@keyframes div-roadmap-pulse {
  0%   { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0;   transform: scale(2.2); }
}

/* ─────────────────────────────────────────────
   MILESTONE CONTENT CARD
   Alternating left/right placement.
   ───────────────────────────────────────────── */
.div-site .div-roadmap__card {
  grid-row: 1;
  background: var(--rm-card-bg);
  border: 1px solid var(--rm-card-border);
  border-radius: var(--rm-card-radius);
  padding: clamp(24px, 3vw, 40px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  will-change: transform, opacity;
}

/* Left-aligned milestone: card in column 1 */
.div-site .div-roadmap__milestone--left .div-roadmap__card {
  grid-column: 1;
  text-align: right;
}

/* Right-aligned milestone: card in column 3 */
.div-site .div-roadmap__milestone--right .div-roadmap__card {
  grid-column: 3;
  text-align: left;
}

/* Year badge */
.div-site .div-roadmap__year {
  display: inline-block;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rm-accent);
  background: rgba(197, 165, 90, 0.1);
  border: 1px solid rgba(197, 165, 90, 0.2);
  border-radius: 100px;
  padding: 4px 16px;
  margin-bottom: 16px;
}

/* Card title */
.div-site .div-roadmap__card-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rm-text);
  margin: 0 0 12px;
  line-height: 1.2;
}

/* Card description */
.div-site .div-roadmap__card-desc {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--rm-text-muted);
  line-height: 1.65;
  margin: 0 0 20px;
}

/* Card image */
.div-site .div-roadmap__card-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.div-site .div-roadmap__card-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  will-change: transform;
}

/* Stat counter inside card */
.div-site .div-roadmap__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.div-site .div-roadmap__stat-value {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  color: var(--rm-accent);
  letter-spacing: -0.02em;
}

.div-site .div-roadmap__stat-label {
  font-size: clamp(0.75rem, 1.1vw, 0.9rem);
  color: var(--rm-text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 8px;
}

/* ─────────────────────────────────────────────
   ERA DIVIDER
   Visual separator between timeline eras
   ───────────────────────────────────────────── */
.div-site .div-roadmap__era {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: clamp(40px, 6vh, 80px) 0;
}

.div-site .div-roadmap__era-label {
  display: inline-block;
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rm-accent);
  padding: 8px 24px;
  border: 1px solid rgba(197, 165, 90, 0.2);
  border-radius: 100px;
  background: rgba(197, 165, 90, 0.06);
}

/* ─────────────────────────────────────────────
   FOOTER CTA
   ───────────────────────────────────────────── */
.div-site .div-roadmap__footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(40px, 6vh, 80px) var(--rm-gutter) clamp(80px, 12vh, 160px);
}

.div-site .div-roadmap__footer-text {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--rm-text);
  max-width: 700px;
  margin: 0 auto 32px;
  line-height: 1.2;
}

.div-site .div-roadmap__cta {
  display: inline-block;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rm-bg);
  background: var(--rm-accent);
  padding: 16px 40px;
  border-radius: 4px;
  text-decoration: none;
  transition: transform 0.4s var(--div-ease-snappy),
              box-shadow 0.4s var(--div-ease-snappy);
  will-change: transform;
}

.div-site .div-roadmap__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--rm-accent-glow);
  color: var(--rm-bg);
}

/* ─────────────────────────────────────────────
   FLOATING PARTICLES (ambient atmosphere)
   Positioned via JS, styled here.
   ───────────────────────────────────────────── */
.div-site .div-roadmap__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.div-site .div-roadmap__particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--rm-accent);
  opacity: 0;
  will-change: transform, opacity;
}

/* ─────────────────────────────────────────────
   RESPONSIVE — MOBILE (<768px)
   Stack cards below the node; single-column.
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .div-site .div-roadmap__milestone {
    grid-template-columns: var(--rm-node-ring) 1fr;
    gap: 0 16px;
  }

  .div-site .div-roadmap__line-svg {
    left: calc(var(--rm-node-ring) / 2);
    transform: translateX(-50%);
    width: 4px;
    display: block;
  }

  .div-site .div-roadmap__line-svg svg {
    display: block;
    width: 4px;
    overflow: visible;
  }

  .div-site .div-roadmap__node {
    grid-column: 1;
  }

  /* All cards go to column 2 regardless of direction */
  .div-site .div-roadmap__milestone--left .div-roadmap__card,
  .div-site .div-roadmap__milestone--right .div-roadmap__card {
    grid-column: 2;
    text-align: left;
  }

  .div-site .div-roadmap__era-label {
    font-size: 0.75rem;
  }

  /* Ensure pulse rings visible on mobile */
  .div-site .div-roadmap__node-dot.is-active + .div-roadmap__node-pulse {
    animation: div-roadmap-pulse 2s var(--div-ease-expo, ease) infinite;
  }
}

/* ─────────────────────────────────────────────
   PERFORMANCE HINTS
   ───────────────────────────────────────────── */
.div-site .div-roadmap__card,
.div-site .div-roadmap__node-dot,
.div-site .div-roadmap__particle {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ─────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .div-site .div-roadmap__node-pulse {
    animation: none !important;
  }

  .div-site .div-roadmap__particle {
    display: none;
  }

  .div-site .div-roadmap__card,
  .div-site .div-roadmap__node-dot {
    transition-duration: 0.01ms !important;
  }
}
