@font-face { font-family: "Gambarino"; src: url("../assets/fonts/gambarino.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo-latin.woff2") format("woff2"); font-weight: 400 700; font-stretch: 62% 125%; font-style: normal; font-display: swap; }

:root {
  --paper: #FAF5EA; --white: #FFFDF8; --ink: #2A1B17; --ink2: #6A5A52; --red: #DA251C; --red-d: #B21910; --night: #1D1513; --night2: #2B201D;
  --green: #2E7D4F; --amber: #B2660F;
  --line: rgba(42, 27, 23, .16); --line-l: rgba(250, 245, 234, .2);
  --disp: "Gambarino", "Iowan Old Style", Georgia, serif; --text: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hd: 64px; --pad: clamp(18px, 4vw, 64px); --ease: cubic-bezier(.22, .61, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--hd); scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--text); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--disp); font-weight: 400; margin: 0; letter-spacing: -.01em; line-height: 1.08; }
h1 { font-size: clamp(2rem, 4.4vw, 3.6rem); }
h1 span { color: var(--red); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; margin-bottom: .6rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); }
.kicker { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: .9rem; }
.lead { font-size: 1.1rem; max-width: 62ch; color: var(--ink2); }
.hint { font-size: .85rem; color: var(--ink2); }
.link { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--red-d); }

