@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/schibsted-grotesk.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

/* Farben tragen Bedeutung: Türkis = abgeglichen/verbunden, Amber = ausstehend/offline */
:root {
  --bg: #050e16; --bg-2: #081923; --bg-3: #0c2330;
  --glass: rgba(170, 225, 240, .045); --glass-2: rgba(170, 225, 240, .08);
  --line: rgba(160, 215, 230, .13); --line-2: rgba(160, 215, 230, .24);
  --ink: #e7f2f5; --ink-2: #aac0c8; --muted: #7896a0;
  --teal: #4fd1e3; --teal-2: #93e6f1; --teal-deep: #0b6a84; --teal-soft: rgba(79, 209, 227, .14);
  --amber: #f2a93b; --amber-soft: rgba(242, 169, 59, .15);
  --mint: #7fdcae; --mint-soft: rgba(127, 220, 174, .13);
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --measure: 38rem;
  --radius-lg: 22px; --radius: 14px; --radius-sm: 9px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--teal-2); text-underline-offset: .18em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
code, .mono { font-family: var(--mono); font-size: .88em; }
h1, h2, h3 { line-height: 1.08; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
img, video { display: block; max-width: 100%; }

.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 600px) { .wrap { padding: 0 1rem; } }

/* Kopf, klebt oben mit Glas */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(5, 14, 22, .62); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent; }
.bar.scrolled { border-bottom-color: var(--line); }
.top { display: flex; align-items: center; gap: 1.5rem; height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.22rem; letter-spacing: -.025em; }
.brand:hover { color: #fff; }
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }
.top nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .98rem; }
.top nav a:hover { color: #fff; }
.lang { font-weight: 600; }
@media (max-width: 800px) { .top nav a.sec { display: none; } }

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .72rem 1.25rem; border-radius: 999px; font-weight: 650; text-decoration: none; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--teal); color: #03151c; box-shadow: 0 0 0 1px rgba(147, 230, 241, .4) inset, 0 8px 30px -8px rgba(79, 209, 227, .55); }
.btn-primary:hover { background: var(--teal-2); color: #03151c; }
.btn-line { border-color: var(--line-2); color: var(--ink); background: var(--glass); }
.btn-line:hover { border-color: var(--teal); color: #fff; }
.top nav .btn { padding: .5rem 1rem; color: var(--ink); }

/* Einstieg */
.hero { position: relative; overflow: hidden; margin-top: -4.25rem; padding-top: 4.25rem; isolation: isolate; }
.hero-media { position: absolute; inset: 0 0 0 max(0px, calc(50% - 16rem)); z-index: -1; }
.hero-media img, .hero-media video { position: absolute; top: 0; right: 0; height: 100%; width: 100%; object-fit: cover; object-position: 90% 50%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--bg) 0%, rgba(5, 14, 22, .6) 14%, rgba(5, 14, 22, 0) 34%),
  linear-gradient(0deg, var(--bg) 0%, rgba(5, 14, 22, 0) 30%); }
