/* ==========================================================================
   FORM/01 — clothing for what's next
   Black, white, silver. Big Shoulders for the enormous words, IBM Plex Sans
   for reading, IBM Plex Mono for the machine voice. The photography carries
   the screen; the interface floats around it. Product detail is a full-screen
   takeover, not a page.
   ========================================================================== */

:root {
  --white: #FAFAFA;
  --grey: #EDEEEF;
  --silver: #9DA0A4;
  --ink: #0B0B0C;
  --line: #D8D9DB;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .06em; }

h1, h2 { font-family: 'Big Shoulders', sans-serif; font-weight: 800; text-transform: uppercase; line-height: .92; }

img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); }
button { font: inherit; cursor: pointer; }

.linkish { border: none; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: 10px 18px; z-index: 99; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Sticky nav ---------- */

.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 26px;
  padding: 12px clamp(16px, 3vw, 36px);
  background: color-mix(in srgb, var(--white) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mark {
  font-family: 'Big Shoulders', sans-serif; font-weight: 800; font-size: 1.3rem;
  letter-spacing: .02em; text-decoration: none; color: var(--ink);
}

.top-nav { display: flex; gap: 20px; margin-left: auto; }
.top-nav a { text-decoration: none; font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .08em; color: var(--ink); }
.top-nav a:hover { color: var(--silver); }

.cart-btn {
  font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .08em;
  background: var(--ink); color: var(--white); border: none; padding: 8px 14px;
  transition: background .15s ease;
}
.cart-btn:hover { background: #2A2A2C; }
.cart-btn.bump { animation: bump .25s ease; }
@keyframes bump { 50% { transform: scale(1.08); } }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100vh - 49px);
  display: grid;
  overflow: hidden;
  background: var(--grey);
}

.hero-photo { position: absolute; inset: 0; display: grid; justify-content: center; }
.hero-photo img { height: 100%; width: auto; max-width: none; object-fit: cover; }

.hero-word {
  /* Was bottom: -1.5vw — the wordmark's own box ran below the hero's edge,
     and .hero's overflow:hidden clipped the bleed straight off. Matches the
     clamp() spacing already used by .hero-tag/.hero-meta/.hero-cta. */
  position: absolute; left: clamp(8px, 2vw, 40px); bottom: clamp(20px, 4vh, 56px); z-index: 2;
  font-size: clamp(5.2rem, 17vw, 15rem);
  letter-spacing: -.01em;
  mix-blend-mode: multiply; color: var(--ink);
  pointer-events: none;
}
.hero-word span { color: var(--silver); }

.hero-tag {
  position: absolute; top: clamp(18px, 5vh, 60px); left: clamp(16px, 3vw, 36px); z-index: 2;
  font-family: 'Big Shoulders', sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.3rem, 3vw, 2.2rem); line-height: 1.02;
}

.hero-meta { position: absolute; top: clamp(18px, 5vh, 60px); right: clamp(16px, 3vw, 36px); text-align: right; color: var(--ink); z-index: 2; }

.hero-cta {
  position: absolute; bottom: clamp(18px, 4vh, 44px); right: clamp(16px, 3vw, 36px); z-index: 2;
  text-decoration: none; background: var(--ink); color: var(--white); padding: 12px 18px;
}
.hero-cta:hover { background: #2A2A2C; }

/* ---------- Index grid ---------- */

.index { max-width: 1280px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(16px, 3vw, 36px) 0; }

.index-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--ink); padding-bottom: 10px; margin-bottom: 4px;
  gap: 14px; flex-wrap: wrap;
}
.index-head h2 { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: .78rem; text-transform: none; }
#indexNote { color: var(--silver); }

/* Uniform grid: every cell the same, tight 2px joints, three across. */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--white); }

.cell {
  position: relative; border: none; background: var(--grey); padding: 0; text-align: left;
  overflow: hidden; display: grid; color: var(--ink);
}

.cell img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.cell:hover img { transform: scale(1.045); }

.cell-idx {
  position: absolute; top: 12px; left: 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .08em;
  color: var(--ink);
}

/* Info bar is part of every card, always visible — one style, twelve products. */
.cell-bar {
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 14px 13px;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.cell-name { font-family: 'Big Shoulders', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 1.15rem; }
.cell-price { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: .82rem; color: var(--silver); }
.cell:hover .cell-price { color: var(--ink); }

/* ---------- Lockers ---------- */

.lockers { max-width: 1280px; margin: 0 auto; padding: clamp(50px, 7vw, 90px) clamp(16px, 3vw, 36px) 0; }

.locker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--white); }

.locker { background: var(--white); display: grid; align-content: start; }
.locker > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.locker-bar {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 14px; background: var(--white); border-top: 1px solid var(--line);
}
.locker-code { font-family: 'IBM Plex Mono', monospace; font-size: .78rem; color: var(--silver); }
.locker-theme { font-family: 'Big Shoulders', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 1.15rem; margin-left: auto; }

.locker-pieces { list-style: none; background: var(--white); }
.locker-piece {
  display: flex; align-items: baseline; gap: 10px; width: 100%;
  border: none; border-top: 1px solid var(--line); background: var(--white);
  padding: 10px 14px; text-align: left;
  font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .05em;
  color: var(--ink);
  transition: background .15s ease;
}
.locker-piece:hover { background: var(--grey); }
.locker-piece .lp-code { color: var(--silver); min-width: 44px; }
.locker-piece .lp-price { margin-left: auto; color: var(--silver); }
.locker-piece:hover .lp-price { color: var(--ink); }

