/* Schlossbote Showcase. Alle Farben, Abstände und Radien kommen aus design-system/tokens.css. */

/* Seitenweite Vorgaben */
:root {
  --seite-breite: 1200px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-hoehe: 64px;
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-hoehe) + 16px); }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color 320ms var(--sb-kurve-aus), color 320ms var(--sb-kurve-aus), border-color 320ms var(--sb-kurve-aus), fill 320ms var(--sb-kurve-aus), stroke 320ms var(--sb-kurve-aus), box-shadow 320ms var(--sb-kurve-aus) !important;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--kalkstein-100); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--kalkstein-100); }
img, svg { max-width: 100%; }
a { color: var(--petrol-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--petrol-700); }
:focus-visible { outline: var(--fokus-breite) solid var(--petrol-600); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.display { font-family: var(--font-display); font-weight: 400; font-variation-settings: "SOFT" 0, "WONK" 0; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }
.hair { border: 0; border-top: 1px solid var(--kalkstein-300); margin: 0; }

.wrap { width: min(100%, var(--seite-breite)); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* Navigation */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--kalkstein-100) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--kalkstein-300); }
.nav .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--nav-hoehe); }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; -webkit-overflow-scrolling: touch; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { white-space: nowrap; text-decoration: none; color: var(--ink-muted); font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: var(--radius-pill); transition: color var(--sb-dauer-kurz), background-color var(--sb-dauer-kurz); }
.nav-links a:hover { color: var(--ink); background: var(--petrol-50); }
.nav-links a.is-aktiv { color: var(--petrol-text); background: var(--petrol-50); }
.nav-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 12px; }
.nav .sb-wordmark-line { display: none; }
@media (max-width: 720px) { .nav .sb-wordmark-over { display: none; } .nav .sb-wordmark-name { font-size: 22px; line-height: 26px; } .nav .wrap { gap: 14px; } }

/* Segment-Schalter (Thema) */
.segment { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; background: var(--kalkstein-200); border-radius: var(--radius-pill); isolation: isolate; }
.segment button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 32px; padding: 0 12px; border: 0; background: transparent; color: var(--ink-muted); font: 500 13px/1 var(--font-sans); border-radius: var(--radius-pill); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color var(--sb-dauer-kurz); }
.segment button[aria-checked="true"] { color: var(--ink); }
.segment button:active { transform: scale(.96); }
.segment button:focus-visible { outline-offset: -2px; }
.segment-marke { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px - 4px) / 3); background: var(--papier); border-radius: var(--radius-pill); box-shadow: var(--shadow-card); border: 1px solid var(--karte-rand); transition: transform var(--sb-dauer-feder) var(--sb-kurve-feder); }
.segment button span.txt { display: none; }
@media (min-width: 720px) { .segment button span.txt { display: inline; } }

/* Abschnitte */
.abschnitt { padding-block: 72px; }
.abschnitt + .abschnitt { border-top: 1px solid var(--kalkstein-300); }
.kopf { display: grid; gap: 12px; max-width: 64ch; margin-bottom: 40px; }
.kopf h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; }
.kopf .lede { font-size: 19px; line-height: 1.5; color: var(--ink-muted); max-width: 58ch; }
.overline { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--messing-700); }

