/* Layout-Erweiterungen für Unterseiten – Rhenetia-Designsystem. */

.subpage-hero {
  padding: calc(var(--nav-h) + 100px) 0 80px;
}

/* Inhaltsseiten: jede Sektion durch eine feine Linie von der vorherigen
   trennen. Gilt nur auf Unterseiten (_subpage.css wird auf der Startseite
   nicht geladen), die erste Sektion (subpage-hero) folgt auf den header und
   bekommt daher keine Linie. */
main > section + section,
[data-page-main] section + section,
body > section + section {
  border-top: 1px solid var(--line);
}

/* H1: Libre Baskerville Bold, Schiefergrau, Akzentlinie darunter.
   block + fit-content: linksbündig unter dem Eyebrow, Hover nur auf dem Text. */
.subpage-hero h1 {
  display: block;
  width: fit-content;
  margin: 16px 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.2;
  max-width: 22ch;
  font-weight: 600;
  color: var(--ink);
}

/* Akzentlinie darunter – verlängert sich, wenn man die Überschrift anfährt. */
.subpage-hero h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent);
  margin-top: 24px;
  transition: width 0.55s var(--ease-out);
}

.subpage-hero h1:hover::after {
  width: 200px;
}

@media (prefers-reduced-motion: reduce) {
  .subpage-hero h1::after {
    transition: none;
  }
}

.subpage-hero p {
  color: var(--ink-soft);
  font-size: clamp(16px, 1.5vw, 19px);
  max-width: 60ch;
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 0;
}

.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 28px;
  transition: border-color 0.3s var(--ease-out), transform 0.4s var(--ease-out);
}

.feature:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature h3 {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.back-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-right: 28px;
  margin-bottom: 18px;
  transition: color 0.25s var(--ease-out);
}

.back-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}

.back-link:hover {
  color: var(--accent);
}

.back-link:hover::after {
  transform: scaleX(1);
}

@media (max-width: 700px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .subpage-hero {
    padding: calc(var(--nav-h) + 48px) 0 56px;
  }
  .feature {
    padding: 22px;
  }
}

/* ---------- Wechsel-Schritte ---------- */

.steps {
  background: var(--bg-soft);
}

.steps__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

.step {
  position: relative;
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
  display: grid;
  gap: 6px;
  transition: transform 0.35s var(--ease-out);
}

/* Akzentlinie, die sich beim Hover über die obere Kante zeichnet. */
.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.step:hover {
  transform: translateY(-4px);
}

.step:hover::before {
  width: 100%;
}

.step__num {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 32px;
}

.step h3 {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.3s var(--ease-out);
}

.step:hover h3 {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .step,
  .step::before {
    transition: none;
  }
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 540px) {
  .steps__grid {
    grid-template-columns: 1fr;
  }
  .step__num {
    margin-bottom: 14px;
  }
}

/* Trust-Sektion: siehe css/trust.css (eine Quelle für „für wen",
   „ansatz", „was wir bieten"). */

/* ---------- FAQ ---------- */

.faq__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 52px;
  align-items: start;
}

.faq__column {
  display: flex;
  flex-direction: column;
}

.faq__item {
  border-top: 1px solid var(--line);
}

.faq__column .faq__item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.25s var(--ease-out);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex: 0 0 22px;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease-out), transform 0.4s var(--ease-out);
}

.faq__item[open] summary::after {
  content: "−";
  color: var(--ink);
  transform: rotate(180deg);
}

.faq__item summary:hover {
  color: var(--accent);
}

.faq__item summary:hover::after {
  color: var(--accent);
}

.faq__answer {
  margin: 0 60px 24px 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

@media (max-width: 880px) {
  .faq__list {
    grid-template-columns: 1fr;
    gap: 0;
  }
  /* In der einspaltigen Ansicht würden zwei `:last-child` der Spalten
     je eine doppelte Border ergeben – wir entfernen die Border der ersten
     Spalte unten und die Border der zweiten Spalte oben (nur die innere
     Naht). */
  .faq__column:first-child .faq__item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 540px) {
  .faq__item summary {
    font-size: 15.5px;
    padding: 18px 0;
  }
  .faq__answer {
    margin-right: 40px;
  }
}

/* ---------- Login page ---------- */

.login-body {
  background: var(--bg-soft);
  min-height: 100vh;
}

.login-brand {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 5;
}

.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  gap: 22px;
}

.login__card {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
}

.login__card h1 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
}

