/* ═══ Cómo trabajamos — Timeline & Portal ═══ */

/* ── Dark theme (gam.zip) + grain ── */
body.process-page {
  --base-deep: #0F1115;
  --ivory: #E5E7EB;
  --ivory-muted: #C9CDD4;
  --slate-warm: #6B7280;
  --slate-light: #9CA3AF;
  --silver: #B0B8C4;
  --panel-border: rgba(156, 163, 175, 0.08);
  background: var(--base-deep);
  color: var(--ivory);
}

body.process-page .atmosphere {
  background: linear-gradient(180deg, #0F1115 0%, #161A20 35%, #1C2128 70%, #0D0F13 100%);
}

body.process-page .grain {
  opacity: 0.11;
  mix-blend-mode: overlay;
}

body.process-page .nav-brand { color: var(--ivory); }
body.process-page .nav-brand span { color: var(--slate-warm); }
body.process-page .nav-links a { color: var(--slate-warm); }
body.process-page .nav-links a:hover,
body.process-page .nav-links a.active { color: var(--ivory); }
body.process-page .nav-links a::after { border-color: var(--silver); }
body.process-page .nav-cta {
  background: linear-gradient(135deg, var(--silver), var(--slate-light));
  color: var(--base-deep);
}
body.process-page .toggle-bar { background: var(--ivory); }
body.process-page .top-nav.scrolled {
  background: rgba(15, 17, 21, 0.88);
  box-shadow: 0 1px 0 rgba(156, 163, 175, 0.08);
}
body.process-page .mobile-menu-inner { background: rgba(15, 17, 21, 0.96); }
body.process-page .mobile-menu-link { color: var(--ivory); border-bottom-color: rgba(156, 163, 175, 0.06); }
body.process-page .mobile-menu-footer a { color: var(--slate-warm); }
body.process-page .section-tag { color: var(--slate-warm); }
body.process-page .section-title { color: var(--ivory); }
body.process-page .section-body { color: var(--slate-light); }
body.process-page .btn-secondary {
  color: var(--ivory-muted);
  border-color: var(--panel-border);
}
body.process-page .site-footer { border-top-color: rgba(156, 163, 175, 0.06); }
body.process-page .footer-social-link { color: var(--slate-light); border-color: var(--panel-border); }
body.process-page .footer-copyright { color: var(--slate-light); }

.process-page {
  --accent: #128C7E;
  --accent-soft: rgba(18, 140, 126, 0.12);
  --accent-glow: rgba(18, 140, 126, 0.35);
  --card-bg: rgba(22, 26, 32, 0.72);
  --card-border: rgba(156, 163, 175, 0.1);
}

.process-page .main {
  position: relative;
  z-index: 1;
}

/* ── Page hero ── */
.process-hero {
  padding: 140px 24px 80px;
  text-align: center;
  max-width: 52rem;
  margin: 0 auto;
}

.process-hero .section-body {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.05rem;
}

.process-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(18, 140, 126, 0.25);
  margin-bottom: 24px;
}

.process-hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: processPulse 2s ease-in-out infinite;
}

@keyframes processPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ── Timeline section ── */
.process-timeline-section {
  padding: 40px 24px 100px;
  max-width: 1100px;
  margin: 0 auto;
}

.process-timeline {
  position: relative;
  margin-top: 56px;
}

.timeline-rail {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--panel-border) 8%, var(--panel-border) 92%, transparent);
  border-radius: 2px;
}

.timeline-progress-wrap {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  overflow: hidden;
  border-radius: 2px;
}

.timeline-progress-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent), #1ebe9e);
  border-radius: 2px;
  transition: height 0.15s linear;
}

.timeline-progress-glow {
  position: absolute;
  left: 50%;
  top: 0;
  width: 24px;
  height: 0%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(8px);
  transition: height 0.15s linear;
}

.timeline-step {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px 32px;
  align-items: center;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--silk-ease), transform 1s var(--silk-ease);
}

.timeline-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-node {
  grid-column: 2;
  grid-row: 1;
}

