/* doggy-dex service station — daylight forecourt.
   Palette: sunlit concrete, service-station green, signage yellow, LCD pump display, receipt paper. */

@font-face {
  font-family: 'Archivo Black';
  src: url('/fonts/ArchivoBlack-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --slab: #e3e0d8;
  --slab-deep: #d4d0c4;
  --service: #0b5d4d;
  --service-dark: #07443a;
  --sign-yellow: #ffc42e;
  --sign-yellow-dark: #d99e0b;
  --ink: #191d1b;
  --muted: #5c645f;
  --lcd-house: #10201a;
  --lcd-glow: #93e9ba;
  --lcd-dim: #3d5c4c;
  --paper: #fbf8ee;
  --receipt-ink: #26291f;
  --danger: #b13a20;
  --sign-font: 'Archivo Black', 'Arial Black', 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  --sans: system-ui, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--slab);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 220px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a { color: var(--service); text-underline-offset: 3px; }
a:hover { color: var(--service-dark); }

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

/* ---- brand fascia band ---------------------------------------------- */

.fascia {
  margin: 0;
  padding: 0.55rem clamp(1rem, 4vw, 2.5rem);
  background: var(--service);
  color: #f2efe4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.fascia-brand {
  font-family: var(--sign-font);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fascia-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---- forecourt layout ------------------------------------------------ */

.forecourt {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2.2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* ---- signage totem ---------------------------------------------------- */

.sign {
  margin: 0 0 1.4rem;
  font-family: var(--sign-font);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--service);
  font-size: clamp(2.4rem, 6.2vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.sign-line { display: block; }

.sign-plate {
  display: inline-block;
  background: var(--sign-yellow);
  color: var(--ink);
  padding: 0.04em 0.18em 0.08em;
  margin-top: 0.08em;
  box-shadow: 0.18em 0.18em 0 var(--service-dark);
}

.lead {
  margin: 0 0 1.8rem;
  max-width: 46ch;
  color: var(--ink);
}

.priceboard {
  margin: 0;
  max-width: 30rem;
  border: 2px solid var(--ink);
  background: #efece2;
  padding: 0.9rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.28rem 0;
}

.price-row + .price-row { border-top: 1px dashed var(--slab-deep); }

.price-row dt { margin: 0; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.price-row dd { margin: 0; font-weight: 600; }

/* ---- the pump --------------------------------------------------------- */

.pump {
  background: #f2efe6;
  border: 2px solid var(--ink);
  border-radius: 14px 14px 6px 6px;
  box-shadow: 6px 8px 0 rgba(25, 29, 27, 0.18);
  overflow: hidden;
}

.pump-fascia {
  background: var(--service);
  color: #f2efe4;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.5rem 1.1rem;
}

.lcd {
  margin: 1rem 1rem 0;
  background: var(--lcd-house);
  border-radius: 6px;
  padding: 0.9rem 1rem 0.8rem;
  border: 1px solid #000;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.65);
}

.lcd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
}

.lcd-label {
  color: var(--lcd-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.lcd-value {
  color: var(--lcd-glow);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(147, 233, 186, 0.55);
}

.lcd-status {
  margin: 0.65rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(147, 233, 186, 0.18);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lcd-glow);
  text-shadow: 0 0 8px rgba(147, 233, 186, 0.45);
  min-height: 1.2em;
}

.lcd-status.is-error { color: #ffb09a; text-shadow: 0 0 8px rgba(255, 118, 80, 0.5); }

.pump-button {
  display: block;
  width: calc(100% - 2rem);
  margin: 1rem auto;
  padding: 0.95rem 1rem 0.9rem;
  background: var(--sign-yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-bottom-width: 6px;
  border-radius: 8px;
  font-family: var(--sign-font);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 80ms ease, border-bottom-width 80ms ease;
}

.pump-button:hover { background: #ffcf52; }

.pump-button:active:not(:disabled) {
  transform: translateY(3px);
  border-bottom-width: 3px;
}

.pump-button:disabled {
  background: var(--slab-deep);
  color: var(--muted);
  cursor: wait;
}

.pump-error {
  margin: 0 1rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--danger);
}

.slot {
  height: 10px;
  margin: 0 1.6rem;
  background: var(--ink);
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 3px 6px #000;
}

.receipt-slot {
  padding: 0 1.6rem 1.4rem;
  min-height: 5.5rem;
  display: flex;
  justify-content: center;
}

.receipt-placeholder {
  margin: 1.2rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* ---- the receipt (signature element) ---------------------------------- */

.receipt {
  width: 100%;
  max-width: 340px;
  background: var(--paper);
  color: var(--receipt-ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 1.1rem 1rem 0.4rem;
  margin-top: -2px;
  border: 1px solid rgba(38, 41, 31, 0.14);
  border-top: 0;
  box-shadow: 0 10px 22px rgba(25, 29, 27, 0.22);
  transform: rotate(-0.6deg);
  transform-origin: top center;
  /* torn bottom edge */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), 96% 100%, 92% calc(100% - 7px), 88% 100%, 84% calc(100% - 7px), 80% 100%, 76% calc(100% - 7px), 72% 100%, 68% calc(100% - 7px), 64% 100%, 60% calc(100% - 7px), 56% 100%, 52% calc(100% - 7px), 48% 100%, 44% calc(100% - 7px), 40% 100%, 36% calc(100% - 7px), 32% 100%, 28% calc(100% - 7px), 24% 100%, 20% calc(100% - 7px), 16% 100%, 12% calc(100% - 7px), 8% 100%, 4% calc(100% - 7px), 0 100%);
}

@keyframes print {
  from { clip-path: inset(0 0 100% 0); transform: rotate(-0.6deg) translateY(-14px); }
  to { clip-path: inset(0 0 0 0); transform: rotate(-0.6deg) translateY(0); }
}

.receipt.is-printing { animation: print 1.4s steps(14, end) both; }

.receipt-head { text-align: center; text-transform: uppercase; letter-spacing: 0.1em; }
.receipt-head strong { display: block; font-size: 0.88rem; }

.receipt hr { border: 0; border-top: 1px dashed rgba(38, 41, 31, 0.4); margin: 0.55rem 0; }

.receipt-line { display: flex; justify-content: space-between; gap: 0.8rem; }
.receipt-line span:last-child { text-align: right; word-break: break-all; }
.receipt-total { font-weight: 700; font-size: 0.85rem; }

.receipt-link { display: block; text-align: center; margin: 0.5rem 0 0.2rem; color: var(--service); }

.receipt-barcode {
  height: 34px;
  margin: 0.6rem 0 0.5rem;
  background: repeating-linear-gradient(90deg, var(--receipt-ink) 0 2px, transparent 2px 5px, var(--receipt-ink) 5px 6px, transparent 6px 10px, var(--receipt-ink) 10px 13px, transparent 13px 16px);
}

.receipt-foot { text-align: center; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.62rem; color: var(--muted); }

/* ---- safety stripes divider ------------------------------------------- */

.stripes {
  height: 12px;
  background: repeating-linear-gradient(-45deg, var(--sign-yellow) 0 18px, var(--ink) 18px 36px);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

/* ---- how it works ------------------------------------------------------ */

.how {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem);
}

.how-title {
  font-family: var(--sign-font);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--service);
  font-size: 1.35rem;
  margin: 0 0 1.1rem;
}

.how-list {
  margin: 0;
  padding-left: 1.2rem;
  max-width: 72ch;
}

.how-list li { margin-bottom: 0.55rem; }

.how code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #efece2;
  border: 1px solid var(--slab-deep);
  padding: 0.05em 0.35em;
  border-radius: 4px;
  white-space: nowrap;
}

.how-note {
  max-width: 72ch;
  margin: 1.1rem 0 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--sign-yellow);
  background: #efece2;
  font-size: 0.92rem;
}

/* ---- footer ------------------------------------------------------------ */

.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 2.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.foot-links { margin: 0 0 0.4rem; }

.foot-stats {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.foot-small { margin: 0; font-size: 0.8rem; }

/* ---- responsive & motion ----------------------------------------------- */

@media (max-width: 900px) {
  .forecourt { grid-template-columns: minmax(0, 1fr); }
  .pump { max-width: 480px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .receipt.is-printing { animation: none; }
  .pump-button { transition: none; }
}
