/* =========================================================
   12. CATALOGUE — HOW IT WORKS
   ========================================================= */

/* 12.1 SECTION */
.catalogue-how-it-works {
  padding: 60px 28px 90px;
  background: transparent;
  color: var(--ink);
}

.how-it-works-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================================
   12.2 SECTION HEADER
   ========================================================= */

.how-it-works-header {
  position: relative;

  max-width: 1200px;

  min-height: 570px;

  margin: 0 auto 70px;

  padding: 0;

  box-sizing: border-box;
}

/* =========================================================
   12.2.1 HEADER COPY
   ========================================================= */

.how-it-works-header-copy {
  position: relative;

  z-index: 4;

  max-width: 680px;

  padding-top: 20px;
}

.how-it-works-header-copy .eyebrow {
  margin-bottom: 20px;

  color: var(--ink);
}

.how-it-works-header-copy h2 {
  max-width: 650px;

  margin: 0 0 25px;

  color: var(--ink);

  font-size: clamp(44px, 5vw, 68px);

  font-weight: 700;

  line-height: 0.98;

  letter-spacing: -0.055em;

  text-transform: uppercase;
}

.how-it-works-header-copy h2 em {
  color: var(--green-soft);

  font-style: normal;
}

.how-it-works-header-copy > p:last-child {
  max-width: 480px;

  margin: 0;

  color: var(--muted);

  font-size: 15px;

  line-height: 1.7;
}

/* =========================================================
   12.2.2 HEADER VISUAL
   ========================================================= */

.how-it-works-visual {
  position: absolute;

  z-index: 1;

  top: -45px;
  right: -40px;

  width: 620px;
  height: 620px;

  display: flex;

  align-items: center;
  justify-content: center;

  overflow: visible;

  pointer-events: none;
}

.page-float-top-right {
  top: 100px;
  right: 40px;
}

/* =========================================================
   12.2.3 SOFT BACKGROUND GLOW
   ========================================================= */

.how-it-works-glow {
  position: absolute;

  width: 520px;
  height: 520px;

  right: 0;
  top: 50%;

  transform: translateY(-50%);

  background: radial-gradient(
    circle,
    rgba(57, 230, 164, 0.19) 0%,
    rgba(57, 230, 164, 0.09) 34%,
    rgba(57, 230, 164, 0) 72%
  );

  border-radius: 50%;
}

/* =========================================================
   12.2.4 DECORATIVE ORBITS
   ========================================================= */

.how-it-works-orbit {
  position: absolute;

  z-index: 1;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  border: 1px solid #bfd4ca;
  border-radius: 50%;

  pointer-events: none;
}

/* Inner orbit */

.how-it-works-orbit-one {
  width: 500px;
  height: 500px;
}

/* Outer orbit */

.how-it-works-orbit-two {
  width: 640px;
  height: 640px;

  border-style: dashed;

  opacity: 0.65;
}

/* =========================================================
   12.2.5 PERSON IMAGE
   ========================================================= */

.how-it-works-image {
  position: relative;

  z-index: 2;

  display: block;

  width: 620px;
  max-width: none;

  height: 620px;

  object-fit: contain;
  scale: 1.5;

  object-position: center;

  filter: drop-shadow(0 25px 35px rgba(23, 58, 48, 0.14));
}

/* =========================================================
   12.2.6 FLOATING INFORMATION LABEL
   ========================================================= */

.how-it-works-float-card {
  position: absolute;

  z-index: 5;

  top: 90px;
  right: 15px;

  display: flex;

  flex-direction: column;

  gap: 4px;

  padding: 12px 15px;

  background: rgba(255, 255, 255, 0.94);

  border: 1px solid rgba(219, 225, 220, 0.85);

  border-radius: 8px;

  box-shadow: 0 12px 30px rgba(23, 58, 48, 0.12);

  backdrop-filter: blur(7px);

  transform: rotate(2deg);

  pointer-events: auto;

  animation: howItWorksFloat 2.5s ease-in-out infinite;
}

.how-it-works-float-card span {
  color: #71817b;

  font:
    600 8px "DM Mono",
    monospace;

  letter-spacing: 0.07em;
}

.how-it-works-float-card strong {
  color: var(--ink);

  font-size: 11px;

  font-weight: 750;

  letter-spacing: -0.015em;
}

/* =========================================================
   12.2.7 FLOATING ANIMATION
   ========================================================= */

@keyframes howItWorksFloat {
  0%,
  100% {
    transform: translateY(0) rotate(2deg);
  }

  50% {
    transform: translateY(-7px) rotate(2deg);
  }
}

/* =========================================================
   12.2.8 REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .how-it-works-float-card {
    animation: none;
  }
}

/* ========================================================= 
12.3 TIMELINE LAYOUT 
========================================================= */

.how-it-works-timeline {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 75px;
  align-items: stretch;
  margin-top: -215px;
}

/* =========================================================
   12.4 STEP LIST
   ========================================================= */

