/* ==========================================================================
   rtk-kanzlei.de — Stylesheet
   Nachbau des bestehenden Webdesigns (The7-Child), statisch, ohne CDN.
   Schriften lokal: Roboto (SIL OFL), Vollkorn SC (SIL OFL)
   ========================================================================== */

/* --- Schriften ---------------------------------------------------------- */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/roboto-400.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/roboto-500.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/roboto-700.woff2") format("woff2");
}
@font-face {
  font-family: "Vollkorn SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vollkornsc-400.woff2") format("woff2");
}
@font-face {
  font-family: "Vollkorn SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/vollkornsc-600.woff2") format("woff2");
}
@font-face {
  font-family: "Vollkorn SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/vollkornsc-700.woff2") format("woff2");
}

/* --- Tokens ------------------------------------------------------------- */

:root {
  --bordeaux: #800040;
  --bordeaux-dark: #660033;
  --ink: #3e3e3e;
  --ink-soft: #6b6b6b;
  --nav: #333333;
  --page: #ffffff;
  --band: #f7f7f7;
  --line: #e2e2e2;
  --footer-bg: #3e3e3e;
  --footer-ink: #eeeeee;
  --topbar-ink: #8d9095;

  --serif: "Vollkorn SC", Georgia, "Times New Roman", serif;
  --sans: "Roboto", Helvetica, Arial, Verdana, sans-serif;

  --wrap: 1200px;
  --gutter: 50px;
}

/* --- Basis -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.75 var(--sans);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--bordeaux); }
a:hover, a:focus-visible { color: var(--bordeaux-dark); }

:focus-visible {
  outline: 2px solid var(--bordeaux);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--bordeaux);
  font-weight: 400;
  margin: 0;
  text-align: center;
  text-transform: capitalize;
}

/* Rechtstexte behalten die normale Groß-/Kleinschreibung. */
.legal h2, .legal h3 { text-transform: none; }

h1 { font-size: 42px; line-height: 1.15; font-weight: 600; }
h2 { font-size: 34px; line-height: 1.3; }
h3 { font-size: 24px; line-height: 1.42; }
h4 { font-size: 20px; line-height: 1.5; }

p { margin: 0 0 1.2em; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bordeaux);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

/* --- Kopfbereich -------------------------------------------------------- */

.topbar {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--topbar-ink);
  background: var(--page);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  padding-block: 4px;
}
.topbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.topbar a { color: var(--topbar-ink); text-decoration: none; }
.topbar a:hover { color: var(--bordeaux); }
.topbar li { display: flex; align-items: center; gap: 7px; }
.topbar svg { width: 13px; height: 13px; fill: currentColor; flex: none; }

.masthead {
  background: var(--page);
  box-shadow: 0 0 15px 1px rgba(0, 0, 0, .07);
  position: relative;
  z-index: 5;
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 90px;
}

/* Desktop 400 × 40 px wie im Original. */
.branding { flex: none; }
.branding img { width: 400px; height: 40px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--nav);
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
}
.nav-toggle:hover { color: var(--bordeaux); }
.nav-toggle svg { width: 24px; height: 24px; fill: currentColor; display: block; }

