/* Schriften: lokal ausgeliefert (SIL Open Font License), nichts wird nachgeladen. */
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Farben und Maße laut DESIGN.md */
:root {
  --ink: #0b2545;          /* Dunkelblau */
  --petrol: #1f9d8b;       /* Petrol: nur Fläche, Icon, Akzent */
  --petrol-dark: #157a6b;  /* Petrol dunkel: Links, Hauptschaltflächen */
  --petrol-deep: #0f6356;  /* Petrol tief: Hover */
  --mint: #9ed9cf;         /* Hellpetrol: Akzent und Fokus auf Dunkelblau */
  --paper: #f4f5f9;        /* Grauweiß */
  --slate: #4a5a6e;        /* Zweittext */
  --steel: #6b7a90;        /* Feldränder */
  --mist: #d5dae3;         /* Trennlinien, Kartenrand */
  --haze: #c5d0de;         /* Zweittext auf Dunkelblau */
  --ok-bg: #e6f4f1;
  --note-bg: #fff3d1;
  --note-ink: #6b4a00;

  --r-card: 16px;
  --r-btn: 12px;
  --r-field: 10px;
  --shadow: 0 1px 2px rgba(11, 37, 69, .05), 0 4px 14px rgba(11, 37, 69, .06);
  --focus: var(--ink);

  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  accent-color: var(--petrol-dark);
  caret-color: var(--petrol-dark);
  scrollbar-color: var(--steel) var(--paper);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-size: 1.125rem; }
::selection { background: var(--mint); color: var(--ink); }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.5rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.625rem, 1.4rem + .9vw, 1.875rem); font-weight: 800; margin-top: 0; }
h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 1em; }
main p, main li { max-width: 68ch; }
.center p { margin-inline: auto; }
a { color: var(--petrol-dark); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--petrol-deep); }
code { font-size: .95em; background: var(--paper); padding: .1em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--slate); font-size: 1rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .75rem 1rem; border-radius: var(--r-btn); }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .6rem 1.5rem; border-radius: var(--r-btn);
  background: var(--petrol-dark); color: #fff; text-decoration: none;
  font: 600 1.0625rem/1.2 var(--font-body);
  border: 2px solid var(--petrol-dark); cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--petrol-deep); border-color: var(--petrol-deep); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.btn--small { min-height: 44px; padding: .4rem 1.1rem; font-size: 1rem; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--text { background: transparent; border-color: transparent; color: var(--petrol-dark); text-decoration: underline; text-underline-offset: .2em; padding-inline: .75rem; }
.btn--text:hover { background: transparent; border-color: transparent; color: var(--petrol-deep); }

/* Kopfzeile */
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--mist); }
.topbar__inner { display: flex; align-items: center; gap: 2rem; height: 72px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 36px; width: auto; }
.nav { display: flex; gap: .4rem; margin-left: auto; }
.nav a { color: var(--slate); text-decoration: none; font-size: 1rem; font-weight: 500; padding: .7rem .7rem; border-radius: 8px; }
.nav a:hover { color: var(--ink); text-decoration: underline; }

/* Einstieg */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; background: var(--paper); }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.lead { font-size: 1.3rem; color: var(--slate); max-width: 34em; }
.badge {
  display: inline-block; font-size: 1rem; font-weight: 600; color: var(--petrol-dark);
  background: var(--ok-bg); border-radius: 999px; padding: .3rem 1rem; margin-bottom: 1.2rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.6rem; }
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--slate); font-size: 1rem; }
.pills li { display: flex; align-items: center; gap: .4rem; }
.pills li::before { content: ""; width: 1.1rem; height: 1.1rem; flex: none; background: url("icons/check.svg") center / contain no-repeat; }

