/* Komponenten: Bordüre, Navigation, Felder (Emblemata), Buttons, Formulare, Warenkorb, Footer */

/* ---------- Mäander-Bordüre ---------- */
.band {
  height: var(--band-h);
  background-color: var(--band-ink);
  -webkit-mask: url(../img/band-meander.svg) repeat-x left center / calc(var(--band-h) * 1.2) var(--band-h);
  mask: url(../img/band-meander.svg) repeat-x left center / calc(var(--band-h) * 1.2) var(--band-h);
}
.band--accent { background-color: var(--accent); }
.band--on-dark { background-color: var(--field-accent); }

/* ---------- Vorschau-Hinweis ---------- */
.preview-note {
  background: var(--surface-sunk);
  color: var(--accent-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 6px var(--s-2);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- Kopf und Navigation ---------- */
.site-head { position: relative; z-index: 30; }
.site-head .band { margin-block: var(--s-1); }
.nav-wrap { position: sticky; top: 0; z-index: 40; background: var(--nav-bg); color: var(--nav-text); }
.nav {
  display: flex; align-items: center; gap: var(--s-2);
  min-height: var(--nav-h);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-1) calc(var(--t) * 1.5);
  text-decoration: none; margin-right: auto; min-height: 44px;
}
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ochre-500); }
.brand span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.125rem;
  letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.brand small { display: block; font-family: var(--font-text); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: none; color: var(--lime-300); }

.nav-menu { display: flex; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-2);
  text-decoration: none; font-weight: 500; letter-spacing: 0.04em; position: relative;
}
.nav-menu a::after {
  content: ""; position: absolute; left: var(--s-2); right: var(--s-2); bottom: 8px; height: 2px;
  background: var(--ochre-500); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-2) var(--ease-out);
}
.nav-menu a:hover::after, .nav-menu a[aria-current="page"]::after { transform: scaleX(1); }
.nav-menu a[aria-current="page"] { color: var(--ochre-300); }

.nav-tools { display: flex; align-items: center; gap: var(--s-1); }
.nav-wrap :focus-visible { outline-color: var(--focus-on-dark); }

.seg { display: inline-flex; border: 1px solid rgba(234, 229, 218, 0.28); }
.seg button {
  min-width: 44px; min-height: 44px; padding: 0 var(--s-1); background: transparent; border: 0;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--lime-300);
}
.seg button[aria-pressed="true"] { background: var(--lime-100); color: var(--basalt-850); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; background: transparent;
  border: 0; color: inherit; position: relative;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { color: var(--ochre-300); }
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }

.cart-count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--ochre-500); color: var(--basalt-850);
  font-size: 0.6875rem; font-weight: 700; line-height: 18px; text-align: center;
}
.cart-count[data-empty="true"] { display: none; }
.cart-count.bump { animation: bump 420ms var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

.nav-toggle { display: none; }
@media (max-width: 899px) {
  .nav-toggle { display: inline-grid; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: var(--s-1) var(--s-2) var(--s-3);
    background: var(--nav-bg); border-top: 1px solid rgba(234, 229, 218, 0.14);
    box-shadow: var(--shadow-lift);
  }
  .nav-menu:not(.is-open) { display: none; }
  .nav-menu a { width: 100%; padding-inline: var(--s-1); font-size: var(--fs-lg); }
  .nav-menu a::after { left: var(--s-1); right: auto; width: 32px; }
  .brand small { display: none; }
}
.menu-lang { display: none; }
@media (max-width: 899px) {
  .menu-lang { display: block; padding: var(--s-2) var(--s-1) 0; }
  .menu-lang .seg button { min-height: 44px; padding: 0 var(--s-2); font-size: var(--fs-sm); letter-spacing: 0.02em; }
}
@media (max-width: 599px) {
  .nav-tools > .seg { display: none; }
  .nav { gap: var(--s-1); }
  .nav-tools { gap: 0; }
}
@media (max-width: 420px) {
  .brand { gap: var(--s-1); }
  .brand span { font-size: 0.9375rem; letter-spacing: 0.1em; }
}

/* ---------- Felder (Emblemata) ---------- */
.field {
  position: relative;
  background: var(--field);
  color: var(--field-text);
  padding: clamp(var(--s-3), 4vw, var(--s-6));
  isolation: isolate;
}
.field::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--field-line); pointer-events: none; z-index: -1;
}
.field--action { --field: var(--action); --field-line: rgba(233, 204, 142, 0.6); --field-muted: rgba(255, 248, 238, 0.95); color: var(--on-action); }
.field--path { --field: var(--path); --field-line: rgba(233, 204, 142, 0.55); --field-muted: rgba(255, 248, 238, 0.95); --field-accent: #E9CC8E; color: var(--on-path); }
.field--light {
  --field: var(--surface); --field-text: var(--text); --field-muted: var(--text-muted);
  --field-line: rgba(195, 143, 44, 0.6); --field-accent: var(--accent-text);
  border: 1px solid var(--line);
}
.field :focus-visible { outline-color: var(--focus-on-dark); }
.field--light :focus-visible { outline-color: var(--focus); }
.field--action :focus-visible, .field--path :focus-visible { outline-color: var(--lime-50); }

.frame { border: 1px solid var(--line); padding: 5px; background: var(--surface); }
.frame > * { outline: 1px solid var(--line-soft); }

.inlay { margin: 0; position: relative; }
.inlay img { width: 100%; height: 100%; object-fit: cover; }
.inlay--on-dark { border: 1px solid var(--field-line); padding: 5px; background: var(--basalt-800); margin-top: var(--s-2); }
.inlay figcaption { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--s-1); }

