/* ==========================================================================
   Page · D06 Machine · VX5 (whole page in Night Shift)
   ========================================================================== */

/* ---- Hero (machine film placeholder) ----------------------------------- */

.machine-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(92vh, 900px);
  overflow: hidden;
  background: #15181B;
  background-image: repeating-linear-gradient(135deg, rgba(91, 155, 255, .07) 0 1px, transparent 1px 12px);
}

.machine-hero__caption {
  position: absolute;
  right: 24px;
  top: 20px;
  max-width: 360px;
  font: 500 11px/1.5 var(--f-mono);
  color: var(--ink-2);
  text-align: right;
}

.machine-hero__film {
  position: absolute;
  right: 24px;
  top: 72px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: rgba(14, 16, 18, .6);
  color: var(--ink);
  font: 500 12px var(--f-mono);
  white-space: nowrap;
  cursor: pointer;
}

.machine-hero__inner {
  width: 100%;
  padding-block: clamp(40px, 6vw, 96px);
}

.machine-hero__annotation {
  max-width: 820px;
}

.machine-hero__title {
  margin: 0 0 28px;
  font: 800 clamp(72px, 13vw, 220px)/.8 var(--f-display);
  text-transform: uppercase;
}

.machine-hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 32px;
  align-items: end;
}

.machine-hero__lead {
  margin: 0 0 10px;
  font-size: var(--fs-lead);
  color: var(--ink-2);
  max-width: 40ch;
}

.machine-hero__proof {
  margin: 0;
  font: 400 13px/1.5 var(--f-mono);
  color: var(--muted);
}

.machine-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.machine-hero__btn {
  line-height: normal;
}

/* long label may wrap on small screens */
.machine-hero__btn--primary {
  white-space: normal;
}

.machine-hero__btn--outline {
  padding: 0 22px;
}

/* ---- Chapters + hall-door reveal --------------------------------------- */

.chapter {
  position: relative;
  border-top: 1px solid var(--line);
}

/* 10 slats cover the chapter; .chapter--closed is set by d06-machine.js
   and removed when the chapter scrolls into view (slats roll up bottom-first) */
.hall-door {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
}

.hall-door__slat {
  flex: 1;
  border-bottom: 1px solid #15181A;
  background: linear-gradient(#3A4146, #2C3237 70%, #1E2226);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 300ms var(--ease-servo);
  transition-delay: calc((9 - var(--i)) * 70ms);
}

.chapter--closed .hall-door__slat {
  transform: scaleY(1);
  transition-delay: 0ms;
}

.chapter__station .station__code {
  background: var(--accent);
  color: #0B0C0D;
}

.chapter__title {
  margin: 0 0 48px;
  font: 800 clamp(48px, 7vw, 120px)/.86 var(--f-display);
  text-transform: uppercase;
}

.chapter__title--narrow {
  max-width: 14ch;
}

.chapter__title--tight {
  margin-bottom: 40px;
}

.chapter__intro {
  margin: 0 0 28px;
  color: var(--ink-2);
  max-width: 44ch;
}

.chapter__footnote {
  margin: 16px 0 0;
  font: 400 12px var(--f-mono);
  color: var(--muted);
}

/* ---- CHAPTER 01 · Performance figures ---------------------------------- */

.perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

.perf {
  padding: 22px;
  background: var(--canvas);
}

.perf__key {
  margin-bottom: 14px;
  font: 500 11px var(--f-mono);
  letter-spacing: .06em;
  color: var(--ink-2);
}

.perf__value {
  margin: 0;
  font: 800 clamp(40px, 4vw, 64px)/.95 var(--f-display);
}

.perf__note {
  margin: 8px 0 0;
  font: 400 12px var(--f-mono);
  color: var(--muted);
}

/* ---- CHAPTER 02 · Automation ------------------------------------------- */

.automation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 40px;
  align-items: start;
}

.automation__title {
  margin-bottom: 20px;
}

.auto-options {
  display: grid;
  gap: 8px;
}

.auto-option {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1.5px solid var(--line-strong);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  text-align: left;
  clip-path: var(--chamfer-s);
  cursor: pointer;
}

.auto-option[aria-checked="true"] {
  border-color: var(--action);
  background: rgba(91, 155, 255, .1);
}

.auto-option__title {
  display: block;
  font: 700 22px/1 var(--f-display);
  text-transform: uppercase;
}

.auto-option__text {
  font-size: 14px;
  color: var(--ink-2);
}

.auto-option__price {
  font: 500 12px var(--f-mono);
  color: var(--ink-2);
}

.shift-panel {
  padding: 24px;
  border: 1px solid var(--line-strong);
  background: var(--canvas);
}

.shift-panel__label {
  margin-bottom: 12px;
  font: 500 11px var(--f-mono);
  color: var(--ink-2);
}

.shift-panel__value {
  font: 800 clamp(64px, 8vw, 120px)/.9 var(--f-display);
}

.shift-calendar {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  gap: 2px;
  margin: 24px 0 8px;
}

.shift-calendar > .shift {
  height: 36px;
}

