/* adidas x RK Threads kiosk. Black and white, hard corners, condensed
   uppercase headlines. Thread swatches are the only colour on the page. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("/fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2"); }
/* Stand-ins for the two machine fonts, for the on-screen preview only. */
@font-face { font-family: "Emb Sans"; font-weight: 800; font-display: swap; src: url("/fonts/archivo-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Emb Serif"; font-weight: 700; font-display: swap; src: url("/fonts/tinos-latin-700-normal.woff2") format("woff2"); }

:root {
  --black: #000;
  --white: #fff;
  --ink: #111;
  --grey-1: #f4f4f2;
  --grey-2: #e3e3e0;
  --grey-3: #9a9a97;
  --grey-4: #5c5c5a;
  --red: #c8102e;
  --vh: 100dvh;
  --pad: clamp(20px, 3.4vw, 44px);
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--black); overscroll-behavior: none; }
body {
  font-family: var(--body); font-weight: 500; font-size: 20px; line-height: 1.35; color: var(--ink);
  -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
input { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ frame */

.app {
  position: fixed; left: 0; top: 0; width: 100%; height: var(--vh);
  display: flex; flex-direction: column;
  background: var(--white);
}
.app > * { flex: none; }
.app > .stage { flex: 1 1 0; min-height: 0; }
.demo {
  background: #ffe14a; color: #000; text-align: center; font-weight: 700; font-size: 16px;
  letter-spacing: .04em; text-transform: uppercase; padding: 8px 12px;
}
.bar {
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) var(--pad) 10px; min-height: 64px;
}
.lockup { display: flex; align-items: center; gap: 14px; }
.lockup-adidas { font-family: var(--body); font-weight: 700; font-size: 30px; letter-spacing: -.02em; line-height: 1; padding-bottom: 4px; }
.lockup-x { font-size: 22px; opacity: .7; line-height: 1; }
.lockup-rk { height: 40px; width: auto; display: block; }
.bar-right { display: flex; align-items: baseline; gap: 18px; font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 20px; white-space: nowrap; }
.bar-store { opacity: .6; }
.progress { height: 6px; background: var(--grey-2); }
.progress i { display: block; height: 100%; width: 0; background: var(--black); transition: width .25s ease; }
.app[data-step="welcome"] .progress, .app[data-step="done"] .progress { visibility: hidden; height: 0; }

.stage { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.screen { padding: clamp(18px, 3vh, 36px) var(--pad) 24px; max-width: 1180px; margin: 0 auto; }

.nav {
  display: flex; gap: 16px; justify-content: space-between; align-items: center;
  padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--black); background: var(--white);
}
.nav .btn { min-width: 190px; }
.nav #nextBtn { flex: 1; max-width: 520px; margin-left: auto; }
.app[data-step="welcome"] .nav, .app[data-step="done"] .nav { display: none; }

/* ------------------------------------------------------------ type */

.eyebrow { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 22px; margin: 0 0 10px; }
.mega { font-family: var(--cond); font-weight: 800; text-transform: uppercase; line-height: .86; letter-spacing: -.01em; font-size: clamp(96px, 19vmin, 210px); margin: 0 0 20px; }
.head { font-family: var(--cond); font-weight: 800; text-transform: uppercase; line-height: .95; letter-spacing: -.005em; font-size: clamp(40px, 6.4vmin, 68px); margin: 0 0 8px; }
.head-sm { font-size: clamp(32px, 4.6vmin, 46px); }
.sub { font-size: 22px; color: var(--grey-4); margin: 0 0 18px; }
.lede { font-size: clamp(22px, 2.9vmin, 30px); max-width: 26em; margin: 0 0 30px; }
.tiny { font-size: 16px; color: var(--grey-4); margin: 14px 0 0; }
.note { font-size: 17px; color: var(--grey-4); margin: 16px 0 0; }
.hint { font-size: 17px; color: var(--grey-4); }
.error { color: var(--red); font-weight: 700; font-size: 19px; margin: 10px 0 0; }
.link { background: none; border: 0; padding: 12px 0; font: inherit; font-weight: 700; font-size: 18px; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }

/* ------------------------------------------------------------ buttons */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 22px;
  min-height: 68px; padding: 0 26px; border: 2px solid var(--black); border-radius: 0;
  background: var(--black); color: var(--white); text-decoration: none; cursor: pointer;
  font-family: var(--cond); font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: .1em;
}
/* the offset outline behind a primary button */
.btn:not(.btn-ghost)::after { content: ""; position: absolute; left: 5px; top: 5px; right: -7px; bottom: -7px; border: 2px solid var(--black); border-left: 0; border-top: 0; pointer-events: none; }
.btn:active { transform: translate(3px, 3px); }
.btn:active::after { right: -4px; bottom: -4px; left: 2px; top: 2px; }
.btn-ghost { background: var(--white); color: var(--black); justify-content: center; }
.btn-invert { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-invert::after { border-color: var(--white) !important; }
.btn-xl { min-height: 92px; font-size: 38px; padding: 0 36px; min-width: min(460px, 86vw); }
.btn[disabled] { background: var(--grey-2); border-color: var(--grey-2); color: var(--grey-3); }
.btn[disabled]::after { display: none; }
.arrow { position: relative; width: 44px; height: 2px; background: currentColor; flex: none; }
.arrow::after { content: ""; position: absolute; right: 0; top: 50%; width: 12px; height: 12px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-50%) rotate(45deg); }

