/* Pentimento · Turn 233 · The Vending Machine
   The site as a station vending machine whose whole stock is this
   project's own archive: twelve packets dyed the measured average
   colour of a hung photograph. Anton for the illuminated sign,
   Space Mono for everything the machine records. Night slate, panel
   steel, signal orange enamel, burnt orange, sign cream, bone, soot,
   chrome, lamp amber. */

@layer reset { * { margin: 0; padding: 0; box-sizing: border-box; } }

@font-face {
  font-family: 'Anton';
  src: url('fonts/anton-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/spacemono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/spacemono-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --night: #0E1114;        /* the room, the glass */
  --steel: #1B1E22;        /* the control panel */
  --enamel: #D4552E;       /* the body */
  --burnt: #A63A18;        /* small type on paper */
  --sign: #FFF1D3;         /* the lightbox ground */
  --bone: #EFE6D2;         /* the paper sections */
  --soot: #17140E;         /* type on pale ground */
  --chrome: #C3C8CD;       /* trim, coils, rules */
  --amber: #F5B93F;        /* anything lit */

  /* frame theme — plates are sign cream on a bone page */
  --pm-paper: #FFF1D3;
  --pm-ink: #17140E;
  --pm-muted: rgba(23, 20, 14, 0.66);
  --pm-line: rgba(23, 20, 14, 0.22);
  --pm-accent: #A63A18;
  --pm-accent-2: #A63A18;
  --pm-stage: #0E1114;
  --pm-stage-ink: #EFE6D2;
  --pm-font-display: 'Anton', 'Arial Narrow', sans-serif;
  --pm-font-text: 'Space Mono', ui-monospace, monospace;
  --pm-gutter: 20px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--night);
  color: var(--soot);
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============ HERO: THE MACHINE IN A DARK ROOM ============ */
.hero {
  position: relative;
  height: 900px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
}
#wall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 78% 62% at 50% 38%, transparent 30%, rgba(0, 0, 0, 0.62) 100%);
}

.mast {
  position: absolute;
  z-index: 4;
  top: 74px;
  left: 56px;
  right: 56px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.mast__id { display: flex; flex-direction: column; gap: 5px; }
.mast__name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--bone);
}
.mast__tag {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(195, 200, 205, 0.62);
}
.mast__vitals {
  --pm-paper: #1B1E22;
  --pm-ink: #EFE6D2;
  --pm-muted: rgba(239, 230, 210, 0.72);
  --pm-line: rgba(239, 230, 210, 0.3);
  --pm-accent: #F5B93F;
  --pm-accent-2: #F5B93F;
}
.pm-vitals { font-family: 'Space Mono', ui-monospace, monospace; }

/* wall lettering in the margins */
.edge {
  position: absolute;
  z-index: 3;
  top: 216px;
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(195, 200, 205, 0.78);
}
.edge--l { left: 52px; transform: rotate(180deg); }
.edge--r { right: 56px; }

/* ---- the machine ---- */
.machine {
  position: absolute;
  z-index: 2;
  top: 132px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1060px, calc(100% - 120px));
  border-radius: 12px 12px 8px 8px;
  background: var(--enamel);
  box-shadow:
    0 34px 70px rgba(0, 0, 0, 0.6),
    0 4px 0 rgba(0, 0, 0, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    inset 0 -3px 0 rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 30px;
  margin: 10px 14px 0;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--soot);
}
.brand__logo {
  font-family: 'Anton', 'Arial Narrow', sans-serif;
  font-size: 16px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--amber);
}
.brand__model {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(195, 200, 205, 0.78);
}

/* ---- the illuminated sign: the question ---- */
.lightbox {
  position: relative;
  margin: 10px 14px 0;
  padding: 26px 30px 28px;
  border-radius: 5px;
  background: var(--sign);
  box-shadow:
    0 0 70px rgba(255, 241, 211, 0.3),
    inset 0 0 46px rgba(245, 185, 63, 0.22),
    inset 0 0 0 2px rgba(23, 20, 14, 0.85);
}
.q {
  font-family: 'Anton', 'Arial Narrow', sans-serif;
  font-weight: 400;
  color: var(--soot);
  font-size: 82px;
  line-height: 0.99;
  letter-spacing: 0.002em;
}
.q__ln { display: block; width: max-content; max-width: 100%; white-space: nowrap; }
.q__ln:last-child { color: var(--enamel); }
.qhot { color: var(--enamel); }