.timeline-step:nth-child(odd) .timeline-card {
  grid-column: 3;
  grid-row: 1;
  text-align: left;
}

.timeline-step:nth-child(odd) .timeline-spacer {
  grid-column: 1;
  grid-row: 1;
}

.timeline-step:nth-child(even) .timeline-card {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}

.timeline-step:nth-child(even) .timeline-card-inner {
  margin-left: auto;
}

.timeline-step:nth-child(even) .timeline-spacer {
  grid-column: 3;
  grid-row: 1;
}

.timeline-spacer {
  min-height: 1px;
}

.timeline-node {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--base-mid);
  border: 1px solid var(--card-border);
  box-shadow: 0 0 0 8px rgba(15, 17, 21, 0.9);
  transition: transform 0.6s var(--silk-ease), border-color 0.6s var(--silk-ease), box-shadow 0.6s var(--silk-ease);
}

.timeline-step.is-active .timeline-node,
.timeline-step.is-hovered .timeline-node {
  transform: scale(1.08);
  border-color: rgba(18, 140, 126, 0.5);
  box-shadow: 0 0 0 8px rgba(15, 17, 21, 0.9), 0 0 32px var(--accent-glow);
}

.timeline-node-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.timeline-node-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.5s var(--silk-ease), transform 0.5s var(--silk-ease);
  color: var(--ivory);
}

.timeline-step.is-active .timeline-node-num,
.timeline-step.is-hovered .timeline-node-num {
  opacity: 0;
}

.timeline-step.is-active .timeline-node-icon,
.timeline-step.is-hovered .timeline-node-icon {
  opacity: 1;
  transform: scale(1);
}

.timeline-node-icon svg {
  width: 22px;
  height: 22px;
}

.timeline-card {
  max-width: 420px;
}

.timeline-card-inner {
  padding: 28px 32px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.7s var(--silk-ease), border-color 0.7s var(--silk-ease), box-shadow 0.7s var(--silk-ease);
}

.timeline-step.is-hovered .timeline-card-inner,
.timeline-step.is-active .timeline-card-inner {
  transform: translateY(-4px);
  border-color: rgba(18, 140, 126, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(18, 140, 126, 0.08);
}

.timeline-card h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ivory);
  margin-bottom: 10px;
}

.timeline-card p {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--slate-light);
}

.timeline-card-tag {
  display: inline-block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.85;
}

/* ── Portal section ── */
.portal-section {
  padding: 80px 24px 100px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.portal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 800px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--panel-border), transparent);
}

.portal-header {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 56px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.portal-card {
  padding: 32px 28px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--silk-ease), transform 0.9s var(--silk-ease), border-color 0.6s var(--silk-ease), box-shadow 0.6s var(--silk-ease);
}

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

.portal-card:nth-child(1) { transition-delay: 0.05s; }
.portal-card:nth-child(2) { transition-delay: 0.12s; }
.portal-card:nth-child(3) { transition-delay: 0.19s; }
.portal-card:nth-child(4) { transition-delay: 0.26s; }

.portal-card:hover {
  border-color: rgba(18, 140, 126, 0.28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  transform: translateY(-6px);
}

.portal-card.visible:hover {
  transform: translateY(-6px);
}

.portal-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(18, 140, 126, 0.2);
  margin-bottom: 20px;
  color: var(--accent);
  transition: transform 0.5s var(--silk-ease), background 0.5s var(--silk-ease);
}

.portal-card:hover .portal-card-icon {
  transform: scale(1.06) rotate(-2deg);
  background: rgba(18, 140, 126, 0.18);
}

.portal-card-icon svg {
  width: 24px;
  height: 24px;
}

.portal-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.portal-card p {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--slate-light);
}

/* Dashboard preview */
.portal-dashboard {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, rgba(22, 26, 32, 0.95), rgba(15, 17, 21, 0.98));
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 1.2s var(--silk-ease), transform 1.2s var(--silk-ease);
}

.portal-dashboard.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dashboard-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--card-border);
}

