/* ============================================================
   WORKFLOW / METODOLOGIA — premium vertical timeline.
   A hero-spectrum rail connects numbered nodes; each phase is a
   glass card that lights up on hover. Steps are always visible
   (reveal is optional via .workflow.animate). 
   ============================================================ */
.workflow {
  background: #000000;
  position: relative;
  overflow: hidden;
}

/* faint methodology backdrop: a couple of deep hero-tinted pools */
.workflow::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 40% at 18% 20%, rgba(56, 189, 248, 0.03) 0%, transparent 60%),
    radial-gradient(50% 42% at 85% 80%, rgba(129, 140, 248, 0.03) 0%, transparent 62%);
}

.workflow > * { position: relative; z-index: 1; }

.workflow__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--tertiary), var(--primary-container));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.workflow__intro {
  max-width: 640px;
  margin: 1rem auto 3rem;
  text-align: center;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  line-height: 1.7;
  color: var(--on-surface-variant);
}

/* ── Timeline ── */
.workflow__timeline {
  list-style: none;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding-left: 0;
}

/* the connecting rail — a single, restrained line (sober, professional) */
.workflow__timeline::before {
  content: '';
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 27px;                        /* centre of the 54px marker column */
  width: 1px;
  background: linear-gradient(180deg,
    rgba(173, 198, 255, 0) 0%,
    rgba(173, 198, 255, 0.35) 12%,
    rgba(173, 198, 255, 0.35) 88%,
    rgba(173, 198, 255, 0) 100%);
  border-radius: 2px;
}

.workflow__step {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 1.1rem;
  align-items: start;
  padding-bottom: 1.5rem;
  --accent: 56, 189, 248;
}
.workflow__step:last-child { padding-bottom: 0; }

/* ── Node marker on the rail ── */
.workflow__marker {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0c12;
  border: 1px solid rgba(173, 198, 255, 0.22);
  box-shadow: 0 0 0 5px #000;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.workflow__num {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--on-surface);
  opacity: 0.85;
}

/* ── Phase card ── */
.workflow__card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(173, 198, 255, 0.1);
  border-left: 2px solid rgba(173, 198, 255, 0.3);
  border-radius: 8px;
  padding: 1.1rem 1.3rem 1.2rem;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.workflow__dur {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--outline);
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--outline-variant);
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.workflow__step-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--on-surface);
  margin: 0 0 0.3rem;
}

.workflow__step-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--on-surface-variant);
  margin: 0;
}
.workflow__step-desc em {
  font-style: normal;
  color: var(--primary);
  font-weight: 600;
}

/* ── Hover: a restrained highlight — the brand accent, no heavy glow ── */
.workflow__step:hover .workflow__marker {
  border-color: rgba(173, 198, 255, 0.6);
  box-shadow: 0 0 0 5px #000;
}
.workflow__step:hover .workflow__num { opacity: 1; color: var(--primary); }
.workflow__step:hover .workflow__card {
  border-color: rgba(173, 198, 255, 0.28);
  border-left-color: var(--primary);
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(3px);
}

/* ── Optional staggered reveal (only when JS adds .animate) ── */
.workflow.animate .workflow__step {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--i) * 90ms);
}
.workflow.animate.is-visible .workflow__step {
  opacity: 1;
  transform: translateY(0);
}

/* ── Tablet ≤ 768px ── */
@media (max-width: 768px) {
  .workflow__timeline { max-width: 100%; }
  .workflow__step { grid-template-columns: 46px 1fr; gap: 0.85rem; }
  .workflow__timeline::before { left: 23px; }
  .workflow__marker { width: 46px; height: 46px; }
  .workflow__num { font-size: 0.92rem; }
  .workflow__step-title { font-size: 1.05rem; }
}

/* ── Mobile ≤ 480px ── */
@media (max-width: 480px) {
  .workflow__step { grid-template-columns: 40px 1fr; gap: 0.7rem; padding-bottom: 0.7rem; }
  .workflow__timeline::before { left: 20px; }
  .workflow__marker { width: 40px; height: 40px; border-width: 1.5px; }
  .workflow__num { font-size: 0.82rem; }
  .workflow__card { padding: 0.8rem 1rem; }
  .workflow__step-title { font-size: 0.95rem; margin: 0; }
  .workflow__step-desc { font-size: 0.86rem; }

  /* ACCORDION: compact by default — only the title shows; tapping the card
     expands to reveal the duration + description. */
  .workflow__card {
    position: relative;
    cursor: pointer;
    padding-right: 2.2rem;          /* room for the +/− chevron */
  }
  .workflow__card::after {
    content: '+';
    position: absolute;
    top: 0.7rem;
    right: 0.85rem;
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--primary);
    transition: transform 0.3s ease;
  }
  .workflow__step.is-open .workflow__card::after { content: '−'; }

  /* collapsed: hide duration + description with a smooth height transition */
  .workflow__dur,
  .workflow__step-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  }
  .workflow__step.is-open .workflow__dur {
    max-height: 2rem;
    opacity: 1;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
  }
  .workflow__step.is-open .workflow__step-desc {
    max-height: 10rem;
    opacity: 1;
  }
}

/* ── Full HD ≥ 1920px ── */
@media (min-width: 1920px) {
  .workflow__timeline { max-width: 880px; }
  .workflow__step { grid-template-columns: 64px 1fr; gap: 1.4rem; padding-bottom: 1.9rem; }
  .workflow__timeline::before { left: 32px; }
  .workflow__marker { width: 64px; height: 64px; }
  .workflow__num { font-size: 1.25rem; }
  .workflow__card { padding: 1.4rem 1.7rem 1.5rem; }
  .workflow__step-title { font-size: 1.35rem; }
  .workflow__step-desc { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .workflow__step, .workflow__marker, .workflow__card { transition: none; }
}
