/* Smartmacherei — /downloads nach Claude-Design "Downloads.html" (helles Web-CI).
   Hero mit HA-Verlauf, Sprungleiste, Karten mit Fakten-Spalte, dunkle Formularkarte. */

:root {
  --ink:       #0a2a3d;
  --ink-soft:  #5b7180;
  --text:      #3f5866;
  --card:      #ffffff;
  --card-soft: #f4f8fb;
  --page:      #eef4f8;
  --deep:      #0a6fbe;
  --accent:    #03A9F4;
  --brand:     #11b1d6;
  --line:      rgba(10, 42, 61, 0.10);
  --amber:     #a35b00;
  --amber-soft:#fff4e0;
  --ha-grad:   radial-gradient(135% 130% at 88% 12%, #34C8FF 0%, #07A4EF 38%, #0286D4 70%, #0a6fbe 100%);
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--page); color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--deep); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; }
code {
  font-family: var(--font-mono); font-size: .82em;
  background: var(--card-soft); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; color: var(--deep);
  overflow-wrap: break-word; word-break: break-word;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* ── Header ──────────────────────────────────────────────── */
.sm-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.sm-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.sm-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.sm-logo:hover { color: var(--ink); }
.sm-logo .lk { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.sm-logo svg { color: var(--brand); }
.back {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  text-decoration: none; color: var(--ink-soft); padding: 8px 14px; border-radius: 100px;
}
.back:hover { background: var(--card-soft); color: var(--ink); }
/* Sprachumschalter — teilt sich mit dem Zurueck-Link die rechte Spalte, damit
   das space-between des Headers keine dritte Spalte bekommt. Beide Sprachen
   stehen im Markup, sichtbar ist nur die jeweils andere (i18n.js setzt hidden). */
.hdr-right { display: inline-flex; align-items: center; gap: 18px; }
.sm-lang {
  display: inline-flex; align-items: center; color: var(--ink-soft);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
}
.sm-lang a { color: inherit; text-decoration: none; opacity: 0.8; padding: 2px 4px; }
.sm-lang a:hover { color: inherit; opacity: 1; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { position: relative; background: var(--ha-grad); color: #fff; overflow: hidden; padding: 74px 0 118px; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 70% at 20% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(80% 70% at 20% 0%, #000 0%, transparent 75%);
  opacity: .7;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.82); margin: 0 0 20px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; margin: 0 0 22px; max-width: 15ch; }
.hero h1 em { font-style: normal; color: #bdeeff; }
.hero p.lead { font-family: var(--font-body); font-size: 1.03rem; line-height: 1.65; color: rgba(255,255,255,.86); max-width: 62ch; margin: 0; }

/* ── Sprungleiste ────────────────────────────────────────── */
.rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: -72px auto 0; position: relative; z-index: 5; }
.rail a {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 14px 34px rgba(10,42,61,.08); transition: transform .16s, box-shadow .16s;
}
.rail a:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(10,42,61,.13); color: var(--ink); }
.rail a > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.rail .tile {
  flex: 0 0 52px; height: 52px; border-radius: 11px; background: var(--card-soft); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.rail .tile svg, .rail .tile img { width: 30px; height: 30px; }
.rail .nm { font-size: .95rem; font-weight: 600; line-height: 1.25; }
.rail .ft { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }
.rail .arw { margin-left: auto; color: var(--brand); font-size: 1.1rem; }

/* ── Statusleiste (?t= / ?abgemeldet=1 / ?fehler=token) ──── */
main { padding: 56px 0 96px; }
.dl-banner {
  border-left: 3px solid var(--deep); background: #e4f2fd; color: var(--ink);
  font-family: var(--font-body); font-size: .95rem; line-height: 1.5;
  padding: 14px 20px; margin: 0 0 28px; border-radius: 0 12px 12px 0;
}
.dl-banner.err { border-color: var(--amber); background: var(--amber-soft); }

/* ── Karten ──────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 0; overflow: hidden;
  box-shadow: 0 18px 50px rgba(10,42,61,.06); margin-bottom: 28px; min-width: 0;
}
.card .bar { height: 4px; background: linear-gradient(90deg, var(--deep), var(--brand)); }
.card .body { display: grid; grid-template-columns: 236px 1fr; gap: 44px; padding: 36px 40px 40px; min-width: 0; }
.card .body > div { min-width: 0; }
.aside { border-right: 1px solid var(--line); padding-right: 28px; }
.logo-box {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--card-soft); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; margin-bottom: 22px;
}
.logo-box svg, .logo-box img { width: 44%; height: 56%; object-fit: contain; }
.logo-box img[src$="loxone.svg"] { width: 78%; height: auto; }   /* breite Wortmarke */
.rail .tile img[src$="loxone.svg"] { width: 44px; height: auto; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { display: grid; gap: 2px; }
.facts .k { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-soft); }
.facts .v { font-family: var(--font-body); font-size: .83rem; font-weight: 500; line-height: 1.4; }
.badge {
  display: inline-block; font-family: var(--font-mono); font-size: .62rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; padding: 6px 11px; border-radius: 100px; margin-bottom: 16px;
}
.badge.alpha { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: #e4f2fd; color: var(--deep); }
.card h2 { font-size: 1.62rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 14px; }
.card p { font-family: var(--font-body); font-size: .97rem; line-height: 1.68; color: var(--text); margin: 0 0 24px; max-width: 68ch; text-wrap: pretty; }
ol.steps { list-style: none; counter-reset: s; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
ol.steps li { counter-increment: s; position: relative; padding-left: 44px; font-family: var(--font-body); font-size: .94rem; line-height: 1.6; color: var(--text); }
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 9px;
  background: var(--card-soft); border: 1px solid var(--line); color: var(--deep);
  font-family: var(--font-mono); font-size: .76rem; font-weight: 600; display: grid; place-items: center;
}
ul.pts { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 13px; }
ul.pts li { position: relative; padding-left: 22px; font-family: var(--font-body); font-size: .94rem; line-height: 1.6; color: var(--text); }
ul.pts li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: var(--brand); }
ul.pts strong, ol.steps strong { color: var(--ink); font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────── */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: .88rem; font-weight: 600; text-decoration: none; line-height: 1.2;
  padding: 12px 22px; border-radius: 100px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn[hidden] { display: none; }
.btn.pri { background: var(--deep); color: #fff; box-shadow: 0 8px 20px rgba(10,111,190,.24); }
.btn.pri:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10,111,190,.32); color: #fff; }
.btn.sec { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.sec:hover { background: var(--card-soft); color: var(--ink); }
.btn.brand { background: var(--brand); box-shadow: 0 8px 20px rgba(17,177,214,.3); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

/* ── Formularkarte (dunkel) ──────────────────────────────── */
.form-card {
  background: #0b2c42; color: #fff; border-radius: 24px; padding: 0; overflow: hidden;
  box-shadow: 0 26px 70px rgba(10,42,61,.22); margin-top: 52px;
}
.form-card .bar { height: 4px; background: linear-gradient(90deg, var(--brand), #5fc23f); }
.form-card .inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: 52px; padding: 42px 44px 46px; }
.form-card h2 { font-size: 1.58rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.18; margin: 0 0 14px; }
.form-card p { font-family: var(--font-body); font-size: .95rem; line-height: 1.68; color: rgba(255,255,255,.76); margin: 0; }
.form-card a { color: #8fdcff; }
label.fl { display: block; font-family: var(--font-body); font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.72); margin-bottom: 8px; }
.form-card input[type=email] {
  width: 100%; font-family: var(--font-body); font-size: .95rem; padding: 14px 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff;
}
.form-card input[type=email]::placeholder { color: rgba(255,255,255,.42); }
.form-card input[type=email]:focus { outline: none; border-color: var(--brand); background: rgba(255,255,255,.1); }
.opts { display: grid; gap: 10px; margin: 20px 0 18px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; font-family: var(--font-body); font-size: .9rem; line-height: 1.5;
  color: rgba(255,255,255,.9); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 13px 15px; cursor: pointer; transition: background .15s, border-color .15s;
}
.opt:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.22); }
.opt input { margin: 1px 0 0; accent-color: var(--brand); width: 17px; height: 17px; flex: 0 0 auto; }
.opt.fine { background: none; border-color: rgba(255,255,255,.1); font-size: .79rem; line-height: 1.55; color: rgba(255,255,255,.62); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card .dl-msg { font-family: var(--font-body); font-size: .9rem; line-height: 1.5; color: rgba(255,255,255,.78); margin: 14px 0 0; }
.form-card .dl-msg.err { color: #ffcf78; }

/* ── Abmelden ────────────────────────────────────────────── */
.unsub { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.unsub p { font-family: var(--font-body); font-size: .85rem; line-height: 1.55; color: var(--ink-soft); margin: 0; max-width: 44ch; }
.unsub form { display: flex; gap: 10px; margin-left: auto; }
.unsub input {
  font-family: var(--font-body); font-size: .9rem; padding: 12px 16px; border-radius: 100px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); min-width: 230px;
}
.unsub input:focus { outline: none; border-color: var(--brand); }
.unsub .dl-msg { flex-basis: 100%; font-family: var(--font-body); font-size: .85rem; color: var(--ink-soft); margin: 0; }
.unsub .dl-msg.err { color: var(--amber); }

/* ── Footer (hell) ───────────────────────────────────────── */
.legal-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.legal-footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; }
.legal-footer .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); letter-spacing: .1em; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legal-footer nav a { font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.legal-footer nav a:hover { color: var(--deep); }

/* ── Mobil / Bewegung ────────────────────────────────────── */
@media (max-width: 900px) {
  .rail { grid-template-columns: 1fr; margin-top: -52px; }
  .card .body { grid-template-columns: 1fr; gap: 28px; padding: 28px 24px 32px; }
  .aside { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 24px; }
  .logo-box { max-width: 220px; }
  .form-card .inner { grid-template-columns: 1fr; gap: 28px; padding: 30px 24px 34px; }
  .wrap, .legal-footer-inner { padding: 0 20px; }
  .hero { padding: 52px 0 96px; }
  .unsub form { margin-left: 0; width: 100%; }
  .unsub input { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .rail a { transition: none; }
  .btn:hover, .rail a:hover { transform: none; }
}