/* Schließen-Schaltfläche im Drawer — bordeauxfarbenes Quadrat oben rechts. */
.nav-close {
  display: none;
  position: absolute;
  top: 15px;
  right: 13px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: var(--bordeaux);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-close:hover { background: var(--bordeaux-dark); }
.nav-close svg { width: 12px; height: 12px; fill: currentColor; display: block; }

/* Abdunklung hinter dem Drawer. */
.nav-scrim { display: none; }

/* Kontaktblock im aufgeklappten Menü — nur mobil sichtbar. */
.nav-contact { display: none; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 26px;
}
.main-nav ul a {
  color: var(--nav);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 16px;
  padding: 6px 2px;
  display: inline-block;
  border-bottom: 2px solid transparent;
}
.main-nav ul a:hover { color: var(--bordeaux); }
.main-nav ul a[aria-current="page"] {
  color: var(--nav);
  border-bottom-color: var(--bordeaux);
}

/* --- Seitenkopf mit Bild ------------------------------------------------ */

.page-head {
  background-color: #f0ecee;
  background-image: url("../img/hero.webp");
  background-size: cover;
  background-position: 50% 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 40px 20px;
  text-align: center;
}

/* --- Inhaltsbereiche ---------------------------------------------------- */

.section { padding-block: 60px; }
.section--band { background: var(--band); }
.section--tight { padding-block: 40px; }

.lead {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}
.lead p:last-child { margin-bottom: 0; }

.subline {
  text-align: center;
  color: var(--ink);
  margin-top: 10px;
}

/* --- Teaser-Kacheln ----------------------------------------------------- */

.teasers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}
.teaser {
  position: relative;
  border: 1px solid rgba(128, 0, 64, .5);
  padding: 22px 20px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.teaser h3 { margin: 0; }

/* Die ganze Kachel ist anklickbar und löst den Hover der Schaltfläche mit aus.
   Das Ziel bleibt derselbe Link — nur seine Fläche wird über die Kachel
   aufgespannt, es kommt kein zweiter Link für Screenreader hinzu. */
.teaser .btn::after {
  content: "";
  position: absolute;
  inset: 0;
}
.teaser:hover { border-color: var(--bordeaux); box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.teaser:hover .btn,
.teaser:focus-within .btn {
  background: var(--bordeaux-dark);
  border-color: var(--bordeaux-dark);
  color: #fff;
}
.teaser:hover h3 { color: var(--bordeaux-dark); }

.btn {
  display: inline-block;
  background: var(--bordeaux);
  color: #fff;
  text-decoration: none;
  padding: 7px 22px;
  font-size: 16px;
  border: 1px solid var(--bordeaux);
}
.btn:hover, .btn:focus-visible {
  background: var(--bordeaux-dark);
  border-color: var(--bordeaux-dark);
  color: #fff;
}

/* --- Zitat -------------------------------------------------------------- */

.quote { text-align: center; }
.quote h3 { margin-bottom: 14px; }
.quote p { margin: 0 0 6px; }
.quote .quote-en { font-style: italic; color: var(--ink-soft); }
.quote .quote-src { font-size: 14px; color: var(--ink-soft); }

/* --- Listen (Rechtsgebiete) --------------------------------------------- */

.checklist {
  list-style: none;
  margin: 34px auto 0;
  padding: 0;
  max-width: 420px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}
.checklist svg {
  width: 17px;
  height: 17px;
  fill: var(--bordeaux);
  flex: none;
}

/* --- Downloads ---------------------------------------------------------- */

.downloads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 40px;
}
.download { text-align: center; }
.download a { text-decoration: none; display: block; }
.download img {
  border: 1px solid var(--line);
  margin-inline: auto;
  width: 100%;
  height: auto;
}
.download a:hover img { border-color: var(--bordeaux); }
.download .label {
  display: inline-block;
  margin-top: 16px;
  text-decoration: underline;
  color: var(--bordeaux);
}
.download .meta {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* --- Kontaktseite ------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.contact-grid h2, .contact-grid h3 { text-align: left; }
.contact-info h3 { margin-bottom: 4px; }
.contact-info .role { margin-bottom: 26px; }
.contact-info dl { margin: 0; }
.contact-info dt {
  font-weight: 700;
  margin-top: 16px;
}
.contact-info dd { margin: 0; }

/* --- Formular ----------------------------------------------------------- */

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 12px;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--bordeaux);
  outline: none;
}
.form-field textarea { min-height: 170px; resize: vertical; }

.form-consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.form-consent input { margin-top: 6px; flex: none; }

.form-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

/* Das von ProntoSite eingesetzte Formular-Widget an das Design der Seite
   angleichen — dieselben Kanten, Farben und Abstände wie .form-field. */

.contact-form .ps-form-grid { display: block; }
.contact-form .ps-form-field { margin-bottom: 18px; }
.contact-form .ps-form-field label { display: block; margin-bottom: 6px; }
.contact-form .ps-form-field input ,
.contact-form .ps-form-field select ,
.contact-form .ps-form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 12px;
}
.contact-form .ps-form-field input:focus ,
.contact-form .ps-form-field select:focus ,
.contact-form .ps-form-field textarea:focus {
  border-color: var(--bordeaux);
  outline: none;
}
.contact-form .ps-form-field textarea { min-height: 170px; resize: vertical; }

