/* Washday — a laundromat for your weekend */
@font-face {
  font-family: "Oswald"; src: url("assets/oswald.ttf") format("truetype");
  font-weight: 400 700; font-display: swap;
}
@font-face {
  font-family: "Work Sans"; src: url("assets/work-sans.ttf") format("truetype");
  font-weight: 400 700; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono"; src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400 600; font-display: swap;
}

:root {
  --tile: #0f3d3e;
  --tile-deep: #0a2b2c;
  --tile-line: rgba(255, 247, 232, 0.14);
  --cream: #fff7e8;
  --cream-dim: #f3e8cf;
  --ink: #14201f;
  --red: #e23a2e;
  --mustard: #ffc53d;
  --aqua: #7fd1c0;
  --pink: #ff8fb2;
  --sky: #8ecae6;
  --lilac: #c3b2ff;
  --lime: #cde86b;
  --orange: #ff9a3d;
  --radius: 18px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --cond: "Oswald", "Arial Narrow", sans-serif;
  --body: "Work Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--cream);
  background:
    repeating-linear-gradient(0deg, var(--tile-line) 0 2px, transparent 2px 72px),
    repeating-linear-gradient(90deg, var(--tile-line) 0 2px, transparent 2px 72px),
    radial-gradient(1200px 500px at 50% -80px, #176063 0%, var(--tile) 55%, var(--tile-deep) 100%);
  background-color: var(--tile);
  min-height: 100vh;
  line-height: 1.5;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--mustard); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; font-weight: 700;
  transition: top 0.15s ease;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- shopfront sign ---------- */
.shopfront {
  text-align: center;
  padding: 34px 16px 0;
}
.sign-kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--aqua); margin: 0 0 8px;
}
.sign {
  font-family: var(--cond);
  font-size: clamp(64px, 14vw, 168px);
  line-height: 0.9;
  margin: 0;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow:
    0 0 18px rgba(255, 197, 61, 0.55),
    0 0 60px rgba(255, 197, 61, 0.25),
    4px 4px 0 var(--red);
}
.sign-sub {
  font-family: var(--mono); font-size: 13px;
  color: var(--cream-dim); margin: 14px 0 0;
}
.sign-sub .dot { color: var(--red); }

