/* Final homepage polish for Rae & Riel.
   These rules replace the temporary runtime style injection that was used during QA. */

/* Hero collage hierarchy: Zeedz and Streamiverse trade positions, while the
   two compact cards sit in front so all four projects remain legible. */
.project-streamiverse { z-index: 7; }
.project-zeedz { z-index: 12; }
.project-community { z-index: 16; }
.project-peppy-small { z-index: 15; }

.project-streamiverse:hover { z-index: 9; }
.project-zeedz:hover { z-index: 14; }
.project-community:hover { z-index: 18; }
.project-peppy-small:hover { z-index: 17; }

/* Swap the two large-card positions without swapping their content. */
.project-streamiverse {
  width: 385px;
  left: 0;
  right: auto;
  top: 28px;
}
.project-zeedz {
  width: 360px;
  left: 42%;
  right: auto;
  top: 90px;
}
.project-community {
  width: 225px;
  right: 0;
  top: 6px;
}
.project-peppy-small {
  width: 225px;
  right: 1%;
  bottom: 16px;
}

.project-zeedz .project-art,
.project-streamiverse .project-art {
  aspect-ratio: 1 / 1;
  height: auto;
}

.project-zeedz .project-art img,
.project-streamiverse .project-art img,
.zeedz-proof-cover img,
.stream-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.zeedz-proof-cover,
.stream-cover {
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  background: #fff;
}

.streamiverse-gallery {
  gap: 14px;
}

.streamiverse-gallery .evidence-card {
  margin: 0;
}

.streamiverse-gallery .evidence-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  filter: none;
  transform: none;
}

.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 2px;
}

.card-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid rgba(217, 119, 87, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .36);
  color: #6f6256;
  font-size: 10px;
}

.card-metrics strong {
  color: var(--terracotta);
  font: 500 15px/1 var(--serif);
}

.stream-full-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 22px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--terracotta);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.signature-transition {
  height: auto;
  min-height: 0;
  padding: 84px 0 92px;
  border-top: 1px solid var(--line);
}

.signature-sticky {
  position: relative;
  top: auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.kinetic-stack,
.kinetic-copy {
  position: relative;
  z-index: 1;
}

.kinetic-copy {
  max-width: 720px;
}

.stream-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 22px;
}

