/* Closing day photo collage hero (Lumen, 2026-11-05, photo version). Plain CSS.
   Structure follows ryanserhant.com's hero (inspiration only): copy on the left
   half, bottom aligned, giant two line name, paragraph, buttons, media on the
   right. Here the media is a slowly drifting collage of Brandon's real closing
   day photos that fills the whole hero, under a deep emerald scrim (never black).

   Safety contract (same as motion.js): nothing is hidden by this file. Drift only
   runs under html.rh-on, which the head script sets only when JS runs and motion
   is allowed. No JS or reduced motion = a still collage and readable text. */

.rh {
  --rh-gap: 12px;
  --rh-cols: 3;
  --rh-ink: 11, 42, 32;            /* --ink-deep #0B2A20 as rgb, the scrim colour */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100dvh - var(--header-h));
  background-color: var(--ink-deep);   /* shows only before the photos paint */
  color: var(--on-deep);
  display: flex;
}
@media (min-width: 768px)  { .rh { --rh-cols: 4; } }
@media (min-width: 1024px) { .rh { --rh-cols: 5; } }
@media (min-width: 1280px) { .rh { --rh-cols: 6; } }

/* 1. Collage. Bleeds 4vw past both edges so the outer columns crop like a
   real collage instead of ending in a neat gutter. */
.rh-photos {
  position: absolute; z-index: 0;
  inset: 0 -4vw;
  display: grid;
  grid-template-columns: repeat(var(--rh-cols), minmax(0, 1fr));
  column-gap: var(--rh-gap);
  margin: 0; padding: 0; list-style: none;
}
.rh-col { position: relative; min-width: 0; margin: 0; padding: 0; list-style: none; }
.rh-col:nth-child(n + 4) { display: none; }
@media (min-width: 768px)  { .rh-col:nth-child(4) { display: block; } }
@media (min-width: 1024px) { .rh-col:nth-child(5) { display: block; } }
@media (min-width: 1280px) { .rh-col:nth-child(6) { display: block; } }
/* Static start offsets, so with no motion the columns still stagger. */
.rh-col:nth-child(2n) { margin-top: -90%; }
.rh-col:nth-child(3n) { margin-top: -150%; }

/* flow-root keeps the last tile's bottom margin inside the track. With plain
   block it collapsed out, the track came up 12px short and -50% landed 6px
   early, so every loop jumped 6px. */
.rh-track { display: flow-root; }
/* Tiles keep each photo's own crop (3:4, 4:3 or 1:1), so heights vary like a
   real collage. width and height on the img reserve the space, so no shift. */
.rh-tile {
  margin: 0 0 var(--rh-gap);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #123A2C;
}
.rh-tile img { display: block; width: 100%; height: auto; }

/* 2. Scrim. Phone: photos read clearly in the top band, the copy sits on the
   darker lower part. Desktop: a left to right fall off, so the left half reads
   as the text side and the right half shows the photos, like the reference split. */
.rh-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(var(--rh-ink), .16) 0%,
      rgba(var(--rh-ink), .22) 13%,
      rgba(var(--rh-ink), .82) 23%,
      rgba(var(--rh-ink), .86) 40%,
      rgba(var(--rh-ink), .88) 100%);
}
@media (min-width: 1024px) {
  .rh-scrim {
    background:
      linear-gradient(0deg, rgba(var(--rh-ink), .55) 0%, rgba(var(--rh-ink), 0) 28%),
      linear-gradient(180deg, rgba(var(--rh-ink), .30) 0%, rgba(var(--rh-ink), 0) 30%),
      linear-gradient(90deg,
        rgba(var(--rh-ink), .88) 0%,
        rgba(var(--rh-ink), .84) 44%,
        rgba(var(--rh-ink), .52) 60%,
        rgba(var(--rh-ink), .22) 76%,
        rgba(var(--rh-ink), .14) 100%);
  }
}

/* 3. Copy. Bottom left, about half the width from 1024 up. */
.rh-copy {
  position: relative; z-index: 2;
  width: 100%;
  display: flex; align-items: flex-end;
}
.rh-copy .wrap { width: 100%; }
.rh-inner {
  max-width: 40rem;
  padding: 27svh 0 40px;           /* phone: the top band stays clear for the photos */
  text-shadow: 0 1px 2px rgba(var(--rh-ink), .35);
}
@media (min-width: 768px)  { .rh-inner { padding: 22vh 0 48px; } }
@media (min-width: 1024px) { .rh-inner { padding: 64px 0 56px; max-width: 42rem; } }

.rh-byline { width: fit-content; font-size: .8125rem; line-height: 1.45; color: var(--on-deep); margin: 0 0 14px; }
.rh-byline strong { color: var(--on-deep); font-weight: 600; }