.login__sub {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.login__form {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}

/* Hinweisbox laut Styleguide: Kupferrose-Fläche, Terrakotta-Linie links */
.login__error {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.login__foot {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.login__forgot {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 4px 2px;
  transition: color 0.25s var(--ease-out);
}

.login__forgot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}

.login__forgot:hover {
  color: var(--accent);
}

.login__forgot:hover::after {
  transform: scaleX(1);
}

.login__below {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.login__below a {
  color: var(--ink);
  font-weight: 600;
  margin-left: 4px;
  transition: color 0.25s var(--ease-out);
}

.login__below a:hover {
  color: var(--accent);
}

@media (max-width: 540px) {
  .login__card {
    padding: 32px 24px 28px;
  }
  .login-brand {
    top: 20px;
    left: 22px;
    font-size: 17px;
  }
}

/* === Auth-Page-Klassen (forgot/reset/accept-invitation) ============ */
/* Auth-Seiten (login / forgot / reset / accept-invitation) */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 80px 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px 32px;
  background: var(--bg);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
}

.auth-card .auth-sub {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.auth-form input {
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s var(--ease-out);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Submit-Button im auth-form benutzt die globale .btn-Klasse aus
   styles.css (mit Pfeil-Animation). Wir overriden hier nur den Top-Margin
   für etwas Luft zum letzten Feld + den Disabled-Zustand. */
.auth-form .btn[type="submit"] {
  margin-top: 8px;
}

.auth-form .btn[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-msg {
  font-size: 13.5px;
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: 3px solid transparent;
}

.auth-msg.error {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: #8b2a2a;
}

.auth-msg.success {
  background: var(--bg-soft);
  border-left-color: var(--ink-soft);
  color: var(--ink);
}

.auth-foot {
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-foot a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.auth-foot a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-brand {
  position: fixed;
  top: 28px;
  left: 28px;
  text-decoration: none;
}

/* ---------- Subpage-Hero: CTA-Zeile ---------- */

.subpage-hero__actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.subpage-hero__note {
  font-size: 14px;
  color: var(--ink-mute);
}

/* ---------- Fließtext-Sektion (prose) ---------- */

.prose--soft {
  background: var(--bg-soft);
}

/* Zweispaltiges Editorial-Layout: Titel (+ Hinweis) links, Inhalt rechts –
   füllt die Sektion und vermeidet große Leerflächen. */
.prose .container {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 24px 64px;
  align-items: start;
}

.prose__aside .section-head {
  margin-bottom: 0;
}

.prose__body {
  max-width: 100%;
}

@media (max-width: 880px) {
  .prose .container {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.prose__body > p {
  max-width: 70ch;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}

.prose__body > p:last-child {
  margin-bottom: 0;
}

.prose__list {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.prose__list li {
  position: relative;
  padding: 16px 18px 16px 50px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.5;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.prose__list li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Kupferrose-Kreis als Marker … */
.prose__list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 17px;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--accent-soft);
}

/* … mit Häkchen darin. */
.prose__list li::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 21px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

@media (max-width: 640px) {
  .prose__list {
    grid-template-columns: 1fr;
  }
}

.prose__cta {
  margin-top: 30px;
}

/* Hinweisbox laut Styleguide: Kupferrose-Fläche, Terrakotta-Linie links */
.prose__note {
  max-width: 80ch;
  margin: 28px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

.prose--soft .prose__note {
  background: var(--bg);
}

/* In der linken Spalte (Listen-Sektionen) ist der Hinweis nur eine ruhige
   Stütztext-Notiz mit Akzentkante – keine gefüllte Box unter den Karten. */
.prose__aside .prose__note {
  margin: 26px 0 0;
  padding: 2px 0 2px 18px;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
}

/* ---------- Leistungstabelle (im Stil der Ablauf-Sektion) ---------- */

/* Kein umschließender Rahmen, keine dunkle Kopfzeile – luftig wie die
   Ablauf-Sektion: Versalien-Kopf mit kräftiger Unterlinie, Zeilen nur durch
   feine Linien getrennt. */
.svc__wrap {
  overflow-x: auto;
}

.svc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

/* Kopfzeile wie ein Eyebrow: Versalien, gesperrt, ohne Fläche */
.svc-table th {
  text-align: left;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 20px 13px;
  border-bottom: 2px solid var(--line-strong);
}

.svc-table td {
  padding: 18px 20px;
  color: var(--ink-soft);
  vertical-align: top;
  border-top: 1px solid var(--line);
  transition: background-color 0.18s var(--ease-out), color 0.18s var(--ease-out);
}

/* erste Zeile schließt direkt an die Kopf-Unterlinie an (keine Doppellinie) */
.svc-table tbody tr:first-child td {
  border-top: 0;
}

.svc-table td:first-child {
  color: var(--ink);
  font-weight: 600;
}

/* Zeile beim Hover leicht in Kupferrose – wie der Hover der Ablauf-Punkte */
.svc-table tbody tr:hover td {
  background: var(--accent-soft);
}

.svc-table tbody tr:hover td:first-child {
  color: var(--accent);
}

/* Dreispaltige Leistungstabelle: feste Leistungs- und Umfang-Spalte */
.svc-table--cols3 td:first-child {
  width: 26%;
}

.svc-table--cols3 td:last-child {
  width: 15%;
  color: var(--ink);
  font-weight: 600;
}

/* Zweispaltige Tabelle (z. B. Kontaktwege): erste Spalte trägt das Anliegen */
.svc-table--cols2 td:first-child {
  width: 42%;
}

.svc__note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-mute);
}

@media (max-width: 640px) {
  .svc-table,
  .svc-table tbody,
  .svc-table tr,
  .svc-table td {
    display: block;
    width: 100% !important;
  }
  .svc-table thead {
    display: none;
  }
  .svc-table tr {
    padding: 18px 0;
    border-top: 1px solid var(--line);
  }
  .svc-table tbody tr:first-child {
    border-top: 0;
    padding-top: 0;
  }
  .svc-table td {
    border-top: 0;
    background: transparent !important;
    padding: 0 0 10px;
  }
  .svc-table td:last-child {
    padding-bottom: 0;
  }
  .svc-table td::before {
    content: attr(data-col);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 4px;
  }
}