/* Header */
.hd { position: sticky; top: 0; z-index: 20; height: var(--hd); display: flex; align-items: center; gap: 1.5rem; padding: 0 var(--pad); background: rgba(250, 245, 234, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hd__brand { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; }
.hd__brand b { font-weight: 700; }
.hd__brand em { font-style: normal; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); margin-left: .5rem; }
.hd__nav { display: flex; gap: 1.2rem; margin-left: auto; font-size: .92rem; }
.hd__nav a { padding: .35rem 0; border-bottom: 2px solid transparent; }
.hd__nav a.is-on { border-color: var(--red); }
.hd__stand { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--ink2); font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #B8B0A6; transition: background .3s; }
.dot.is-ok { background: var(--green); box-shadow: 0 0 0 3px rgba(46, 125, 79, .18); }
.dot.is-busy { background: var(--amber); }
.dot.is-bad { background: var(--red); }
@media (max-width: 760px) { .hd__brand em, .hd__nav { display: none; } }

/* Intro */
.intro { padding: clamp(2.4rem, 6vw, 5rem) 0 1.6rem; }
.intro h1 { margin: 0 0 1.1rem; max-width: 22ch; }

/* Demo grid */
.demo { padding: 0 var(--pad) 3rem; }
.demo__grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1.25fr); gap: 0; align-items: start; }
.pane { background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 0 rgba(42, 27, 23, .04), 0 18px 40px -30px rgba(42, 27, 23, .35); overflow: hidden; }
.pane__head { padding: 1.1rem 1.25rem .9rem; border-bottom: 1px solid var(--line); }
.pane__head p { margin: .25rem 0 0; font-size: .86rem; color: var(--ink2); }
.pane__tag { display: inline-block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--ink2); margin-bottom: .3rem; }
.pane--erp .pane__tag { color: var(--amber); }
.pane--web .pane__tag { color: var(--red); }
.pane__sub { padding: 1rem 1.25rem 1.2rem; border-top: 1px solid var(--line); background: rgba(42, 27, 23, .025); }
.pane__sub h3 { font-size: 1.05rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.pane__sub h3 .link { font-family: var(--text); font-size: .8rem; }
.leer { color: var(--ink2); font-size: .88rem; list-style: none; }

/* ERP */
.erp__controls { padding: 1rem 1.25rem; }
.field { display: block; font-size: .78rem; color: var(--ink2); }
.field span { display: block; margin-bottom: .3rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.field select, .web__filter input, .web__filter select { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: .55rem .7rem; }
.field--inline { display: flex; align-items: center; gap: .6rem; }
.field--inline span { margin: 0; }
.field--inline select { width: auto; max-width: 100%; }
.erp__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .9rem 0; }
.erp__stat { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .7rem; }
.erp__stat span { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.erp__stat b { display: block; font-family: var(--disp); font-size: 1.45rem; font-weight: 400; line-height: 1.2; font-variant-numeric: tabular-nums; transition: color .3s; }
.erp__stat b.is-flash { color: var(--red); }
.erp__buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn { font-size: .86rem; font-weight: 600; padding: .5rem .85rem; border-radius: 6px; border: 1px solid var(--ink); background: transparent; color: var(--ink); transition: background .2s, color .2s, transform .15s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-d); border-color: var(--red-d); color: #fff; }
.btn--dark { background: var(--night); border-color: var(--night); color: var(--paper); }
.btn--dark:hover { background: var(--night2); }
.erp__webhook { margin-top: 1rem; border-top: 1px dashed var(--line); padding-top: .8rem; font-size: .86rem; }
.erp__webhook summary { cursor: pointer; font-weight: 600; }
.erp__webhook p { color: var(--ink2); margin: .5rem 0; }
.erp__webhook pre { font-size: .74rem; line-height: 1.5; background: var(--night); color: var(--paper); padding: .7rem .8rem; border-radius: 6px; overflow: auto; margin: .5rem 0 .7rem; }
.erp__antwort { min-height: 1.2em; font-weight: 600; }
.erp__antwort.is-ok { color: var(--green); }
.erp__antwort.is-bad { color: var(--red); }
.auftraege, .bestellungen { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.auftraege li, .bestellungen li { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: .55rem .75rem; font-size: .86rem; animation: rein .5s var(--ease); }
.auftraege b, .bestellungen b { font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--ink2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.s-uebermittelt { color: var(--amber); }
.status.s-angelegt { color: #2563B5; }
.status.s-kommissioniert { color: #6B46A6; }
.status.s-lieferschein { color: var(--green); }
.stufen { display: flex; gap: 4px; margin-top: .4rem; }
.stufen i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .4s; }
.stufen i.is-on { background: var(--green); }
@keyframes rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Bridge */
.bridge { position: sticky; top: calc(var(--hd) + 2rem); align-self: start; height: 420px; display: flex; align-items: center; justify-content: center; }
.bridge__line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 12px); opacity: .35; }
.bridge__node { position: relative; z-index: 2; width: 104px; height: 104px; border-radius: 50%; background: var(--night); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--line); }
.bridge__title { font-family: var(--disp); font-size: 1.05rem; }
.bridge__v { font-size: .78rem; font-variant-numeric: tabular-nums; color: #E8DCC8; }
.bridge__sub { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: #A79A8C; }
.bridge.is-busy .bridge__node { box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--red); }
.bridge__packets { position: absolute; inset: 0; pointer-events: none; }
.packet { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--red); animation: fliegen 1.1s var(--ease) forwards; }
.packet--zurueck { background: var(--amber); animation-name: fliegenZurueck; }
@keyframes fliegen { from { left: -4px; opacity: 0; } 20% { opacity: 1; } 50% { left: 50%; } to { left: calc(100% + 4px); opacity: 0; } }
@keyframes fliegenZurueck { from { left: calc(100% + 4px); opacity: 0; } 20% { opacity: 1; } 50% { left: 50%; } to { left: -4px; opacity: 0; } }

/* Portal */
.web__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .8rem 1.25rem; background: var(--night); color: var(--paper); }
.web__bar .field { color: #A79A8C; }
.web__bar .field select { background: var(--night2); color: var(--paper); border-color: var(--line-l); }
.web__liste { font-size: .8rem; color: #E8DCC8; }
.web__filter { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .8rem 1.25rem 0; }
.produkte { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; padding: .8rem 1.25rem 1rem; max-height: 560px; overflow: auto; }
.produkt { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: .55rem; display: flex; flex-direction: column; gap: .3rem; transition: box-shadow .3s, border-color .3s; }
.produkt.is-flash { border-color: var(--red); box-shadow: 0 0 0 3px rgba(218, 37, 28, .15); }
.produkt.is-gesperrt { opacity: .55; }
.produkt img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 5px; }
.produkt__name { font-size: .74rem; font-weight: 600; line-height: 1.25; min-height: 2.5em; }
.produkt__nr { font-size: .66rem; color: var(--ink2); font-variant-numeric: tabular-nums; }
.produkt__preis { font-family: var(--disp); font-size: 1.15rem; line-height: 1.1; font-variant-numeric: tabular-nums; transition: color .3s; }
.produkt__preis small { font-family: var(--text); font-size: .66rem; color: var(--ink2); }
.produkt__lager { font-size: .7rem; font-weight: 600; }
.produkt__lager.l-ok { color: var(--green); }
.produkt__lager.l-wenig { color: var(--amber); }
.produkt__lager.l-aus { color: var(--red); }
.produkt__add { margin-top: auto; display: flex; gap: .3rem; align-items: center; }
.produkt__add input { width: 3.2em; font: inherit; font-size: .8rem; padding: .3rem .35rem; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); text-align: center; }
.produkt__add button { flex: 1; font-size: .74rem; font-weight: 600; padding: .35rem .4rem; border: 1px solid var(--ink); border-radius: 5px; transition: background .2s, color .2s; }
.produkt__add button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.produkt__add button:disabled { opacity: .4; cursor: default; }
.warenkorb { margin: 0 1.25rem 1rem; border: 1px solid var(--ink); border-radius: 8px; padding: .8rem 1rem; background: var(--paper); animation: rein .4s var(--ease); }
.warenkorb__head { display: flex; justify-content: space-between; align-items: baseline; }
.warenkorb__head h3 { margin: 0; }
.warenkorb__head span { font-family: var(--disp); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.warenkorb ul { list-style: none; margin: .5rem 0; padding: 0; font-size: .84rem; }
.warenkorb li { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem 0; border-top: 1px dashed var(--line); }
.warenkorb li button { color: var(--red); font-size: .8rem; }
.warenkorb__foot { display: flex; gap: 1rem; align-items: center; margin-top: .5rem; }
.warenkorb__fehler { margin: .5rem 0 0; font-size: .82rem; color: var(--red); min-height: 1.2em; }

/* Monitor */
.monitor { background: var(--night); color: var(--paper); padding: clamp(2.4rem, 6vw, 4.5rem) 0; }
.monitor .lead { color: #D9CDB9; }
.monitor .kicker { color: #E8A39B; }
.monitor .hint { color: #A79A8C; }
.zaehler { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.6rem 0; }
.zaehler div { border-top: 1px solid var(--line-l); padding-top: .7rem; }
.zaehler b { display: block; font-family: var(--disp); font-size: 2.2rem; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.zaehler span { font-size: .78rem; color: #A79A8C; }
.log { width: 100%; border-collapse: collapse; font-size: .84rem; }
.log th { text-align: left; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #A79A8C; padding: .4rem .6rem; border-bottom: 1px solid var(--line-l); }
.log td { padding: .45rem .6rem; border-bottom: 1px solid rgba(250, 245, 234, .08); vertical-align: top; }
.log tr.is-neu td { animation: reinDunkel 1.2s var(--ease); }
.log .t { font-variant-numeric: tabular-nums; color: #D9CDB9; white-space: nowrap; }
.log .r { white-space: nowrap; font-weight: 600; }
.log .r-erp { color: #F0B36A; }
.log .r-web { color: #E8A39B; }
.log .r-sys { color: #A79A8C; }
.log .d { font-variant-numeric: tabular-nums; color: #A79A8C; white-space: nowrap; }
.log .ok { color: var(--green); } .log .bad { color: #FF6B5E; }
@keyframes reinDunkel { from { background: rgba(218, 37, 28, .25); } to { background: transparent; } }
@media (max-width: 760px) { .zaehler { grid-template-columns: repeat(2, 1fr); } .log .d, .log th:nth-child(4) { display: none; } }

/* Architektur */
.arch { padding: clamp(2.4rem, 6vw, 4.5rem) 0 2rem; }
.schema { margin: 1.5rem 0 2rem; }
.schema svg { width: 100%; height: auto; font-family: var(--text); }
.schema__box rect { fill: var(--white); stroke: var(--ink); stroke-width: 1.2; }
.schema__box--mid rect { fill: var(--night); }
.schema__box--mid text { fill: var(--paper); }
.schema__box--mid .schema__s { fill: #C9BBA6; }
.schema__box--mid .schema__k { fill: #E8DCC8; }
.schema__t { font-family: var(--disp); font-size: 22px; text-anchor: middle; fill: var(--ink); }
.schema__s { font-size: 12.5px; text-anchor: middle; fill: var(--ink2); }
.schema__k { font-size: 12px; text-anchor: middle; fill: var(--ink); font-weight: 600; }
.schema__arrow path { stroke: var(--red); stroke-width: 1.6; fill: none; color: var(--red); }
.schema__arrow text { font-size: 11px; text-anchor: middle; fill: var(--red); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 1.5rem; }
.cols--2 { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.liste { padding-left: 1.2rem; margin: 0; font-size: .95rem; }
.liste li { margin-bottom: .55rem; }
.erp-tab { width: 100%; border-collapse: collapse; font-size: .86rem; margin: .5rem 0 .8rem; }
.erp-tab th { text-align: left; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); padding: .35rem .5rem; border-bottom: 1px solid var(--ink); }
.erp-tab td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.erp-tab td:first-child { font-weight: 600; white-space: nowrap; }

/* Footer */
.ft { border-top: 1px solid var(--line); padding: 1.4rem 0 2.2rem; font-size: .82rem; color: var(--ink2); }
.ft p { margin: 0 0 .3em; }
.ft a { text-decoration: underline; text-underline-offset: 3px; }

/* Responsiv */
@media (max-width: 1000px) {
  .demo__grid { grid-template-columns: 1fr; gap: 0; }
  .bridge { position: relative; top: auto; height: 120px; }
  .bridge__line { left: 50%; right: auto; top: 0; bottom: 0; height: auto; width: 2px; background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 12px); }
  .packet { left: 50% !important; animation-name: fliegenV; }
  .packet--zurueck { animation-name: fliegenVZurueck; }
  @keyframes fliegenV { from { top: -4px; opacity: 0; } 20% { opacity: 1; } to { top: calc(100% + 4px); opacity: 0; } }
  @keyframes fliegenVZurueck { from { top: calc(100% + 4px); opacity: 0; } 20% { opacity: 1; } to { top: -4px; opacity: 0; } }
  .cols { grid-template-columns: 1fr; gap: 1.6rem; }
  .erp-tab td:first-child { white-space: normal; }
}
@media (max-width: 560px) {
  .erp__row { grid-template-columns: 1fr 1fr; }
  .produkte { grid-template-columns: repeat(2, 1fr); max-height: none; }
  .web__filter { grid-template-columns: 1fr; }
  .hd { gap: .8rem; }
  .hd__stand span:last-child { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .packet, .auftraege li, .bestellungen li, .warenkorb, .log tr.is-neu td { animation: none; } html { scroll-behavior: auto; } }
