/* Langøra designsystem – samme uttrykk som adventskalender/Drift.
   Freigeist (display, sparsomt) · ABC Diatype (UI/brødtekst) · Mono (data/pris/SKU).
   Braun/Zürich: rolige flater, tynne linjer, minimale hjørner, «remove instead of add». */

/* Lisensierte fonter: legg woff2 i public/fonts/ (samme rutine som dine andre verktøy).
   Mangler de, faller vi tilbake til systemfonter – appen ser fremdeles ryddig ut. */
@font-face {
  font-family: 'Freigeist';
  src: url('/fonts/freigeist-xwide-black.woff2') format('woff2');
  font-weight: 900; font-display: swap;
}
@font-face {
  font-family: 'Diatype';
  src: url('/fonts/abc-diatype-regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Diatype';
  src: url('/fonts/abc-diatype-medium.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Diatype';
  src: url('/fonts/abc-diatype-bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
/* IBM Plex Mono – medfølger (åpen lisens). Byttes til Diatype Mono når du har den. */
@font-face {
  font-family: 'DataMono';
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'DataMono';
  src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}

:root {
  --paper:       #f4f1ea;   /* varm off-white */
  --paper-2:     #efeae1;   /* svak nedtoning */
  --ink:         #1a1714;   /* varm nesten-svart */
  --ink-soft:    #4a443c;
  --meta:        #ada695;   /* dempet metadata-grå */
  --meta-2:      #c4bdb0;
  --line:        rgba(26,23,20,.10);
  --line-soft:   rgba(26,23,20,.06);

  /* Operasjonelle statusfarger – dempet, ikke godteri */
  --st-ny:        #b8763a;  /* ny ordre – trenger godkjenning (okergul) */
  --st-produksjon:#a8442a;  /* i produksjon – brennrød (som Drift «brenning pågår») */
  --st-pakket:    #5c6e4a;  /* pakket/klar til sending – dempet grønn */
  --st-sendt:     #5a6b6e;  /* sendt – nøytral blågrå */
  --st-fakturert: #8a837a;  /* fakturert – ferdig, dempet */

  --display: 'Freigeist', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Diatype', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  /* Tall og "teknisk" tekst bruker også Diatype – mono kun som fallback hvis Diatype mangler */
  --mono: 'Diatype', 'DataMono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r: 2px;                 /* minimale hjørner */
  --tap: 44px;              /* touch-mål */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display – Freigeist wide black, litt strammet, sparsomt brukt */
.display {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-transform: none;
}
/* Fallback-approksimasjon når Freigeist ikke er lastet */
@supports not (font-family: 'Freigeist') { .display { letter-spacing: 0.02em; } }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--meta);
}
.meta { color: var(--meta); }

/* Knapper */
button { font-family: inherit; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.btn {
  font-family: var(--sans); font-weight: 500; font-size: 14px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 11px 18px; border-radius: var(--r); letter-spacing: 0.01em;
  min-height: var(--tap); transition: opacity .12s ease;
}
.btn:hover { opacity: .88; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.btn.link {
  background: none; border: none; color: var(--ink); padding: 6px 2px;
  text-decoration: underline; text-underline-offset: 3px; min-height: 0;
}
.btn.small { padding: 7px 12px; font-size: 13px; min-height: 34px; }

/* Skjemafelt */
input, select, textarea {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
label { display: block; font-size: 12px; letter-spacing: .04em; color: var(--meta); margin-bottom: 5px; text-transform: uppercase; }

/* Statusmerke */
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--meta); }
.status.ny::before         { background: var(--st-ny); }
.status.produksjon::before { background: var(--st-produksjon); }
.status.pakket::before     { background: var(--st-pakket); }
.status.sendt::before      { background: var(--st-sendt); }
.status.fakturert::before  { background: var(--st-fakturert); }
.status.kansellert::before { background: var(--meta-2); }

.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.vr { width: 1px; background: var(--line); align-self: stretch; }

/* Tallteller – stepper */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stepper button {
  width: 38px; min-height: 38px; background: transparent; border: 0; color: var(--ink);
  font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.stepper button:hover { background: var(--paper-2); }
.stepper .qty { min-width: 40px; display: grid; place-items: center; font-family: var(--mono); font-variant-numeric: tabular-nums; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 15px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
