/* ============================================================
   ARISTO MILESTONES — PIXEL-PERFECT RECREATION
   ============================================================ */

:root {
  --primary: #e71e1c;
  --dark: #111827;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --bg: #f5f5f5;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
}

/* ── Section ─────────────────────────────────────────────── */
.milestones-section {
  padding: 60px 0 70px;
  background: var(--bg);
}

.milestones-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────── */
.milestones-header {
  text-align: center;
  margin-bottom: 50px;
}

.milestones-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.milestones-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.milestones-divider {
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 0 auto;
}

/* ── Timeline wrapper ────────────────────────────────────── */
.milestones-timeline {
  position: relative;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary);
  transform: translateX(-50%);
}

/* ── Single milestone row ────────────────────────────────── */
.milestone {
  position: relative;
  margin-bottom: 60px;
}

.milestone:last-child {
  margin-bottom: 0;
}

/* ── Card ────────────────────────────────────────────────── */
.milestone-card {
  width: 480px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 28px;
}

.milestone-year {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.milestone-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.milestone-description {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray);
  line-height: 1.5;
}

/* ── Marker (dot on line) ────────────────────────────────── */
.milestone-marker {
  position: absolute;
  top: 8px;
  width: 42px;
  height: 42px;
  background: var(--primary);
  border: 4px solid var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 0 2px var(--primary);
}

.milestone-marker svg {
  width: 18px;
  height: 18px;
  color: var(--white);
}

/* ── Left card layout ────────────────────────────────────── */
.milestone-left {
  text-align: right;
}

.milestone-left .milestone-card {
  margin-right: 52px;
  margin-left: auto;
}

.milestone-left .milestone-marker {
  right: -21px;
}

/* ── Right card layout ───────────────────────────────────── */
.milestone-right .milestone-card {
  text-align: right;
  margin-left: 52px;
  margin-right: auto;
}

.milestone-right .milestone-marker {
  left: -21px;
}

/* ── Entrance animations ─────────────────────────────────── */
.milestone-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.milestone-marker {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.milestone.is-visible .milestone-card {
  opacity: 1;
  transform: translateY(0);
}

.milestone.is-visible .milestone-marker {
  opacity: 1;
  transform: scale(1);
}

/* stagger */
.milestone:nth-child(2) .milestone-card { transition-delay: 0.1s; }
.milestone:nth-child(2) .milestone-marker { transition-delay: 0.25s; }

.milestone:nth-child(3) .milestone-card { transition-delay: 0.2s; }
.milestone:nth-child(3) .milestone-marker { transition-delay: 0.35s; }

.milestone:nth-child(4) .milestone-card { transition-delay: 0.3s; }
.milestone:nth-child(4) .milestone-marker { transition-delay: 0.45s; }

.milestone:nth-child(5) .milestone-card { transition-delay: 0.4s; }
.milestone:nth-child(5) .milestone-marker { transition-delay: 0.55s; }

.milestone:nth-child(6) .milestone-card { transition-delay: 0.5s; }
.milestone:nth-child(6) .milestone-marker { transition-delay: 0.65s; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .milestone-card,
  .milestone-marker {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .milestone-card { width: 420px; }
}

@media (max-width: 768px) {
  .milestones-section { padding: 40px 0 50px; }
  .milestones-title { font-size: 32px; }

  .timeline-line { left: 28px; }

  .milestone-marker {
    left: 28px;
    width: 36px;
    height: 36px;
  }

  .milestone-marker svg {
    width: 15px;
    height: 15px;
  }

  .milestone-card {
    width: auto;
    margin-left: 56px !important;
    margin-right: 0 !important;
    text-align: left !important;
  }

  .milestone-left,
  .milestone-right {
    text-align: left;
  }

  .milestone-left .milestone-marker,
  .milestone-right .milestone-marker {
    left: 28px;
    right: auto;
  }
}

@media (max-width: 480px) {
  .milestones-title { font-size: 28px; }
  .milestone-year { font-size: 26px; }
  .milestone-card { padding: 18px 20px; }
  .milestone-marker { left: 20px; width: 32px; height: 32px; }
  .timeline-line { left: 20px; }
  .milestone-card { margin-left: 44px !important; }
}