.how-it-works-steps {
  position: relative;
  display: flex;
  flex-direction: column;
}

/*
 * Timeline line
 */
/* .how-it-works-steps::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 21px;
  width: 1px;
  background: var(--line);
} */
/* =========================================================
   12.5 STEP BUTTON
   ========================================================= */

.how-step {
  position: relative;

  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;

  gap: 20px;

  width: 100%;
  min-width: 0;
  min-height: 82px;

  margin: 0;
  padding: 15px 0;

  border: 0;
  background: transparent;

  color: var(--muted);

  font: inherit;
  text-align: left;

  cursor: pointer;

  box-sizing: border-box;

  transition: all 0.25s ease;
}

.how-step:hover {
  color: var(--ink);
  transform: translateX(10px);
}

/* =========================================================
   12.5.1 DELIBERATE EDITORIAL OFFSET
   ========================================================= */

/*
 * The timeline itself stays perfectly straight.
 *
 * Only the contents of each step move slightly.
 * This creates a deliberate editorial rhythm without
 * making the timeline appear broken.
 */

.how-step:nth-child(1) {
  padding-left: 20px;
}

.how-step:nth-child(2) {
  padding-left: 80px;
}

.how-step:nth-child(3) {
  padding-left: 20px;
}

.how-step:nth-child(4) {
  padding-left: 80px;
}
/* =========================================================
   12.6 STEP ICON
   ========================================================= */