.hero-inner { min-height: min(46rem, 92vh); display: flex; flex-direction: column; justify-content: center; padding-top: 5rem; padding-bottom: 9rem; }
.hero h1 { font-size: clamp(3rem, 7.4vw, 6.4rem); font-weight: 800; letter-spacing: -.045em; line-height: .98; max-width: 12ch; margin-bottom: 1.6rem; }
.hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 33rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.platforms-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.4rem; padding: 0; list-style: none; }
.platforms-row li { font-size: .88rem; font-weight: 600; color: var(--ink-2); padding: .32rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); }
@media (max-width: 760px) {
  .hero-media { left: 0; }
  .hero-media img, .hero-media video { object-position: 78% 50%; opacity: .55; }
  .hero-media::after { background: linear-gradient(0deg, var(--bg) 5%, rgba(5, 14, 22, .55) 60%, rgba(5, 14, 22, .7) 100%); }
  .hero-inner { min-height: 0; padding-top: 4rem; padding-bottom: 7rem; }
}
/* Einmaliger Auftritt beim Laden */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-inner > :nth-child(2) { animation-delay: .08s; }
  .hero-inner > :nth-child(3) { animation-delay: .16s; }
  .hero-inner > :nth-child(4) { animation-delay: .24s; }
  .hero-media { animation: fade 1.6s ease-out both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Vorführung */
.demo-section { position: relative; margin-top: -5.5rem; z-index: 2; }
.bench { background: linear-gradient(180deg, rgba(12, 35, 48, .82), rgba(8, 25, 35, .9)); border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(79, 209, 227, .05), 0 -1px 0 rgba(255, 255, 255, .06) inset; }
.bench-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); }
.bench-head h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.bench-head p { margin: .15rem 0 0; color: var(--muted); font-size: .92rem; }
.bench-head button { font: 600 .88rem var(--sans); background: var(--glass); border: 1px solid var(--line-2); color: var(--ink-2); cursor: pointer; padding: .4rem .9rem; border-radius: 999px; white-space: nowrap; }
.bench-head button:hover { color: #fff; border-color: var(--teal); }
.devices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.device { padding: 1.2rem 1.5rem 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .7rem; transition: background .3s; }
.device:last-child { border-right: 0; }
.device.offline { background: linear-gradient(180deg, rgba(242, 169, 59, .05), transparent 70%); }
.dev-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dev-name { font-weight: 700; font-size: 1.05rem; }
.state { font-size: .78rem; font-weight: 650; padding: .16rem .6rem; border-radius: 99px; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.state.clean { background: var(--mint-soft); color: var(--mint); }
.state.dirty { background: var(--amber-soft); color: var(--amber); }
.device label { font-size: .8rem; color: var(--muted); display: block; margin-bottom: .25rem; }
.device input { width: 100%; font: inherit; font-weight: 600; color: var(--ink); background: rgba(0, 0, 0, .25); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .55rem .75rem; }
.device input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-soft); }
.hlc { font-family: var(--mono); font-size: .72rem; color: var(--muted); overflow-wrap: anywhere; line-height: 1.45; min-height: 2.1em; }
.hlc b { color: var(--teal-2); font-weight: 500; }
.toggle { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { width: 1rem; height: 1rem; accent-color: var(--amber); margin: 0; }
/* Leitung vom Gerät zum Server: durchgezogen = verbunden, gestrichelt = offline */
.wire { height: 44px; margin: auto auto 0; width: 2px; background: linear-gradient(180deg, rgba(79, 209, 227, .2), var(--teal)); box-shadow: 0 0 10px rgba(79, 209, 227, .5); position: relative; }
.device.offline .wire { background: repeating-linear-gradient(to bottom, var(--amber) 0 5px, transparent 5px 10px); box-shadow: none; }
.device.offline .wire::after { content: ""; position: absolute; left: -7px; top: 17px; width: 16px; height: 2px; background: var(--amber); transform: rotate(-35deg); }
.packet { position: absolute; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal-2); box-shadow: 0 0 12px 2px var(--teal); opacity: 0; }
.packet.up { animation: up .45s ease-in forwards; }
.packet.down { animation: down .45s ease-out forwards; }
.packet.stale { background: var(--amber); box-shadow: 0 0 12px 2px var(--amber); }
/* Push läuft vom Gerät nach unten zum Server, Pull zurück nach oben */
@keyframes up { 0% { top: -2px; opacity: 1; } 85% { opacity: 1; } 100% { top: 36px; opacity: 0; } }
@keyframes down { 0% { top: 36px; opacity: 1; } 85% { opacity: 1; } 100% { top: -2px; opacity: 0; } }
.flash { animation: flash 1s ease-out; }
@keyframes flash { from { background: rgba(79, 209, 227, .28); } to { background: rgba(0, 0, 0, .25); } }

