/* Acme GPU — the merchant's own look (examples FRD FR-EXM-010/011).
   A colocation cage under cold white light: brushed-aluminium ground, a numbered
   U-strip down the left rail, engraved laminate plates, a safety-yellow rating
   label, red embossed tape, and a push plate with a status LED.
   Nothing here is Elapse's design system on purpose: Acme GPU is a merchant. */

@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;700&family=Martian+Mono:wght@400;700&display=swap");

:root {
  --alu: #cfd3d6;
  --alu-hi: #e4e7e9;
  --alu-lo: #b7bcc0;
  --rail: #383d42;
  --rail-ink: #cdd1d4;
  --plate: #141516;
  --plate-ink: #f2f3f4;
  --plate-dim: #a9aeb3;
  --etch: #3b4046;
  --yellow: #f2c11c;
  --tape: #b3261e;
  --led-off: #3a3f44;
  --led-on: #3ddc84;
  --push: #dde0e3;
  --push-lo: #c3c8cc;
  --sans: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --rail-w: 30px;
  --u: 14px;
  /* the materials: brushed grain, matte grain, a screw head, a cage-nut hole; all inline so one stylesheet stays one file */
  --brushed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.003 0.9' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.62  0 0 0 0 0.64  0 0 0 0 0.66  0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url%28%23g%29'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.28 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url%28%23n%29'/%3E%3C/svg%3E");
  --screw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cdefs%3E%3CradialGradient id='h' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23b9bec3'/%3E%3Cstop offset='.6' stop-color='%236f757a'/%3E%3Cstop offset='1' stop-color='%233a3f44'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='8.5' cy='9' r='6.2' fill='rgba%280%2C0%2C0%2C.55%29'/%3E%3Ccircle cx='8' cy='8' r='6' fill='url%28%23h%29' stroke='%2323272a' stroke-width='.8'/%3E%3Cpath d='M8 3.6v8.8M3.6 8h8.8' stroke='%231a1d20' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M8.6 4.2v8.2M4.2 8.6h8.2' stroke='rgba%28255%2C255%2C255%2C.35%29' stroke-width='.5' stroke-linecap='round'/%3E%3C/svg%3E");
  --hole: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Crect x='11.5' y='11.8' width='7' height='7' fill='rgba%28255%2C255%2C255%2C.22%29'/%3E%3Crect x='11.5' y='11' width='7' height='7' fill='%2315171a'/%3E%3Crect x='12.3' y='11.8' width='5.4' height='1' fill='%23000' opacity='.6'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.35;
  color: var(--etch);
  /* brushed aluminium: a directional sheen over horizontal grain over the base tone */
  background:
    linear-gradient(112deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.34) 46%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(0,0,0,.04) 60%, rgba(0,0,0,.12)),
    var(--brushed),
    var(--alu);
  background-attachment: fixed, fixed, scroll, scroll;
  -webkit-font-smoothing: antialiased;
}

/* ---- the cage: rail on the left, bay on the right --------------------- */

.cage {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100dvh;
}

.rail {
  position: relative;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.07) 30%, rgba(0,0,0,.22)),
    var(--grain),
    var(--rail);
  box-shadow: 1px 0 0 rgba(255,255,255,.12), 2px 0 6px rgba(0,0,0,.25);
  overflow: hidden;
}

/* the square cage-nut holes, one per U, running the whole height */
.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hole);
  background-size: var(--rail-w) calc(var(--u) * 3);
  background-position: 50% 0;
}

.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  font: 700 8px/1 var(--mono);
  color: var(--rail-ink);
  letter-spacing: .02em;
}

.rail li {
  height: calc(var(--u) * 3);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.rail li.here {
  color: var(--yellow);
}

.bay {
  padding: 22px 18px 40px 18px;
  max-width: 560px;
  width: 100%;
}

/* ---- identity plate ---------------------------------------------------- */

.id {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 26px;
}

.id .mark {
  font: 700 22px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
}

.id .mark b {
  color: var(--tape);
}

.id .loc {
  font: 400 11px/1.25 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--etch);
  text-align: right;
}

/* ---- engraved laminate plate ------------------------------------------ */

