/* ===== Process Section ===== */
.process-section {
  --process-font: var(--font-display, 'Apfel Grotezk', var(--font-sans));

  display: block;
  background: #ffffff;
  font-family: var(--process-font);
  border-radius: 2rem;
  position: relative;
  z-index: 6;
  margin: -2rem 0;
  overflow: hidden;
}

.process-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.75rem, 4vw, 3rem) clamp(3.5rem, 7vw, 5.5rem);
  position: relative;
}

.process-headline {
  position: relative;
  text-align: center;
}

.process-section-num {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  font-family: var(--font-oswald, var(--process-font));
  font-size: 1.0625rem;
  font-weight: 400;
  color: rgb(23, 23, 23);
  letter-spacing: 0.02em;
  text-align: left;
}

.process-header {
  text-align: center;
  padding-top: 0.35rem;
}

.process-title {
  font-family: var(--process-font);
  font-size: clamp(3.25rem, 9vw, 5.5rem);
  font-weight: 700;
  color: rgb(23, 23, 23);
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.process-subtitle {
  font-family: var(--process-font);
  font-size: clamp(1.0625rem, 1.75vw, 1.25rem);
  font-weight: 400;
  line-height: 1.65;
  color: rgb(23, 23, 23);
  max-width: 38rem;
  margin: 0 auto;
}

/* ===== Accordion — flush colored bars ===== */
.process-accordion {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-item {
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  /* Filled into the large numeral when the row is open */
  --process-num-fill: #6ce395;
}

.process-item-concept {
  --process-num-fill: #58fb83;
}

.process-item-execution {
  --process-num-fill: #a3fdae;
}

.process-item-launch {
  --process-num-fill: #329949;
}

/* Smooth panel open/close (Chrome 131+ / browsers with interpolate-size + ::details-content) */
@supports (interpolate-size: allow-keywords) {
  .process-item {
    interpolate-size: allow-keywords;
  }

  .process-item::details-content {
    overflow: clip;
    height: 0;
    opacity: 0;
    transition:
      height 0.52s cubic-bezier(0.32, 0.72, 0, 1),
      opacity 0.38s ease-out;
  }

  .process-item[open]::details-content {
    height: auto;
    opacity: 1;
  }
}

.process-item summary {
  list-style: none;
  font-family: var(--process-font);
}

.process-item summary::-webkit-details-marker {
  display: none;
}

/* Bar: title left, outline number right */
.process-item-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  padding: 0 clamp(1.75rem, 5vw, 4rem);
  min-height: clamp(5rem, 14vw, 7rem);
  cursor: pointer;
  user-select: none;
  transition:
    filter 0.22s ease,
    transform 0.28s cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 0.35s ease,
    background-color 0.45s cubic-bezier(0.33, 1, 0.68, 1),
    border-color 0.35s ease;
  box-sizing: border-box;
  font-family: var(--process-font);
  border-bottom: 1px solid transparent;
}

/* Collapsed: full-width tint per step + black title (reference layout) */
.process-item-discovery > .process-item-header {
  background-color: #6ce395;
}

.process-item-concept > .process-item-header {
  background-color: #58fb83;
}

.process-item-execution > .process-item-header {
  background-color: #a3fdae;
}

.process-item-launch > .process-item-header {
  background-color: #329949;
}

/* Open: white bar + mint strip to the right (reference layout) */
.process-item[open] > .process-item-header {
  background-color: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
  padding-right: 0;
  gap: 0;
}

.process-item-header:hover {
  filter: brightness(0.97);
}

.process-item-header:active {
  transform: scale(0.997);
}

.process-item-header:focus {
  outline: none;
}

.process-item-header:focus-visible {
  outline: 2px solid rgb(23, 23, 23);
  outline-offset: -2px;
}

.process-section .process-item-label {
  font-family: var(--font-display, 'Apfel Grotezk', var(--font-sans));
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 700;
  font-style: normal;
  font-synthesis: none;
  color: rgb(5, 5, 5);
  margin: 0;
  padding: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: left;
  flex: 0 1 auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.process-item[open] .process-item-label {
  padding-right: clamp(1rem, 3vw, 2rem);
}

/* Right zone: full coloured bar when collapsed; mint strip + numeral when open */
.process-item-header-visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-height: 100%;
  transition:
    background-color 0.4s cubic-bezier(0.33, 1, 0.68, 1),
    padding 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

.process-item[open] .process-item-header-visual {
  flex: 1 1 0;
  min-width: 0;
  background-color: var(--process-num-fill);
  padding: 0 clamp(1.75rem, 5vw, 4rem) 0 clamp(1.25rem, 3vw, 2rem);
  justify-content: flex-end;
}

/*
 * Collapsed: large solid white numerals on coloured bar (reference).
 * Open: same numerals on the mint strip at the right.
 */
.process-item-num {
  font-family: var(--process-font);
  font-size: clamp(4rem, 15vw, 9rem);
  font-weight: 500;
  font-synthesis: none;
  line-height: 0.82;
  letter-spacing: -0.06em;
  display: inline-block;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke-width: 0;
  -webkit-text-stroke-color: transparent;
  paint-order: normal;
  background: none;
  background-image: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  transition:
    letter-spacing 0.35s ease,
    transform 0.4s cubic-bezier(0.33, 1, 0.68, 1),
    color 0.35s ease;
}

/* Open row: restore heavier numerals on the mint strip (previous look) */
.process-item[open] .process-item-num {
  font-weight: 700;
  letter-spacing: -0.07em;
}

.process-item-execution .process-item-num {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.process-item-execution[open] .process-item-num {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.18));
}

/* Expanded: white panel — three columns like reference (desktop) */
.process-item-body {
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.75rem, 5vw, 4rem) clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3.5vw, 2.75rem);
  row-gap: 0;
  align-items: stretch;
  font-family: var(--process-font);
  background-color: #ffffff;
  transform-origin: top center;
}

