/* Firmatøj – employee ordering app. One stylesheet, no build step.
   The look comes from the garments: hi-vis orange as a surface with black type, reflective tape,
   seams (stitched rules) instead of boxes, and sizes shown as sewn-in labels.
   Type: Archivo (variable width + weight): extra narrow and heavy for headings, normal for text. */

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo-latin.woff2) format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo-latin-ext.woff2) format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --hivis: #EC7B00;
  --hivis-deep: #D56C00;
  --ink: #000000;
  --paper: #FFFFFF;
  --soft: #F1F1EE;
  --muted: #5C5C58;
  --red: #C4261D;
  --green: #1F7A48;
  --tape: repeating-linear-gradient(115deg, #BFC2BC 0 4px, #F4F5F2 4px 8px);
  --seam: repeating-linear-gradient(90deg, var(--ink) 0 7px, transparent 7px 12px);

  --bar: 60px;
  --tabs: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 76px); }

body {
  margin: 0;
  font: 400 1.0625rem/1.5 Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-stretch: 100%;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabs) + var(--safe-b) + 24px);
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { margin: 0; font-weight: 800; font-stretch: 62%; line-height: .98; text-wrap: balance; }
h1 { font-size: clamp(3rem, 14vw, 4.75rem); letter-spacing: -.01em; }
h2 { font-size: 2.125rem; }
h3 { font-size: 1.5rem; font-stretch: 68%; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .9375rem; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* headings sit on a solid rule; seams (rows of stitches) only part items from each other */
.section > h2::after, .cat > h2::after { content: ""; display: block; height: 3px; background: var(--ink); }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--paper); padding-top: var(--safe-t); }
.bar-in { max-width: 1120px; margin: 0 auto; height: var(--bar); padding: 0 16px; display: flex; align-items: center; gap: 16px; }
/* reflective tape, as on the garments: hi-vis with a silver stripe */
.bar::after { content: ""; display: block; height: 10px; background: linear-gradient(var(--hivis), var(--hivis)) top / 100% 3px no-repeat, linear-gradient(var(--hivis), var(--hivis)) bottom / 100% 3px no-repeat, var(--tape); }
.brand { display: inline-flex; align-items: center; min-width: 0; }

/* customer logo: see /logo-plate.js */
.logo-plate { display: inline-flex; align-items: center; height: 44px; padding: 0; }
/* logos are shown in black and white, so every customer's logo sits calmly beside the orange */
.logo-plate img { height: 36px; width: auto; max-width: min(52vw, 300px); object-fit: contain; display: block; filter: grayscale(1) contrast(1.15); }
.logo-plate.dark, .logo-plate.own { padding: 4px 10px; }
.logo-plate.dark { background: var(--ink); }
.logo-plate.pending img { visibility: hidden; }

.bar-cart { margin-left: auto; width: 48px; height: 48px; display: grid; place-items: center; color: var(--ink); }
.bar-cart svg { width: 26px; height: 26px; }
.bar-nav { margin-left: auto; display: none; align-items: center; gap: 28px; }
.bar-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; font-weight: 700; font-stretch: 75%; font-size: 1.1875rem; border-bottom: 3px solid transparent; }
.bar-nav a:hover, .bar-nav a[aria-current] { border-bottom-color: var(--hivis); }

svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- bottom menu: black, like a belt ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--ink); padding-bottom: var(--safe-b); }
.tabs a { height: var(--tabs); display: grid; place-content: center; justify-items: center; gap: 3px; color: #fff; text-decoration: none; font-size: .875rem; font-weight: 700; font-stretch: 75%; letter-spacing: .01em; }
.tabs a[aria-current] { color: var(--hivis); }
.tabs svg { width: 25px; height: 25px; }
.tab-icon { position: relative; display: inline-flex; }
.count { position: absolute; top: -7px; right: -13px; min-width: 21px; height: 21px; padding: 0 6px; background: var(--hivis); color: var(--ink); font-size: .8125rem; font-weight: 800; font-stretch: 75%; line-height: 21px; text-align: center; font-variant-numeric: tabular-nums; }
.tabs a[aria-current] .count { background: #fff; }
.bar-nav .count { position: static; }

/* ---------- page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 16px 8px; }
.page.narrow { max-width: 680px; }
.stack > * + * { margin-top: 16px; }
.lead { font-size: 1.1875rem; max-width: 32em; }
.section { margin-top: 44px; }
.page > .section:first-child { margin-top: 8px; }
.section > h2 { margin-bottom: 16px; }
.section > h2::after { margin-top: 10px; }

/* ---------- buttons and fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 10px 22px; border: 0; border-radius: 0; background: var(--hivis); color: var(--ink); font-weight: 800; font-stretch: 75%; font-size: 1.1875rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--hivis-deep); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.big { min-height: 60px; padding: 12px 30px; font-size: 1.4375rem; }
.btn.ink { background: var(--ink); color: #fff; }
.btn.ink:hover { background: #2b2b2b; }
.btn.quiet { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.quiet:hover { background: var(--soft); }
.btn.done { background: var(--green); color: #fff; }

.field { display: block; width: 100%; min-height: 50px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); }
.field:focus { outline: 3px solid var(--hivis); outline-offset: 0; }
textarea.field { min-height: 110px; resize: vertical; }
label.lbl { display: block; font-weight: 700; margin-bottom: 6px; }
.row2 { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }

/* ---------- home: the hi-vis block ---------- */
.hero { background: var(--hivis); color: var(--ink); }
.hero-in { max-width: 680px; margin: 0 auto; padding: 30px 16px 34px; display: grid; gap: 18px; justify-items: start; }
.hero .lead { font-weight: 500; }
.budget { width: 100%; }
.budget-left { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-weight: 600; }
.budget-left b { font-size: 3.5rem; font-stretch: 62%; font-weight: 800; line-height: .9; font-variant-numeric: tabular-nums; }
/* the gauge is a strip of reflective tape; black shows what is used */
.meter { height: 22px; margin: 12px 0 8px; background: var(--tape); border: 2px solid var(--ink); }
.meter span { display: block; height: 100%; background: var(--ink); }
.budget.over .budget-left span { background: var(--ink); color: #fff; padding: 2px 8px; }
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 10px 0; }
.facts li + li { background: var(--seam) top / 100% 2px no-repeat; }

/* sizes ordered last time, as sewn-in labels */
.sizes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sizes li { display: grid; min-width: 96px; border: 2px solid var(--ink); }
.sizes span { padding: 4px 10px; font-size: .875rem; font-weight: 600; }
.sizes b { padding: 2px 10px 6px; background: var(--ink); color: #fff; font-size: 1.75rem; font-stretch: 62%; font-weight: 800; line-height: 1.1; }

.contact { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; }
.contact img, .contact .avatar { width: 84px; height: 84px; object-fit: cover; background: var(--soft); }
.contact .btn { margin-top: 10px; }

.notice { padding: 14px 16px; background: var(--soft); border-left: 8px solid var(--hivis); }
.notice.ok { border-left-color: var(--green); }
.notice.bad { border-left-color: var(--red); }
.notice b { font-stretch: 75%; font-weight: 800; font-size: 1.1875rem; }

/* ---------- catalogue ---------- */
.cats { position: sticky; top: calc(var(--bar) + var(--safe-t) + 10px); z-index: 20; margin: -28px -16px 0; padding: 0 16px; display: flex; gap: 22px; overflow-x: auto; background: var(--paper); border-bottom: 2px solid var(--ink); scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 14px 0 11px; text-decoration: none; font-weight: 700; font-stretch: 75%; font-size: 1.125rem; white-space: nowrap; border-bottom: 4px solid transparent; }
.cats a:hover { border-bottom-color: var(--hivis); }

.cat { margin-top: 36px; }
.cat > h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.cat > h2 small { font-size: 1rem; font-weight: 500; font-stretch: 100%; color: var(--muted); }
.cat > h2::after { flex-basis: 100%; margin-top: 10px; }
.grid { display: grid; grid-template-columns: 1fr; }

/* a product is not a box: products are parted by a seam */
.product { display: flex; flex-direction: column; padding: 20px 0 22px; }
.product + .product { background: var(--seam) top / 100% 2px no-repeat; }
.product-top { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.product-img { height: 140px; display: grid; place-items: center; }
.product-img img { max-height: 140px; max-width: 100%; width: auto; object-fit: contain; }
.product-img .noimg { width: 100%; height: 100%; background: var(--soft); }
.product-info { display: grid; gap: 6px; align-content: center; min-width: 0; }
.product-body { padding-top: 14px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.price { font-stretch: 62%; font-weight: 800; font-size: 1.75rem; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; font-size: .9375rem; font-stretch: 100%; color: var(--muted); }
.product-note { font-size: .9375rem; color: var(--muted); }

.opts { border: 0; margin: 0; padding: 0; min-width: 0; }
.opts legend { padding: 0; margin-bottom: 8px; font-size: .9375rem; font-weight: 700; }
.opts legend span { font-weight: 400; color: var(--muted); }
.opts.missing legend, .opts.missing legend span { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* size and colour: woven labels, black when chosen */
.chip { min-width: 50px; min-height: 46px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); font-weight: 700; font-stretch: 75%; font-size: 1.125rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--soft); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.opts.missing .chip { border-color: var(--red); }

.buy { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.buy .btn { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.stepper { display: grid; grid-template-columns: 46px 40px 46px; align-items: stretch; border: 2px solid var(--ink); background: var(--paper); }
.stepper button { border: 0; background: none; font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer; }
.stepper button:hover { background: var(--soft); }
.stepper input { width: 100%; border: 0; padding: 0; text-align: center; font-weight: 800; font-stretch: 75%; font-size: 1.25rem; background: none; font-variant-numeric: tabular-nums; }
.stepper input:focus { outline: none; }

.empty { padding: 36px 0; display: grid; gap: 12px; justify-items: start; }

/* ---------- cart: a packing slip ---------- */
.lines { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.line { display: grid; grid-template-columns: 1fr auto 44px; gap: 2px 10px; align-items: center; padding: 14px 0; background: var(--seam) bottom / 100% 2px no-repeat; }
.line-name { font-weight: 700; }
.line-detail { grid-column: 1; color: var(--muted); font-size: .9375rem; }
.line-total { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 800; font-stretch: 68%; font-size: 1.375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-del { grid-row: 1 / span 2; grid-column: 3; width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none; font-size: 1.5rem; }
.line-del:hover { background: var(--red); color: #fff; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 0; font-weight: 700; }
.total .muted { font-weight: 400; }
.total b { font-size: 2.75rem; font-stretch: 62%; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }

.choices { display: grid; gap: 8px; }
.choice { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 14px; border: 2px solid var(--ink); cursor: pointer; }
.choice:has(input:checked) { background: var(--soft); box-shadow: inset 6px 0 0 var(--hivis); }
.choice input, .check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.choice b { font-weight: 700; }
.choice small { display: block; color: var(--muted); font-size: .9375rem; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.actions { display: grid; gap: 10px; margin-top: 32px; }

/* ---------- status pages ---------- */
.status { padding: 28px 0 8px; display: grid; gap: 16px; justify-items: start; }
.status .mark { width: 64px; height: 64px; display: grid; place-items: center; background: var(--green); color: #fff; }
.status .mark.bad { background: var(--red); }
.status .mark svg { width: 36px; height: 36px; stroke-width: 3; }

/* ---------- budget list (for the customer) ---------- */
.table-wrap { overflow-x: auto; border-top: 3px solid var(--ink); }
table.t { width: 100%; border-collapse: collapse; font-size: .9375rem; }
table.t th { text-align: left; font-weight: 700; padding: 12px 14px 12px 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.t td { padding: 12px 14px 12px 0; border-bottom: 1px solid #cfcfca; vertical-align: top; }
table.t td.r, table.t th.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabs) + var(--safe-b) + 12px); z-index: 40; max-width: 480px; margin: 0 auto; padding: 14px 16px; background: var(--ink); color: #fff; border-left: 8px solid var(--hivis); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.toast a { color: var(--hivis); font-weight: 800; font-stretch: 75%; white-space: nowrap; }
.toast.bad { border-left-color: var(--red); }

.install { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- larger screens ---------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
  .grid .product, .grid .product + .product { background: var(--seam) bottom / 100% 2px no-repeat; }
  .product-top { grid-template-columns: 1fr; gap: 12px; }
  .product-img { height: 220px; justify-items: start; }
  .product-img img { max-height: 220px; }
  .stepper { grid-template-columns: 40px 34px 40px; }
  .actions { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  body { padding-bottom: 48px; }
  .tabs, .bar-cart { display: none; }
  .bar-nav { display: flex; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .page { padding-top: 40px; }
  .cats { margin-top: -40px; }
  .hero-in { padding: 56px 16px 60px; }
  .toast { bottom: 24px; }
  .logo-plate img { height: 40px; }
}
@media (min-width: 1180px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in .16s ease-out; }
  @keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
}