.rh-name {
  font-weight: 800; letter-spacing: -0.04em; line-height: .9;
  font-size: clamp(3.5rem, 2rem + 5vw, 6rem);
  color: var(--on-deep);
  margin: 0 0 clamp(18px, 3vh, 28px);
  padding-bottom: .04em;
}
.rh-name span { display: block; }
.rh-name span + span { color: var(--emerald-light); padding-left: .6em; }

.rh h1 {
  font-size: clamp(1.375rem, 1rem + 1.35vw, 2.125rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.16;
  color: var(--on-deep); max-width: 24ch; text-wrap: balance;
}
.rh h1 .soft { font-weight: 600; color: var(--on-deep-2); }
.rh-lead { margin-top: 14px; font-size: 1.0625rem; line-height: 1.55; color: #DCE8E2; max-width: 34em; }
@media (min-width: 1024px) { .rh-lead { font-size: 1.125rem; margin-top: 16px; } }

.rh-ctas { margin-top: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rh-ctas .btn { text-shadow: none; }
.rh-helper { font-size: .875rem; color: var(--on-deep-2); }
@media (min-width: 768px) { .rh-ctas { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; } }
@media (max-width: 599px) { .rh-ctas .btn { width: 100%; } }

.rh-alt { margin-top: 6px; display: flex; flex-wrap: wrap; column-gap: 24px; }
.rh-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; font-size: .9375rem; color: var(--on-deep);
  text-decoration: underline; text-decoration-color: var(--emerald-light);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.rh-link:hover { text-decoration-color: var(--on-deep); }

.rh-rated { margin-top: 4px; }
.rh-rated a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--on-deep); font-weight: 700; font-size: .9375rem; text-decoration: none; }
.rh-rated a:hover span.t { text-decoration: underline; text-decoration-color: var(--emerald-light); text-underline-offset: 4px; }
.rh-stars { display: inline-flex; gap: 2px; color: var(--emerald-light); }
.rh-stars svg { width: 14px; height: 14px; }

.rh-legal { margin-top: 10px; font-size: .8125rem; line-height: 1.55; color: var(--on-deep-2); max-width: 40em; }

.rh :focus-visible { outline-color: var(--emerald-light); }

/* 4. Pause control (WCAG 2.2.2). Only exists when there is motion to pause. */
.rh-pause {
  display: none;
  position: absolute; z-index: 3; right: 12px; top: 12px;
  min-height: 44px; padding: 0 14px;
  align-items: center; gap: 8px;
  font: 600 .6875rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--on-deep);
  background: rgba(var(--rh-ink), .72);
  border: 1px solid rgba(242, 247, 244, .32);
  border-radius: var(--r-md);
  cursor: pointer;
}
.rh-pause:hover { background: rgba(var(--rh-ink), .9); }
html.rh-on .rh-pause { display: inline-flex; }
@media (min-width: 1024px) { .rh-pause { top: 16px; right: 16px; } }

/* 5. Drift. Only under html.rh-on. Each track holds the column's set twice,
   every tile carries its own bottom margin, so -50% is exactly one set and the
   loop has no seam. Alternate directions, different speeds. */
@media (prefers-reduced-motion: no-preference) {
  html.rh-on .rh-track { will-change: transform; animation: rh-up var(--rh-dur, 90s) linear infinite; animation-delay: var(--rh-delay, 0s); }
  html.rh-on .rh-col:nth-child(2n) .rh-track { animation-name: rh-down; }
  html.rh-on .rh-col:nth-child(1) { --rh-dur: 159s; --rh-delay: -16s; }
  html.rh-on .rh-col:nth-child(2) { --rh-dur: 194s; --rh-delay: -173s; }
  html.rh-on .rh-col:nth-child(3) { --rh-dur: 174s; --rh-delay: -16s; }
  html.rh-on .rh-col:nth-child(4) { --rh-dur: 210s; --rh-delay: -112s; }
  html.rh-on .rh-col:nth-child(5) { --rh-dur: 165s; --rh-delay: -8s; }
  html.rh-on .rh-col:nth-child(6) { --rh-dur: 184s; --rh-delay: -132s; }
  /* 15 photos since 2026-11-13. Each column holds all 15 in its own rotation
     (start tiles 06, 02, 05, 15, 07, 10). Start delays were picked by a search so
     no photo sits beside itself on the first frame at 390, 768, 1024 or 1440.
     Durations scale with the set height, so a column still moves about 26px a
     second on desktop and 16px a second on phones, the same pace as before. */
  html.rh-paused .rh-track,
  .rh.is-idle .rh-track { animation-play-state: paused; }
}
@keyframes rh-up   { from { transform: translate3d(0, 0, 0); }    to { transform: translate3d(0, -50%, 0); } }
@keyframes rh-down { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(0, 0, 0); } }

/* 6. Flow into the next section. Its top edge tucks 16px over the photos with a
   16px radius and the same soft emerald shadow the editorial gallery card used,
   so the hero hands off to the page instead of ending on a hard line. */
.rh + section {
  position: relative; z-index: 1;
  margin-top: -16px;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -24px 48px rgba(11, 42, 32, 0.10);
}