.medallion {
  border-radius: 50%; overflow: hidden; aspect-ratio: 1;
  box-shadow: 0 0 0 4px var(--basalt-850), 0 0 0 7px var(--ochre-500);
  background: #EADBB4;
}
.medallion img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  min-height: var(--btn-h); padding: 0 var(--s-3);
  border: 1.5px solid transparent; border-radius: 0;
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0.03em; text-decoration: none;
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease, border-color var(--dur-1) ease, transform var(--dur-1) ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn--primary:hover { background: var(--btn-primary-bg-hover); }
.btn--path { background: var(--btn-path-bg); color: var(--btn-path-text); }
.btn--path:hover { background: var(--path-hover); }
.btn--ink { background: var(--text); color: var(--bg); }
.btn--ink:hover { background: var(--accent-text); }
.btn--outline { border-color: currentColor; background: transparent; }
.btn--outline:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn--light { background: var(--lime-50); color: var(--basalt-850); }
.btn--light:hover { background: #fff; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.is-added { background: var(--ok); color: #fff; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; min-height: 44px; }
.link-arrow svg { width: 18px; height: 18px; transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(var(--s-8), 9vw, var(--s-16)); }
.section-head { display: grid; gap: var(--s-2); margin-bottom: clamp(var(--s-4), 5vw, var(--s-8)); max-width: 52rem; }
.section-head p { color: var(--text-muted); font-size: var(--fs-lg); max-width: var(--measure); }
.title-caps { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: var(--fs-sm); }

/* ---------- Stationen (Ablauf) ---------- */
.stations { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); counter-reset: st; }
@media (min-width: 760px) { .stations { grid-template-columns: repeat(4, 1fr); gap: 0; } }
.stations li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2); align-items: start; padding: var(--s-2) 0; }
@media (min-width: 760px) {
  .stations li { grid-template-columns: 1fr; padding: 0 var(--s-3) 0 0; }
  .stations li + li { border-left: 1px solid var(--line-soft); padding-left: var(--s-3); }
}
.station-no {
  counter-increment: st; width: calc(var(--t) * 7); height: calc(var(--t) * 7);
  display: grid; place-items: center; background: var(--nav-bg); color: var(--ochre-300);
  font-family: var(--font-display); font-size: 1.75rem; font-weight: 700;
}
.station-no::before { content: counter(st); }
.stations h3 { font-size: var(--fs-lg); margin-bottom: var(--s-1); }
.stations p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- Formulare ---------- */
.form-grid { display: grid; gap: var(--s-3) var(--s-3); }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(6, 1fr); } }
.form-grid > * { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
}
.form-step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s-3); }
.form-step + .form-step { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--line-soft); }
.form-step > legend { float: left; width: 100%; }
.form-step > legend + * { clear: both; }
.form-step > legend, .step-title {
  display: flex; align-items: center; gap: var(--s-2); padding: 0; margin-bottom: var(--s-3);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); line-height: 1.1;
}
.step-no {
  width: calc(var(--t) * 5); height: calc(var(--t) * 5); display: inline-grid; place-items: center; flex: none;
  background: var(--nav-bg); color: var(--ochre-300); font-size: 1.25rem;
}
.label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: 6px; }
.label .opt { font-weight: 400; color: var(--text-muted); }
.req { color: var(--accent-text); }
.input, .select, .textarea {
  width: 100%; min-height: var(--btn-h); padding: 10px var(--s-2);
  background: var(--input-bg); color: var(--text);
  border: 1.5px solid var(--input-border); border-radius: 0;
  font-size: 1rem; transition: border-color var(--dur-1) ease;
}
.textarea { min-height: calc(var(--t) * 14); resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: var(--s-5);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--line); outline: 3px solid var(--focus); outline-offset: 1px; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); opacity: 1; }
.hint { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 6px; }
.has-error .input, .has-error .select, .has-error .textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: var(--fs-sm); font-weight: 600; margin-top: 6px; }
.field-error:empty { display: none; }

