/* ============================== COMO TRABALHO ============================== */

/* Hero */
.ct-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 4vw, 64px);
  background: var(--paper);
  text-align: center;
}
.ct-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 820px;
}
.ct-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.ct-hero__sub {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  max-width: 624px;
  opacity: 0.78;
}

/* Active nav link state */
.nav__link--active {
  background: rgba(36, 41, 51, 0.06);
  color: var(--accent);
}

/* ============================== TIMELINE ============================== */
.timeline-section {
  padding: clamp(48px, 6vw, 96px) 0 var(--section-y);
  background: var(--paper);
}
.timeline {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 0;
}

/* The vertical line that connects all steps */
.timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(36, 41, 51, 0.1);
  border-radius: 2px;
  overflow: hidden;
  pointer-events: none;
}
.timeline__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent), var(--ink));
  border-radius: 2px;
  transition: height .15s linear;
}

/* Each step */
.ts {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(48px, 6vw, 80px) 0;
  align-items: start;
}
.ts__dot {
  position: absolute;
  left: 50%;
  top: clamp(58px, 7vw, 92px);
  transform: translate(-50%, 0) scale(0.6);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--paper);
  border: 2px solid rgba(36, 41, 51, 0.15);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .4s ease, background-color .4s ease, border-color .4s ease;
}
.ts__dot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity .5s ease, transform .8s cubic-bezier(.2,.7,.2,1);
  z-index: -1;
  filter: blur(8px);
}
.ts.is-active .ts__dot {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  background: var(--accent);
  border-color: var(--accent);
}
.ts.is-active .ts__dot::before {
  opacity: 0.35;
  transform: scale(1);
}

/* Content placement */
.ts--right .ts__content {
  grid-column: 2;
  padding-left: clamp(16px, 3vw, 32px);
  text-align: left;
}
.ts--left .ts__content {
  grid-column: 1;
  padding-right: clamp(16px, 3vw, 32px);
  text-align: right;
}

/* Soft horizontal connector from dot to content */
.ts__content {
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.ts.is-active .ts__content {
  opacity: 1;
  transform: translateY(0);
}
.ts__content::before {
  content: "";
  position: absolute;
  top: clamp(70px, 7vw, 92px);
  width: 40px;
  height: 2px;
  background: rgba(36, 41, 51, 0.15);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: .2s;
}
.ts--right .ts__content::before { left: calc(-1 * clamp(16px, 3vw, 32px) - 40px); }
.ts--left .ts__content::before { right: calc(-1 * clamp(16px, 3vw, 32px) - 40px); transform-origin: right; }
.ts.is-active .ts__content::before { transform: scaleX(1); }

.ts__step {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  line-height: 1;
}
.ts__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.ts__body {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.05vw, 16px);
  line-height: 1.6;
  color: var(--ink);
  max-width: 480px;
  margin-bottom: 20px;
}
.ts--left .ts__body { margin-left: auto; }

.ts__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.ts--left .ts__chips { justify-content: flex-end; }
.ts__chips li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(36, 41, 51, 0.06);
  color: var(--ink);
  line-height: 1.2;
}

/* Mobile: stack all on left */
@media (max-width: 760px) {
  .timeline__line { left: 24px; transform: none; }
  .ts {
    grid-template-columns: 1fr;
    padding: 32px 0 32px 64px;
  }
  .ts__dot { left: 24px; transform: translate(-50%, 0) scale(0.6); top: 38px; }
  .ts.is-active .ts__dot { transform: translate(-50%, 0) scale(1); }
  .ts--right .ts__content,
  .ts--left .ts__content {
    grid-column: 1;
    padding: 0;
    text-align: left;
  }
  .ts__content::before { display: none; }
  .ts--left .ts__body { margin-left: 0; }
  .ts--left .ts__chips { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .ts__content, .ts__dot, .ts__content::before {
    transition: none;
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  .ts--right .ts__content, .ts--left .ts__content { transform: none; opacity: 1; }
  .timeline__line-fill { transition: none; }
}