.server { border-top: 1px solid var(--teal); box-shadow: 0 -1px 18px -4px rgba(79, 209, 227, .5); background: rgba(3, 12, 18, .55); padding: 1rem 1.5rem 1.2rem; }
.server-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.server-head strong { font-weight: 700; display: inline-flex; align-items: center; gap: .5rem; }
.server-head strong::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.server-head span { font-family: var(--mono); font-size: .8rem; color: var(--teal-2); }
.log { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .76rem; }
.log li { display: grid; grid-template-columns: 2.6rem 8.6rem minmax(0, 1fr) auto; gap: .6rem; padding: .34rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.log li:first-child { border-top: 0; }
.log .seq { color: var(--teal-2); font-weight: 600; }
.log .ok { color: var(--mint); }
.log .old { color: var(--amber); }
.log .val { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); font-size: .9rem; }
.log .by { color: var(--muted); }
@media (max-width: 680px) {
  .devices { grid-template-columns: 1fr; }
  .device { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
  .device:last-child { border-bottom: 0; }
  .wire { display: none; }
  .log li { grid-template-columns: 2.4rem 8.2rem minmax(0, 1fr); }
  .log .by { display: none; }
  .bench-head { padding: 1rem; } .device, .server { padding-left: 1rem; padding-right: 1rem; }
}

/* Abschnitte */
section.band { padding: 7rem 0 0; }
.band h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; max-width: 18ch; margin-bottom: 1rem; }
.band .intro { color: var(--ink-2); max-width: var(--measure); font-size: 1.15rem; margin-bottom: 3rem; }

