/* =============================================================================
   PROCESS.CSS — CR8TIF Process / Customer Journey Page
   Timeline, alternating steps, video placeholder, progress
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Process Timeline Container
   --------------------------------------------------------------------------- */
.process-timeline {
  position: relative;
  padding-bottom: 2rem;
}

/* Vertical connecting copper line (center) */
.process-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--gold-dim) 5%,
    var(--gold-dim) 95%,
    transparent 100%
  );
  transform: translateX(-50%);
  z-index: 0;
}

/* ---------------------------------------------------------------------------
   Process Steps — Alternating Layout
   --------------------------------------------------------------------------- */
.process-step {
  position: relative;
  z-index: 2;
}

/* Connector line within each step */
.process-step__connector {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
}

.process-step__connector .process-step__line {
  width: 1px;
  height: 100%;
  background: var(--gold-dim);
}

/* Step grid layout */
.process-step__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(5rem, 10vw, 10rem);
  align-items: center;
}

/* Right variant: image left, text right (default) */
.process-step--right .process-step__grid {
  /* default order */
}

/* Left variant: text left, image right */
.process-step--left .process-step__grid {
  direction: rtl;
}

.process-step--left .process-step__grid > * {
  direction: ltr;
}

/* Step text / content */
.process-step__content {
  max-width: 520px;
}

/* Large gold step number */
.process-step__number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gold-faint);
  margin-bottom: 1.25rem;
  position: relative;
  display: block;
}

/* Large number variant for featured step */
.process-step__number--large {
  font-size: clamp(5rem, 10vw, 8rem);
}

.process-step__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.75rem;
}

.process-step__title--large {
  font-size: clamp(2.4rem, 3.5vw, 3.4rem);
}

/* Step image */
.process-step__image {
  position: relative;
  overflow: hidden;
}

.process-step__image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step__image:hover img {
  transform: scale(1.03);
}

/* Gold accent on image corner */
.process-step__image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--gold);
  z-index: 2;
}

.process-step__image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 56px;
  background: var(--gold);
  z-index: 2;
}

/* Featured step — center layout */
.process-step--center .process-step__grid {
  grid-template-columns: 1fr;
  text-align: center;
}

.process-step--featured {
  /* featured styling */
  position: relative;
  z-index: 2;
}

/* Hide the connector line within the featured/centered step so it doesn't run through text */
.process-step--featured .process-step__connector,
.process-step--center .process-step__connector {
  display: none;
}

/* Mask the parent timeline line behind the featured step's centered text.
   Draw a background-colored strip over the center line. */
.section--light.process-step--featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 100%;
  background: var(--bg-light);
  z-index: 1;
  pointer-events: none;
}

.section--light-alt.process-step--featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 100%;
  background: var(--bg-light-alt);
  z-index: 1;
  pointer-events: none;
}

/* Ensure featured header content stays above the mask */
.process-step--featured .process-step__featured-header,
.process-step--featured .process-step__dual-images,
.process-step--featured .process-step__triple-images {
  position: relative;
  z-index: 3;
}

/* Triple image showcase — real artisans at work (Craftsmanship) */
.process-step__triple-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.process-step__image-third {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.process-step__image-third img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step__image-third:hover img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .process-step__triple-images {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .process-step__image-third {
    aspect-ratio: 4 / 3;
  }
}

.process-step__featured-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.process-step__featured-header .lead {
  max-width: 640px;
  margin: 0 auto;
}

/* Dual images for featured step */
.process-step__dual-images {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
}

.process-step__image-large,
.process-step__image-small {
  position: relative;
  overflow: hidden;
}

.process-step__image-large img,
.process-step__image-small img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step__image-large:hover img,
.process-step__image-small:hover img {
  transform: scale(1.03);
}

/* Text color handling for dark/light sections */
.section--light .process-step__title { color: var(--text-dark); }
.section--light .process-step__content p { color: var(--text-dark-muted); }
.section--light .process-step__content .lead { color: var(--text-dark); }
.section--light .process-step__featured-header .lead { color: var(--text-dark); }

.section--light-alt .process-step__title { color: var(--text-dark); }
.section--light-alt .process-step__content p { color: var(--text-dark-muted); }
.section--light-alt .process-step__content .lead { color: var(--text-dark); }
.section--light-alt .process-step__featured-header .lead { color: var(--text-dark); }

/* ---------------------------------------------------------------------------
   Video Section
   --------------------------------------------------------------------------- */
.process-video {
  position: relative;
}

.process-video__header {
  text-align: center;
  margin-bottom: clamp(3rem, 5vw, 4rem);
}

.process-video__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.2vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--text);
}

.process-video__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-dark);
  overflow: hidden;
  cursor: pointer;
}

.process-video__thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
}

.process-video__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-video__player:hover .process-video__thumbnail img {
  opacity: 0.4;
  transform: scale(1.02);
}

.process-video__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Play button overlay */
.process-video__play {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
  border: none;
  cursor: pointer;
}

.process-video__play svg {
  width: 80px;
  height: 80px;
  color: var(--bg-dark);
}

.process-video__player:hover .process-video__play {
  transform: scale(1.1);
  box-shadow: 0 12px 48px rgba(196, 162, 101, 0.4);
}

/* Pulse ring around play button */
.process-video__play::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: 0.4;
  animation: pulse 2.5s ease-in-out infinite;
}

/* ---------------------------------------------------------------------------
   Responsive Overrides for Process Page
   --------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .process-timeline::before {
    display: none;
  }

  .process-step__connector {
    display: none;
  }

  /* Hide the timeline mask strip on mobile/tablet where timeline is hidden */
  .process-step--featured::after {
    display: none;
  }

  .process-step__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .process-step--left .process-step__grid {
    direction: ltr;
  }

  .process-step__image {
    order: -1;
    max-height: 400px;
  }

  .process-step__dual-images {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .process-step__number {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
  }

  .process-video__play {
    width: 60px;
    height: 60px;
  }

  .process-video__play svg {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .process-step__image {
    aspect-ratio: 16 / 9;
  }
}
