/* Home hero "the floor": the room full of students is the hero. The photo is a duotone in the active theme's colours
   was a grey duotone until 11-15 ("gloomy"); now it is the room in full colour under a warm sunrise wash, "for" is struck and
   rewritten as "by", and an agenda rail sits under it. Every colour is a token, so ?theme= repaints it. */
.hero--floor {
  display: block;
  min-height: 0;
  padding: calc(var(--header-h) + clamp(20px, 3vw, 40px)) 0 clamp(18px, 2.4vw, 28px);
}
.floor {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-areas: "copy room" "rail rail";
  gap: clamp(20px, 3vw, 48px) clamp(24px, 4vw, 64px);
  align-items: center;
  width: min(1360px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.floor__copy { grid-area: copy; }
.floor__title {
  max-width: 10.5em;
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* for -> by: the old word is struck through, the new one drops in above it */
.swap {
  position: relative;
  display: inline-block;
}
.swap s {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--muted);
  text-decoration: none;
  background: linear-gradient(var(--orange), var(--orange)) no-repeat 0 58% / 100% 0.09em;
  transition: background-size 0.5s var(--ease-out) 0.5s, opacity 0.5s 1.25s, transform 0.6s var(--ease-out) 1.25s;
}
.swap b {
  font-weight: inherit;
  color: var(--ink);
  transition: opacity 0.5s 1.3s, transform 0.7s var(--ease-out) 1.3s;
}
.js .hero--floor:not(.go) .swap s { background-size: 0 0.09em; }
.js .hero--floor:not(.go) .swap b { opacity: 0; transform: translateY(-0.45em); }
.hero--floor.go .swap s { opacity: 0; transform: translateY(0.35em); }
html:not(.js) .swap s { display: none; }

/* the room */
.floor__room {
  grid-area: room;
  position: relative;
  margin: 0;
  aspect-ratio: 1300 / 900;
  border-radius: clamp(20px, 2.4vw, 32px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% 10%, var(--butter), transparent 60%),
    linear-gradient(155deg, var(--lilac), var(--peach) 55%, var(--orange));
  background-size: 140% 140%, 100% 100%;
  animation: floor-drift 18s ease-in-out infinite alternate;
  box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--ink) 55%, transparent);
}
@keyframes floor-drift { to { background-position: 100% 100%, 0 0; } }
.floor__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.floor__photo:first-of-type {
  filter: saturate(1.12) contrast(1.04) brightness(1.06);
}
/* sunrise wash: warm light from the top right, the theme's accent glowing low, never grey (brief.md) */
.floor__room::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 88% 0%, color-mix(in srgb, var(--butter) 70%, transparent), transparent 65%),
    linear-gradient(0deg, color-mix(in srgb, var(--orange) 30%, transparent), transparent 45%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.floor__photo--live { z-index: 1; }
.floor__photo--live {
  opacity: 0;
  -webkit-mask-image: radial-gradient(circle var(--spot, 150px) at var(--mx, 50%) var(--my, 50%), #000 55%, transparent 100%);
  mask-image: radial-gradient(circle var(--spot, 150px) at var(--mx, 50%) var(--my, 50%), #000 55%, transparent 100%);
  transition: opacity 0.35s;
}
.floor__room.is-lit .floor__photo--live { opacity: 1; }
.floor__cap {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  max-width: calc(100% - 150px);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: var(--fs-label);
  color: var(--ink);
  background: color-mix(in srgb, var(--bone-2) 86%, transparent);
  backdrop-filter: blur(6px);
}
.floor__badge {
  position: absolute;
  right: clamp(12px, 2vw, 22px);
  bottom: clamp(12px, 2vw, 22px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(96px, 9vw, 124px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--ink);
  background: var(--orange);
  text-decoration: none;
  transition: transform 0.4s var(--ease-out);
}
.floor__badge:hover { transform: rotate(-8deg) scale(1.05); }
.floor__badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  font: 600 11.5px/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: currentColor;
  animation: floor-spin 22s linear infinite;
}
.floor__badge b { font-size: 1.6rem; }
@keyframes floor-spin { to { transform: rotate(360deg); } }

/* the agenda rail */
.floor__rail {
  grid-area: rail;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}
.floor__rail a {
  display: grid;
  gap: 2px;
  padding: 14px 18px 4px 0;
  color: var(--ink);
  text-decoration: none;
  border-right: 1px solid var(--line);
  margin-right: 18px;
}
.floor__rail a:last-child { border-right: 0; margin-right: 0; }
.floor__rail small {
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.floor__rail span {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 600;
}
.floor__rail a:hover span,
.floor__rail a:focus-visible span {
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--orange) 55%, transparent) 62% 92%, transparent 92%);
}

/* entrance + scroll: the room opens out as the page arrives, then settles as you scroll past */
.js .hero--floor:not(.go) .floor__room { clip-path: inset(8% 8% 8% 8% round 32px); opacity: 0.4; }
.floor__room { transition: clip-path 1.1s var(--ease-out) 0.15s, opacity 0.8s 0.15s; clip-path: inset(0 0 0 0 round 0); }
@supports (animation-timeline: view()) {
  .floor__photo { animation: floor-parallax linear both; animation-timeline: view(); animation-range: cover 40% cover 100%; }
  @keyframes floor-parallax { to { transform: scale(1.12) translateY(4%); } }
}

@media (max-width: 900px) {
  .floor { grid-template-columns: 1fr; grid-template-areas: "copy" "room" "rail"; }
  .floor__room { aspect-ratio: 4 / 3.4; }
  .floor__rail { grid-template-columns: 1fr 1fr; }
  .floor__rail a:nth-child(2) { border-right: 0; margin-right: 0; }
  .floor__rail a:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .floor__cap { max-width: calc(100% - 128px); }
}
@media (prefers-reduced-motion: reduce) {
  .floor__room, .floor__badge svg, .floor__photo { animation: none; }
  .floor__room, .swap s, .swap b { transition: none; }
}