/* ---- glass + control panel ---- */
.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 12px;
  margin: 10px 14px 0;
}
.glass {
  position: relative;
  padding: 9px 12px 12px;
  border-radius: 4px;
  background: var(--night);
  box-shadow:
    inset 0 0 0 1px rgba(195, 200, 205, 0.4),
    inset 0 14px 26px rgba(0, 0, 0, 0.75);
}
.codes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 0 2px 7px;
}
.codes span {
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(195, 200, 205, 0.72);
}
.rows { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.row {
  position: relative;
  flex: 1 1 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  /* the coil's spine, running behind every packet */
  background: linear-gradient(to bottom,
    transparent calc(50% - 1.2px),
    rgba(195, 200, 205, 0.42) calc(50% - 1.2px),
    rgba(195, 200, 205, 0.42) calc(50% + 1.2px),
    transparent calc(50% + 1.2px));
}

/* a packet of stock: a colour from the archive */
.prod {
  position: relative;
  align-self: center;
  width: 100%;
  aspect-ratio: 5 / 6;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9px 8px 0;
  border: 0;
  border-radius: 3px;
  background: var(--ink, #52544F);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.5s cubic-bezier(0.2, 0.75, 0.3, 1.05), box-shadow 0.2s ease;
}
.prod:hover { transform: translateY(-4px); box-shadow: 0 8px 14px rgba(0, 0, 0, 0.5); }
.prod:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.prod.is-out { z-index: 6; box-shadow: 0 22px 34px rgba(0, 0, 0, 0.65); }
.prod.is-active { box-shadow: 0 0 0 2px var(--amber), 0 8px 14px rgba(0, 0, 0, 0.5); }

.prod__no {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  padding: 1px 7px 2px;
  background: var(--sign);
  color: var(--soot);
  box-shadow: 0 0 0 1px var(--soot);
}
.prod__band {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 -8px;
  padding: 5px 7px 6px;
  background: var(--sign);
  border-top: 1.5px solid var(--soot);
}
.prod__ttl {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 8.5px;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soot);
}

/* ---- the control panel ---- */
.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 4px;
  background: var(--steel);
  box-shadow: inset 0 0 0 1px rgba(195, 200, 205, 0.26);
}
.lcd {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px 9px;
  border-radius: 3px;
  background: var(--night);
  box-shadow: inset 0 0 0 1px rgba(195, 200, 205, 0.35), inset 0 3px 8px rgba(0, 0, 0, 0.8);
}
.lcd__k {
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(195, 200, 205, 0.7);
}
.lcd__v {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: var(--amber);
  min-height: 2.6em;
}
.pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pad button {
  height: 30px;
  border: 0;
  border-radius: 3px;
  background: var(--chrome);
  color: var(--soot);
  font-family: inherit;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
  transition: transform 0.12s ease, background 0.12s ease;
}
.pad button:hover { background: var(--sign); }
.pad button.is-active { background: var(--amber); transform: translateY(2px); box-shadow: none; }

.coin {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 3px;
  background: rgba(14, 17, 20, 0.6);
  box-shadow: inset 0 0 0 1px rgba(195, 200, 205, 0.28);
}
.coin__slot {
  flex: none;
  width: 7px;
  height: 42px;
  border-radius: 4px;
  background: var(--night);
  box-shadow: inset 0 0 0 1px rgba(195, 200, 205, 0.5), 0 1px 0 rgba(255, 255, 255, 0.14);
}
.coin__txt {
  font-size: 9.5px;
  line-height: 1.7;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(239, 230, 210, 0.82);
}
.panel__plate {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(195, 200, 205, 0.28);
  font-size: 9.5px;
  line-height: 1.75;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(195, 200, 205, 0.74);
}

/* ---- the delivery chute ---- */
.chute {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  margin: 10px 14px 12px;
  padding: 0 18px;
  border-radius: 4px;
  background: var(--night);
  box-shadow:
    inset 0 12px 20px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(195, 200, 205, 0.34);
}
.chute__lip {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(195, 200, 205, 0.72);
}
.chute__state {
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bone);
}
.chute__lamp {
  margin-left: auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(245, 185, 63, 0.9);
  animation: lamp 2.6s ease-in-out infinite;
}
@keyframes lamp { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ============ MATERIALS ============ */
.materials {
  background: var(--bone);
  color: var(--soot);
  padding: 74px 48px 84px;
}
.materials__inner { max-width: 1140px; margin: 0 auto; }
.kick {
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--burnt);
}
.h2 {
  margin-bottom: 20px;
  font-family: 'Anton', 'Arial Narrow', sans-serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.why { max-width: 78ch; font-size: 0.94rem; line-height: 1.75; color: rgba(23, 20, 14, 0.9); }
.why em { font-style: normal; font-weight: 700; color: var(--burnt); }

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  margin-top: 48px;
}
.label {
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(23, 20, 14, 0.55);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.label--stock { margin-top: 34px; }
.face { margin-bottom: 24px; line-height: 1.15; }
.face__use {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(23, 20, 14, 0.66);
}
.face--anton { font-family: 'Anton', 'Arial Narrow', sans-serif; font-size: 1.9rem; text-transform: uppercase; }
.face--mono { font-size: 1.05rem; }
.face--mono-b { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; }

.swatches { display: grid; gap: 7px; }
.sw {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 11px;
  border: 1px solid rgba(23, 20, 14, 0.28);
}
.sw i { flex: none; width: 34px; height: 34px; border: 1px solid rgba(23, 20, 14, 0.35); }
.sw span { font-size: 12.5px; letter-spacing: 0.05em; }
.sw em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(23, 20, 14, 0.68);
  text-align: right;
}