.dashboard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--graphite-soft);
}

.dashboard-dot:nth-child(1) { background: #ff5f57; }
.dashboard-dot:nth-child(2) { background: #febc2e; }
.dashboard-dot:nth-child(3) { background: #28c840; }

.dashboard-url {
  flex: 1;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--slate-warm);
  opacity: 0.7;
}

.dashboard-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 280px;
}

.dashboard-sidebar {
  padding: 24px 16px;
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-nav-item {
  height: 10px;
  border-radius: 6px;
  background: var(--graphite);
  opacity: 0.5;
}

.dashboard-nav-item.active {
  width: 70%;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 1;
}

.dashboard-main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.dashboard-stat {
  padding: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
}

.dashboard-stat-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--graphite);
  margin-top: 10px;
  overflow: hidden;
}

.dashboard-stat-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #1ebe9e);
  animation: dashboardBar 2.5s var(--silk-ease) infinite alternate;
}

.dashboard-stat:nth-child(1) .dashboard-stat-bar span { width: 72%; animation-delay: 0s; }
.dashboard-stat:nth-child(2) .dashboard-stat-bar span { width: 88%; animation-delay: 0.3s; }
.dashboard-stat:nth-child(3) .dashboard-stat-bar span { width: 54%; animation-delay: 0.6s; }

@keyframes dashboardBar {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.dashboard-chart {
  flex: 1;
  min-height: 100px;
  border-radius: 12px;
  background: rgba(18, 140, 126, 0.06);
  border: 1px dashed rgba(18, 140, 126, 0.2);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 16px 20px 12px;
  gap: 8px;
}

.dashboard-chart-bar {
  flex: 1;
  max-width: 32px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent), rgba(18, 140, 126, 0.3));
  transform-origin: bottom;
  animation: chartGrow 1.2s var(--silk-ease) backwards;
}

.dashboard-chart-bar:nth-child(1) { height: 45%; animation-delay: 0.1s; }
.dashboard-chart-bar:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.dashboard-chart-bar:nth-child(3) { height: 55%; animation-delay: 0.3s; }
.dashboard-chart-bar:nth-child(4) { height: 90%; animation-delay: 0.4s; }
.dashboard-chart-bar:nth-child(5) { height: 65%; animation-delay: 0.5s; }

@keyframes chartGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.portal-cta-row {
  text-align: center;
  margin-top: 48px;
}

.portal-cta-row .btn-primary {
  margin-right: 12px;
}

.portal-cta-note {
  display: block;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--slate-warm);
  opacity: 0.7;
}

/* ── CTA strip ── */
.process-cta-strip {
  text-align: center;
  padding: 60px 24px 40px;
  max-width: 36rem;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .timeline-rail,
  .timeline-progress-wrap,
  .timeline-progress-glow {
    left: 26px;
    transform: none;
  }

  .timeline-step {
    grid-template-columns: auto 1fr;
    gap: 20px;
    margin-bottom: 36px;
    padding-left: 8px;
  }

  .timeline-step:nth-child(odd) .timeline-card,
  .timeline-step:nth-child(even) .timeline-card {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }

  .timeline-step:nth-child(even) .timeline-card-inner {
    margin-left: 0;
  }

  .timeline-step .timeline-spacer {
    display: none;
  }

  .timeline-node {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
  }

  .timeline-card {
    max-width: none;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-body {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
    padding: 12px 16px;
  }

  .dashboard-nav-item {
    flex: 1;
    height: 8px;
  }

  .dashboard-stat-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .process-hero {
    padding: 120px 20px 48px;
  }

  .timeline-card-inner {
    padding: 22px 20px;
  }

  .portal-card {
    padding: 24px 20px;
  }

  .portal-cta-row .btn-primary,
  .portal-cta-row .btn-secondary {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-step,
  .portal-card,
  .portal-dashboard,
  .process-hero-badge::before,
  .dashboard-stat-bar span,
  .dashboard-chart-bar {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .timeline-progress-fill,
  .timeline-progress-glow {
    transition: none;
  }
}