.chip { border: 2px solid var(--black); background: var(--white); color: var(--black); min-height: 48px; padding: 0 18px; font-family: var(--cond); font-weight: 700; font-size: 20px; letter-spacing: .1em; border-radius: 0; }
.chip[aria-pressed="true"] { background: var(--black); color: var(--white); }

/* ------------------------------------------------------------ welcome */

.app[data-step="welcome"] { background: var(--black); color: var(--white); }
.app[data-step="welcome"] .bar-right { display: none; }
.screen-welcome { min-height: 100%; display: flex; align-items: center; position: relative; max-width: none; }
.welcome-inner { width: 100%; max-width: 1100px; margin: 0 auto; }
.screen-welcome .tiny { color: #8d8d8d; margin-top: 26px; }
.staff-link { position: absolute; right: var(--pad); bottom: 14px; background: none; border: 0; color: #5a5a5a; font: inherit; font-size: 15px; padding: 14px 4px; min-height: 48px; letter-spacing: .08em; text-transform: uppercase; }
/* this iPad was linked to the printer and the link is down */
.staff-link.warn { background: #ffe14a; color: #000; font-weight: 700; padding: 12px 16px; }

/* ------------------------------------------------------------ inputs */

.field { position: relative; }
.field label { display: block; font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 20px; margin: 0 0 6px; }
.input {
  width: 100%; height: 72px; padding: 0 20px; border: 2px solid var(--black); border-radius: 0; background: var(--white);
  font-family: var(--body); font-weight: 600; font-size: 30px; color: var(--ink); -webkit-appearance: none; appearance: none; outline: none;
}
.input:focus { box-shadow: 0 0 0 4px var(--grey-2); }
.input::placeholder { color: #b9b9b6; font-weight: 500; }
.input-xl { height: 92px; font-size: 44px; font-weight: 700; padding-right: 140px; }
.field-text .count { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-family: var(--cond); font-weight: 700; font-size: 26px; color: var(--grey-4); letter-spacing: .04em; }
.field-text .count.full { color: var(--red); }
.row-tools { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; }

/* ------------------------------------------------------------ live preview */

.preview-slot { margin-top: 18px; }
.preview {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  height: clamp(120px, 22vh, 210px); padding: 0 28px; background: #1b1b1b; border: 2px solid var(--black);
}
.preview.light { background: #f1f1ee; }
.preview-text { white-space: pre; line-height: 1; font-size: 96px; color: #fff; }
.preview-text.sans { font-family: "Emb Sans", "Arial Black", Arial, sans-serif; font-weight: 800; }
.preview-text.serif { font-family: "Emb Serif", "Times New Roman", serif; font-weight: 700; }
/* The machine's serif (Tennessee ExtraBold) is heavier than a normal bold
   serif, so the preview letters are thickened a touch to match it. */
.preview-text.serif:not(.empty) { -webkit-text-stroke: .03em currentColor; paint-order: stroke fill; letter-spacing: .015em; }
/* A font's own name is written in that font: "Serif" in the serif, "Bold" in
   the block letters, on the font cards and in the check screen. */
.face-sans { font-family: "Emb Sans", "Arial Black", Arial, sans-serif !important; font-weight: 800 !important; text-transform: none !important; letter-spacing: 0 !important; }
.face-serif { font-family: "Emb Serif", "Times New Roman", serif !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; }
.opt-font .opt-label { font-size: 38px; }
.preview-text.empty { font-family: var(--cond); font-weight: 600; font-size: 30px !important; color: #7a7a7a !important; letter-spacing: .1em; text-transform: uppercase; }
.preview-fabric { position: absolute; right: 10px; bottom: 10px; display: flex; border: 2px solid #777; background: #777; gap: 2px; }
.preview-fabric button { border: 0; background: #2b2b2b; color: #cfcfcf; font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px; min-height: 44px; border-radius: 0; }
.preview-fabric button[aria-pressed="true"] { background: #fff; color: #000; }
.preview-slot[data-big] .preview { height: clamp(140px, 24vh, 230px); }
.preview-slot[data-big] .preview-fabric { display: none; }

/* ------------------------------------------------------------ option cards */

.options { display: grid; gap: 18px; }
.opt { position: relative; border: 2px solid var(--grey-2); background: var(--white); border-radius: 0; padding: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.opt[aria-checked="true"] { border-color: var(--black); box-shadow: inset 0 0 0 3px var(--black); }
.opt[aria-checked="true"]::after {
  content: "Selected"; position: absolute; right: 0; top: 0; background: var(--black); color: var(--white);
  font-family: var(--cond); font-weight: 700; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px;
}
.opt-label { font-family: var(--cond); font-weight: 800; text-transform: uppercase; font-size: 32px; letter-spacing: .02em; line-height: 1; }
.opt-blurb { font-size: 18px; color: var(--grey-4); margin-top: 4px; }

.options-fonts { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.opt-font .opt-sample { display: flex; align-items: center; justify-content: center; height: clamp(130px, 24vh, 220px); padding: 0 22px; background: #1b1b1b; overflow: hidden; }
.opt-font .opt-sample.light { background: #f1f1ee; }
.opt-font .opt-meta { padding: 16px 20px 18px; }

.options-threads { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 20px; }
.opt-thread { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px 14px; text-align: center; }
.opt-thread .dot { width: clamp(56px, 8.4vmin, 84px); aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .28); }
.opt-thread .opt-name { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 20px; line-height: 1.05; }
/* selected thread: a black disc in the corner with a tick made from two borders */
.opt-thread[aria-checked="true"]::before { content: ""; position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--black); }
.opt-thread[aria-checked="true"]::after { content: ""; right: 18px; top: 13px; width: 8px; height: 14px; padding: 0; background: none; border: solid var(--white); border-width: 0 3px 3px 0; transform: rotate(45deg); }

.options-places { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.opt-place { padding: 30px 24px 28px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; }
.opt-place .opt-label { font-size: 40px; }

/* ------------------------------------------------------------ review */

.review { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.review .preview-slot { margin-top: 0; }
.review .link { padding: 8px 0 0; }
.screen[data-screen="review"] .sub { margin-bottom: 12px; }
.summary { margin: 0; border-top: 2px solid var(--black); }
.summary-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--grey-2); min-height: 46px; }
.summary dt { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 18px; color: var(--grey-4); }
.summary dd { margin: 0; font-weight: 700; font-size: 21px; display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.summary .dot-sm { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .28); flex: none; }
.summary .link { font-size: 16px; padding: 8px 0 8px 14px; min-height: 44px; min-width: 76px; text-align: right; }
.exact { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .12em; }

.waiver { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 16px; padding: 14px 18px; border: 2px solid var(--black); background: var(--grey-1); cursor: pointer; }
.waiver input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.waiver .box { position: relative; width: 44px; height: 44px; border: 2px solid var(--black); background: var(--white); display: block; }
.waiver input:checked + .box { background: var(--black); }
.waiver input:checked + .box::after { content: ""; position: absolute; left: 13px; top: 4px; width: 12px; height: 24px; border: solid var(--white); border-width: 0 4px 4px 0; transform: rotate(45deg); }
.waiver input:focus-visible + .box { box-shadow: 0 0 0 4px var(--grey-3); }
.waiver-text { font-size: 18px; line-height: 1.3; font-weight: 500; }
.waiver.shake { animation: shake .3s; border-color: var(--red); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ------------------------------------------------------------ done */

.screen-done { max-width: 1240px; }
.done-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.head-done { font-size: clamp(30px, 4.4vmin, 44px); margin-bottom: 0; color: var(--grey-4); }
.code { font-family: var(--cond); font-weight: 800; font-size: clamp(120px, 24vmin, 250px); line-height: .9; letter-spacing: .01em; margin: 0 0 14px; }
.steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; font-size: 24px; font-weight: 600; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; align-items: baseline; padding: 6px 0; }
.steps li::before { content: counter(s); font-family: var(--cond); font-weight: 800; font-size: 30px; }
.done-summary { font-size: 18px; color: var(--grey-4); border-top: 1px solid var(--grey-2); padding-top: 12px; }
.done-actions { display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.done-review { border: 2px solid var(--black); padding: 24px; text-align: center; }
.done-rk { width: 150px; height: auto; display: block; margin: 0 auto 14px; }
.done-review .sub { font-size: 19px; margin-bottom: 14px; }
.qr { width: min(100%, 300px); margin: 0 auto; aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ------------------------------------------------------------ overlays */

.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .82); display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay-card { background: var(--white); border: 2px solid var(--black); padding: 30px 32px 34px; width: min(620px, 100%); }
.overlay-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.overlay-actions .btn { flex: 1; min-width: 200px; }
.printer-box { border-top: 2px solid var(--black); border-bottom: 2px solid var(--black); padding: 14px 0 18px; margin: 6px 0 4px; }
.printer-line { margin: 0; font-size: 20px; }

/* ------------------------------------------------------------ smaller screens */

@media (max-width: 760px) {
  body { font-size: 18px; }
  .form, .review, .done-grid { grid-template-columns: 1fr; }
  .options-threads { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav .btn { min-width: 0; }
  .nav #backBtn { flex: 0 0 auto; padding: 0 18px; }
  .bar-store { display: none; }
  .input-xl { font-size: 34px; height: 80px; padding-right: 110px; }
  .summary-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
}
/* On-screen keyboard is up (kiosk.js adds .kb): little height is left, so the
   frame tightens to keep the box being typed in and the Next button in view. */
.app.kb .bar { min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
.app.kb .lockup-rk { height: 30px; }
.app.kb .lockup-adidas { font-size: 24px; }
.app.kb .screen { padding-top: 12px; padding-bottom: 12px; }
.app.kb .head { font-size: 34px; margin-bottom: 4px; }
.app.kb .sub { display: none; }
.app.kb .input-xl { height: 72px; font-size: 36px; }
.app.kb .nav { padding-top: 8px; padding-bottom: 8px; }
.app.kb .nav .btn { min-height: 54px; font-size: 22px; }
.app.kb .preview-slot, .app.kb .row-tools .hint { display: none; }
.app.kb .screen[data-screen="details"] .form { margin-top: 6px; }

@media (max-height: 560px) {
  .preview { height: 96px; }
  .head { font-size: 34px; }
  .sub { margin-bottom: 10px; font-size: 18px; }
  .nav { padding-top: 8px; padding-bottom: 8px; }
  .nav .btn { min-height: 56px; }
}