.stock { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 7px; }
.stk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(23, 20, 14, 0.28);
}
.stk i { flex: none; width: 20px; height: 20px; border: 1px solid rgba(23, 20, 14, 0.35); }
.stk b { font-weight: 700; font-size: 10px; letter-spacing: 0.06em; }
.stk em { margin-left: auto; font-style: normal; font-size: 9.5px; letter-spacing: 0.03em; color: rgba(23, 20, 14, 0.7); }

.credit-line {
  margin-top: 28px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.8;
  color: rgba(23, 20, 14, 0.7);
}
.credit-line code { font-family: inherit; }

/* ============ SERVICE RECORD (ARCHIVE) ============ */
.archive {
  background: var(--bone);
  color: var(--soot);
  padding: 70px 48px 84px;
  border-top: 5px solid var(--enamel);
}
.archive__head { max-width: 1140px; margin: 0 auto 32px; }
.archive__intro { max-width: 70ch; font-size: 0.94rem; color: rgba(23, 20, 14, 0.88); }
.archive__xray, .archive__wall, .archive__lineup { max-width: 1180px; margin: 0 auto 36px; }

/* frame controls */
.pm-filter { max-width: min(100%, 30rem); flex-wrap: wrap; }
.pm-filter__select { min-width: 0; max-width: 100%; }
.pm-segmented .pm-icon { text-transform: none; letter-spacing: normal; }
[data-pentimento="lineup"] { overflow-x: auto; max-width: 100%; }

/* the archived "Latest version" pill: a sign-cream label, no radius */
.pm-fab {
  font-family: 'Space Mono', ui-monospace, monospace !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 1.5px solid var(--soot) !important;
  background: var(--sign) !important;
  color: var(--soot) !important;
  padding: 8px 13px !important;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--night);
  color: var(--bone);
  padding: 52px 48px 62px;
  border-top: 5px solid var(--enamel);
  --pm-paper: #1B1E22;
  --pm-ink: #EFE6D2;
  --pm-muted: rgba(239, 230, 210, 0.72);
  --pm-line: rgba(239, 230, 210, 0.28);
  --pm-accent: #F5B93F;
  --pm-accent-2: #F5B93F;
  font-size: 0.8rem;
}
.footer__inner { max-width: 800px; margin: 0 auto; }

/* ============ TABLET ============ */
@media (max-width: 1019px) {
  .machine { width: calc(100% - 72px); }
  .q { font-size: 52px; }
  .body { grid-template-columns: minmax(0, 1fr) 232px; }
  .edge { display: none; }
}

/* ============ PHONE ============ */
@media (max-width: 760px) {
  .hero { height: 844px; }
  .mast { top: 64px; left: 18px; right: 18px; }
  .mast__tag { display: none; }
  .mast__name { font-size: 12.5px; letter-spacing: 0.28em; }
  .mast__vitals { flex: none; }
  .mast__vitals .pm-vitals { font-size: 10px; gap: 5px 14px; justify-content: flex-end; }
  .mast__vitals .pm-vitals dd { font-size: 1.1rem; }

  .machine {
    top: 108px;
    width: calc(100% - 20px);
    border-radius: 9px 9px 6px 6px;
  }
  .brand { height: auto; min-height: 25px; margin: 8px 9px 0; padding: 3px 10px; }
  .brand__logo { font-size: 12.5px; letter-spacing: 0.2em; }
  .brand__model { font-size: 7.5px; letter-spacing: 0.1em; line-height: 1.4; text-align: right; }

  .lightbox { margin: 8px 9px 0; padding: 16px 16px 18px; }
  .q { font-size: 37px; line-height: 1.02; }
  .q__ln { display: inline; white-space: normal; width: auto; }

  .body { grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 8px 9px 0; }
  .glass { padding: 7px 9px 10px; }
  .codes { display: none; }
  .rows { gap: 8px; }
  .row { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 52px; gap: 7px; }
  .prod { aspect-ratio: auto; height: 52px; padding: 5px 7px 0; align-self: stretch; }
  .prod__no { font-size: 13px; }
  .prod__band { margin: 0 -7px; padding: 3px 5px 4px; }
  .prod__ttl { font-size: 7.5px; -webkit-line-clamp: 1; }
  /* the coil, drawn as a loop around each packet on a phone */
  .prod::before {
    content: '';
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: -5px;
    right: -5px;
    border: 1.5px solid rgba(195, 200, 205, 0.6);
    border-radius: 50%;
    pointer-events: none;
  }

  .panel { padding: 9px; gap: 0; }
  .lcd { padding: 6px 9px 7px; }
  .lcd__v { font-size: 12px; min-height: 1.3em; }
  .pad, .coin, .panel__plate { display: none; }

  .chute { height: 50px; margin: 8px 9px 10px; padding: 0 13px; gap: 11px; }
  .chute__lip { font-size: 8.5px; letter-spacing: 0.22em; }
  .chute__state { font-size: 11px; }

  .materials, .archive { padding-left: 18px; padding-right: 18px; }
  .materials { padding-top: 54px; padding-bottom: 60px; }
  .archive { padding-top: 54px; padding-bottom: 64px; }
  .cols { grid-template-columns: 1fr; gap: 34px; }
  .face--anton { font-size: 1.5rem; }
  .footer { padding: 40px 18px 50px; }
}
