/* Home only: the original directory shares the page with public work previews. */
#hero {
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(26px, 3vw, 58px);
  overflow: visible;
}
#hero .home-directory {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, .86fr) minmax(0, 1fr);
  gap: clamp(18px, 2.6vh, 30px);
}
#hero .mast {
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 66px;
  align-content: center;
  gap: 16px 22px;
  padding: 0 0 20px;
}
#hero .brand-block {
  grid-column: 1 / -1;
  padding: 12px 0 10px;
  overflow: visible;
}
#hero .wordmark {
  font-size: clamp(40px, 14.3cqw, 112px);
  letter-spacing: .008em;
  line-height: 1.08;
}
#hero .masterline { width: 99%; margin-top: clamp(18px, 2.5vh, 28px); }
#hero .statement {
  grid-column: 1;
  min-height: 0;
  padding: 0;
  border: 0;
}
#hero .statement__eyebrow {
  max-width: 100%;
  margin-bottom: 10px;
  padding-bottom: 8px;
  font-size: clamp(9px, .82vw, 12px);
  letter-spacing: .09em;
  line-height: 1.4;
}
#hero .statement p { max-width: 42ch; margin-bottom: 8px; font-size: clamp(12px, 1vw, 15px); line-height: 1.65; }
#hero .statement time { font-size: 12px; }
#hero .seal { grid-column: 2; grid-row: 2; width: 62px; height: 62px; font-size: 11px; }
#hero .chapters { display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); align-self: stretch; min-height: 0; }
#hero .chapter {
  min-width: 0;
  min-height: 0;
  grid-template-columns: 46px minmax(0, 1fr) 104px 38px;
  gap: 0;
  padding: 8px 0;
}
#hero .chapter__number { padding: 0; font-size: clamp(34px, 3.2vw, 54px); text-align: left; }
#hero .chapter__title {
  min-width: 0;
  overflow: visible;
  padding-left: 18px;
  font-size: clamp(35px, 3.8vw, 65px);
  line-height: .98;
  white-space: nowrap;
}
#hero .chapter__desc { display: none; }
#hero .chapter__status { padding-left: 10px; font-size: 9px; line-height: 1.7; }
#hero .chapter__arrow { min-width: 0; font-size: 34px; }
#hero .chapter:hover .chapter__arrow, #hero .chapter:focus-visible .chapter__arrow { transform: translateX(4px); }

.home-showcases {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vh, 36px);
  min-width: 0;
  min-height: 0;
  padding-right: clamp(18px, 2.2vw, 40px);
  border-right: 1px solid var(--hairline);
}
.home-showcase { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; min-width: 0; min-height: 0; }
.home-showcase__heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home-showcase__index { align-self: center; color: var(--red); font: 650 10px/1.5 var(--mono); }
.home-showcase__heading h2 { margin: 0; font: 400 clamp(30px, 2.6vw, 43px)/1 var(--display); letter-spacing: .02em; }
.home-showcase__browse { margin-left: auto; padding: 9px 0 9px 6px; font: 600 11px/1.3 var(--mono); white-space: nowrap; }
.home-showcase__browse:hover { color: var(--red); }
.home-showcase__viewport {
  --showcase-copy-height: 80px;
  container-type: size;
  min-width: 0;
  min-height: 0;
  padding: 8px 1.2%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  touch-action: pan-x pan-y;
}
.home-showcase__viewport::-webkit-scrollbar { display: none; }
.home-showcase__viewport:focus-visible { outline-offset: 2px; }
.home-showcase__track { position: relative; display: flex; gap: 8px; height: 100%; min-height: 0; width: 100%; }
.home-showcase__card {
  position: relative;
  flex: 0 0 auto;
  width: min(100cqw, calc((100cqh - var(--showcase-copy-height) - 2px) * 16 / 9 + 2px));
  display: grid;
  grid-template-rows: auto var(--showcase-copy-height);
  align-self: start;
  min-width: 0;
  height: auto;
  border: 1px solid var(--hairline);
  background: var(--paper);
  overflow: hidden;
  transform-origin: center;
  transition: border-color 160ms ease, transform 180ms ease;
}
.home-showcase[data-count="1"] .home-showcase__track { justify-content: center; }
.home-showcase__card:hover, .home-showcase__card:focus-visible { border-color: var(--red); }
.home-showcase__card:focus-visible { outline-offset: -3px; }
@media (hover: hover) and (pointer: fine) {
  .home-showcase__card:hover { z-index: 1; transform: scale(1.02); }
}
.home-showcase__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--faint);
}
.home-showcase__visual img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.home-showcase__fallback { display: grid; justify-items: center; gap: 9px; color: var(--graphite); font: 500 11px/1.4 var(--mono); }
.home-showcase__fallback strong { color: var(--ink); font: 400 34px/1 var(--display); letter-spacing: .08em; }
.home-showcase__copy { display: grid; align-content: center; gap: 4px; min-width: 0; padding: 8px 12px; border-top: 1px solid var(--hairline); }
.home-showcase__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; font: 650 15px/1.45 var(--sans); }
.home-showcase__meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--red); font: 600 10px/1.45 var(--mono); }
.home-showcase__description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--graphite); font: 400 11px/1.5 var(--sans); }
.home-showcase__footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-width: 0; min-height: 30px; }
.home-showcase__status { min-width: 0; color: var(--graphite); font: 500 10px/1.4 var(--mono); }
.home-showcase__controls { display: flex; gap: 5px; flex-shrink: 0; }
.home-showcase__controls button {
  min-width: 32px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font: 600 11px/1 var(--mono);
}
.home-showcase__controls button:hover, .home-showcase__controls button[aria-pressed="true"] { color: var(--red); border-color: var(--red); }
.home-showcase__controls button:disabled { opacity: .45; cursor: default; }
.home-showcase__empty {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  min-height: 0;
  height: 100%;
  padding: clamp(18px, 2vw, 30px);
  border: 1px dashed var(--hairline);
  background: var(--faint);
}
.home-showcase__empty strong { font: 550 15px/1.6 var(--sans); }
.home-showcase__empty p { max-width: 32ch; margin: 0; color: var(--graphite); font: 400 12px/1.7 var(--sans); }
.home-showcase__retry { padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 0; background: var(--paper); cursor: pointer; font: 600 11px/1.3 var(--mono); }