/* Funktionen als Bento: drei Kacheln mit Bild, drei Textkacheln */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.tile { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--glass-2), var(--glass)); padding: 1.8rem; display: flex; flex-direction: column; justify-content: flex-end; min-height: 15rem; }
.tile h3 { font-size: 1.35rem; font-weight: 750; margin-bottom: .5rem; letter-spacing: -.02em; }
.tile p { color: var(--ink-2); margin: 0; max-width: 34rem; }
.tile.pic { min-height: 27rem; }
.tile.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tile.pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 14, 22, .96) 12%, rgba(5, 14, 22, .55) 45%, rgba(5, 14, 22, 0) 75%); z-index: 1; }
.tile.pic > :not(img) { position: relative; z-index: 2; }
.t-offline { grid-column: span 4; }
.t-offline img { object-position: 50% 45%; }
.t-key { grid-column: span 2; }
.t-shared { grid-column: span 2; }
.t-conflict { grid-column: span 4; }
.t-subs { grid-column: span 3; }
.t-schema { grid-column: span 3; }
.t-subs, .t-schema { min-height: 0; }
.t-conflict { justify-content: flex-start; background: radial-gradient(90% 120% at 100% 0%, rgba(79, 209, 227, .12), transparent 60%), linear-gradient(180deg, var(--glass-2), var(--glass)); }
.tile .hlc-demo { font-family: var(--mono); font-size: clamp(.8rem, 1.6vw, 1.2rem); color: var(--muted); margin: .4rem 0 2rem; line-height: 1.5; display: grid; gap: .9rem; }
.tile .hlc-demo span { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem; }
.tile .hlc-demo em { font: 650 .78rem var(--sans); padding: .14rem .6rem; border-radius: 99px; }
.tile .hlc-demo .win em { color: var(--mint); background: var(--mint-soft); }
.tile .hlc-demo .lose em { color: var(--amber); background: var(--amber-soft); }
.tile .hlc-demo .lose code { text-decoration: line-through; text-decoration-color: var(--amber); }
.tile .hlc-demo .win code { color: var(--teal-2); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .t-offline, .t-conflict { grid-column: span 2; }
  .t-key, .t-shared, .t-subs, .t-schema { grid-column: span 1; }
  .tile.pic { min-height: 22rem; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .bento > * { grid-column: auto !important; }
  .tile { padding: 1.4rem; }
}

/* Code */
.code { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 3.5rem; align-items: center; }
@media (max-width: 960px) { .code { grid-template-columns: 1fr; gap: 2rem; } }
.code .intro { margin-bottom: 1.6rem; }
.checks { list-style: none; padding: 0; margin: 0; color: var(--ink-2); }
.checks li { position: relative; padding-left: 1.7rem; margin-bottom: .8rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: .75rem; height: .4rem; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.editor { position: relative; background: #040b11; border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 40px 90px -40px rgba(79, 209, 227, .35), 0 0 0 1px rgba(0, 0, 0, .4); }
.tabs { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 0 .6rem; background: rgba(170, 225, 240, .03); }
.tabs::before { content: ""; width: 44px; height: 10px; margin: 0 .8rem 0 .5rem; background: radial-gradient(circle, #33434c 4px, transparent 5px) 0 0 / 15px 10px repeat-x; }
.tabs button { font: 600 .92rem var(--sans); color: var(--muted); background: none; border: 0; padding: .95rem 1rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--teal); }
.tabs button:focus-visible { outline-offset: -3px; }
.editor pre { margin: 0; padding: 1.4rem 1.5rem 1.6rem; overflow-x: auto; font: .82rem/1.75 var(--mono); tab-size: 4; color: #cfe0e5; }
.editor .c { color: #5f7b85; }
.editor .k { color: #7cd3e6; }
.editor .s { color: #f2c27a; }

/* Ablauf */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.steps li { counter-increment: s; position: relative; padding: 1.6rem 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); }
.steps li::before { content: counter(s); display: flex; align-items: center; justify-content: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 1px solid var(--teal); color: var(--teal-2); font-weight: 700; margin-bottom: 1.1rem; background: var(--bg); box-shadow: 0 0 18px -2px rgba(79, 209, 227, .5); }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 2.75rem; right: -1rem; width: 1rem; height: 1px; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.steps h3 { font-size: 1.12rem; margin-bottom: .45rem; }
.steps p { color: var(--ink-2); font-size: .98rem; margin: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
}

/* Grenzen */
.limits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.limits p { margin: 0; padding: 1.5rem 1.5rem 0 0; color: var(--ink-2); font-size: .98rem; }
.limits strong { color: var(--ink); display: block; font-size: 1.08rem; margin-bottom: .4rem; }
.limits strong::before { content: ""; display: block; width: 1.4rem; height: 2px; background: var(--amber); margin-bottom: 1rem; }
@media (max-width: 900px) { .limits { grid-template-columns: 1fr 1fr; gap: 1rem 0; } }
@media (max-width: 560px) { .limits { grid-template-columns: 1fr; } }

/* Einsatz */
.case { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 4rem; align-items: center; padding: 3rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: radial-gradient(120% 140% at 100% 0%, rgba(11, 106, 132, .28), transparent 55%), var(--glass); }
.case h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 1rem; }
.case .intro { margin-bottom: 1rem; }
.case p.body { color: var(--ink-2); max-width: var(--measure); margin: 0; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; gap: 2rem; padding: 1.6rem; } }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.platforms div { background: var(--bg-2); padding: 1.1rem 1.2rem; }
.platforms strong { display: block; }
.platforms span { color: var(--muted); font-size: .92rem; }

/* Abschluss */
.closing { position: relative; overflow: hidden; margin-top: 7rem; isolation: isolate; }
.closing img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; z-index: -2; }
.closing::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, rgba(5, 14, 22, .7) 45%, rgba(5, 14, 22, 0) 80%), linear-gradient(180deg, var(--bg) 0%, rgba(5, 14, 22, 0) 25%, rgba(5, 14, 22, 0) 75%, var(--bg) 100%); }
.closing .wrap { padding-top: 8rem; padding-bottom: 8rem; }
.closing h2 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.04em; max-width: 14ch; margin-bottom: 1.2rem; }
.closing p { color: var(--ink-2); max-width: 34rem; font-size: 1.15rem; }
.closing .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

footer { border-top: 1px solid var(--line); padding: 2.2rem 0 3rem; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: #fff; }

/* Rechtliches */
.legal { max-width: 44rem; padding: 3rem 0 6rem; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: 1.6rem; }
.legal h2 { font-size: 1.3rem; font-weight: 700; margin: 2.6rem 0 .7rem; }
.legal h3 { font-size: 1.05rem; font-weight: 700; margin: 1.6rem 0 .4rem; }
.legal p, .legal li { color: var(--ink-2); }
.legal strong { color: var(--ink); }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: .45rem; }
.legal address { font-style: normal; color: var(--ink); line-height: 1.7; margin-bottom: 1em; }
.legal .stand { color: var(--muted); font-size: .95rem; margin-top: 3rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .packet { display: none; }
  .flash { animation: none; }
  .hero-media video { display: none; }
}
.t-conflict h3 { margin-top: auto; }
.tile .hlc-demo code { font-size: 1em; }