/* Hero */
.hero { padding-block: 56px 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(56px, 9vw, 112px); line-height: .95; margin-top: 10px; }
.hero .lede { margin-top: 24px; font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--ink-muted); max-width: 32ch; }
.hero-fakten { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.fakt { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: var(--radius-pill); background: var(--papier); border: 1px solid var(--karte-rand); box-shadow: var(--shadow-card); font-size: 14px; font-weight: 500; color: var(--ink); }
.fakt .sb-icon { color: var(--petrol-600); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-cta a.sb-btn-primary, .hero-cta a.sb-btn-primary:hover { color: var(--on-petrol); }
.hero-cta a.sb-btn-secondary:hover { color: var(--petrol-600); }
.hero-bild { position: relative; aspect-ratio: 480 / 320; border-radius: var(--radius-xl); overflow: hidden; background: var(--kalkstein-50); border: 1px solid var(--karte-rand); box-shadow: var(--shadow-card); }
.hero-bild svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bild .b-petrol { fill: var(--petrol-600); } .hero-bild .b-ink { fill: var(--ink); } .hero-bild .b-messing { fill: var(--messing-500); } .hero-bild .b-tint { fill: var(--petrol-100); } .hero-bild .b-bogen { fill: var(--petrol-100); } .hero-bild .b-bogen-dunkel { fill: var(--petrol-800); } .hero-bild .b-linie { stroke: var(--messing-500); }
.hero-bild .b-bogen, .hero-bild .b-bogen-dunkel { transform-box: fill-box; transform-origin: bottom center; animation: bogen-auf 900ms var(--sb-kurve-feder) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
@keyframes bogen-auf { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 40px 56px; } .hero-bild { max-width: 560px; } }

/* Raster */
.raster { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.raster > * { min-width: 0; }
.raster-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.raster-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.raster-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.karte { background: var(--papier); border: 1px solid var(--karte-rand); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.karte h3 { font-size: 20px; line-height: 1.3; font-weight: 600; }
.karte .beschreibung { color: var(--ink-muted); font-size: 15px; line-height: 1.5; }
.karte-buehne { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 20px; border-radius: var(--radius-md); background: var(--kalkstein-50); border: 1px solid var(--kalkstein-300); min-height: 96px; }
.karte-buehne.ist-mitte { justify-content: center; }
.karte-buehne.ist-spalte { flex-direction: column; align-items: stretch; }
.karte-buehne > .sb-root { width: 100%; }
.karte-fuss { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Durchspielen */
.demo-leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.demo-leiste .trenner { width: 1px; height: 24px; background: var(--kalkstein-300); }
.schalter { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: var(--radius-pill); border: 1px solid var(--rand-feld); background: var(--papier); cursor: pointer; font: 500 14px/1 var(--font-sans); color: var(--ink); -webkit-tap-highlight-color: transparent; user-select: none; transition: background-color var(--sb-dauer-kurz), border-color var(--sb-dauer-kurz); }
.schalter:hover { background: var(--petrol-50); }
.schalter[aria-checked="true"] { border-color: var(--petrol-600); color: var(--petrol-text); background: var(--petrol-50); }
.schalter .kugel { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--kalkstein-300); transition: background-color var(--sb-dauer-mittel) var(--sb-kurve-aus); flex: none; }
.schalter .kugel::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--papier); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--sb-dauer-feder) var(--sb-kurve-feder); }
.schalter[aria-checked="true"] .kugel { background: var(--petrol-600); }
.schalter[aria-checked="true"] .kugel::after { transform: translateX(14px); }

.demo { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .demo { grid-template-columns: minmax(0, 1fr); } }
.demo > * { min-width: 0; }
.panel { background: var(--papier); border: 1px solid var(--karte-rand); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); min-width: 0; }
.panel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--kalkstein-300); }
.panel-kopf h3 { font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.panel-kopf h3 .sb-icon { color: var(--ink-muted); }
.panel-inhalt { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.feld { display: flex; flex-direction: column; gap: 8px; }
.feld label { font-size: 13px; line-height: 18px; font-weight: 500; }
.feld textarea { font: 400 15px/1.5 var(--font-sans); color: var(--ink); background: var(--papier); border: 1px solid var(--rand-feld); border-radius: var(--radius-md); padding: 10px 12px; resize: vertical; min-height: 72px; transition: border-color var(--sb-dauer-kurz), box-shadow var(--sb-dauer-kurz); }
.feld textarea:focus { outline: none; border-color: var(--petrol-600); box-shadow: 0 0 0 3px var(--petrol-glow); }
.pult-status { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-md); background: var(--kalkstein-50); border: 1px solid var(--kalkstein-300); font-size: 15px; }
.pult-status .zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); background: var(--ziegel-50); color: var(--ziegel-700); font-size: 14px; line-height: 1.45; animation: sb-fade-up var(--sb-dauer-mittel) var(--sb-kurve-aus) both; }
.hinweis .sb-icon { flex: none; margin-top: 2px; }
.hinweis.ist-info { background: var(--petrol-50); color: var(--petrol-text); }