.stream-scope span {
  padding: 9px 12px;
  border: 1px solid rgba(217, 119, 87, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
  color: #765f52;
  font-size: 12px;
}

.proof-note {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #7a6f63;
  font-size: 12px;
  line-height: 1.5;
}

.contact-lede {
  max-width: 680px;
  margin: 18px auto 28px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
}

/* Keep keyboard focus obvious without changing the visual language for pointer users. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
.work-track:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

/* Final launch QA fixes: keep the hovered/focused project above overlapping
   cards even when the motion loop writes an inline z-index. */
.hero-board .project-trigger:hover,
.hero-board .project-trigger:focus-visible {
  z-index: 30 !important;
}

/* Normal-size white text now uses the existing darker brand terracotta.
   #FFFFFF on #B9583E is approximately 4.64:1. */
.index-card.terracotta {
  background: var(--terra-dark);
}
.index-card.terracotta p,
.index-card.terracotta .index-number {
  color: #fff;
}

/* Make the Selected Work boundaries obvious both visually and semantically. */
.pager button:disabled {
  opacity: .38;
  cursor: not-allowed;
  background: transparent;
  color: #8C7F72;
  border-color: rgba(74, 61, 49, .18);
  box-shadow: none;
}

/* Desktop/tablet preview sheets keep their fixed animation frame, but the
   copy column can scroll so the CTA and footer never become unreachable. */
.project-sheet-inner {
  height: 100%;
  min-height: 0;
}
@media (min-width: 761px) {
  .project-sheet-copy {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

/* Remaining filled controls use the accessible dark terracotta. */
.project-sheet-cta,
.pager .pager-active,
.project-cursor {
  background: var(--terra-dark) !important;
  color: #fff !important;
}
.project-sheet-cta:hover {
  background: #A9472F !important;
}

/* Desktop-only hierarchy adjustment: make Zeedz the first visual read while
   keeping all four cards visible. Mobile and tablet positions remain unchanged. */
@media (min-width: 1101px) {
  .project-streamiverse {
    width: 350px;
    left: 0;
    top: 42px;
    z-index: 7;
  }

  .project-zeedz {
    width: 420px;
    left: 34%;
    top: 56px;
    z-index: 13;
    box-shadow: 0 30px 72px rgba(66, 48, 35, .22), 0 9px 22px rgba(66, 48, 35, .12);
  }

  .project-community {
    width: 210px;
    right: -1%;
    top: 0;
    z-index: 15;
  }

  .project-peppy-small {
    width: 210px;
    right: 0;
    bottom: 8px;
    z-index: 14;
  }

  .project-zeedz:hover {
    z-index: 17;
    box-shadow: 0 34px 82px rgba(66, 48, 35, .25), 0 10px 24px rgba(66, 48, 35, .13);
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .project-streamiverse {
    width: 345px;
    left: 2%;
    top: 28px;
  }
  .project-zeedz {
    width: 330px;
    left: 43%;
    top: 90px;
  }
  .project-community {
    width: 218px;
    right: 1%;
    top: 2px;
  }
  .project-peppy-small {
    width: 218px;
    right: 2%;
    bottom: 12px;
  }
}

@media (max-width: 760px) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .intro-curtain {
    display: none !important;
  }

  .hero-line,
  .site-header,
  .page-ready .hero .eyebrow,
  .page-ready .hero .lede,
  .page-ready .hero-actions,
  .page-ready .service-line {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }

  .hero-actions {
    gap: 14px;
  }

  /* Mobile collage: Streamiverse moves to the old Zeedz slot, Zeedz moves to
     the old Streamiverse slot, and the smaller cards sit above both. */
  /* Zeedz is the flagship: on phones it sits in front of Peppy Diary so its title
     stays readable, and the board is 70-80px taller so Peppy's own title clears Zeedz. */
  .hero-board {
    height: 890px;
  }
  .project-zeedz {
    z-index: 17;
  }
  .project-streamiverse {
    width: 76%;
    left: 0;
    right: auto;
    top: 40px;
    bottom: auto;
  }
  .project-zeedz {
    width: 72%;
    right: 0;
    left: auto;
    top: 365px;
    bottom: auto;
  }
  .project-community {
    width: 48%;
    right: 0;
    left: auto;
    top: 24px;
    bottom: auto;
  }
  .project-peppy-small {
    width: 49%;
    left: 1%;
    right: auto;
    top: auto;
    bottom: 2px;
  }

  .menu-button,
  .pager button,
  .project-close,
  .project-sheet-cta {
    min-width: 44px;
    min-height: 44px;
  }

  .menu-button {
    padding: 10px 8px;
    cursor: pointer;
  }

  .pager button {
    width: 44px;
    height: 44px;
  }

  .project-close {
    padding: 10px 14px;
  }

  .project-sheet-inner {
    height: 100%;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .project-sheet-visual {
    min-height: clamp(260px, 38dvh, 330px) !important;
  }

  .project-sheet-visual .project-art,
  .project-sheet-visual .work-visual {
    width: min(92%, 520px);
    height: clamp(260px, 38dvh, 330px) !important;
    min-height: 0 !important;
  }

  .project-sheet-visual[data-project="zeedz"] .project-art,
  .project-sheet-visual[data-project="zeedz"] .work-visual,
  .project-sheet-visual[data-project="streamiverse"] .project-art,
  .project-sheet-visual[data-project="streamiverse"] .work-visual {
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
  }

  .project-sheet-copy {
    padding: 30px 22px !important;
  }

  .project-sheet-summary {
    font-size: 16px;
    line-height: 1.5;
  }

  .project-meta-row {
    grid-template-columns: 82px 1fr;
    gap: 14px;
    padding: 12px 0;
  }

  .signature-transition {
    padding: 58px 0 64px;
  }

  .kinetic-row {
    display: grid !important;
    grid-template-columns: 30px 1fr !important;
    gap: 4px 12px !important;
    padding: 17px 0 !important;
  }

  .kinetic-row small {
    grid-column: 2 !important;
  }

  .kinetic-row strong {
    font-size: clamp(43px, 15vw, 64px) !important;
    line-height: .92 !important;
  }

  .kinetic-copy {
    margin-top: 24px !important;
    font-size: 25px !important;
    line-height: 1.08 !important;
  }

  .zeedz-proof-cover,
  .stream-cover {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
  }

  .streamiverse-gallery {
    gap: 10px;
  }
}

@media (max-width: 430px) {
  .hero-board {
    height: 850px;
  }
  .project-streamiverse {
    width: 79%;
  }
  .project-zeedz {
    width: 77%;
    top: 342px;
  }
  .project-community {
    width: 50%;
    top: 20px;
  }
  .project-peppy-small {
    width: 52%;
    bottom: 0;
  }
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: 50px !important;
  }

  .button {
    padding: 13px 18px;
  }

  .hero-actions {
    gap: 12px;
  }

  .project-sheet-copy {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-line,
  .site-header,
  .kinetic-row,
  .kinetic-copy {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
}
