/* ====== Tokens (mismo espíritu del globals.css del zip) ====== */
:root {
  --background: #fbfbfb;
  --foreground: #1f1f1f;
  --card: #ffffff;
  --card-foreground: #1f1f1f;
  --muted-foreground: #6c6c6c;
  --secondary: #f3f3f3;
  --secondary-foreground: #2f2f2f;
  --border: #e7e7e7;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    "DM Sans",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;

  color: var(--foreground);
}

.services {
  padding: 80px 16px 120px;
}

.services__container {
  max-width: 1080px;
  margin: 0 auto;
}

.services__.services__header {
  text-align: center;
  margin: 0 auto 72px;
  max-width: 760px;

  opacity: 0;
  transform: translateY(40px);
}
.services__kicker {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.services__title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(44px, 5vw, 76px);
  letter-spacing: -0.02em;
}
.services__divider {
  width: 64px;
  height: 1px;
  background: var(--foreground);
  margin: 18px auto 0;
}
.services__lead {
  margin: 18px auto 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted-foreground);
  max-width: 560px;
}

/* ====== Timeline ====== */
.timeline {
  position: relative;
}
.timeline__line {
  display: none;
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  transition: transform 1.4s cubic-bezier(0.2, 1, 0.2, 1);
}
@media (min-width: 900px) {
  .timeline__line {
    display: block;
  }
}

.timeline__items {
  margin-top: 7vh;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
@media (min-width: 900px) {
  .timeline__items {
    gap: 80px;
  }
}

/* ====== Item layout ====== */
.item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;

  opacity: 0;
  transform: translateY(20px);
}
@media (min-width: 900px) {
  .item {
    grid-template-columns: 1fr auto 1fr;
  }
}

.item__number {
  display: none;
}
@media (min-width: 900px) {
  .item__number {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0 28px;
  }
  .item__number span {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 2px solid var(--foreground);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    background: var(--background);
    position: relative;
    z-index: 2;
  }
}

/* card */
.item__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 22px;
}
@media (min-width: 900px) {
  .item__card {
    padding: 30px;
  }
}

/* icon badge */
.item__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--foreground);
  color: var(--background);
  margin-bottom: 14px;
}

.item__heading {
  margin: 0 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 22px;
}
@media (min-width: 900px) {
  .item__heading {
    font-size: 26px;
  }
}

.item__desc {
  margin: 0 0 18px;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.7;
}

/* chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ====== Side placement ====== */
@media (min-width: 900px) {
  .item--left .item__card {
    grid-column: 1;
  }
  .item--left .item__number {
    grid-column: 2;
  }
  .item--right .item__card {
    grid-column: 3;
  }
  .item--right .item__number {
    grid-column: 2;
  }
}

/* ====== Animaciones (equivalente a gsap fromTo) ====== */
.is-ready {
  will-change: transform, opacity;
}
.is-in {
  opacity: 1 !important;
  transform: translateY(0) translateX(0) !important;
  transition:
    opacity 0.9s cubic-bezier(0.2, 1, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 1, 0.2, 1);
}

/* Header: sube desde abajo */
.services__header.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Cards: entran desde lados en desktop */
@media (min-width: 900px) {
  .item[data-side="left"] {
    transform: translateX(-60px) translateY(20px);
  }
  .item[data-side="right"] {
    transform: translateX(60px) translateY(20px);
  }
}

/* Línea: crece */
.timeline__line.is-in {
  transform: translateX(-50%) scaleY(1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .services__header,
  .item {
    opacity: 1;
    transform: none;
  }
  .timeline__line {
    transform: translateX(-50%) scaleY(1);
    transition: none;
  }
}
