/* JnJ Vending · issue report. Palette carried over from the previous jnjvending.com (teal on deep navy). */
:root {
  --navy: oklch(0.21 0.03 262);        /* #121a27 shell */
  --navy-2: oklch(0.27 0.035 262);
  --teal: oklch(0.71 0.12 208);        /* bright brand teal, used on navy */
  --teal-ink: oklch(0.47 0.09 210);    /* teal for text/fills on white (white text ≥4.5:1) */
  --teal-wash: oklch(0.96 0.025 205);
  --ground: oklch(0.97 0.006 240);
  --surface: oklch(0.995 0.002 240);
  --ink: oklch(0.21 0.03 262);
  --ink-2: oklch(0.42 0.025 258);      /* secondary text, ≥7:1 on surface */
  --line: oklch(0.9 0.01 245);
  --line-2: oklch(0.83 0.014 245);
  --on-navy: oklch(0.97 0.006 240);
  --on-navy-2: oklch(0.82 0.02 245);
  --danger: oklch(0.52 0.18 25);
  --r: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) var(--ground); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1rem/1.55 var(--body); -webkit-font-smoothing: antialiased;
  caret-color: var(--teal-ink); accent-color: var(--teal-ink);
}
::selection { background: oklch(0.85 0.08 205); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* shell */
.bar { background: var(--navy); color: var(--on-navy); }
.bar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { width: 28px; height: 28px; color: var(--teal); }
.wordmark { font: 700 1.125rem/1 var(--display); letter-spacing: -0.01em; }
.call {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border: 1px solid oklch(1 0 0 / 0.16); border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 0.9rem; color: var(--on-navy);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.call .ic { width: 16px; height: 16px; color: var(--teal); }
.call:hover { background: oklch(1 0 0 / 0.07); border-color: oklch(1 0 0 / 0.28); }

.intro { background: var(--navy); color: var(--on-navy); padding: 14px 0 76px; }
h1 {
  margin: 0 0 8px; font: 700 clamp(2rem, 8.5vw, 2.6rem)/1.05 var(--display);
  letter-spacing: -0.03em; text-wrap: balance;
}
.intro p { margin: 0; max-width: 34ch; color: var(--on-navy-2); font-size: 1.04rem; text-wrap: pretty; }

/* signature: the machine number as a lit vending display */
.slot {
  display: inline-grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 18px;
  align-items: end; margin-top: 22px; padding: 12px 16px 12px 18px;
  background: oklch(0.15 0.025 262); border: 1px solid oklch(0.71 0.12 208 / 0.35); border-radius: var(--r);
  box-shadow: inset 0 2px 6px oklch(0 0 0 / 0.35);
}
.slot-label { grid-column: 1; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-navy-2); }
.slot-num {
  grid-column: 1; font: 700 2.4rem/1 var(--display); letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  color: var(--teal);
  animation: lightUp 0.9s var(--ease) both;
}
.slot-change {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; background: none; border: 0; padding: 8px 2px;
  color: var(--on-navy-2); font: 500 0.88rem var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.slot-change:hover { color: var(--on-navy); }
@keyframes lightUp {
  0% { opacity: 0; filter: blur(6px); }
  40% { opacity: 1; }
  100% { opacity: 1; filter: blur(0); }
}

/* the form sheet */
.sheet {
  position: relative; margin-top: -52px; background: var(--surface); border-radius: 20px;
  padding: 26px 20px 24px; border: 1px solid var(--line);
  box-shadow: 0 1px 2px oklch(0.21 0.03 262 / 0.05), 0 18px 40px -18px oklch(0.21 0.03 262 / 0.22);
}
.hp { position: absolute; left: -9999px; }

.step { padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--line); }
#machineField + .step { margin-top: 4px; }
#machineField.is-hidden + .step { border-top: 0; margin-top: 0; padding-top: 0; }
h2 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font: 700 1.2rem/1.2 var(--display); letter-spacing: -0.015em;
}
.n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-wash); color: var(--teal-ink); font: 700 0.8rem/1 var(--display);
}
.step-note { margin: -8px 0 16px; color: var(--ink-2); font-size: 0.95rem; }

