/* ─────────────────────────────────────────────
   Image Follow List — premium light editorial
   Floating Unsplash preview follows the cursor
───────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #f7f5f2;
  --color-bg-elevated: #fbfaf8;
  --color-ink: #141311;
  --color-ink-soft: #3f3c38;
  --color-ink-muted: #5c5852;
  --color-line: rgba(20, 19, 17, 0.12);
  --color-line-strong: rgba(20, 19, 17, 0.22);
  --color-focus: #c8d5b9;
  --font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* ── Stage ─────────────────────────────────── */

.stage {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 5rem 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 0%,
      rgba(255, 255, 255, 0.7) 0%,
      transparent 55%
    ),
    var(--color-bg);
}

.stage__header {
  width: 100%;
  max-width: none;
  margin: 0 0 2.75rem;
  padding: 0 4vw;
  text-align: left;
}

.stage__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  margin-bottom: 0.75rem;
}

.stage__title {
  font-size: clamp(1.85rem, 3.5vw, 2.625rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-ink);
}

/* ── Image Follow List ─────────────────────── */

.image-follow-list {
  --ifl-image-size: 253px;
  --ifl-border: var(--color-line);
  --ifl-accent: var(--color-ink);
  --ifl-label-size: clamp(1.35rem, 2.4vw, 1.875rem);
  --ifl-item-pad-y: 1.85rem;
  --ifl-item-pad-x: 0.25rem;
  --ifl-item-pad-hover: 1.5rem;
  --ifl-ease: var(--ease-out);

  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 4vw;
}

.image-follow-list__list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* ── Row ───────────────────────────────────── */

.image-follow-list__item {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: baseline;
  gap: 1.25rem 1.5rem;
  padding: var(--ifl-item-pad-y) var(--ifl-item-pad-x);
  padding-left: var(--ifl-item-pad-x);
  cursor: pointer;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform, padding-left;
  color: var(--ifl-accent);
  transition:
    color 400ms var(--ifl-ease),
    padding-left 400ms var(--ifl-ease),
    opacity 400ms var(--ifl-ease);
  margin-top: -1px;
  outline: none;
}

.image-follow-list__list:hover .image-follow-list__item:not(:hover):not(.is-active) {
  opacity: 0.55;
}

.image-follow-list__item:hover,
.image-follow-list__item.is-active {
  padding-left: var(--ifl-item-pad-hover);
  opacity: 1;
}

.image-follow-list__item:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 6px;
}

/* ── Index + meta ──────────────────────────── */

.image-follow-list__index {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-ink-soft);
  line-height: 1.3;
  align-self: center;
  pointer-events: none;
  user-select: none;
  transition: color 400ms var(--ifl-ease);
}

.image-follow-list__item:hover .image-follow-list__index,
.image-follow-list__item.is-active .image-follow-list__index {
  color: var(--color-ink);
}

.image-follow-list__meta {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  line-height: 1.3;
  align-self: center;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  transition: color 400ms var(--ifl-ease);
}

.image-follow-list__item:hover .image-follow-list__meta,
.image-follow-list__item.is-active .image-follow-list__meta {
  color: var(--color-ink);
}

/* ── Divider ───────────────────────────────── */

.image-follow-list__divider {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--ifl-border);
  z-index: 2;
  pointer-events: none;
}

.image-follow-list__divider--top {
  top: 0;
  bottom: auto;
}

.image-follow-list__item:hover .image-follow-list__divider,
.image-follow-list__item.is-active .image-follow-list__divider {
  background-color: var(--color-line-strong);
}

/* ── Label ─────────────────────────────────── */

.image-follow-list__label {
  position: relative;
  z-index: 1;
  display: block;
  font-size: var(--ifl-label-size);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--color-ink);
  transform: translateZ(0);
  pointer-events: none;
  user-select: none;
}

/* ── Floating preview (no rounding) ────────── */

.image-follow-list__preview {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--ifl-image-size);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  z-index: 9999;
  background: #e8e4de;
  border-radius: 0;
  overflow: hidden;
  opacity: 0;
  will-change: transform, opacity;
  box-shadow:
    0 28px 80px rgba(28, 27, 25, 0.14),
    0 8px 24px rgba(28, 27, 25, 0.06);
  transform-origin: center center;
}

.image-follow-list__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

/* ── Reduced motion ────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .image-follow-list__item,
  .image-follow-list__label,
  .image-follow-list__preview,
  .image-follow-list__image {
    animation: none !important;
    transition: none !important;
  }

  .image-follow-list__item:hover,
  .image-follow-list__item.is-active {
    padding-left: var(--ifl-item-pad-x);
  }

  .image-follow-list__list:hover .image-follow-list__item {
    opacity: 1;
  }

  .image-follow-list__preview {
    display: none;
  }
}

/* ── High contrast ─────────────────────────── */

@media (prefers-contrast: high) {
  :root {
    --color-line: rgba(0, 0, 0, 0.45);
    --color-ink-muted: #333;
  }

  .image-follow-list__item:hover .image-follow-list__label,
  .image-follow-list__item.is-active .image-follow-list__label {
    text-decoration: underline;
  }
}

/* ── Responsive ────────────────────────────── */

@media (max-width: 991px) {
  .stage {
    padding: 3.5rem 0;
  }

  .stage__header {
    margin-bottom: 2rem;
    padding: 0 5vw;
  }

  .image-follow-list {
    --ifl-image-size: 200px;
    --ifl-item-pad-y: 1.45rem;
    --ifl-item-pad-hover: 1.15rem;
    padding: 0 5vw;
  }

  .image-follow-list__item {
    grid-template-columns: 2.25rem 1fr auto;
    gap: 0.85rem 1rem;
  }
}

@media (max-width: 640px) {
  .stage {
    padding: 2.5rem 0;
  }

  .stage__header {
    padding: 0 6vw;
  }

  .image-follow-list {
    --ifl-item-pad-y: 1.2rem;
    --ifl-item-pad-x: 0;
    --ifl-item-pad-hover: 0.75rem;
    padding: 0 6vw;
  }

  .image-follow-list__item {
    grid-template-columns: 2rem 1fr;
    gap: 0.5rem 0.85rem;
  }

  .image-follow-list__meta {
    display: none;
  }

  .image-follow-list__preview {
    display: none;
  }
}
