/* ============================================================
   COLORS — change these to restyle the whole site
   ============================================================ */
:root {
  --bg: #07090d;          /* data-center floor */
  --aisle: #0f1a2b;       /* cool-aisle glow */
  --steel: #161b22;       /* rack frame */
  --steel-2: #1f252e;
  --face: #252c36;        /* server front panels */
  --face-2: #1b2028;
  --line: #313a46;
  --text: #e3e8ef;
  --muted: #8d98a8;
  --dim: #566170;
  --green: #39e07a;       /* power / OK lights */
  --amber: #ffb22e;       /* activity / deploying lights */
  --blue: #4ea8ff;        /* accent */
  --lcd-bg: #0b1a10;
  --lcd: #7dffa8;

  --rail: 30px;
  --ear: 18px;
}

/* ============================================================
   BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--blue); color: #04121f; padding: 8px 14px; border-radius: 6px; font-weight: 600;
}
.skip:focus { top: 16px; }
.no-intro .skip, .seen .skip { display: none; }

/* Data-center aisle: cool light from above, perforated floor below */
.aisle {
  min-height: 100vh;
  padding: 56px 16px 40px;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(78,168,255,.22), transparent 70%),
    linear-gradient(180deg, var(--aisle) 0%, var(--bg) 55%);
}

/* ============================================================
   RACK FRAME
   ============================================================ */
.rack {
  max-width: 920px;
  margin: 0 auto;
  background: var(--steel);
  border: 1px solid #2a313b;
  border-radius: 10px;
  box-shadow: 0 40px 80px rgba(0,0,0,.6), 0 0 0 6px #0c1015, 0 0 120px rgba(78,168,255,.08);
}

.rack-top {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid #2a313b;
  background: linear-gradient(180deg, #1d232c, var(--steel));
  border-radius: 10px 10px 0 0;
}
.photo {
  flex-shrink: 0;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(145deg, #2c3a4d, #1a2433) center / cover no-repeat;
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #6f8bb0; letter-spacing: 1px;
}
.photo.has-photo span { display: none; }
.rack-id { flex: 1; min-width: 0; }
.tag { font-size: 11px; letter-spacing: 2px; color: var(--muted); }
.rack-top h1 { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.5px; }
.title { color: var(--muted); font-size: 15px; }
.rack-status { font-size: 11px; letter-spacing: 1.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.rack-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); transition: background .4s, box-shadow .4s; }
.rack-live .rack-status .dot, html:not(.js) .rack-status .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }

.rack-body {
  position: relative;
  padding: 18px var(--rail);
  perspective: 2600px;
  perspective-origin: 0 380px;
}

