/* 05 — Fix-it split (prefix fx-) */

.fx {
  margin-block: var(--space-section);
}

.fx-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 60px;
  align-items: center;
}

/* ---- left: text ---- */

.fx-text {
  max-width: 440px;
}

.fx-copy {
  margin-top: 20px;
  color: var(--ink);
}

.fx-link {
  margin-top: 28px;
  padding-block: 8px; /* ≥40px hit area */
  border-radius: 4px;
}

.fx-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* ---- right: cream card with rotated task stack ---- */

.fx-card {
  background: var(--cream);
  aspect-ratio: 618 / 742;
  max-width: 618px;
  margin-inline: auto;
  padding: 0;
  overflow: hidden;
}

.fx-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.fx-banked {
  position: absolute;
  top: 7%;
  right: 8%;
  z-index: 5;
  box-shadow: var(--shadow-soft);
  transform: rotate(2deg);
  white-space: nowrap;
}

.fx-banked-icon {
  font-size: 16px;
  line-height: 1;
}

.fx-stack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 6%; /* optical: clears the banked chip */
}

.fx-task {
  --fx-tilt: 0deg;
  --fx-shift: 0%;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 66%;
  padding: 12px 20px 12px 12px;
  background: var(--paper);
  border-radius: var(--r-tile);
  box-shadow: var(--shadow-card);
  transform: translateX(var(--fx-shift)) rotate(var(--fx-tilt));
  will-change: transform;
}

.fx-task + .fx-task {
  margin-top: -8px; /* overlapping stack */
}

.fx-task-label {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* alternating tilt and lateral scatter */
.fx-task--1 {
  --fx-tilt: -3deg;
  --fx-shift: -9%;
  z-index: 1;
}

.fx-task--2 {
  --fx-tilt: 2deg;
  --fx-shift: 9%;
  z-index: 2;
}

.fx-task--3 {
  --fx-tilt: -2deg;
  --fx-shift: -7%;
  z-index: 3;
}

.fx-task--4 {
  --fx-tilt: 3deg;
  --fx-shift: 8%;
  z-index: 4;
}

/* 48px gradient thumbs — placeholder media, raw hex permitted here */
.fx-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.fx-thumb--radiator {
  background: linear-gradient(135deg, #d9b28c 0%, #b07d55 55%, #8a5a3b 100%);
}

.fx-thumb--mirror {
  background: linear-gradient(150deg, #e8e4d5 0%, #b9bfae 50%, #8d9484 100%);
}

.fx-thumb--planter {
  background: linear-gradient(140deg, #d9e0c2 0%, #9fae7c 55%, #6e7d52 100%);
}

.fx-thumb--shelves {
  background: linear-gradient(130deg, #e5d5bd 0%, #c3a37c 55%, #96744f 100%);
}

/* gentle idle float, staggered; rotation preserved via custom property */
@media (prefers-reduced-motion: no-preference) {
  .fx-task {
    animation: fx-float 6s var(--ease-out) infinite;
  }

  .fx-task--2 {
    animation-delay: 0.9s;
  }

  .fx-task--3 {
    animation-delay: 1.8s;
  }

  .fx-task--4 {
    animation-delay: 2.7s;
  }

  @keyframes fx-float {
    0%,
    100% {
      transform: translateX(var(--fx-shift)) rotate(var(--fx-tilt)) translateY(0);
    }

    50% {
      transform: translateX(var(--fx-shift)) rotate(var(--fx-tilt)) translateY(-7px);
    }
  }
}

/* ---- responsive ---- */

@media (max-width: 899px) {
  .fx-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .fx-text {
    max-width: 520px;
  }
}

@media (max-width: 479px) {
  .fx-task {
    width: 78%;
    gap: 10px;
    padding: 8px 14px 8px 8px;
  }

  .fx-task + .fx-task {
    margin-top: -4px;
  }

  .fx-task--1,
  .fx-task--3 {
    --fx-shift: -6%;
  }

  .fx-task--2,
  .fx-task--4 {
    --fx-shift: 6%;
  }

  .fx-task-label {
    font-size: 14px;
  }

  .fx-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .fx-banked {
    font-size: 14px;
    padding: 8px 14px;
  }
}