/* Beispielansicht im Einstieg (nur Schmuck) */
.mock { background: #fff; border: 1px solid var(--mist); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; font-size: 1rem; }
.mock__bar { display: flex; gap: 6px; padding: .8rem 1rem; background: var(--paper); border-bottom: 1px solid var(--mist); }
.mock__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--mist); }
.mock__body { display: grid; grid-template-columns: 42% 1fr; min-height: 280px; }
.mock__side { background: var(--paper); border-right: 1px solid var(--mist); padding: 1rem; }
.mock__label { font-size: 1rem; font-weight: 600; color: var(--slate); margin: .5rem 0; }
.mock__label b { background: var(--petrol-dark); color: #fff; border-radius: 999px; padding: 0 .55em; margin-left: .3em; }
.mock__item { margin: 0 0 .25rem; padding: .4rem .6rem; border-radius: 8px; }
.mock__item--active { background: var(--ok-bg); color: var(--petrol-deep); font-weight: 600; }
.mock__main { padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.mock__msg { margin: 0; padding: .6rem .8rem; border-radius: 10px; background: var(--paper); }
.mock__msg b { display: block; font-size: 1rem; font-weight: 700; color: var(--petrol-dark); }

/* Abschnitte */
.section { padding: clamp(4rem, 7vw, 6rem) 0; }
.section--tint { background: var(--paper); }
.section--dark { --focus: var(--mint); background: var(--ink); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--mint); }
.section--cta { --focus: var(--mint); background: var(--ink); color: #fff; }
.section--cta p { color: var(--haze); font-size: 1.15rem; margin-bottom: 1.8rem; }
.section__intro { color: var(--slate); font-size: 1.2rem; max-width: 62ch; margin-bottom: 2.4rem; }
.big { font-size: 1.35rem; }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { background: #fff; border: 1px solid var(--mist); border-radius: var(--r-card); padding: 1.75rem; }
.card p { color: var(--slate); margin: 0; }
.card--accent { border: 2px solid var(--petrol-dark); background: var(--ok-bg); }
.card__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--ok-bg); color: var(--petrol-dark); margin-bottom: 1rem; }
.card--accent .card__icon { background: #fff; }
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cards--dark .card { background: transparent; border-color: rgba(197, 208, 222, .4); }
.cards--dark .card h3 { color: #fff; }
.cards--dark .card p { color: var(--haze); }

/* Zweispaltig */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.checks { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.checks li { position: relative; padding-left: 2rem; margin-bottom: 1rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 1.2rem; height: 1.2rem; background: url("icons/check.svg") center / contain no-repeat; }

/* Raum-Beispiel */
.room { margin: 0; background: #fff; border: 1px solid var(--mist); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 1.4rem; }
.room__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.room__title { font-family: var(--font-head); font-weight: 800; font-size: 1.375rem; }
.room__status { font-size: 1rem; font-weight: 600; color: var(--petrol-dark); background: var(--ok-bg); padding: .2rem .9rem; border-radius: 999px; }
.room__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.room__tile { background: var(--paper); border-radius: 12px; padding: 1rem; }
.room__tile p { margin: 0 0 .2rem; }
.room__kind { font-size: 1rem; color: var(--petrol-dark); font-weight: 700; }
.room figcaption { margin-top: 1rem; font-size: 1rem; color: var(--slate); }

/* Hinweis */
.note { background: var(--note-bg); border: 1px solid rgba(107, 74, 0, .35); border-radius: var(--r-card); padding: 1.6rem; }
.note p { color: var(--ink); }
.note p:last-child { margin-bottom: 0; }
.note .muted { color: var(--note-ink); }

/* Gründe */
.reasons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.75rem; }
.reasons article { grid-column: span 2; }
.reasons article:nth-child(n+4) { grid-column: span 3; }
.reasons article { border-top: 3px solid var(--petrol); padding-top: 1.1rem; }
.reasons p { color: var(--slate); margin: 0; }
.fineprint { margin-top: 2.5rem; font-size: 1rem; color: var(--slate); border-top: 1px solid var(--mist); padding-top: 1rem; max-width: 62ch; }

/* Häufige Fragen */
details { border-bottom: 1px solid var(--mist); }
summary { cursor: pointer; font-weight: 600; font-size: 1.1875rem; list-style: none; position: relative; padding: 1.1rem 2.5rem 1.1rem 0; min-height: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; color: var(--petrol-dark); }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 1.2rem; color: var(--slate); }

/* Fußzeile */
.footer { padding: 2rem 0; border-top: 1px solid var(--mist); font-size: 1rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer p { margin: 0; max-width: none; }
.footer nav { display: flex; gap: .4rem; }
.footer nav a { padding: .7rem .5rem; }

/* Newsletter */
.newsletter { max-width: 30rem; margin: 0 auto; text-align: left; }
.newsletter p { margin: 0 0 1.1rem; font-size: 1rem; }
.newsletter label { display: block; font-weight: 600; margin-bottom: .35rem; color: #fff; }
.newsletter input[type="email"], .newsletter input[type="text"] { width: 100%; min-height: 48px; padding: .6rem .9rem; font: inherit; font-size: 1.0625rem; border: 2px solid #fff; border-radius: var(--r-field); color: var(--ink); background: #fff; }
.newsletter__check { display: flex; gap: .8rem; align-items: flex-start; }
.newsletter__check input { margin-top: .2rem; width: 1.5rem; height: 1.5rem; flex: none; accent-color: var(--mint); }
.newsletter__check label { font-weight: 400; margin: 0; }
.newsletter__check span { color: var(--haze); font-size: 1rem; }
.newsletter .btn { width: 100%; }
.newsletter .newsletter__note { margin: 1rem 0 0; font-size: 1rem; color: var(--haze); text-align: center; max-width: none; }

/* Kalkulator */
.calc-principles { margin-bottom: 2.4rem; }
.calc { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; }
.calc[hidden] { display: none; }
.calc__main { display: grid; gap: 1rem; justify-items: start; }
.calc__main > [data-groups] { display: grid; gap: 1rem; width: 100%; }
.calc-group { background: #fff; border: 1px solid var(--mist); border-radius: var(--r-card); padding: 1.4rem 1.6rem; }
.calc-group__head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-bottom: 1rem; }
.calc-group__title { margin: 0; flex: 1 1 auto; }
.calc-count { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: 1rem; }
.calc-count input { width: 6.5rem; min-height: 48px; padding: .5rem .7rem; font: inherit; font-size: 1.0625rem; color: var(--ink); background: #fff; border: 2px solid var(--steel); border-radius: var(--r-field); }
.calc-remove { font: inherit; font-size: 1rem; font-weight: 500; color: var(--slate); background: #fff; border: 2px solid var(--steel); border-radius: var(--r-btn); min-height: 44px; padding: .4rem 1rem; cursor: pointer; }
.calc-remove:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
.calc-remove:disabled { opacity: .5; cursor: not-allowed; }
.calc-features { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .6rem .8rem; }
.calc-features legend { font-size: 1rem; color: var(--slate); margin-bottom: .6rem; padding: 0; }
.calc-feature { display: flex; align-items: center; gap: .8rem; background: var(--paper); border-radius: 12px; padding: .5rem 1rem; min-height: 56px; }
.calc-feature input { width: 1.5rem; height: 1.5rem; flex: none; }
.calc-feature label { display: flex; flex-direction: column; flex: 1; cursor: pointer; padding: .2rem 0; line-height: 1.35; }
.calc-feature__price { font-size: 1rem; color: var(--slate); font-variant-numeric: tabular-nums; }
.calc-storage { background: #fff; border: 1px solid var(--mist); border-radius: var(--r-card); padding: 1.4rem 1.6rem; margin: 0; width: 100%; min-width: 0; display: grid; gap: 1rem; }
.calc-storage legend { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; padding: 0 .3rem; }
.calc-storage__intro { margin: 0; max-width: none; color: var(--slate); font-size: 1rem; }
.calc-storage__row { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; background: var(--paper); border-radius: 12px; padding: .8rem 1rem; }
.calc-storage__label { display: flex; flex-direction: column; line-height: 1.35; }
.calc-storage__field { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.calc-selfhost { background: var(--paper); border: 1px solid var(--mist); border-radius: var(--r-card); padding: 1.2rem 1.6rem; width: 100%; }
.calc-selfhost h3 { margin: 0 0 .4rem; }
.calc-selfhost p { margin: 0; max-width: none; }
.calc-selfhost__note { margin-top: .5rem !important; color: var(--slate); font-size: 1rem; }
.calc-storage-host { width: 100%; }
.calc-storage__field input { width: 7.5rem; min-height: 48px; padding: .5rem .7rem; font: inherit; font-size: 1.0625rem; color: var(--ink); background: #fff; border: 2px solid var(--steel); border-radius: var(--r-field); }
.calc-storage__sum { grid-column: 1 / -1; margin: 0; max-width: none; font-size: 1rem; color: var(--slate); font-variant-numeric: tabular-nums; }
.calc-group__sum { margin: 0; padding-top: 1rem; border-top: 1px solid var(--mist); display: flex; flex-wrap: wrap; gap: .3rem 1rem; justify-content: space-between; color: var(--slate); max-width: none; font-variant-numeric: tabular-nums; }
.calc-group__value { color: var(--ink); }
.calc-total { --focus: var(--mint); position: sticky; top: 96px; background: var(--ink); color: #fff; border-radius: var(--r-card); padding: 1.6rem; box-shadow: var(--shadow); }
.calc-total p { margin: 0; max-width: none; }
.calc-total__label { font-size: 1rem; font-weight: 600; color: var(--haze); }
.calc-total__value { font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin: .3rem 0 .2rem; font-variant-numeric: tabular-nums; }
.calc-total__meta { color: var(--haze); margin-bottom: 1rem; font-size: 1rem; }
.calc-total__list { list-style: none; margin: 0 0 1.4rem; padding: 1rem 0 0; border-top: 1px solid rgba(197, 208, 222, .35); display: grid; gap: .6rem; font-size: 1rem; }
.calc-total__list li { display: flex; justify-content: space-between; gap: 1rem; max-width: none; }
.calc-total__list li:empty { display: none; }
.calc-break__sum { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-total .btn { background: #fff; color: var(--ink); border-color: #fff; width: 100%; }
.calc-total .btn:hover:not(:disabled) { background: var(--paper); border-color: var(--paper); }
.calc-total .calc-total__link { background: transparent; color: #fff; border-color: var(--haze); }
.calc-total .calc-total__link:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }
.calc-total__note { font-size: 1rem; color: var(--haze); margin: .8rem 0 1rem; }
.calc-total__status { min-height: 1.6em; font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

/* Anpassung an kleinere Bildschirme */
@media (max-width: 900px) {
  .hero__inner, .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .reasons { grid-template-columns: 1fr 1fr; }
  .reasons article, .reasons article:nth-child(n+4) { grid-column: auto; }
  .nav { display: none; }
  .topbar__inner { justify-content: space-between; }
  .calc { grid-template-columns: 1fr; }
  .calc-total { position: static; }
}
@media (max-width: 600px) {
  .cards, .reasons { grid-template-columns: 1fr; }
  .mock__body { grid-template-columns: 1fr; }
  .mock__side { display: none; }
  .room__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

::placeholder { color: var(--slate); opacity: 1; }

@media (max-width: 600px) {
  .brand img { height: 33px; }
  .btn--small { white-space: nowrap; padding-inline: .9rem; }
}