.plate {
  position: relative;
  color: var(--plate-ink);
  /* four screw heads on a laminate face with a faint matte grain */
  background:
    var(--screw) 7px 7px / 14px 14px no-repeat,
    var(--screw) calc(100% - 7px) 7px / 14px 14px no-repeat,
    var(--screw) 7px calc(100% - 7px) / 14px 14px no-repeat,
    var(--screw) calc(100% - 7px) calc(100% - 7px) / 14px 14px no-repeat,
    var(--grain),
    linear-gradient(180deg, #1e2022, var(--plate) 40%);
  border: 1px solid #2c2f32;
  border-radius: 3px;
  padding: 22px 26px 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 -1px 0 rgba(0,0,0,.6),
    0 1px 2px rgba(0,0,0,.4),
    0 10px 18px -12px rgba(0,0,0,.6);
}

.plate h1 {
  margin: 0;
  font: 700 clamp(30px, 9vw, 40px)/1.05 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-wrap: balance;
  color: #e6e8ea;
  text-shadow: 0 -1px 0 rgba(0,0,0,.85), 0 1px 0 rgba(255,255,255,.28);
}

.plate h1.long {
  font-size: clamp(24px, 6.6vw, 30px);
  text-transform: none;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

.plate .sub {
  margin: 8px 0 0;
  font: 500 13px/1.3 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--plate-dim);
  text-shadow: 0 -1px 0 rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.14);
}

.plate .sub .id-mono {
  font: 400 11px/1.3 var(--mono);
  letter-spacing: 0;
  text-transform: none;
  color: var(--plate-ink);
}

.plate--small {
  padding: 12px 18px 11px;
  background:
    var(--screw) 6px 50% / 12px 12px no-repeat,
    var(--screw) calc(100% - 6px) 50% / 12px 12px no-repeat,
    var(--grain),
    linear-gradient(180deg, #1e2022, var(--plate) 40%);
}

/* ---- safety-yellow rating label --------------------------------------- */

.label {
  margin: 14px 0 0;
  padding: 12px 14px 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 45%, rgba(0,0,0,.06)),
    var(--yellow);
  color: #111;
  border: 1.5px solid #111;
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(0,0,0,.25), 0 4px 10px -8px rgba(0,0,0,.5);
}

.label .k {
  display: block;
  font: 700 10px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.label .v {
  display: block;
  margin: 0;
  font: 700 clamp(19px, 5.4vw, 24px)/1.15 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

/* ---- red embossed tape ------------------------------------------------- */

.tape {
  display: inline-block;
  margin: 18px 0 0 -2px;
  padding: 7px 14px 6px;
  font: 700 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(255,255,255,.5), 0 1px 1px rgba(0,0,0,.6), 0 2px 1px rgba(0,0,0,.25);
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 50%, rgba(0,0,0,.14)),
    var(--grain),
    var(--tape);
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 0 100%, 4px 50%);
  transform: rotate(-1.4deg);
  transform-origin: left center;
  box-shadow: 0 1px 1px rgba(0,0,0,.3);
}

/* ---- push plate with status LED --------------------------------------- */

.push {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 0;
  min-height: 64px;
  padding: 0 20px 0 22px;
  font: 700 22px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #0e0f10;
  text-decoration: none;
  border: 1px solid #7f858a;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%, rgba(0,0,0,.08)),
    var(--brushed),
    linear-gradient(180deg, #e9ecee, var(--push) 55%, var(--push-lo));
  /* the chamfer: light on the top and left edges, dark on the bottom and right, then the plate's lip */
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(0,0,0,.28),
    inset -1px 0 0 rgba(0,0,0,.14),
    0 2px 0 #8d9398,
    0 3px 0 #5f6569,
    0 8px 14px -6px rgba(0,0,0,.5);
  transition: transform 120ms cubic-bezier(.2,.8,.2,1), box-shadow 120ms cubic-bezier(.2,.8,.2,1);
  -webkit-tap-highlight-color: transparent;
}

.push:hover .led,
.push:focus-visible .led {
  background: var(--led-on);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 0 0 3px rgba(61,220,132,.22), 0 0 12px 2px rgba(61,220,132,.65);
}

.push:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(0,0,0,.28),
    inset -1px 0 0 rgba(0,0,0,.14),
    0 0 0 #8d9398,
    0 0 0 #5f6569,
    0 2px 6px -4px rgba(0,0,0,.45);
}