.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field.is-hidden { display: none; }
label, .label-like { display: block; margin: 0 0 7px; padding: 0; font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.opt-tag { font-weight: 500; color: var(--ink-2); font-size: 0.85rem; margin-left: 4px; }
.help { margin: 7px 0 0; font-size: 0.875rem; color: var(--ink-2); }
.err { margin: 8px 0 0; font-size: 0.875rem; font-weight: 600; color: var(--danger); }

input, textarea {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 1rem/1.4 var(--body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
textarea { min-height: 112px; resize: vertical; }
input::placeholder, textarea::placeholder { color: oklch(0.5 0.02 255); }
input:hover, textarea:hover { border-color: oklch(0.72 0.02 245); }
input:focus, textarea:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 4px oklch(0.71 0.12 208 / 0.22); }
[aria-invalid="true"] { border-color: var(--danger); }
#machine { font: 700 1.2rem/1 var(--display); letter-spacing: 0.02em; }

/* issue options */
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.opt { margin: 0; cursor: pointer; font-weight: 500; }
.opt input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.opt-in {
  display: flex; align-items: center; gap: 10px; height: 100%; min-height: 58px; padding: 10px 12px;
  font-size: 0.92rem; line-height: 1.25; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.opt-in .ic { color: var(--ink-2); transition: color 0.15s var(--ease), transform 0.35s var(--ease); }
.opt:hover .opt-in { border-color: var(--line-2); }
.opt input:checked + .opt-in { border-color: var(--teal-ink); background: var(--teal-wash); box-shadow: inset 0 0 0 1px var(--teal-ink); font-weight: 600; }
.opt input:checked + .opt-in .ic { color: var(--teal-ink); transform: scale(1.12); }
.opt input:focus-visible + .opt-in { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 360px) { .opts { grid-template-columns: 1fr; } }

.money { margin-top: 16px; animation: reveal 0.35s var(--ease) both; }
.prefix { position: relative; max-width: 220px; }
.prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 600; }
.prefix input { padding-left: 30px; font-variant-numeric: tabular-nums; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* photo */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; margin: 0; padding: 12px;
  border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--ground);
  color: var(--teal-ink); font-weight: 600; font-size: 0.93rem; text-align: center; cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.drop:hover { border-color: var(--teal-ink); background: var(--teal-wash); }
.file-input:focus-visible + .preview, .file-input:focus-visible ~ .drop { outline: 3px solid var(--teal); }
.preview { position: relative; width: 120px; }
.preview img { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.remove {
  position: absolute; top: -8px; right: -8px; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; border: 0; background: var(--navy); color: var(--on-navy); cursor: pointer;
  box-shadow: 0 2px 6px oklch(0 0 0 / 0.2);
}
.remove .ic { width: 16px; height: 16px; }

/* product type */
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kind { margin: 0; cursor: pointer; font-weight: 600; }
.kind input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.kind-in {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 0.93rem; color: var(--ink);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.kind-in .ic { width: 24px; height: 24px; color: var(--ink-2); transition: color 0.15s var(--ease), transform 0.35s var(--ease); }
.kind:hover .kind-in { border-color: var(--line-2); }
.kind input:checked + .kind-in { border-color: var(--teal-ink); background: var(--teal-wash); box-shadow: inset 0 0 0 1px var(--teal-ink); }
.kind input:checked + .kind-in .ic { color: var(--teal-ink); transform: scale(1.1); }
.kind input:focus-visible + .kind-in { outline: 3px solid var(--teal); outline-offset: 2px; }

.pair.when { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 440px) { .pair.when { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; } }
input[type="date"], input[type="time"] { min-width: 0; -webkit-appearance: none; appearance: none; font-variant-numeric: tabular-nums; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair .field { margin-bottom: 18px; }
.step > .pair:last-child .field:last-child { margin-bottom: 0; }
@media (min-width: 441px) { .step > .pair:last-child .field { margin-bottom: 0; } }
@media (max-width: 440px) { .pair { grid-template-columns: 1fr; gap: 0; } }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--ground); border: 1px solid var(--line); border-radius: 12px; }
.seg label { margin: 0; cursor: pointer; font-weight: 600; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 42px; border-radius: 9px; font-size: 0.93rem; color: var(--ink-2); transition: background 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px oklch(0.21 0.03 262 / 0.16); }
.seg input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 1px; }

/* submit */
.send {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 28px;
  border: 0; border-radius: 14px; cursor: pointer; background: var(--teal-ink); color: #fff;
  font: 700 1.05rem/1 var(--display); letter-spacing: 0.005em;
  box-shadow: 0 6px 14px -6px oklch(0.21 0.03 262 / 0.35);
  transition: background 0.2s var(--ease), transform 0.12s var(--ease), box-shadow 0.2s var(--ease);
}
.send:hover { background: oklch(0.42 0.085 210); }
.send:active { transform: translateY(1px); box-shadow: 0 3px 8px -4px oklch(0.21 0.03 262 / 0.35); }
.send .ic { transition: transform 0.25s var(--ease); }
.send:hover .ic { transform: translateX(3px); }
.send:disabled { cursor: progress; opacity: 0.85; }
.send.is-sending .ic { animation: nudge 0.8s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }
.privacy { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 14px 0 0; color: var(--ink-2); font-size: 0.85rem; }
.privacy .ic { width: 15px; height: 15px; }

.foot { padding: 28px 0 44px; text-align: center; color: var(--ink-2); font-size: 0.9rem; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--teal-ink); font-weight: 600; }
.copy { font-size: 0.82rem; }

/* thanks page */
.done { text-align: center; padding: 34px 22px 30px; }
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--teal-wash); color: var(--teal-ink); }
.done-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.6s 0.15s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h2 { justify-content: center; font-size: 1.5rem; margin-bottom: 8px; }
.done p { margin: 0 auto 20px; max-width: 30ch; color: var(--ink-2); }
.again { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal-ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .done-mark svg { stroke-dashoffset: 0; }
}
