/* ==================================================
   RABBIT HOLE · SELECTED WORKS
   Two white panels split apart on scroll, revealing black void
   ================================================== */

/* ── Outer section: black void base ── */
.hero-reveal {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #0a0908;
  color: #F9F6F0;
  overflow: hidden;
  z-index: 10;
  margin-bottom: 240vh;
}

.hero-reveal article {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ── Header wrapper: sits above everything ── */
.hero-reveal__header {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.hero-reveal_split {
  position: absolute;
  inset: 0;
}

/* ── PANELS: two solid white halves covering 50% each ── */
.hero-reveal_split_item {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: #F4F1EC;
  overflow: hidden;
  will-change: transform;
}

.hero-reveal_split_item.-top    { top: 0; }
.hero-reveal_split_item.-bottom { bottom: 0; top: auto; }

/* ── TEXT WRAP: positions the text so it appears centered in the FULL viewport ──
   Each panel is 50vh tall. The text should appear centered in 100vh (full screen),
   which means its center sits exactly at the SEAM between the two panels.

   TOP panel: text center is at the BOTTOM edge of this panel.
   We achieve this by placing the wrap at bottom:0 and using transform
   to shift it so the center aligns with the seam.

   BOTTOM panel: text center is at the TOP edge of this panel.
   Same trick in reverse.

   overflow:hidden on each panel clips away the half of text that would
   cross into the other panel, creating the split illusion.
   ── */
.c-wide-text-wrap {
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Top panel: position wrap at the bottom edge of the panel */
.hero-reveal_split_item.-top .c-wide-text-wrap {
  bottom: 0;
  top: auto;
  /* translateY(50%) shifts the element DOWN by 50% of its own height,
     placing its vertical center exactly at the panel's bottom = screen center */
  transform: translateY(50%);
}

/* Bottom panel: position wrap at the top edge of the panel */
.hero-reveal_split_item.-bottom .c-wide-text-wrap {
  top: 0;
  bottom: auto;
  /* translateY(-50%) shifts the element UP by 50% of its own height,
     placing its vertical center exactly at the panel's top = screen center */
  transform: translateY(-50%);
}

/* ── TEXT HEADING ── */
.c-wide-text {
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 10.5vw, 11rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0A0908;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  display: block;
}

/* ── CONTENT: revealed behind panels ── */
.hero-reveal__content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3rem);
  box-sizing: border-box;
  /* starts hidden — JS sets opacity:0 / y:40% */
}

.hero-reveal__content-inner {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ── PROJECTS SPREAD: laid directly on the void, no card ── */
.hero-reveal__projects {
  position: relative;
  z-index: 15;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-reveal__projects .works-index {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-reveal__projects .works-index li:first-child .work-row {
  border-top: none;
}

.hero-reveal__projects .works-index li:last-child .work-row {
  border-bottom: 1px solid rgba(249, 246, 240, 0.16);
}

.hero-reveal__projects .work-row {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 3.25rem 1fr 2.5rem;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(1.1rem, 2.4vh, 1.8rem) 0;
  border: none;
  border-top: 1px solid rgba(249, 246, 240, 0.16);
  background: transparent;
  color: #F9F6F0;
  text-align: left;
  cursor: pointer;
}

.hero-reveal__projects .work-num {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.1em;
  color: rgba(249, 246, 240, 0.4);
  transition: color var(--dur-fast) ease;
}

.hero-reveal__projects .work-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: 0;
}

.hero-reveal__projects .work-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 3.9rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.04;
  color: #F9F6F0;
  transition:
    transform 0.45s var(--ease-editorial),
    color var(--dur-fast) ease;
}

.hero-reveal__projects .work-meta {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(249, 246, 240, 0.5);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-reveal__projects .work-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F9F6F0;
  opacity: 0;
  transform: translate(-8px, 8px);
  transition:
    opacity var(--dur-base) ease,
    transform var(--dur-base) var(--ease-editorial);
}

.hero-reveal__projects .work-row:hover .work-title,
.hero-reveal__projects .work-row:focus-visible .work-title {
  transform: translateX(0.75rem);
  color: #F9F6F0;
}

.hero-reveal__projects .work-row:hover .work-arrow,
.hero-reveal__projects .work-row:focus-visible .work-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.hero-reveal__projects .work-row:hover .work-num,
.hero-reveal__projects .work-row:focus-visible .work-num {
  color: #F9F6F0;
}

.hero-reveal__projects .works-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(1.2rem, 2.6vh, 2rem);
}

.hero-reveal__projects .works-colophon {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(249, 246, 240, 0.4);
}

.hero-reveal__projects .text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #F9F6F0;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-reveal__projects .text-link:hover {
  opacity: 0.75;
  transform: translateX(4px);
}

@media (max-width: 860px) {
  .c-wide-text { font-size: clamp(2.5rem, 9vw, 5rem); }
  .hero-reveal__projects .work-row { grid-template-columns: 2.2rem 1fr 1.6rem; }
  .hero-reveal__projects .work-main { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .hero-reveal__projects .work-meta { text-align: left; }
}