/* Mounting rails with square cage-nut holes */
.rail {
  position: absolute; top: 0; bottom: 0; width: var(--rail);
  background:
    linear-gradient(180deg, #07090d 0 7px, transparent 7px) 10px 4px / 10px 15px repeat-y,
    linear-gradient(90deg, #1a2028, #262d37 50%, #1a2028);
}
.rail-left { left: 0; }
.rail-right { right: 0; }

.units {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  overflow: hidden;              /* hides units until they slide in */
  padding: 2px 0;
}

/* ============================================================
   GENERIC UNIT (ears + front panel)
   ============================================================ */
.unit {
  display: grid;
  grid-template-columns: var(--ear) 1fr var(--ear);
  position: relative;
}
.ear {
  background: linear-gradient(180deg, #2b333e, #20262f);
  border: 1px solid #39424f;
  position: relative;
}
.ear:first-child { border-radius: 3px 0 0 3px; border-right: 0; }
.ear:nth-child(3) { border-radius: 0 3px 3px 0; border-left: 0; }
.ear::before, .ear::after {      /* thumbscrews */
  content: ""; position: absolute; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8a96a6, #4a5462);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
  transition: transform .35s ease;
}
.ear::before { top: 8px; }
.ear::after { bottom: 8px; }
.locked .ear::before, .locked .ear::after { transform: rotate(180deg); }

.face {
  background: linear-gradient(180deg, var(--face), var(--face-2));
  border-top: 1px solid #3a4452;
  border-bottom: 1px solid #12161c;
  min-width: 0;
  padding: 14px 18px;
}

.unit-label { font-size: 11px; letter-spacing: 2px; color: var(--muted); display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.unit-label span { color: var(--text); font-weight: 700; }
.unit-label em { margin-left: auto; font-style: normal; color: var(--dim); }

/* Status lights */
.led {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #2b323c; box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
  transition: background .25s, box-shadow .25s;
}
.powered .led.pwr { background: var(--green); box-shadow: 0 0 6px var(--green); }
.powered .led.act { animation: blink var(--speed, 1.2s) steps(2, jump-none) var(--delay, 0s) infinite; }
.powered .led.warn { background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: pulse 1.4s ease-in-out infinite; }
@keyframes blink {
  0%   { background: #2b323c; box-shadow: none; }
  100% { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
}
@keyframes pulse { 50% { opacity: .35; } }

/* Vent / blanking panel */
.blank .face {
  height: 30px; padding: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,.45) 6px 10px) center / 70% 10px no-repeat,
    linear-gradient(180deg, #20262f, #191e25);
}

/* ============================================================
   SWITCH
   ============================================================ */
.switch .face { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.switch .unit-label { flex-direction: column; gap: 2px; margin: 0; }
.ports { display: flex; gap: 12px; }
.port { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); text-decoration: none; padding: 4px 6px; border-radius: 6px; transition: background .2s; }
.port:hover { text-decoration: none; background: rgba(78,168,255,.1); }
.port .leds { display: flex; gap: 14px; }
.port .led { width: 6px; height: 6px; }
.jack {
  width: 38px; height: 30px; position: relative;
  background: #0b0e12; border: 2px solid #4a5462; border-radius: 3px;
  transition: border-color .2s, box-shadow .2s;
}
.jack::before { content: ""; position: absolute; left: 10px; right: 10px; bottom: -2px; height: 8px; background: var(--face-2); border: 2px solid #4a5462; border-bottom: 0; border-radius: 2px 2px 0 0; }
.jack::after { content: ""; position: absolute; left: 6px; right: 6px; top: 4px; height: 3px; background: repeating-linear-gradient(90deg, #b08d3c 0 2px, transparent 2px 4px); }
.port:hover .jack { border-color: var(--blue); box-shadow: 0 0 12px rgba(78,168,255,.45); }
.port-name { font-size: 11px; font-weight: 500; letter-spacing: .5px; }
.spare-ports { display: grid; grid-template-columns: repeat(6, 18px); gap: 6px; margin-left: auto; }
.spare-ports i { height: 14px; background: #0b0e12; border: 1px solid #3c4552; border-radius: 2px; }

/* ============================================================
   KVM CONSOLE (about)
   ============================================================ */
.screen {
  background: #05080b;
  border: 1px solid #0f141a;
  box-shadow: inset 0 0 40px rgba(57,224,122,.05);
  border-radius: 6px;
  padding: 18px 20px;
  font-size: 14px; line-height: 1.7;
  color: #c9f5d9;
}
.screen p + p { margin-top: 6px; }
.screen .cmd { color: #7c8a98; margin-top: 14px; }
.screen .cmd:first-child { margin-top: 0; }
.screen .prompt { color: var(--green); }
.screen b { color: #fff; font-weight: 700; }
.cursor { display: inline-block; width: 9px; height: 16px; background: var(--green); vertical-align: -3px; animation: pulse 1s steps(2, jump-none) infinite; }

/* ============================================================
   SERVERS (jobs)
   ============================================================ */
.server .face { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; min-height: 104px; }
.bays { display: grid; grid-template-columns: repeat(2, 34px); gap: 5px; }
.bays i { height: 30px; background: linear-gradient(180deg, #313a46, #262d37); border: 1px solid #12161c; border-radius: 2px; position: relative; }
.bays i::after { content: ""; position: absolute; right: 4px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: #2b323c; }
.powered .bays i::after { background: var(--green); box-shadow: 0 0 4px var(--green); }
.host { font-size: 11px; letter-spacing: 1.5px; color: var(--muted); }
.host .current { color: var(--green); }
.server h3 { font-size: 20px; font-weight: 600; line-height: 1.25; margin: 2px 0; }
.meta { color: var(--muted); font-size: 14px; }
.server-ctrl { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.server-ctrl .leds { display: flex; gap: 7px; }
.pull {
  font-size: 12px; letter-spacing: 1px;
  padding: 7px 12px; border-radius: 5px;
  border: 1px solid var(--line); background: #1a1f27;
  transition: border-color .2s, background .2s;
}
.pull::after { content: " \25B8"; display: inline-block; transition: transform .25s; }
.pull:hover { border-color: var(--blue); background: #1b2533; }
.pull[aria-expanded="true"]::after { transform: rotate(90deg); }

/* Pulled-out server: details slide out under the faceplate */
.details {
  grid-column: 1 / -1;
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s ease;
  margin: 0 var(--ear);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 2px, transparent 2px 40px), #12161c;
}
.details-inner { overflow: hidden; min-height: 0; }
.details-body { padding: 18px 22px 20px; border: 1px solid #232a33; border-top: 0; }
.server.open .details { grid-template-rows: 1fr; }
.specs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.specs span { border: 1px solid #2f4a68; color: #a9d2ff; background: rgba(78,168,255,.08); border-radius: 4px; padding: 3px 9px; }
.details ul { padding: 8px 0 0 18px; color: #c5ccd6; font-size: 15px; }
.details li { margin-top: 6px; }

/* ============================================================
   EDUCATION
   ============================================================ */
.edu-rows { display: grid; gap: 14px; }
.edu-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 20px; align-items: center; }
.edu-row h3 { font-size: 17px; font-weight: 600; line-height: 1.3; }
.progress { height: 8px; background: #11151b; border: 1px solid #2d3540; border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width 1.4s ease .3s; }
.powered .progress.done span { width: 100%; }
.powered .deploying .progress span {
  width: 100%;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, #c98410 10px 20px);
  background-size: 28px 28px;
  animation: stripes .9s linear infinite;
}
@keyframes stripes { to { background-position: 28px 0; } }
.state { font-size: 11px; letter-spacing: 1.2px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ============================================================
   STORAGE ARRAY (certifications)
   ============================================================ */
.drives { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.drives li {
  position: relative;
  background: linear-gradient(180deg, #2f3742, #232a33);
  border: 1px solid #12161c; border-radius: 3px;
  padding: 22px 10px 10px;
  min-height: 112px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
}
.drives li::before {             /* drive-carrier latch */
  content: ""; position: absolute; left: 10px; right: 22px; top: 8px; height: 5px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, #1a1f26 0 3px, #3a4350 3px 5px);
}
.drives .led { position: absolute; right: 8px; top: 7px; }
.drives b { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.drives span { font-size: 10px; color: var(--muted); letter-spacing: .4px; }
.drives .empty { background: #14181e; border-style: dashed; border-color: #2d3540; }
.drives .empty b, .drives .empty span { color: var(--dim); }

/* ============================================================
   PATCH PANEL (skills)
   ============================================================ */
.patch-ports { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.patch-ports li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 4px;
  background: #11151b; border: 1px solid #2d3540;
}
.patch-ports li::before {        /* little patch cable in the port */
  content: ""; width: 14px; height: 12px; border-radius: 2px;
  background: var(--c); box-shadow: 0 0 0 2px #0b0e12;
}

/* ============================================================
   UPS
   ============================================================ */
.ups .face { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; min-height: 128px; }
.ups .unit-label { flex-direction: column; gap: 2px; margin: 0; }
.lcd {
  background: var(--lcd-bg);
  border: 2px solid #0a0f0b;
  box-shadow: inset 0 0 22px rgba(125,255,168,.08), 0 0 0 1px #3a4452;
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--lcd);
  text-shadow: 0 0 6px rgba(125,255,168,.45);
  min-width: 0;
}
.lcd-head { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 2px; opacity: .65; margin-bottom: 6px; }
.lcd-lines { list-style: none; position: relative; height: 26px; font-size: 16px; letter-spacing: 1px; }
.lcd-lines li { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; }
.lcd-lines li.on { opacity: 1; animation: lcd-type .9s steps(28, end); }
@keyframes lcd-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
html:not(.js) .lcd-lines { height: auto; }
html:not(.js) .lcd-lines li { position: static; opacity: 1; }

.ups-side { display: grid; gap: 10px; }
.meter { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 1.5px; color: var(--muted); }
.meter span { width: 62px; }
.bars { display: flex; gap: 3px; }
.bars i { width: 12px; height: 10px; background: #2b323c; border-radius: 1px; transition: background .3s; }
.powered .bars i { background: var(--green); }
.powered .bars.load i:nth-child(n+4) { background: #2b323c; }
.ups-leds { display: flex; gap: 14px; font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.ups-leds span { display: flex; align-items: center; gap: 6px; }

/* ============================================================
   RACK BASE + FOOTER
   ============================================================ */
.rack-base { height: 18px; background: linear-gradient(180deg, #11151a, #0a0d11); border-top: 1px solid #2a313b; border-radius: 0 0 10px 10px; position: relative; }
.rack-base i { position: absolute; bottom: -10px; width: 40px; height: 10px; background: #0a0d11; border-radius: 0 0 6px 6px; }
.rack-base i:first-child { left: 40px; }
.rack-base i:last-child { right: 40px; }

.footer { max-width: 920px; margin: 48px auto 0; text-align: center; color: var(--muted); font-size: 14px; }
.footer .fine { margin-top: 8px; font-size: 11px; letter-spacing: 1px; color: var(--dim); }

/* ============================================================
   RACK DOOR
   ============================================================ */
.door { display: none; }

.js:not(.no-intro) .door {
  display: flex; flex-direction: column; align-items: center;
  position: absolute; inset: 0; z-index: 5;
  padding: 70px 40px 40px;
  border-radius: 0 0 6px 6px;
  background:
    radial-gradient(circle, rgba(0,0,0,.7) 1.3px, transparent 1.8px) 0 0 / 9px 9px,
    linear-gradient(180deg, #2a323d, #1c222a);
  border: 6px solid #2f3742;
  box-shadow: inset 0 0 60px rgba(0,0,0,.6);
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(.65,0,.3,1), opacity .5s ease .85s;
}
.door-opening .door { transform: rotateY(-104deg); opacity: 0; pointer-events: none; }
.door-gone .door, .seen .door { display: none !important; }

.door-plate {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: 3px; color: #9aa6b6;
  background: #161b22; border: 1px solid #3a4452; padding: 3px 12px; border-radius: 3px;
}
.door-panel {
  display: flex; align-items: center; gap: 28px;
  background: rgba(10,13,17,.85); border: 1px solid #39424f; border-radius: 12px;
  padding: 28px; position: sticky; top: 40px;
}
.badge {
  width: 200px; padding: 26px 18px 18px; border-radius: 12px;
  background: linear-gradient(180deg, #f4f6f9, #dfe4ea);
  color: #18202b; text-align: center; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 14px 30px rgba(0,0,0,.5);
  transition: transform .6s cubic-bezier(.5,0,.2,1);
  animation: sway 3s ease-in-out infinite;
}
.badge:hover { animation-play-state: paused; }
.badge-clip { position: absolute; top: 8px; width: 34px; height: 6px; border-radius: 3px; background: #9aa6b6; }
.badge .photo { width: 84px; height: 84px; margin-bottom: 8px; border-color: #c4ccd6; color: #8ea3bf; background-color: #2c3a4d; }
.badge-name { font-weight: 700; font-size: 17px; }
.badge-role { font-size: 12px; color: #4b5666; }
.badge-access { margin-top: 10px; font-size: 10px; letter-spacing: 1.5px; background: #18202b; color: var(--green); padding: 3px 8px; border-radius: 3px; }
@keyframes sway { 50% { transform: rotate(-1.5deg) translateY(2px); } }
.badging .badge { animation: none; transform: translateX(118px) scale(.92); }

.reader {
  width: 86px; height: 128px; border-radius: 10px;
  background: linear-gradient(180deg, #2a313b, #161b22);
  border: 1px solid #47515f;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.reader-led { width: 12px; height: 12px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; transition: background .2s, box-shadow .2s; }
.reader-text { font-size: 9px; letter-spacing: 1.5px; color: #9aa6b6; text-align: center; }
.granted .reader-led { background: var(--green); box-shadow: 0 0 14px var(--green); }
.door-hint { margin-top: 20px; font-size: 12px; letter-spacing: 1.5px; color: #9aa6b6; }
.handle {
  position: absolute; right: 18px; top: 60px; width: 14px; height: 150px; border-radius: 7px;
  background: linear-gradient(90deg, #5b6574, #a5afbd 50%, #5b6574);
  box-shadow: 0 6px 14px rgba(0,0,0,.5);
}

/* ============================================================
   UNIT INSTALL ANIMATION (servers slide in and lock)
   ============================================================ */
.js:not(.no-intro) .unit { transform: translateX(108%); opacity: 0; }
.js:not(.no-intro) .unit.installed { animation: install .9s cubic-bezier(.25,.8,.3,1) forwards; }
/* Lock: a quick flash across the faceplate and ears as the unit seats */
.js:not(.no-intro) .unit.locked .face,
.js:not(.no-intro) .unit.locked .ear { animation: lock-flash .6s ease-out; }
@keyframes lock-flash {
  0%   { box-shadow: inset 0 0 0 1px rgba(78,168,255,.9), 0 0 18px rgba(78,168,255,.45); }
  100% { box-shadow: inset 0 0 0 1px rgba(78,168,255,0), 0 0 0 rgba(78,168,255,0); }
}
@keyframes install {
  0%   { transform: translateX(108%); opacity: 1; }
  78%  { transform: translateX(-5px); opacity: 1; }
  90%  { transform: translateX(2px); }
  100% { transform: translateX(0); opacity: 1; }
}
.no-intro .unit { transform: none; opacity: 1; }

/* KVM text appears line by line once powered */
.js:not(.no-intro) .kvm .screen > p { opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; transition-delay: calc(var(--i, 0) * 220ms); }
.js:not(.no-intro) .kvm.powered .screen > p { opacity: 1; transform: none; }

/* Reduced motion: no blinking, no sliding */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .lcd-lines li.on { clip-path: none; }
}

/* ============================================================
   TABLET & PHONE
   ============================================================ */
@media (max-width: 760px) {
  :root { --rail: 14px; --ear: 10px; }
  .aisle { padding: 24px 10px 32px; }
  .rack-top { flex-wrap: wrap; padding: 18px 16px; gap: 14px; }
  .rack-top h1 { font-size: 24px; }
  .title { font-size: 14px; }
  .rack-status { width: 100%; }
  .ear::before, .ear::after { width: 6px; height: 6px; margin-left: -3px; }
  .face { padding: 12px; }
  .spare-ports, .bays { display: none; }
  .switch .face { gap: 10px; }
  .ports { flex-wrap: wrap; gap: 4px; }
  .jack { width: 32px; height: 26px; }
  .screen { padding: 14px; font-size: 13px; }
  .server .face { grid-template-columns: 1fr auto; gap: 12px; min-height: 0; }
  .server h3 { font-size: 17px; }
  .meta { font-size: 13px; }
  .details-body { padding: 14px; }
  .details ul { font-size: 14px; }
  .rail { background-position: 3px 4px, 0 0; background-size: 8px 15px, auto; }
  .edu-row { grid-template-columns: 1fr; gap: 8px; }
  .drives { grid-template-columns: repeat(2, 1fr); }
  .drives li { min-height: 92px; }
  .ups .face { grid-template-columns: 1fr; gap: 14px; }
  .ups .unit-label { flex-direction: row; gap: 10px; }
  .lcd-lines { font-size: 13px; height: 42px; }
  .lcd-lines li { white-space: normal; }
  .js:not(.no-intro) .door { padding: 56px 12px 24px; border-width: 4px; }
  .door-panel { flex-direction: column; padding: 20px; gap: 18px; }
  .badging .badge { transform: translateY(110px) scale(.9); }
  .reader { width: 140px; height: 64px; flex-direction: row; }
  .handle { right: 8px; width: 10px; height: 110px; }
}

/* ============================================================
   COMPACT CONSOLE (from version A): label beside a short screen
   ============================================================ */
.kvm .face { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.kvm .unit-label { flex-direction: column; gap: 2px; margin: 0; }
.kvm .screen { padding: 12px 16px; font-size: 13px; line-height: 1.6; }
.kvm .screen p + p { margin-top: 4px; }
.kvm .screen .values { color: #9fb3a6; }
.kvm .screen .values b { color: var(--green); font-weight: 500; }
.rack-top { padding-top: 18px; padding-bottom: 18px; }
.aisle { padding-top: 40px; }
@media (max-width: 760px) {
  .kvm .face { grid-template-columns: 1fr; gap: 10px; }
  .kvm .unit-label { flex-direction: row; gap: 10px; }
}

/* ============================================================
   AI CLUSTER (from version C): 3 Mac Studios on a rack shelf
   ============================================================ */
.cluster-body { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: center; }
.shelf { position: relative; height: 190px; border-bottom: 6px solid #12161c; box-shadow: 0 6px 0 -3px #2f3742; }
.cables { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cable { fill: none; stroke: #0d1014; stroke-width: 3.5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.pulse { fill: none; stroke: var(--blue); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round;
  stroke-dasharray: 0 100; opacity: 0; filter: drop-shadow(0 0 3px var(--blue)); }
.powered .pulse { opacity: 1; stroke-dasharray: 7 93; animation: flow 1.6s linear infinite; }
.powered .pulse.p2 { animation-delay: -.55s; }
.powered .pulse.p3 { animation-duration: 2.3s; animation-delay: -1.1s; }
@keyframes flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.macs { position: absolute; left: 0; right: 0; top: 46%; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.mac-slot { display: flex; justify-content: center; align-items: flex-end; }
.mac {
  position: relative; width: 82%; max-width: 200px; height: 100%;
  border-radius: 16px 16px 12px 12px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #f1f3f5 0%, #d6dadf 50%, #b9bec5 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(0,0,0,.18), 0 8px 14px rgba(0,0,0,.45);
}
.mac::before {                    /* top-edge highlight, like the curved aluminum lip */
  content: ""; position: absolute; left: 6%; right: 6%; top: 0; height: 6px; border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.9), transparent);
}
.mac-node { position: absolute; left: 12px; top: 12px; font-size: 10px; letter-spacing: 1px; color: #7a828d; }
.mac-ports { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 6px; align-items: center; }
.mac-ports i { width: 5px; height: 12px; border-radius: 3px; background: #1d2228; box-shadow: inset 0 0 0 1px #000; }
.mac-ports b { width: 22px; height: 4px; border-radius: 2px; background: #1d2228; margin-left: 4px; }
.mac-led { position: absolute; right: 14px; bottom: 15px; width: 5px; height: 5px; border-radius: 50%; background: #9aa1aa; transition: background .4s, box-shadow .4s; }
.powered .mac-led { background: #fff; box-shadow: 0 0 6px #fff, 0 0 10px var(--blue); }
.powered .mac-slot:nth-child(2) .mac-led { transition-delay: .2s; }
.powered .mac-slot:nth-child(3) .mac-led { transition-delay: .4s; }

.cluster-screen {
  background: #05080b; border: 1px solid #0f141a; border-radius: 6px;
  padding: 14px 16px; font-size: 12px; line-height: 1.75; color: #c9f5d9;
}
.cluster-screen .cmd { color: #7c8a98; margin-bottom: 4px; }
.cluster-screen .prompt { color: var(--green); }
.cluster-screen p:not(.cmd) { display: grid; grid-template-columns: 84px 1fr; gap: 8px; }
.cluster-screen p:not(.cmd) span { color: #6f8a7a; }

@media (max-width: 760px) {
  .cluster-body { grid-template-columns: 1fr; gap: 14px; }
  .shelf { height: 130px; }
  .mac { width: 88%; border-radius: 10px 10px 8px 8px; }
  .mac-node { left: 8px; top: 8px; font-size: 9px; }
  .mac-ports { left: 8px; bottom: 9px; gap: 4px; }
  .mac-ports b { width: 14px; }
  .mac-led { right: 9px; bottom: 10px; }
  .cluster-screen p:not(.cmd) { grid-template-columns: 80px 1fr; }
}

/* ============================================================
   CLOUD INTRO — sky, drifting clouds, dive into the center cloud
   ============================================================ */
.sky { display: none; }
.js:not(.no-intro):not(.seen) .sky {
  display: block; position: fixed; inset: 0; z-index: 100; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, #050f24 0%, #0d2a55 28%, #1f4f8e 55%, #4f84c2 78%, #8fb6de 100%);
  transition: opacity .9s ease;
}
.js:not(.no-intro):not(.seen):not(.sky-gone) { overflow: hidden; }   /* no scrolling during the dive */
.sky-done .sky { opacity: 0; pointer-events: none; }
.sky-gone .sky { display: none !important; }

/* Sunrise: warm light builds at the horizon while the sun climbs behind the clouds */
.dawn {
  position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(180deg, rgba(6,20,43,0) 0%, rgba(70,60,120,.18) 30%, rgba(160,100,140,.35) 52%, rgba(240,140,100,.6) 74%, rgba(255,190,120,.85) 90%, rgba(255,222,160,.95) 100%);
  animation: dawn 4.5s ease-out .2s forwards;
}
.sun {
  position: absolute; left: 74%; bottom: -70px; width: 240px; aspect-ratio: 1; margin-left: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf2 0, #fff1b8 30%, #ffc45e 46%, rgba(255,150,60,.55) 56%, rgba(255,140,60,0) 71%);
  transform: translateY(240px);
  animation: sunrise 4.5s cubic-bezier(.25,.6,.3,1) .2s forwards;
}
.sun::before {                      /* the wide glow around the sun */
  content: ""; position: absolute; inset: -160%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,190,110,.55) 0, rgba(255,150,90,.22) 35%, transparent 65%);
}
/* atmospheric haze near the horizon + a fine painted grain over everything */
.haze {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 40% at 64% 100%, rgba(255,220,180,.35), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .55; mix-blend-mode: soft-light;
}
.sky-go .haze { opacity: 0; transition: opacity .8s ease-in; }
@keyframes sunrise { to { transform: translateY(-150px); } }
@keyframes dawn    { to { opacity: 1; } }

/* Background clouds: soft overlapping ellipses */
.sky-layer { position: absolute; inset: 0; transform-origin: 50% 50%; }
.sky-layer.far  { opacity: .45; }
.sky-layer.near { opacity: .8; }
.cloud {
  position: absolute; left: var(--x); top: var(--y); width: min(var(--w), 70vw); aspect-ratio: 9 / 4;
  background: var(--img) center / contain no-repeat;
  animation: drift calc(var(--d) / 2) ease-in-out infinite alternate;
}
.sky-layer.far .cloud { filter: blur(1.5px); }   /* distance softens the far layer */
@keyframes drift { from { transform: translateX(-50px); } to { transform: translateX(50px); } }

/* The center cloud the camera flies into */
.core-wrap {
  position: absolute; inset: 0; display: grid; place-items: center;
  transform-origin: 50% 52%;
}
.cloud-core {
  position: relative; width: min(600px, 86vw); aspect-ratio: 2 / 1;
  animation: bob 6s ease-in-out infinite alternate;
}
.cloud-core::before {               /* glow that makes it the brightest thing in the sky */
  content: ""; position: absolute; inset: -30% -20%;
  background: radial-gradient(ellipse at 50% 55%, rgba(190,222,255,.45), transparent 65%);
}
.cloud-core img { position: absolute; left: -15%; top: -24%; width: 130%; height: auto; display: block; }
@keyframes bob { from { transform: translateY(-6px); } to { transform: translateY(6px); } }

.sky-caption {
  position: absolute; left: 50%; top: calc(50% + 175px); transform: translateX(-50%);
  white-space: nowrap; font-size: 13px; letter-spacing: .5px; color: rgba(255,255,255,.9);
  text-shadow: 0 1px 6px rgba(10,20,40,.55);
  transition: opacity .4s ease;
}
.sky-caption .prompt { color: #9fd0ff; }
.sky-status { color: #ffe3a3; }
.sky-status.ok { color: var(--lcd); }

.fog {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #f7fbff 0%, #e2edf9 70%, #cfe0f3 100%);
}

/* The dive */
.sky-go .core-wrap   { transform: scale(12); transition: transform 2.3s cubic-bezier(.6,0,.85,.4); }
.sky-go .sky-layer.near { transform: scale(2.8); opacity: 0; transition: transform 1.7s ease-in, opacity 1.5s ease-in .2s; }
.sky-go .sky-layer.far  { transform: scale(1.8); opacity: 0; transition: transform 1.9s ease-in, opacity 1.6s ease-in .2s; }
.sky-go .sky-caption { opacity: 0; }
.sky-go .sun { opacity: 0; transition: opacity 1.4s ease-in .3s; }
.sky-go .fog { opacity: 1; transition: opacity .9s ease-in 1.3s; }

/* Coming out of the cloud: the rack settles into view */
.sky-done .rack { animation: land 1.3s cubic-bezier(.2,.7,.2,1); }
@keyframes land {
  from { transform: scale(1.12) translateY(24px); opacity: .15; }
  to   { transform: none; opacity: 1; }
}

@media (max-width: 720px) {
  .sky-caption { top: calc(50% + 115px); font-size: 11px; }
  .sun { left: 76%; width: 170px; margin-left: -85px; }
}
.skip { z-index: 110; }   /* keep the keyboard "Skip intro" link above the sky */

/* ============================================================
   RACK LABEL REVEAL — photo and text appear once the door opens
   ============================================================ */
.js:not(.no-intro):not(.seen) .rack-top > .photo,
.js:not(.no-intro):not(.seen) .rack-id > *,
.js:not(.no-intro):not(.seen) .rack-status {
  opacity: 0; transform: translateY(10px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.js:not(.no-intro):not(.seen) .rack-top > .photo { transform: scale(.6); }
.door-opening .rack-top > .photo,
.door-opening .rack-id > *,
.door-opening .rack-status { opacity: 1 !important; transform: none !important; }
.door-opening .rack-top > .photo     { transition-delay: .45s; }
.door-opening .rack-id > .tag        { transition-delay: .65s; }
.door-opening .rack-id > h1          { transition-delay: .8s; }
.door-opening .rack-id > .title      { transition-delay: .95s; }
.door-opening .rack-status           { transition-delay: 1.2s; }