/* Fallback when ::details-content height animation isn’t available */
@supports not (interpolate-size: allow-keywords) {
  .process-item[open] > .process-item-body {
    animation: processPanelFallback 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

/* Staggered step reveal on open */
.process-item[open] > .process-item-body .process-step:nth-child(1) {
  animation: processStepIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.process-item[open] > .process-item-body .process-step:nth-child(2) {
  animation: processStepIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}

.process-item[open] > .process-item-body .process-step:nth-child(3) {
  animation: processStepIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.process-item[open] > .process-item-body .process-step:nth-child(n + 4) {
  animation: processStepIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.process-item-launch {
  border-radius: 0 0 2rem 2rem;
}

.process-item-body .process-step {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  padding-left: clamp(1.25rem, 2.5vw, 1.75rem);
}

.process-item-body .process-step:first-child {
  border-left: none;
  padding-left: 0;
}

.process-step-content {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.process-step-title {
  color: rgb(5, 5, 5);
  font-family: var(--process-font);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.process-step-desc {
  color: rgba(5, 5, 5, 0.72);
  font-family: var(--process-font);
  font-size: clamp(0.9375rem, 1.25vw, 1.0625rem);
  line-height: 1.68;
  margin: 0;
  max-width: none;
}

.process-item-body .process-step-duration {
  color: rgb(31, 31, 31);
  font-family: var(--process-font);
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  font-weight: 700;
  white-space: nowrap;
  margin-top: auto;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  text-align: left;
  flex-shrink: 0;
}

@keyframes processPanelFallback {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes processStepIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .process-item-body {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .process-item-body .process-step {
    border-left: none;
    padding-left: 0;
    padding-top: clamp(1.25rem, 3vw, 1.5rem);
    padding-bottom: clamp(1.25rem, 3vw, 1.5rem);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .process-item-body .process-step:first-child {
    border-top: none;
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  .process-container {
    padding: 3.5rem 1.5rem 3rem;
  }

  .process-section-num {
    position: static;
    margin-bottom: 1rem;
    text-align: center;
  }

  .process-item-header {
    padding: 0 1.35rem;
    min-height: 4.75rem;
    gap: 1rem;
  }

  .process-item[open] > .process-item-header {
    padding-right: 0;
  }

  .process-item[open] .process-item-header-visual {
    padding: 0 1.35rem 0 0.85rem;
  }

  .process-item-body {
    padding: 1rem 1.35rem 2rem;
  }

  .process-item-body .process-step-duration {
    padding-top: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-item::details-content {
    transition: none;
  }

  .process-item[open] > .process-item-body {
    animation: none;
  }

  .process-item[open] > .process-item-body .process-step {
    animation: none;
  }

  .process-item-header {
    transition: filter 0.2s ease;
  }

  .process-item-header:active {
    transform: none;
  }

  .process-item-num,
  .process-item-header-visual {
    transition: none;
  }
}
