/* =========================================================
   PROCESS — 04, the helix
   ========================================================= */

.process {
  position: relative;
  background: var(--ink-000);
  overflow: hidden;
}

.process__inner {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 4vh, 3rem);
  padding-block: clamp(4rem, 9vh, 7rem);
}

.process__head {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.process__head .h-sec em {
  font-style: italic;
  color: var(--gold-200);
}

/* ---------------- body ---------------- */

.process__body {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: stretch;
  min-height: 0;
}

.process__aside {
  display: grid;
  grid-template-columns: 1px minmax(0, 1fr);
  gap: clamp(1.25rem, 2.4vw, 2.25rem);
  width: min(24ch, 22vw);
  padding-block: 4%;
}

/* The axis. The spiral turns around this. */
.process__rail {
  position: relative;
  width: 1px;
  background: var(--rule);
  grid-row: 1 / -1;
}

.process__rail-fill {
  position: absolute;
  inset: 0;
  background: var(--gold-300);
  transform: scaleY(0);
  transform-origin: top center;
}

.process__index {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  align-self: start;
}

.process__index li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  opacity: 0.3;
  transition: opacity 0.5s var(--ease-out), transform 0.55s var(--ease-chisel);
}

.process__index li.is-done {
  opacity: 0.5;
}

.process__index li.is-active {
  opacity: 1;
  transform: translateX(0.4rem);
}

.process__index-n {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  color: var(--gold-300);
  flex: none;
}

.process__index-t {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--step--1);
  line-height: 1.3;
  color: var(--bone-200);
}

.process__aside-note {
  grid-column: 2;
  font-size: var(--step--2);
  color: var(--bone-500);
  align-self: end;
  max-width: 24ch;
}

/* ---------------- the drum ---------------- */

.process__stage {
  position: relative;
  min-height: 0;
  /* A long perspective: short ones make a four-card carousel look like a
     fairground ride. This should read as a slow, heavy turn. */
  perspective: 1900px;
  perspective-origin: 42% 50%;
}

.process__thread {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(48%, 420px);
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.process__drum {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.process__step {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(46ch, 40vw);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

.process__step-in {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1.5rem, 2.4vw, 2.35rem);
  background: linear-gradient(
    152deg,
    rgba(26, 23, 21, 0.92) 0%,
    rgba(11, 10, 9, 0.94) 62%,
    rgba(18, 16, 16, 0.9) 100%
  );
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 0 44px 80px -30px rgba(0, 0, 0, 0.9);
  will-change: opacity, filter;
}

/* The card at the front of the turn gets the gold edge */
.process__step.is-active .process__step-in {
  border-color: rgba(201, 162, 39, 0.42);
}

.process__step-n {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.24em;
  color: var(--gold-300);
}

.process__step-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--bone-100);
}

.process__step-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--step-0);
  color: var(--gold-200);
  margin-top: -0.25rem;
}

.process__step-body {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--step--1);
  line-height: 1.68;
  color: var(--bone-300);
  margin-top: 0.3rem;
}

.process__step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.process__step-meta li {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-400);
  border: 1px solid var(--rule);
  padding: 0.45em 0.8em 0.4em;
  border-radius: 999px;
}

/* =========================================================
   Below 900px the helix becomes a plain stack. A spiral you
   cannot see all of is just four blurry cards.
   ========================================================= */

@media (max-width: 900px) {
  .process__inner {
    min-height: 0;
  }

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

  .process__aside,
  .process__thread {
    display: none;
  }

  .process__stage {
    position: static;
    perspective: none;
    display: block;
  }

  .process__drum {
    position: static;
    transform: none !important;
    transform-style: flat;
    display: grid;
    gap: 1rem;
  }

  .process__step {
    position: static;
    width: 100%;
    transform: none !important;
    opacity: 1 !important;
  }

  .process__step-in {
    filter: none !important;
  }
}