.push:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.push .hint {
  font: 400 11px/1.25 var(--mono);
  letter-spacing: .08em;
  color: var(--etch);
  text-align: right;
  margin-left: auto;
}

.led {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--led-off);
  border: 1px solid #1d2023;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.7);
  transition: background 120ms ease-out, box-shadow 120ms ease-out;
}

.led.on {
  background: var(--led-on);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 0 0 3px rgba(61,220,132,.22), 0 0 12px 2px rgba(61,220,132,.65);
}

/* an LED standing alone (success and cancel pages) */
.status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 0;
  font: 700 11px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--etch);
}

/* ---- etched notes and the back link ----------------------------------- */

.etched {
  margin: 20px 0 0;
  font: 500 14px/1.45 var(--sans);
  color: var(--etch);
  text-wrap: pretty;
  max-width: 44ch;
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 28px 0 0;
  padding: 0 4px;
  font: 700 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.back:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

footer.tag {
  margin: 40px 0 0;
  font: 400 11px/1.6 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--etch);
}

/* ---- one authored moment: plates settle, LED self-tests ---------------- */

@media (prefers-reduced-motion: no-preference) {
  .settle {
    animation: settle 360ms cubic-bezier(.2,.8,.2,1) both;
  }

  .led.post {
    animation: post 900ms steps(1, end) 300ms 1;
  }

  @keyframes settle {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
  }

  /* power-on self-test: two short blinks, then whatever the page says */
  @keyframes post {
    0%, 30%, 60% { background: var(--led-on); box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 0 12px 2px rgba(61,220,132,.65); }
    15%, 45%     { background: var(--led-off); box-shadow: inset 0 1px 2px rgba(0,0,0,.7); }
  }
}

/* ---- wider than a phone ------------------------------------------------ */

@media (min-width: 640px) {
  :root { --rail-w: 56px; --u: 16px; }
  .rail ol { font-size: 10px; }
  .bay { padding: 40px 40px 56px 44px; max-width: 640px; }
  .id .mark { font-size: 26px; }
  .id .loc, .push .hint, footer.tag { font-size: 12px; }
  .plate { padding: 28px 32px 26px; }
  .plate h1 { font-size: 46px; }
  .label { padding: 14px 18px 13px; }
  .push { min-height: 72px; font-size: 24px; }
  .etched { font-size: 15px; }
}

/* a rack has two posts: on wide screens the bay sits between them */
.rail--right { display: none; }

@media (min-width: 1024px) {
  .cage { grid-template-columns: var(--rail-w) 1fr var(--rail-w); }
  .rail--right { display: block; }
  .rail--right li { transform: none; } /* reads top-down on the far post, like the printed strip */
  .bay { margin: 0 auto; }
  .plate h1.long { font-size: 34px; }
}

/*
 * The Elapse island (FR-EXM-032). @elapse/react ships its own stylesheet; a merchant re-dresses it
 * with variables, so here it becomes another engraved plate in the cage: black laminate, the rating
 * label's yellow for the live amount, Martian Mono on the numerals.
 */
.push-mount .elapse {
  --elapse-bg: var(--plate);
  --elapse-surface: var(--plate);
  --elapse-fg: var(--plate-ink);
  --elapse-muted: var(--plate-dim);
  --elapse-accent: var(--yellow);
  --elapse-accent-soft: rgba(242, 193, 28, 0.14);
  --elapse-border: rgba(255, 255, 255, 0.14);
  --elapse-radius: 2px;
  --elapse-font: var(--sans);
  --elapse-font-mono: var(--mono);
}

.push-mount .elapse-card {
  max-width: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 rgba(0, 0, 0, 0.35);
}

.push-mount .elapse-title,
.push-mount .elapse-preset-cap,
.push-mount .elapse-primary,
.push-mount .elapse-outline {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