/* Terminal-Rahmen: 1024px breites Bild, auf die Spalte skaliert */
.terminal-rahmen { position: relative; border-radius: var(--radius-xl); padding: 12px; background: var(--ink); box-shadow: var(--shadow-sheet); }
[data-theme="dark"] .terminal-rahmen { background: #0B0F0E; border: 1px solid var(--karte-rand); }
.terminal-skalier { position: relative; overflow: hidden; border-radius: 14px; background: var(--kalkstein-100); }
.terminal-inhalt { width: 1024px; transform-origin: top left; background: var(--kalkstein-100); min-height: 640px; position: relative; }
.terminal-seite { padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 24px; min-height: 640px; }
.terminal-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.terminal-kopf .uhr { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.terminal-kopf .uhr time { font-size: 28px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.terminal-kopf .uhr span { font-size: 15px; color: var(--ink-muted); }
.terminal-kopf .mitte { display: flex; align-items: center; gap: 16px; }
.terminal-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.terminal-leer { padding: 24px; border-radius: var(--radius-lg); border: 1px dashed var(--rand-feld); color: var(--ink-muted); font-size: 18px; display: flex; align-items: center; gap: 12px; }
.terminal-overlay { position: absolute; inset: 0; z-index: 5; display: flex; }
.terminal-overlay .sb-scrim { flex: 1; align-items: center; }
.terminal-fuss { margin-top: auto; display: flex; justify-content: space-between; align-items: center; color: var(--ink-muted); font-size: 14px; }
.demo-protokoll { margin-top: 24px; }
.demo-protokoll h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* Bewegung */
.kurve { width: 100%; height: auto; }
.kurve .achse { stroke: var(--kalkstein-300); } .kurve .ziel { stroke: var(--messing-500); stroke-dasharray: 4 4; } .kurve .linie { stroke: var(--petrol-600); fill: none; stroke-width: 2.5; } .kurve text { fill: var(--ink-muted); font: 11px var(--font-sans); }
.zeiten { width: 100%; border-collapse: collapse; font-size: 14px; }
.zeiten th, .zeiten td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--kalkstein-300); vertical-align: top; }
.zeiten th { color: var(--ink-muted); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.zeiten code, .code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: var(--kalkstein-50); border: 1px solid var(--kalkstein-300); border-radius: 6px; padding: 1px 6px; color: var(--ink); white-space: nowrap; }
.tabelle-scroll { overflow-x: auto; }

/* Farben */
.farbgruppe { display: flex; flex-direction: column; gap: 14px; }
.farbgruppe h3 { font-size: 16px; font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.swatch { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.swatch-block { height: 72px; border-radius: var(--radius-md); border: 1px solid var(--karte-rand); box-shadow: inset 0 0 0 1px rgba(0,0,0,.03); }
.swatch-name { font: 600 13px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; word-break: break-all; }
.swatch-hex { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.swatch-hex b { font-weight: 500; color: var(--ink); }
.swatch-usage { font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); }
.status-tabelle td:first-child { white-space: nowrap; }

/* Typografie */
.specimen { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--kalkstein-300); }
.specimen:last-child { border-bottom: 0; }
.specimen .meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-muted); }
.specimen .meta b { color: var(--ink); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 600; }
.specimen .probe { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .specimen { grid-template-columns: 1fr; gap: 8px; } }
.schrift-paar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; margin-bottom: 32px; }
.schrift-paar .grossbuchstabe { font-size: 120px; line-height: 1; }

/* Grundlagen */
.abstaende { display: flex; flex-direction: column; gap: 10px; }
.abstand { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 12px; align-items: center; font-size: 14px; }
.abstand .balken { height: 18px; background: var(--petrol-600); border-radius: 4px; }
.abstand .code { justify-self: start; }
.radien { display: flex; flex-wrap: wrap; gap: 16px; }
.radius-probe { width: 96px; height: 72px; background: var(--petrol-50); border: 2px solid var(--petrol-600); display: grid; place-items: end start; padding: 6px; font-size: 12px; color: var(--petrol-text); }
.schatten-reihe { display: flex; flex-wrap: wrap; gap: 24px; }
.schatten-probe { width: 150px; height: 90px; border-radius: var(--radius-lg); background: var(--papier); border: 1px solid var(--karte-rand); display: grid; place-items: end start; padding: 10px; font-size: 12px; color: var(--ink-muted); }
.ziele { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.ziel { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); }
.ziel .box { width: 120px; background: var(--petrol-600); border-radius: var(--radius-md); display: grid; place-items: center; color: var(--on-petrol); font-weight: 600; font-size: 14px; }
.regeln { display: grid; gap: 12px; }
.regel { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.5; }
.regel .sb-icon { color: var(--moos-600); margin-top: 3px; }
.regel b { font-weight: 600; }
.regel .bsp { display: block; margin-top: 4px; color: var(--ink-muted); }

/* Fuß */
.fuss { padding-block: 40px 56px; border-top: 1px solid var(--kalkstein-300); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--ink-muted); }
.fuss-links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 520px) { .sb-change-foot .sb-btn, .sb-alert .sb-btn { white-space: normal; text-align: center; padding-block: 12px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bild .b-bogen, .hero-bild .b-bogen-dunkel { animation: none; }
  .segment-marke, .schalter .kugel::after { transition: none; }
}