.how-step-number {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  border: 1px solid var(--line);
  border-radius: 50%;

  background: var(--paper);
  color: var(--muted);

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.how-step-number svg {
  width: 19px;
  height: 19px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   12.7 STEP COLOURS
   ========================================================= */

/*
 * Step 01 — Mint
 */
.how-step:nth-child(1) .how-step-number {
  color: var(--mint);
}

.how-step:nth-child(1):hover {
  color: var(--green-soft);
}

/*
 * Step 02 — Coral
 */
.how-step:nth-child(2) .how-step-number {
  color: var(--coral);
}

.how-step:nth-child(2):hover {
  color: var(--coral);
}

/*
 * Step 03 — Yellow
 */
.how-step:nth-child(3) .how-step-number {
  color: var(--yellow);
}

.how-step:nth-child(3):hover {
  color: var(--yellow);
}

/*
 * Step 04 — Mint
 */
.how-step:nth-child(4) .how-step-number {
  color: var(--mint);
}

.how-step:nth-child(4):hover {
  color: var(--green-soft);
}

/* =========================================================
   12.8 STEP TITLE
   ========================================================= */

.how-step-title {
  display: block;

  color: inherit;

  font-family: "Inter", Arial, sans-serif;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.02em;

  transition: color 0.25s ease;
}

/* =========================================================
   12.9 ACTIVE STEP
   ========================================================= */

.how-step.is-active {
  color: var(--ink);
}

.how-step.is-active .how-step-number {
  transform: scale(1.1);
}

.how-step:nth-child(1).is-active .how-step-number {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(57, 230, 164, 0.18);
}

.how-step:nth-child(2).is-active .how-step-number {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(238, 91, 88, 0.18);
}

.how-step:nth-child(3).is-active .how-step-number {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(255, 216, 61, 0.18);
}

.how-step:nth-child(4).is-active .how-step-number {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(57, 230, 164, 0.18);
}

/* =========================================================
   12.10 CONTENT PANEL
   ========================================================= */

.how-it-works-content {
  position: relative;

  display: flex;
  align-items: center;

  min-height: 330px;
  padding: 45px;

  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 10px;

  box-shadow: 0 12px 35px rgba(23, 58, 48, 0.06);

  backdrop-filter: blur(8px);
}

/* =========================================================
   12.11 INDIVIDUAL PANEL
   ========================================================= */

.how-panel {
  width: 100%;
}

.how-panel[hidden] {
  display: none;
}

/* =========================================================
   12.12 PANEL LABEL
   ========================================================= */

.how-panel-label {
  display: block;

  margin-bottom: 22px;

  color: var(--green-soft);

  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================================================
   12.13 PANEL HEADING
   ========================================================= */

.how-panel h3 {
  max-width: 520px;

  margin: 0 0 20px;

  color: var(--ink);

  font-family: "Inter", Arial, sans-serif;
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

/* =========================================================
   12.14 PANEL BODY
   ========================================================= */

.how-panel p {
  max-width: 500px;

  margin: 0 0 28px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.75;
}

/* =========================================================
   12.15 PANEL LINK
   ========================================================= */

.how-panel .text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: var(--ink);

  font-size: 12px;
  font-weight: 700;
  text-decoration: none;

  transition:
    color 0.2s ease,
    gap 0.2s ease;
}

.how-panel .text-link span {
  color: var(--mint);
  font-size: 17px;
  line-height: 1;

  transition: transform 0.2s ease;
}

.how-panel .text-link:hover {
  color: var(--green-soft);
  gap: 13px;
}

.how-panel .text-link:hover span {
  transform: translateX(2px);
}

/* =========================================================
   12.16 PANEL BUTTON
   ========================================================= */

.how-panel .button {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  padding: 12px 18px;

  background: var(--mint);
  border: 1px solid var(--mint);
  border-radius: 6px;

  color: var(--ink);

  font-size: 12px;
  font-weight: 750;
  text-decoration: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.how-panel .button span {
  font-size: 16px;
  line-height: 1;
}

.how-panel .button:hover {
  background: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 1025px) {
  .how-it-works-image {
    height: 360px;
    margin-left: 120px;
  }
}

/* =========================================================
   12.17 TABLET
   ========================================================= */

@media (max-width: 950px) {
  .catalogue-how-it-works {
    padding: 95px 28px 115px;
  }
  .how-it-works-header {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    gap: 35px;
    margin-bottom: 65px;
  }

  .how-it-works-header-copy p {
    width: 60%;
  }

  .how-it-works-visual {
    min-height: 350px;
  }
  .how-it-works-image {
    max-width: 360px;
    height: 360px;
    margin-left: 240px;
    margin-bottom: -50px;
  }
  .how-it-works-glow,
  .how-it-works-orbit-one {
    left: 70%;
    width: 280px;
    height: 280px;
  }
  .how-it-works-orbit-two {
    left: 70%;
    width: 360px;
    height: 360px;
  }
  .how-it-works-float-card {
    top: 130px;
    right: 30px;
  }
  .how-it-works-timeline {
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
    gap: 50px;
  }
  .how-it-works-content {
    min-height: 330px;
    padding: 38px;
  }
  .how-panel h3 {
    font-size: 32px;
  }
  .how-step-title {
    font-size: 16px;
  }
  .how-it-works-timeline {
    grid-template-columns:
      minmax(240px, 0.8fr)
      minmax(0, 1.2fr);

    gap: 55px;
  }

  .how-it-works-content {
    padding: 35px;
    min-height: 310px;
  }

  .how-panel h3 {
    font-size: 30px;
  }
}

/* =========================================================
   12.18 MOBILE
   ========================================================= */

@media (max-width: 700px) {
  .catalogue-how-it-works {
    padding: 75px 21px 95px;
    display: none;
  }
  .how-it-works-header {
    display: block;
    margin-bottom: 0px;
  }
  .how-it-works-header-copy {
    max-width: none;
  }
  .how-it-works-header-copy h2 {
    font-size: 42px;
  }
  .how-it-works-header-copy > p:last-child {
    font-size: 14px;
  } /* ------------------------------------------------------- MOBILE VISUAL ------------------------------------------------------- */
  .how-it-works-visual {
    min-height: 330px;
    margin-top: 25px;
    display: none;
  }
  .how-it-works-image {
    width: 100%;
    max-width: 340px;
    height: 340px;
  }
  .how-it-works-glow,
  .how-it-works-orbit-one {
    width: 300px;
    height: 300px;
  }
  .how-it-works-orbit-two {
    width: 370px;
    height: 370px;
    right: -20px;
  }
  .how-it-works-float-card {
    top: 35px;
    right: 0;
  } /* ------------------------------------------------------- MOBILE TIMELINE ------------------------------------------------------- */
  .how-it-works-timeline {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .how-it-works-steps {
    width: 100%;
    min-height: 0;
    padding: 4px 0;
  }
  .how-it-works-steps::before {
    top: 22px;
    bottom: 22px;
    left: 17px;
  }
  .how-step {
    grid-template-columns: 36px 1fr;
    gap: 15px;
    min-height: 65px;
    padding: 10px 0;
  }

  .how-step-number {
    width: 34px;
    height: 34px;
  }
  .how-step-number svg {
    width: 16px;
    height: 16px;
  }
  .how-step-title {
    font-size: 15px;
  }
  .how-it-works-content {
    min-height: 0;
    padding: 32px 25px;
    border-radius: 10px;
  }
  .how-panel-label {
    margin-bottom: 18px;
  }
  .how-panel h3 {
    font-size: 28px;
  }
  .how-panel p {
    font-size: 13px;
    line-height: 1.7;
  }
} /* ========================================================= 12.19 SMALL MOBILE ========================================================= */
@media (max-width: 380px) {
  .catalogue-how-it-works {
    padding-right: 18px;
    padding-left: 18px;
  }
  .how-it-works-header-copy h2 {
    font-size: 38px;
  }
  .how-it-works-visual {
    min-height: 300px;
  }
  .how-it-works-image {
    max-width: 310px;
    height: 310px;
  }
  .how-it-works-glow,
  .how-it-works-orbit-one {
    width: 270px;
    height: 270px;
  }
  .how-it-works-orbit-two {
    width: 330px;
    height: 330px;
  }
  .how-it-works-float-card {
    right: -2px;
    transform: scale(0.92) rotate(2deg);
  }
  .how-it-works-content {
    padding: 28px 21px;
  }
  .how-panel h3 {
    font-size: 25px;
  }
}