@supports not (container-type: inline-size) { #hero .wordmark { font-size: clamp(40px, 5.8vw, 112px); } }
@media (min-width: 981px) and (max-width: 1180px) {
  #hero { gap: 24px; }
  #hero .chapter { grid-template-columns: 40px minmax(0, 1fr) 34px; }
  #hero .chapter__status { display: none; }
  #hero .chapter__title { padding-left: 14px; }
  .home-showcases { padding-right: 20px; }
}
@media (min-width: 981px) and (max-height: 760px) {
  #story, #stage { min-height: 0; }
  #hero { top: calc(var(--header-h) + 18px); bottom: 20px; }
  #hero .home-directory { grid-template-rows: minmax(0, .78fr) minmax(0, 1fr); gap: 16px; }
  #hero .mast { gap: 10px 16px; padding-bottom: 12px; }
  #hero .brand-block { padding: 3px 0; }
  #hero .wordmark { font-size: clamp(38px, 12.5cqw, 83px); }
  #hero .masterline { margin-top: 14px; }
  #hero .statement p { font-size: 12px; line-height: 1.5; }
  #hero .statement__eyebrow { margin-bottom: 6px; padding-bottom: 5px; }
  #hero .seal { width: 54px; height: 54px; }
  #hero .chapter__title { font-size: clamp(34px, 3.4vw, 53px); }
  #hero .chapter__number { font-size: 36px; }
  .home-showcases { gap: 20px; }
  .home-showcase { gap: 7px; }
  .home-showcase__heading h2 { font-size: 30px; }
  .home-showcase__viewport { --showcase-copy-height: 56px; }
  .home-showcase__copy { gap: 4px; padding: 8px 10px; }
  .home-showcase__title { font-size: 13px; -webkit-line-clamp: 1; }
  .home-showcase__description { display: none; }
}
@media (max-width: 980px) {
  #story { height: auto; min-height: 0; }
  #stage { position: relative; height: auto; min-height: 0; overflow: visible; }
  #hero {
    position: relative;
    inset: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 36px;
    min-height: 0;
    margin: 0 var(--gutter);
    padding: calc(var(--header-h) + 26px) 0 32px;
    overflow: visible;
    overscroll-behavior: auto;
  }
  #hero .home-directory { grid-row: 1; grid-template-rows: auto auto; gap: 22px; }
  #hero .mast { grid-template-columns: minmax(0, 1fr) 60px; gap: 16px 20px; padding-bottom: 20px; }
  #hero .brand-block { padding: 8px 0 4px; }
  #hero .wordmark { font-size: clamp(38px, 14.3cqw, 106px); }
  #hero .masterline { margin-top: 20px; }
  #hero .statement__eyebrow { font-size: clamp(9px, 1.6vw, 12px); }
  #hero .statement p { font-size: 13px; }
  #hero .seal { width: 56px; height: 56px; }
  #hero .chapter { min-height: 67px; grid-template-columns: 42px minmax(0, 1fr) 40px; }
  #hero .chapter__number { font-size: 38px; }
  #hero .chapter__title { padding-left: 16px; font-size: clamp(35px, 7vw, 53px); }
  #hero .chapter__status { display: none; }
  #hero .chapter__arrow { font-size: 32px; }
  .home-showcases { grid-row: 2; grid-template-rows: auto auto; gap: 30px; padding: 0; border: 0; }
  .home-showcase { grid-template-rows: auto auto auto; gap: 10px; }
  .home-showcase__viewport { container-type: inline-size; }
  .home-showcase__track { height: auto; }
  .home-showcase__heading h2 { font-size: 35px; }
  .home-showcase__card { width: min(94cqw, 440px); }
  .home-showcase__controls button { min-width: 38px; min-height: 36px; }
  .home-showcase__browse { padding-block: 12px; }
}
@media (max-width: 380px) {
  #hero .mast { gap: 14px 12px; grid-template-columns: minmax(0, 1fr) 48px; }
  #hero .seal { width: 46px; height: 46px; }
  #hero .statement__eyebrow { letter-spacing: .03em; font-size: 9px; }
  #hero .statement p { font-size: 12px; }
  #hero .chapter { grid-template-columns: 36px minmax(0, 1fr) 32px; }
  #hero .chapter__title { padding-left: 12px; font-size: 35px; }
  .home-showcase__status { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-showcase__card { transition: none; }
  .home-showcase__card:hover { transform: none; }
}
html[data-reduce="true"] .home-showcase__card { transition: none; transform: none; }
@media (forced-colors: active) {
  .home-showcase__viewport { scrollbar-width: auto; }
  .home-showcase__viewport::-webkit-scrollbar { display: initial; }
  .home-showcase__card, .home-showcase__controls button { border-color: CanvasText; }
}
