/* KunozDrop — COD fulfilment platform
   Palette: ink navy, brass, bone, signal green, flag red
   Type: Bricolage Grotesque (display) / Public Sans (body) / JetBrains Mono (codes) */

:root {
  --ink: #0E1B2C;
  --ink-2: #1B2E45;
  --brass: #C8952B;
  --brass-soft: #EFD9A6;
  --bone: #FBF9F5;
  --signal: #157F5C;
  --alert: #C0392B;
  --muted: #64748B;
  --line: rgba(14, 27, 44, .12);

  --f-display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --w: min(1180px, 92vw);
  --r: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: var(--w); margin-inline: auto; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.05;
                 letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }

.eyebrow {
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 1rem;
}
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: var(--r); border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: #D9A63A; }
.btn-ghost { border-color: rgba(251,249,245,.35); color: var(--bone); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-ink { background: var(--ink); color: var(--bone); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: var(--bone);
  border-bottom: 1px solid rgba(200,149,43,.25);
}
.site-head .wrap { display: flex; align-items: center; gap: 2rem; height: 68px; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem;
         letter-spacing: -.03em; }
.brand span { color: var(--brass); }
.nav { display: flex; gap: 1.6rem; margin-inline-start: auto; font-size: .92rem;
       align-items: center; }
.nav a:hover { color: var(--brass); }

.hero { background: var(--ink); color: var(--bone); padding: 5rem 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }
.hero h1 { color: var(--bone); }
.hero h1 em { font-style: normal; color: var(--brass); }
.hero .lede { font-size: 1.12rem; color: rgba(251,249,245,.76); max-width: 46ch; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }

.rail {
  background: var(--ink-2); border: 1px solid rgba(200,149,43,.3);
  border-radius: var(--r); padding: 1.4rem;
}
.rail-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em;
  color: var(--brass); text-transform: uppercase;
  padding-bottom: .9rem; border-bottom: 1px dashed rgba(200,149,43,.3);
}
.rail-step {
  display: grid; grid-template-columns: 14px 1fr auto; gap: .9rem;
  align-items: center; padding: .78rem 0;
  border-bottom: 1px solid rgba(251,249,245,.08);
  opacity: .35; transition: opacity .5s ease;
}
.rail-step.on { opacity: 1; }
.rail-step:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(251,249,245,.3); }
.rail-step.on .dot { background: var(--brass); box-shadow: 0 0 0 4px rgba(200,149,43,.18); }
.rail-step.done .dot { background: var(--signal); box-shadow: none; }
.rail-step .label { font-size: .95rem; }
.rail-step .time { font-family: var(--f-mono); font-size: .74rem; color: rgba(251,249,245,.5); }
.rail-foot {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed rgba(200,149,43,.3);
  display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: .8rem;
}
.rail-foot .amount { color: var(--signal); font-weight: 700; }

.strip { margin-top: 4rem; border-top: 1px solid rgba(251,249,245,.12);
         padding: 1.2rem 0 1.6rem; display: flex; gap: 2.4rem; flex-wrap: wrap;
         font-family: var(--f-mono); font-size: .78rem; letter-spacing: .1em;
         color: rgba(251,249,245,.55); text-transform: uppercase; }

.section { padding: 5.5rem 0; }
.section-dark { background: var(--ink); color: var(--bone); }
.section-dark h2 { color: var(--bone); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.8rem; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--brass); transform: translateY(-2px); }
.card .tag { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em;
             text-transform: uppercase; color: var(--brass); }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
           background: var(--line); border: 1px solid var(--line); }
.figure { background: var(--bone); padding: 1.8rem; }
.figure .n { font-family: var(--f-display); font-size: 2.4rem; font-weight: 800;
             letter-spacing: -.03em; }
.figure .k { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em;
             text-transform: uppercase; color: var(--muted); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .9rem; border: 1px solid var(--line);
  border-radius: var(--r); font-family: inherit; font-size: .95rem; background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--brass); outline: none; }
.help, .errorlist { font-size: .8rem; color: var(--muted); list-style: none; padding: 0; }
.errorlist { color: var(--alert); }

.portal { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: var(--bone); padding: 1.6rem 1.2rem; }
.side .brand { display: block; margin-bottom: 2rem; }
.side nav a { display: block; padding: .6rem .75rem; border-radius: var(--r);
              font-size: .92rem; color: rgba(251,249,245,.75); }
.side nav a:hover, .side nav a.active { background: rgba(200,149,43,.16); color: var(--brass); }
.main { padding: 2.2rem 2.4rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem;
         margin-bottom: 2rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; }