.ticker {
  margin-top: 22px;
  border-top: 2px solid var(--tile-line);
  border-bottom: 2px solid var(--tile-line);
  overflow: hidden;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.28em;
  color: var(--mustard);
  padding: 8px 0;
}
.ticker-inner { display: inline-flex; white-space: nowrap; animation: ticker 26s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- control panel ---------- */
main { max-width: 1160px; margin: 0 auto; padding: 0 16px 40px; }

.control-panel { margin-top: 26px; }
.panel-plate {
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr 1fr 1fr;
}
.field label, .btn-label {
  display: block;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; margin-bottom: 8px;
}
.field .hint { font-weight: 400; opacity: 0.65; }
.field input, .field select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
#saved-filter, #tumble, #reset-filters {
  font: inherit; font-weight: 700; font-size: 15px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
#saved-filter:active, #tumble:active, #reset-filters:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
#saved-filter { background: var(--cream); color: var(--ink); }
#saved-filter[aria-pressed="true"] { background: var(--red); color: #fff; border-color: var(--ink); }
#tumble { background: var(--aqua); color: var(--ink); font-size: 14px; }
#reset-filters { background: var(--mustard); color: var(--ink); margin-top: 14px; }

.load-line { font-family: var(--mono); font-size: 13px; color: var(--cream-dim); margin: 12px 4px 0; }

/* ---------- machine wall ---------- */
.day-row { margin-top: 40px; }
.day-head h2 {
  font-family: var(--cond); font-size: clamp(30px, 5vw, 46px);
  margin: 0; letter-spacing: 0.03em; text-transform: uppercase;
}
.day-date {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em;
  color: var(--mustard); text-transform: none;
}
.day-note { margin: 2px 0 16px; color: var(--cream-dim); font-size: 15px; }

.machines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* the washing machine */
.machine {
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.machine-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 3px solid var(--ink);
  background: var(--cream-dim);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em;
}
.dial { display: inline-flex; align-items: center; gap: 8px; }
.dial-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ink);
  background: conic-gradient(var(--drum, var(--aqua)) 0 40%, #fff 40% 100%);
  display: inline-block;
}
.porthole-wrap { padding: 18px 18px 0; display: flex; justify-content: center; }
.porthole {
  width: 150px; height: 150px; border-radius: 50%;
  border: 8px solid var(--ink);
  outline: 4px solid rgba(20, 32, 31, 0.15);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85), transparent 45%), var(--drum, var(--aqua));
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.porthole .swirl {
  position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,0.5) 82%, transparent 95%);
  animation: spin 9s linear infinite;
}
.porthole .glyph { font-size: 52px; position: relative; z-index: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.25)); }
.porthole .price-tag {
  position: absolute; z-index: 1; bottom: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: var(--ink); color: var(--cream);
  padding: 2px 10px; border-radius: 999px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.machine-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.machine-body h3 { font-size: 21px; line-height: 1.2; margin: 0; }
.cycle-chip {
  align-self: flex-start;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: var(--drum, var(--aqua));
  border: 2px solid var(--ink); border-radius: 999px;
  padding: 2px 10px;
}
.meta { font-family: var(--mono); font-size: 13px; margin: 0; }
.summary { margin: 0; font-size: 15px; }
.saved-ribbon {
  position: absolute; top: 52px; right: -38px;
  transform: rotate(38deg);
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  padding: 4px 44px;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.open-item {
  margin-top: auto;
  font: inherit; font-weight: 700; font-size: 16px;
  background: var(--ink); color: var(--cream);
  border: 2px solid var(--ink); border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}
.open-item:hover { background: var(--red); border-color: var(--ink); }

/* day rows tint */
.day-row[data-day="2026-10-03"] .day-head h2 { text-shadow: 3px 3px 0 var(--red); }
.day-row[data-day="2026-10-04"] .day-head h2 { text-shadow: 3px 3px 0 var(--orange); }

/* ---------- lost sock ---------- */
.lost-sock {
  margin-top: 36px;
  background: var(--cream); color: var(--ink);
  border: 3px dashed var(--red);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
}
.lost-sock h2 { font-family: var(--cond); font-size: 40px; margin: 8px 0 4px; text-transform: uppercase; }

/* ---------- care steps ---------- */
.care-note {
  margin-top: 44px;
  border: 2px solid var(--tile-line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: rgba(0, 0, 0, 0.25);
}
.care-note h2 { font-family: var(--cond); font-size: 24px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.care-note ol { margin: 0; padding-left: 22px; }
.care-note li { margin: 6px 0; max-width: 68ch; }

/* ---------- wash ticket dialog ---------- */
dialog#detail {
  border: none; padding: 0;
  background: transparent;
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
}
dialog#detail::backdrop { background: rgba(6, 20, 20, 0.72); backdrop-filter: blur(2px); }
.ticket {
  background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 0 26px 24px;
  box-shadow: 8px 8px 0 var(--red);
  max-height: calc(100vh - 80px);
  overflow: auto;
}
.ticket-perf {
  height: 14px; margin: 0 -26px 14px;
  background-image: radial-gradient(circle at 8px 7px, var(--tile-deep) 6px, transparent 6.5px);
  background-size: 20px 14px; background-repeat: repeat-x;
}
.ticket-perf:last-child { margin: 18px -26px 0; }
.ticket-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: #6b6250; margin: 0; }
.ticket h2 { font-family: var(--cond); font-size: clamp(30px, 6vw, 44px); line-height: 1.02; margin: 8px 0 12px; text-transform: uppercase; }
.care-label {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  font-family: var(--mono); font-size: 13.5px;
  border: 2px solid var(--ink); border-radius: 10px;
  padding: 14px 16px; margin: 0 0 14px; background: #fff;
}
.care-label dt { font-weight: 600; color: #6b6250; }
.care-label dd { margin: 0; }
.ticket-body { font-size: 16px; }
.ticket-body p { margin: 0 0 10px; max-width: 60ch; }
.access-line {
  font-family: var(--mono); font-size: 13px;
  border-left: 5px solid var(--mustard);
  padding-left: 12px;
}
.ticket-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#save-item, #close-detail {
  font: inherit; font-weight: 700; font-size: 16px;
  border: 2px solid var(--ink); border-radius: 12px; padding: 12px 18px; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
#save-item { background: var(--mustard); color: var(--ink); }
#save-item[aria-pressed="true"] { background: var(--red); color: #fff; }
#close-detail { background: #fff; color: var(--ink); }

footer { max-width: 1160px; margin: 0 auto; padding: 0 16px 34px; color: var(--cream-dim); font-size: 14px; }
footer .fine { font-family: var(--mono); font-size: 12px; }

@media (max-width: 860px) {
  .panel-plate { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .machines { grid-template-columns: 1fr; }
  .ticket-actions { flex-direction: column; }
  #save-item, #close-detail { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-inner, .porthole .swirl { animation: none; }
  * { transition: none !important; }
}