.contact-form .ps-form-consent label.ps-form-opt {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.contact-form .ps-form-consent input[type="checkbox"] {
  width: auto;
  margin-top: 6px;
  flex: none;
  padding: 0;
}

.contact-form .ps-form button[type="submit"] {
  background: var(--bordeaux);
  border: 1px solid var(--bordeaux);
  border-radius: 0;
  color: #fff;
  font: inherit;
  padding: 7px 22px;
  cursor: pointer;
}
.contact-form .ps-form button[type="submit"]:hover ,
.contact-form .ps-form button[type="submit"]:focus-visible {
  background: var(--bordeaux-dark);
  border-color: var(--bordeaux-dark);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Rechtstexte -------------------------------------------------------- */

.legal { max-width: 860px; margin-inline: auto; }
.legal h2 {
  text-align: left;
  font-size: 26px;
  margin: 38px 0 12px;
}
.legal h2:first-of-type { margin-top: 0; }
.legal h3 {
  text-align: left;
  font-size: 20px;
  margin: 26px 0 10px;
}
.legal ul { margin: 0 0 1.2em; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal address { font-style: normal; margin-bottom: 1.2em; }
.legal .highlight {
  border-left: 3px solid var(--bordeaux);
  padding: 4px 0 4px 18px;
  font-weight: 500;
}

/* --- Consent-Platzhalter ------------------------------------------------ */

/* Der JUPUS-Assistent sitzt etwas höher, damit er die Cookie-Leiste nicht
   verdeckt — dieselbe Regel wie auf der Originalseite. */
#rasaWebchatPro.bottom-right { bottom: 60px !important; }


/* --- Fußbereich --------------------------------------------------------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-size: 13px;
  padding-block: 22px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  text-align: center;
}
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: center;
}

/* --- Fehlerseite -------------------------------------------------------- */

.error-page { text-align: center; }
.error-page .code {
  font-family: var(--serif);
  font-size: 72px;
  line-height: 1;
  color: var(--bordeaux);
  margin-bottom: 12px;
}

/* --- Bestätigungsseite -------------------------------------------------- */

.confirm { text-align: center; max-width: 640px; margin-inline: auto; }
.confirm .btn { margin-top: 10px; }

/* --- Umbrüche ----------------------------------------------------------- */

@media (max-width: 1000px) {
  :root { --gutter: 30px; }
  .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .teasers { gap: 22px; }
}

/* Knapp über dem Umbruch zur Schublade wird das Logo proportional kleiner,
   damit Logo und Navigation nebeneinander Platz haben. */
@media (max-width: 940px) {
  .branding img { width: 340px; height: 34px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-close { display: inline-flex; }

  .masthead { position: sticky; top: 0; }
  .masthead .wrap { min-height: 68px; gap: 12px; }
  .branding img { width: 300px; height: 30px; }

  /* Seitliche Schublade von rechts — 330 px wie im Original. */
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 330px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background: var(--page);
    z-index: 9602;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 56px 30px 32px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
  }
  .nav-toggle[aria-expanded="true"] + .main-nav {
    transform: translateX(0);
    visibility: visible;
    transition: transform .3s ease, visibility 0s;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, .5);
    z-index: 9601;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
  }
  .nav-toggle[aria-expanded="true"] ~ .nav-scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease, visibility 0s;
  }

  /* Seite hinter dem Drawer nicht mitscrollen lassen. */
  body:has(.nav-toggle[aria-expanded="true"]) { overflow: hidden; }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .main-nav ul a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .main-nav ul li:last-child a { border-bottom: 1px solid var(--line); }
  .main-nav ul a[aria-current="page"] {
    color: var(--bordeaux);
    border-bottom-color: var(--line);
  }

  .nav-contact {
    display: block;
    padding-top: 26px;
    font-size: 14px;
  }
  .nav-contact a,
  .nav-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--ink);
    text-decoration: none;
  }
  .nav-contact p { margin-bottom: 0; color: var(--ink-soft); }
  .nav-contact a:hover { color: var(--bordeaux); }
  .nav-contact svg { width: 14px; height: 14px; fill: var(--bordeaux); flex: none; }

  .teasers, .downloads { grid-template-columns: 1fr; }
  .downloads { max-width: 420px; margin-inline: auto; }
  h1 { font-size: 32px; }
  h2 { font-size: 27px; }
  h3 { font-size: 22px; }
  .page-head { min-height: 160px; padding-block: 30px; }
  .section { padding-block: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav, .nav-scrim { transition: none; }
}

@media (max-width: 680px) {
  /* Die Anschrift steht mobil im aufgeklappten Menü, nicht in der Kopfleiste. */
  .topbar .topbar-address { display: none; }
  .topbar .wrap { justify-content: center; min-height: 34px; }
  .topbar ul { gap: 18px; justify-content: center; }
  .branding img { width: 250px; height: 25px; }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .topbar { font-size: 12.5px; }
  .topbar ul { gap: 14px; }
  .branding img { width: 205px; height: 21px; }
  h1 { font-size: 26px; }
  h2 { font-size: 23px; }
  h3 { font-size: 20px; }
}

@media (max-width: 360px) {
  .branding img { width: 180px; height: 18px; }
}

@media print {
  .topbar, .main-nav, .nav-toggle, .page-head, .site-footer { display: none; }
  body { color: #000; }
}