.locker-total {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 14px; background: var(--white); border-top: 1px solid var(--ink);
  font-family: 'IBM Plex Mono', monospace; font-size: .82rem;
}
.locker-total span:last-child { margin-left: auto; }

/* ---------- System ---------- */

.system {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) clamp(16px, 3vw, 36px);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 70px); align-items: center;
}
.system-word { font-size: clamp(4rem, 11vw, 9rem); color: var(--ink); }
.system-body p { max-width: 44ch; margin-bottom: 24px; font-size: 1.05rem; }

.system-specs { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.system-specs > div { display: flex; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.system-specs dd { color: var(--silver); }

/* ---------- Takeover ---------- */

.take {
  position: fixed; inset: 0; z-index: 70;
  background: var(--white);
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  animation: takeIn .35s cubic-bezier(.2, .7, .2, 1);
}
.take[hidden] { display: none; }
@keyframes takeIn { from { opacity: 0; transform: translateY(24px); } }

.take-close {
  position: absolute; top: 14px; right: clamp(16px, 3vw, 36px); z-index: 2;
  background: var(--ink); color: var(--white); border: none; padding: 8px 14px;
}

.take-photo { background: var(--grey); display: grid; place-items: center; overflow: hidden; }
.take-photo img { width: 100%; height: 100%; object-fit: contain; max-height: 100vh; }

.take-rail {
  padding: clamp(50px, 8vh, 90px) clamp(20px, 3vw, 44px) 30px;
  display: grid; align-content: center; gap: 12px;
  overflow-y: auto;
}
.take-code { color: var(--silver); }
.take-rail h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.take-price { font-family: 'IBM Plex Mono', monospace; font-size: 1.1rem; }
.take-fabric { color: var(--silver); }
.take-desc { max-width: 40ch; }
.take-label { margin-top: 8px; color: var(--silver); }

.take-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size {
  border: 1px solid var(--line); background: var(--white); min-width: 46px;
  padding: 9px 12px; font-family: 'IBM Plex Mono', monospace; font-size: .82rem;
  transition: border-color .15s ease, background .15s ease;
}
.size:hover { border-color: var(--ink); }
.size.is-on { background: var(--ink); color: var(--white); border-color: var(--ink); }

.take-add {
  margin-top: 10px; background: var(--ink); color: var(--white); border: none;
  padding: 15px; font-family: 'IBM Plex Mono', monospace; font-size: .85rem; letter-spacing: .1em;
  transition: background .15s ease;
}
.take-add:hover { background: #2A2A2C; }
.take-add.added { background: #2E5B34; }

.take-nav { display: flex; align-items: baseline; gap: 16px; margin-top: 14px; color: var(--silver); }
.take-nav span { margin-inline: auto; }

/* ---------- Cart ---------- */

.veil { position: fixed; inset: 0; z-index: 60; background: rgba(11, 11, 12, .35); }
.veil[hidden], .cart[hidden] { display: none; }

.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(400px, 94vw);
  background: var(--white); border-left: 1px solid var(--ink);
  display: flex; flex-direction: column; overflow-y: auto;
}

.cart-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 20px; border-bottom: 1px solid var(--ink);
}

.cart-lines { list-style: none; padding: 6px 20px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cl-detail { grid-column: 1; color: var(--silver); }
.cl-price { text-align: right; }
.cl-ctl { grid-column: 1 / -1; display: flex; gap: 14px; margin-top: 4px; }
.cl-ctl .linkish { font-size: .72rem; color: var(--silver); }
.cl-ctl .linkish:hover { color: var(--ink); }

.cart-empty { padding: 20px; color: var(--silver); }

.cart-tail { padding: 8px 20px 26px; display: grid; gap: 16px; }
.cart-total { display: flex; justify-content: space-between; font-size: .95rem; border-top: 1px solid var(--ink); padding-top: 14px; }

#payForm { display: grid; gap: 12px; }
.field { display: grid; gap: 4px; }
.field label { color: var(--silver); }
.field input {
  border: 1px solid var(--line); background: var(--white); padding: 10px 12px;
  font-family: 'IBM Plex Mono', monospace; font-size: .85rem; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--ink); }
.field input.bad { border-color: #B3261E; }
.err { color: #B3261E; }

.pay-btn {
  background: var(--ink); color: var(--white); border: none; padding: 14px;
  font-family: 'IBM Plex Mono', monospace; font-size: .85rem; letter-spacing: .1em;
}
.pay-btn:hover { background: #2A2A2C; }
.cart-fine { color: var(--silver); }

.cart-done { display: grid; gap: 12px; padding-top: 6px; }
#doneLine { line-height: 1.7; }

/* ---------- Footer ---------- */

.foot {
  margin-top: clamp(50px, 8vw, 90px);
  background: var(--ink); color: var(--white);
  padding: 36px clamp(16px, 3vw, 36px) 44px;
  display: grid; gap: 8px;
}
.foot-dim { color: var(--silver); max-width: 90ch; }
.foot a { color: var(--white); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .take { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .take-photo img { max-height: 52vh; }
  .take-rail { align-content: start; padding-top: 18px; }

  .system { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .locker-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  /* Was bottom: 0 — flush against the hero's own edge, no clearance before
     the index heading below it. Small but real breathing room instead. */
  .hero-word { bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cell img, .cell-bar, .take { transition: none; animation: none; }
  .cart-btn.bump { animation: none; }
}