.choice-group { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--s-1); }
.choice-group > legend { padding: 0; margin-bottom: var(--s-1); }
.choices { display: grid; gap: var(--s-1); }
@media (min-width: 640px) { .choices--2 { grid-template-columns: 1fr 1fr; } .choices--3 { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: grid; gap: 2px; min-height: var(--btn-h); padding: 12px var(--s-2) 12px calc(var(--s-2) + 26px);
  border: 1.5px solid var(--input-border); background: var(--input-bg); position: relative;
}
.choice span::before {
  content: ""; position: absolute; left: var(--s-2); top: 15px; width: 16px; height: 16px;
  border: 1.5px solid var(--line); background: var(--input-bg);
}
.choice input[type="radio"] + span::before { border-radius: 50%; }
.choice input:checked + span { border-color: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.choice input:checked + span::before { background: var(--text); box-shadow: inset 0 0 0 3px var(--input-bg); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice b { font-weight: 600; }
.choice small { color: var(--text-muted); font-size: var(--fs-xs); }

.send-panel { margin-top: var(--s-4); }
.send-panel h3 { margin-bottom: var(--s-1); }
.send-panel p { color: var(--field-muted); margin-bottom: var(--s-3); }
.send-actions { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.send-preview {
  margin-top: var(--s-3); white-space: pre-wrap; font-family: var(--font-text); font-size: var(--fs-sm);
  background: rgba(0,0,0,0.18); padding: var(--s-2); max-height: 260px; overflow: auto; color: var(--field-text);
}
.send-preview-toggle { margin-top: var(--s-2); color: var(--field-muted); font-size: var(--fs-sm); }
.send-preview-toggle summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }

/* ---------- Mengen-Stepper ---------- */
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-soft); }
.qty button { width: 44px; height: 44px; background: transparent; border: 0; display: grid; place-items: center; }
.qty button:hover { background: var(--surface-sunk); }
.qty button svg { width: 16px; height: 16px; }
.qty output { min-width: 32px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Warenkorb-Schublade ---------- */
.drawer {
  margin: 0 0 0 auto; height: 100%; max-height: 100dvh; width: min(100%, 460px); max-width: 100%;
  padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--bg); color: var(--text);
  display: none; flex-direction: column;
}
.drawer[open] { display: flex; animation: drawer-in var(--dur-2) var(--ease-out); }
.drawer::backdrop { background: rgba(18, 17, 16, 0.55); }
@keyframes drawer-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--nav-bg); color: var(--nav-text); }
.drawer-head h2 { font-size: var(--fs-xl); }
.drawer-head :focus-visible { outline-color: var(--focus-on-dark); }
.drawer-body { flex: 1; overflow: auto; padding: var(--s-2) var(--s-3); }
.drawer-foot { padding: var(--s-3); border-top: 1px solid var(--line); background: var(--surface); display: grid; gap: var(--s-2); }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-2); padding: var(--s-2) 0; border-bottom: 1px solid var(--line-soft); }
.cart-line h3 { font-family: var(--font-text); font-size: var(--fs-base); font-weight: 600; }
.cart-line .meta { color: var(--text-muted); font-size: var(--fs-xs); }
.cart-line .price { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cart-line .row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.remove-btn { background: transparent; border: 0; color: var(--text-muted); font-size: var(--fs-xs); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 var(--s-1); }
.remove-btn:hover { color: var(--danger); }
.cart-empty { padding: var(--s-6) 0; text-align: center; color: var(--text-muted); display: grid; gap: var(--s-2); justify-items: center; }
.cart-empty svg { width: 48px; height: 48px; color: var(--line-soft); }
.totals { display: grid; gap: var(--s-1); font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: var(--s-2); }
.totals .grand { font-weight: 700; font-size: var(--fs-lg); padding-top: var(--s-1); border-top: 1px solid var(--line-soft); margin-top: var(--s-1); }
.totals small { color: var(--text-muted); font-size: var(--fs-xs); }

/* ---------- Produkt-Etikett ---------- */
.product {
  --cat: var(--basalt-700);
  display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); border: 1px solid var(--line);
  position: relative;
}
.product[data-cat="wurst"] { --cat: var(--basalt-700); }
.product[data-cat="kaese"] { --cat: var(--slate-600); }
.product[data-cat="oel"] { --cat: var(--ochre-800); }
.product[data-cat="spezial"] { --cat: var(--stone-600); }
.product-label {
  background: var(--cat); color: var(--lime-50); padding: var(--s-3) var(--s-3) var(--s-2);
  min-height: calc(var(--t) * 15); display: grid; align-content: space-between; position: relative; overflow: hidden;
}
.product-label::after {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(233, 204, 142, 0.5); pointer-events: none;
}
.product-greek { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); line-height: 1.05; }
.product-cat { font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; opacity: 0.85; }
.product-body { padding: var(--s-3); display: grid; gap: var(--s-1); align-content: start; }
.product-body h3 { font-family: var(--font-display); font-size: var(--fs-lg); }
.product-body p { color: var(--text-muted); font-size: var(--fs-sm); }
.product-meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-2); font-size: var(--fs-xs); color: var(--text-muted); }
.chill { display: inline-flex; align-items: center; gap: 6px; color: var(--slate-600); font-weight: 600; }
:root[data-theme="dark"] .chill { color: #93AFC0; }
.chill svg { width: 14px; height: 14px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 0 var(--s-3) var(--s-3); }
.price-big { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; font-variant-numeric: lining-nums tabular-nums; }
.price-big small { display: block; font-family: var(--font-text); font-weight: 400; font-size: 0.6875rem; color: var(--text-muted); }
.product details { padding: 0 var(--s-3) var(--s-2); font-size: var(--fs-xs); color: var(--text-muted); }
.product details summary { cursor: pointer; font-weight: 600; color: var(--text); min-height: 44px; display: flex; align-items: center; }
.product details ul { margin: 0 0 var(--s-1); padding-left: 1.1em; }

/* ---------- Footer ---------- */
.site-foot { margin-top: var(--s-4); background: var(--nav-bg); color: var(--lime-100); }
.site-foot .band { background-color: var(--ochre-500); }
.foot-grid { display: grid; gap: var(--s-5); padding-block: var(--s-8) var(--s-5); }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot h2 { font-size: var(--fs-sm); font-family: var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ochre-300); margin-bottom: var(--s-2); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-foot a { text-decoration: none; display: inline-flex; align-items: center; gap: var(--s-1); min-height: 44px; }
.site-foot a:hover { color: var(--ochre-300); }
.site-foot a svg { width: 18px; height: 18px; color: var(--ochre-300); }
.site-foot :focus-visible { outline-color: var(--focus-on-dark); }
.foot-motto { font-family: var(--font-display); font-style: italic; font-size: var(--fs-2xl); color: var(--ochre-300); line-height: 1; margin-top: var(--s-2); }
.foot-claim { color: var(--lime-300); max-width: 34ch; margin-top: var(--s-2); }
.foot-bottom { border-top: 1px solid rgba(234, 229, 218, 0.14); padding-block: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); justify-content: space-between; font-size: var(--fs-xs); color: var(--lime-300); }
.foot-bottom a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Tesserae-Enthüllung (signature motion) ---------- */
.tess-host { position: relative; }
.tess-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
