/* ==========================================================================
   Page · K00 Cover & Index (project entry, index.html)
   ========================================================================== */

/* ---- Cover -------------------------------------------------------------- */

.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
}

.cover__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .08em;
  color: var(--ink-2);
}

.cover__page {
  display: flex;
  gap: 16px;
  align-items: center;
}

.cover__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) 24px 0;
}

.cover__kicker {
  margin-bottom: 16px;
  font: 500 13px/1.5 var(--f-mono);
  letter-spacing: .08em;
  color: var(--accent-text);
}

.cover__title {
  margin: 0 0 0 -.04em;
  font: 800 clamp(120px, 31vw, 480px)/.78 var(--f-display);
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.cover__claims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 24px 64px;
  align-items: end;
  padding: clamp(24px, 3vw, 40px) 0;
}

.cover__claim {
  margin: 0;
  font: 700 clamp(32px, 3.6vw, 56px)/.95 var(--f-display);
  text-transform: uppercase;
  max-width: 14ch;
}

.cover__text {
  margin: 0;
  color: var(--ink-2);
  max-width: 52ch;
}

/* ---- The line: rail, station ticks, carrier ----------------------------- */

.cover__rail {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 28px;
}

/* --pos: carrier position along the rail (0% … 100%), set by k00-cover.js */
.rail {
  --pos: 0%;
  position: relative;
  height: 56px;
}

.rail__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 27px;
  height: 1px;
  background: var(--line-strong);
}

.rail__tick {
  position: absolute;
  top: 21px;
  left: var(--x);
  width: 1px;
  height: 13px;
  background: var(--ink);
}

.rail__carrier,
.rail__label {
  position: absolute;
  left: clamp(15px, var(--pos), calc(100% - 15px));
  margin-left: -15px;
  transition: left var(--t-600) var(--ease-servo);
}

.rail__carrier {
  top: 14px;
  width: 30px;
  height: 27px;
  background: var(--accent);
  clip-path: var(--chamfer-s);
}

.rail__label {
  top: 44px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .06em;
  color: var(--ink);
  white-space: nowrap;
}

/* ---- Hall door ----------------------------------------------------------
   12 slats cover the hero and lift once, bottom slat first (60 ms stagger)
   after a 450 ms dwell. With reduced motion the slats disappear without the
   dwell (the duration is zeroed by base.css, the stagger stays).
   ------------------------------------------------------------------------- */

.hall-door {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.hall-door__slat {
  flex: 1;
  background: linear-gradient(#3A4146, #2C3237 70%, #1E2226);
  border-bottom: 1px solid #15181A;
  transform-origin: top;
  animation: hall-door-lift var(--t-300) cubic-bezier(.7, 0, .2, 1.08) both;
  animation-delay: calc(450ms + (11 - var(--i)) * 60ms);
}

@keyframes hall-door-lift {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hall-door__slat {
    animation-delay: calc((11 - var(--i)) * 60ms);
  }
}

/* ---- Sections ----------------------------------------------------------- */

.cover-section--rule-bottom {
  border-bottom: 1px solid var(--line);
}

.cover-section__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--station) 24px;
}

.cover-section__station {
  margin-bottom: 40px;
}

/* ---- ST 010 · How to use ------------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}

.step {
  padding: 24px 24px 24px 0;
  border-bottom: 1px solid var(--line-strong);
}

.step__number {
  font: 800 64px/1 var(--f-display);
  color: var(--accent-text);
}

.step__title {
  margin: 12px 0 8px;
  font: 700 28px/1.05 var(--f-display);
  text-transform: uppercase;
}

.step__text {
  margin: 0;
  color: var(--ink-2);
  max-width: 40ch;
}

.step__code {
  font: 400 15px var(--f-mono);
}

/* ---- ST 020 · Index ----------------------------------------------------- */

.index-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 40px;
}

.index-head__title {
  margin: 0;
  font: 700 clamp(44px, 6vw, 96px)/.9 var(--f-display);
  text-transform: uppercase;
}

.index-legend {
  display: flex;
  gap: 20px;
  font: 500 12px/1 var(--f-mono);
  color: var(--ink-2);
}

.index-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* status square: filled = available, outline = in production */
.index-status {
  width: 10px;
  height: 10px;
  background: var(--sig-green);
}

.index-status--planned,
.index-row--planned .index-status {
  background: transparent;
  border: 1.5px solid var(--ink-2);
}

.index-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: 48px 64px;
}

.index-group__label {
  margin-bottom: 12px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .08em;
  color: var(--muted);
}

.index-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}

.index-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: var(--target);
  padding: 14px 8px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  text-decoration: none;
}

.index-row:hover {
  background: var(--panel);
  color: var(--ink);
}

.index-row__code {
  font: 500 13px/1 var(--f-mono);
  color: var(--muted);
}

.index-row__title {
  display: block;
  font: 700 24px/1.05 var(--f-display);
  text-transform: uppercase;
}

.index-row__desc {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-2);
}

/* ---- ST 030 · Signature devices ---------------------------------------- */

.devices {
  background: var(--canvas);
  color: var(--ink);
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  background: var(--line);
}

.device {
  padding: 28px 24px 32px;
  background: var(--canvas);
}

.device__code {
  margin-bottom: 14px;
  font: 500 12px/1 var(--f-mono);
  color: var(--accent-text);
}

.device__title {
  margin: 0 0 8px;
  font: 700 30px/1 var(--f-display);
  text-transform: uppercase;
}

.device__text {
  margin: 0;
  font-size: 16px;
  color: var(--ink-2);
}

.devices__title-block {
  margin-top: 72px;
}