.stat .k { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em;
           text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--f-display); font-size: 1.9rem; font-weight: 700;
           letter-spacing: -.02em; margin-top: .3rem; }

table { width: 100%; border-collapse: collapse; background: #fff;
        border: 1px solid var(--line); font-size: .9rem; }
th { text-align: start; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em;
     text-transform: uppercase; color: var(--muted); padding: .8rem 1rem;
     border-bottom: 1px solid var(--line); }
td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }

.pill { display: inline-block; padding: .18rem .6rem; border-radius: 100px;
        font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em;
        text-transform: uppercase; background: rgba(14,27,44,.08); }
.pill.delivered { background: rgba(21,127,92,.14); color: var(--signal); }
.pill.returned, .pill.cancelled { background: rgba(192,57,43,.12); color: var(--alert); }
.pill.new, .pill.confirming { background: rgba(200,149,43,.18); color: #8A6413; }

.messages { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.messages li { padding: .8rem 1rem; border-inline-start: 3px solid var(--signal);
               background: rgba(21,127,92,.08); border-radius: var(--r); }

.site-foot { background: var(--ink); color: rgba(251,249,245,.7); padding: 3.5rem 0 2rem;
             font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.site-foot h4 { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em;
                text-transform: uppercase; color: var(--brass); }
.site-foot a:hover { color: var(--brass); }
.foot-bar { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(251,249,245,.12);
            display: flex; justify-content: space-between; font-family: var(--f-mono);
            font-size: .75rem; flex-wrap: wrap; gap: .6rem; }

@media (max-width: 900px) {
  .hero-grid, .foot-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .portal { grid-template-columns: 1fr; }
  .side { display: flex; align-items: center; gap: 1rem; overflow-x: auto; padding: 1rem; }
  .side .brand { margin: 0; }
  .side nav { display: flex; gap: .4rem; }
  .main { padding: 1.4rem; }
  .nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .rail-step { opacity: 1; }
}

/* ===========================================================================
   Public product catalog
   =========================================================================== */

.catalog-head { background: #fff; border-bottom: 1px solid var(--line); padding: 3rem 0 2rem; }

.filters {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1.8rem;
}
.filters input[type="search"], .filters select {
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--r);
  font-family: inherit; font-size: .9rem; background: var(--bone);
}
.filters input[type="search"] { min-width: 230px; flex: 1 1 230px; }
.filters input:focus, .filters select:focus { border-color: var(--brass); outline: none; }
.filters .check { display: flex; align-items: center; gap: .4rem; font-size: .88rem;
                  white-space: nowrap; }
.filters .clear { font-size: .85rem; color: var(--muted); text-decoration: underline; }

.gate {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--ink); color: var(--bone); padding: 1.1rem 1.4rem;
  border-radius: var(--r); margin-bottom: 2rem;
}
.gate .muted { color: rgba(251,249,245,.65); }
.gate strong { display: block; }
.gate > div { flex: 1 1 320px; }
.gate .btn { margin-inline-start: auto; }
.gate.solo { display: block; margin: 1.6rem 0; }
.gate.solo .btn { margin: 1rem 0 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }

.pcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.pcard:hover { border-color: var(--brass); transform: translateY(-3px);
               box-shadow: 0 8px 24px rgba(14,27,44,.08); }
.pcard-img { position: relative; aspect-ratio: 4 / 3; background: var(--bone);
             display: grid; place-items: center; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-img .noimg { font-family: var(--f-display); font-size: 2.6rem; font-weight: 800;
                    color: var(--line); }
.badge {
  position: absolute; top: .6rem; inset-inline-start: .6rem;
  background: var(--brass); color: var(--ink); font-family: var(--f-mono);
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .22rem .5rem; border-radius: 2px; font-weight: 700;
}
.badge.inline { position: static; display: inline-block; margin-inline-start: .6rem; }
.pcard-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.sku { font-size: .68rem; letter-spacing: .06em; color: var(--muted); }
.pcard-body h3 { font-size: .98rem; margin: 0; line-height: 1.25; }
.prices { display: flex; align-items: baseline; gap: .45rem; margin-top: .3rem; }
.prices .cost { color: var(--muted); font-size: .85rem; }
.prices .arrow { color: var(--line); }
.prices .sell { font-weight: 700; font-size: 1.05rem; }
.prices.locked { font-size: .85rem; }
.margin { font-size: .78rem; color: var(--signal); font-weight: 600; }

.empty { grid-column: 1 / -1; text-align: center; padding: 4rem 1rem; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1.4rem;
         margin-top: 3rem; font-size: .9rem; }
.pager a { color: var(--brass); font-weight: 600; }
.pager .mono { color: var(--muted); font-size: .82rem; }

/* --- detail --- */
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 1.6rem; }
.crumbs a:hover { color: var(--brass); }

.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.gallery .main { width: 100%; aspect-ratio: 1; object-fit: cover;
                 border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.noimg-lg { display: grid; place-items: center; background: var(--bone); }
.noimg-lg span { font-family: var(--f-display); font-size: 5rem; font-weight: 800; color: var(--line); }
.thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.thumb { width: 62px; height: 62px; padding: 0; border: 1px solid var(--line);
         border-radius: 3px; background: #fff; cursor: pointer; overflow: hidden; }
.thumb.on { border-color: var(--brass); border-width: 2px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.info .ar { font-size: 1.05rem; color: var(--muted); margin: 0; }

.pricebox { border: 1px solid var(--line); border-radius: var(--r); background: #fff;
            padding: 1.2rem 1.4rem; margin-top: 1.6rem; }
.pricebox .row { display: flex; justify-content: space-between; align-items: baseline;
                 padding: .45rem 0; font-size: .92rem; }
.pricebox .row span:first-child { color: var(--muted); }
.pricebox .total { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .8rem; }
.pricebox .total strong { color: var(--signal); font-size: 1.1rem; }
.pricebox .pct { font-size: .8rem; font-weight: 400; }

.addform { margin-top: 1.4rem; }
.addrow { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem; }
.addrow label { flex: 1 1 150px; }
.addrow span { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .3rem; }
.addrow input, .addrow select {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line);
  border-radius: var(--r); font-family: inherit; font-size: .95rem; background: #fff;
}

.specs { margin-top: 2rem; border-top: 1px solid var(--line); }
.specs > div { display: flex; justify-content: space-between; padding: .7rem 0;
               border-bottom: 1px solid var(--line); font-size: .9rem; }
.specs dt { color: var(--muted); margin: 0; }
.specs dd { margin: 0; font-weight: 600; }

.desc { margin-top: 1.8rem; font-size: .95rem; color: var(--ink); }

@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; gap: 2rem; }
  .filters input[type="search"] { min-width: 100%; }
  .gate .btn { margin-inline-start: 0; }
}

/* ===========================================================================
   Order intake — portal forms, CSV import, API keys, docs
   =========================================================================== */

.orderform { max-width: 780px; }
.orderform fieldset { border: 1px solid var(--line); border-radius: var(--r);
                      padding: 1.2rem 1.4rem 1.4rem; margin-bottom: 1.4rem; background: #fff; }
.orderform legend { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em;
                    text-transform: uppercase; color: var(--brass); padding: 0 .5rem; }
.fieldrow { display: flex; gap: 1rem; flex-wrap: wrap; }
.fieldrow .field { flex: 1 1 180px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }

.codeblock {
  background: var(--ink); color: var(--brass-soft); padding: 1rem 1.2rem;
  border-radius: var(--r); font-family: var(--f-mono); font-size: .8rem;
  line-height: 1.6; overflow-x: auto; white-space: pre; margin: .8rem 0 1.2rem;
}
.codeblock.resp { color: #9FE1CB; }

.newkey { background: var(--ink); color: var(--bone); padding: 1.2rem 1.4rem;
          border-radius: var(--r); margin-bottom: 1.4rem; }
.newkey strong { display: block; margin-bottom: .7rem; color: var(--brass); }
.keyvalue { display: block; font-family: var(--f-mono); font-size: .82rem;
            word-break: break-all; background: rgba(251,249,245,.08);
            padding: .7rem .9rem; border-radius: 3px; margin-bottom: .8rem; }

.keyform { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.keyform input { flex: 1 1 280px; padding: .7rem .9rem; border: 1px solid var(--line);
                 border-radius: var(--r); font-family: inherit; font-size: .92rem; }
.linkbtn { background: none; border: 0; color: var(--alert); cursor: pointer;
           font: inherit; font-size: .85rem; text-decoration: underline; padding: 0; }

table.failed td { color: var(--alert); }
table.failed td.mono { color: var(--muted); }

.docs { max-width: 780px; }
.docs h3 { margin-top: 2.4rem; }
.docs hr { border: 0; border-top: 1px solid var(--line); margin: 2.8rem 0; }
.docs code { font-family: var(--f-mono); font-size: .85em; background: rgba(14,27,44,.06);
             padding: .12em .4em; border-radius: 3px; }
.docs .method { background: var(--brass); color: var(--ink); font-weight: 700; }
.paramtable { font-size: .88rem; margin: 1rem 0 1.4rem; }
.paramtable td:first-child { white-space: nowrap; }

@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