/* shift states: signal color + pattern, readable without color vision */
.shift--attended   { background: var(--sig-green); }
.shift--unattended { background: var(--dv-1); background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 5px); }
.shift--idle       { background: var(--panel); }

.shift-panel__days {
  display: flex;
  justify-content: space-between;
  font: 400 11px var(--f-mono);
  color: var(--muted);
}

.shift-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  font: 500 12px var(--f-mono);
}

.shift-legend > span {
  display: flex;
  gap: 6px;
  align-items: center;
}

.shift-legend .shift {
  width: 12px;
  height: 12px;
}

.shift-panel__note {
  margin-top: 12px;
  font: 400 11px var(--f-mono);
  color: var(--muted);
}

/* ---- CHAPTER 03 · Service tiers ---------------------------------------- */

.tier-table-wrap {
  overflow-x: auto;
  margin-bottom: 48px;
  border: 1px solid var(--line-strong);
}

/* column widths mirror a 1.4fr repeat(3, 1fr) grid */
.tier-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 15px;
}

.tier-table thead th:first-child {
  width: calc(100% * 1.4 / 4.4);
}

.tier-table thead th {
  padding: 16px;
  background: var(--surface);
  font: 700 22px/1 var(--f-display);
  text-transform: uppercase;
  text-align: left;
  vertical-align: top;
}

.tier-table .tier-table__recommended {
  border-top: 4px solid var(--accent);
}

.tier-table tbody th,
.tier-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tier-table tbody th {
  font-weight: 400;
  color: var(--ink-2);
}

.tier-table td {
  font-family: var(--f-mono);
}

/* ---- CHAPTER 03 · Financing -------------------------------------------- */

.financing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px;
  align-items: start;
}

.financing__title {
  margin-bottom: 12px;
}

.financing__intro {
  margin-bottom: 20px;
}

.range-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.range-field__head {
  display: flex;
  justify-content: space-between;
  font: 500 12px var(--f-mono);
  color: var(--ink-2);
}

.range-field__value {
  color: var(--ink);
}

.range-field__input {
  min-height: var(--target);
  accent-color: var(--action);
}

.financing__term {
  margin-bottom: 18px;
}

.fin-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--ink);
}

.fin-switch__option {
  min-height: var(--target);
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 14px var(--f-text);
  text-transform: uppercase;
  cursor: pointer;
}

.fin-switch__option[aria-checked="true"] {
  background: var(--ink);
  color: var(--canvas);
}

.monthly {
  padding: 24px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.monthly__label {
  font: 500 11px var(--f-mono);
  color: var(--ink-2);
}

.monthly__value {
  font: 800 clamp(56px, 7vw, 96px)/.95 var(--f-display);
}

.monthly__note {
  margin-top: 8px;
  font: 400 12px/1.6 var(--f-mono);
  color: var(--muted);
}

/* ---- Test cut (copper band, fixed light colors) ------------------------ */

.testcut {
  border-top: 1px solid var(--line);
  background: var(--p-copper);
  color: #0B0C0D;
}

.testcut__kicker {
  margin-bottom: 20px;
  font: 500 13px/1 var(--f-mono);
  letter-spacing: .08em;
}

.testcut__title {
  margin: 0 0 24px;
  font: 800 clamp(52px, 8vw, 128px)/.84 var(--f-display);
  text-transform: uppercase;
}

.testcut-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.testcut-steps > li {
  padding-top: 10px;
  border-top: 4px solid #0B0C0D;
}

.testcut-steps__num {
  display: block;
  font: 800 32px/1 var(--f-display);
}

.testcut-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: #F1F1EC;
  color: #0B0C0D;
  clip-path: var(--chamfer-m);
}

.testcut-form__done {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.testcut-form__received {
  font: 500 12px var(--f-mono);
  color: #1E8A3C;
}

.testcut-form__ref {
  font: 800 36px/1 var(--f-display);
  text-transform: uppercase;
}

.testcut-form__confirm {
  font-size: 15px;
}

.testcut-form__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.testcut-form__title {
  font: 700 24px/1 var(--f-display);
  text-transform: uppercase;
}

.upload {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1.5px dashed #373D42;
  cursor: pointer;
}

.upload__hint {
  font: 400 12px var(--f-mono);
  color: #555C61;
}

/* visually hidden, the whole label is the drop target */
.upload__input {
  position: absolute;
  width: 1px;
  opacity: 0;
}

.testcut-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.testcut-form__input {
  min-height: 44px;
  padding: 0 12px;
  border: 1.5px solid #555C61;
  background: #fff;
  font: 400 16px var(--f-text);
}

.slot-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.slot-picker__slot {
  min-height: 44px;
  border: 1.5px solid #0B0C0D;
  background: transparent;
  color: #0B0C0D;
  font: 500 13px var(--f-mono);
  cursor: pointer;
}

.slot-picker__slot[aria-pressed="true"] {
  background: #0B0C0D;
  color: #F1F1EC;
}

/* .form-submit in fixed day colors: the form is a light sheet on the night page */
.testcut-form__submit {
  background: #0F4C9A;
  color: #fff;
}

.testcut-form__legal {
  font: 400 11px/1.5 var(--f-mono);
  color: #555C61;
}
