/* ==========================================================================
   CASCADING ARCHITECTURAL DECK (Hero -> Acerca -> Portafolio -> Testimonios -> Contacto)
   ========================================================================== */

/* El hero queda sticky bajo el header mientras la siguiente sección sube encima */
.portrait-intro {
  position: sticky !important;
  top: 70px;
  z-index: 10;
}

@media (max-width: 700px) {
  .portrait-intro {
    top: 58px !important;
  }
}

/* La sección 'Mi enfoque' sube como panel superpuesto sobre el hero */
.about {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(42px, 7vw, 100px);
  z-index: 20;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -45px 90px rgba(0, 0, 0, 0.85);
}

.projects-index-section {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: var(--proj-sticky-top, 70px) !important;
  z-index: 30;
  isolation: isolate;
  background: var(--paper, #ffffff);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -45px 90px rgba(0, 0, 0, 0.85);
  will-change: opacity;
}

.testimonials {
  position: relative;
  z-index: 40;
  isolation: isolate;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -45px 90px rgba(0, 0, 0, 0.9);
}

.contact {
  position: relative;
  z-index: 50;
  isolation: isolate;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -55px 110px rgba(0, 0, 0, 0.95);
}

footer {
  position: relative;
  z-index: 60;
}

.about,
.projects-index-section,
.testimonials {
  will-change: transform, opacity;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .portrait-intro {
    opacity: 1;
  }
}

/* ==========================================================================
   PROCESO: MÓDULOS ARQUITECTÓNICOS Y AIRE
   ========================================================================== */
.process-section-wrap {
  margin-top: clamp(80px, 10vw, 130px);
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.process-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0.65;
}

/* ==========================================================================
   REGLA TÉCNICA GRADUADA (Línea de tiempo del proceso)
   ========================================================================== */
.timeline-ruler-wrap {
  position: relative;
  margin-bottom: 30px;
  padding: 10px 0 15px;
}

.timeline-scale {
  position: relative;
  height: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.25)) 0 100% / 100% 1px no-repeat,
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px calc(100% / 4)) 0 100% / 100% 20px no-repeat,
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.15) 0 1px, transparent 1px calc(100% / 28)) 0 100% / 100% 10px no-repeat;
}

.timeline-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent-green, #84cc16);
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--timeline-progress, 0.1));
  box-shadow: 0 0 12px rgba(132, 204, 22, 0.7);
  will-change: transform;
}

.timeline-marker {
  position: absolute;
  bottom: -4px;
  left: 0;
  transform: translate3d(calc(var(--timeline-progress, 0.1) * 100% - 50%), 0, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  will-change: transform;
}

.marker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green, #84cc16);
  box-shadow: 0 0 14px rgba(132, 204, 22, 0.9), 0 0 0 2px #0a0a0a;
}

.marker-label {
  position: absolute;
  top: -20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-green, #84cc16);
  white-space: nowrap;
  text-transform: none;
}

.timeline-tasks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  margin-top: 0;
}

.timeline-card {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  opacity: 0.45;
  transition: opacity 0.35s ease, border-color 0.35s ease, transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.timeline-card.is-active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(132, 204, 22, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(132, 204, 22, 0.08);
}

.timeline-card.is-active .process-num {
  color: var(--accent-green, #84cc16);
  opacity: 1;
}

.process-timeline-time {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a1a1aa;
}

.timeline-card.is-active .process-timeline-time {
  color: #ffffff;
}

/* ==========================================================================
   LECTURA PROGRESIVA Y PUNTO FINAL OVERSHOOT
   ========================================================================== */
.progressive-weight {
  font-weight: calc(300 + var(--read-progress, 0) * 400) !important;
  transition: font-weight 0.15s ease, letter-spacing 0.15s ease;
}

.overshoot-dot {
  display: inline-block;
  color: var(--accent-green, #84cc16);
  transform-origin: center bottom;
}

.is-visible .overshoot-dot {
  animation: dotOvershoot 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.35s;
}

@keyframes dotOvershoot {
  0% {
    transform: scale(0) translateY(-18px);
    opacity: 0;
  }
  70% {
    transform: scale(1.4) translateY(2px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  margin-top: 0;
}

.process-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: clamp(26px, 3.2vw, 38px) clamp(20px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.process-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(132, 204, 22, 0.4);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(132, 204, 22, 0.1);
}

.process-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.process-num {
  font-family: "Baskerville", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 26px;
  color: var(--linen);
  opacity: 0.85;
}

.process-phase {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green, #84cc16);
  font-weight: 600;
  opacity: 0.95;
}

.process-card h3 {
  font-family: "Baskerville", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: #ffffff;
}

.process-card p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.82;
  margin: 0;
  max-width: none;
}

/* Ribbon de especialidades */
.services-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(40px, 5vw, 60px);
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50px;
  flex-wrap: wrap;
}

.services-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
  opacity: 0.9;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.services-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green, #84cc16);
  margin-right: 9px;
  box-shadow: 0 0 8px rgba(132, 204, 22, 0.7);
}

.services-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Fichas contrastadas en blanco puro */
.service-pill {
  display: inline-block;
  background: #ffffff;
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
  padding: 7px 16px;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  user-select: none;
}

.service-pill:hover {
  transform: translateY(-3px);
  border-color: var(--accent-green, #84cc16);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 14px rgba(132, 204, 22, 0.3);
}

/* Transición hacia el Portafolio */
.approach-to-portfolio-transition,
.testimonials-to-contact-transition {
  margin-top: clamp(65px, 8vw, 105px);
  padding-bottom: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.transition-connector-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.05));
  margin-bottom: 4px;
}

.transition-callout {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.transition-sub {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.transition-title {
  font-family: "Baskerville", "Palatino Linotype", Palatino, Georgia, serif;
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--paper);
  opacity: 0.95;
}

.transition-arrow-down {
  font-size: 20px;
  color: var(--accent-green, #84cc16);
  animation: bounce-subtle 2s infinite ease-in-out;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 800px) {
  .timeline-ruler-wrap {
    display: none;
  }
  .timeline-tasks,
  .process {
    grid-template-columns: 1fr;
    gap: 16px;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
  }
  .timeline-tasks::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: 100%;
    transform-origin: top center;
    transform: scaleY(var(--timeline-progress, 0.25));
    background: var(--accent-green, #84cc16);
    box-shadow: 0 0 12px rgba(132, 204, 22, 0.8);
    will-change: transform;
  }
  .timeline-card {
    opacity: 0.7;
    padding: 22px 18px;
  }
  .timeline-card.is-active {
    opacity: 1;
    transform: translateX(4px);
  }
  .services-ribbon {
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
}
