/* IT-Recht, Unterseite von geiger-rechtsanwalt.de
   Farbrichtung 3 "Ruhig mit Farbflaeche": heller Grund, weisse Flaechen, Dunkelblau fuer Leisten
   und Abschlussband, Koralle als Akzent. Keine externen Schriften, kein JavaScript.

   Kontrast (WCAG 2.2 AA, gemessen mit tools/pruefe_site.kontrast):
   Text #1a2430 auf Weiss und auf #f3f5f8 weit ueber 7:1, gedaempft #56636f auf Weiss 6,1:1 und auf
   #f3f5f8 5,6:1, Weiss auf Koralle #c24f3b 4,69:1, Weiss auf Dunkelblau #22384f 12,0:1.
   Koralle als TEXTFARBE nur auf Weiss (#ffffff). Auf dem Grund #f3f5f8 erreicht sie nur 4,30:1
   und besteht AA fuer normalen Text nicht. */

:root {
  --ground: #f3f5f8;
  --surface: #ffffff;
  --ink: #1a2430;
  --muted: #56636f;
  --line: #e3e7ec;
  --navy: #22384f;
  --coral: #c24f3b;
  --coral-dark: #a8402e;
  --on-navy: #dfe7f0;
  --gutter: clamp(1rem, 4vw, 2rem);
  --measure: 46rem;
  --wide: 72rem;
  --tap: 44px; /* Mindesthoehe von Links und Schaltflaechen */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--navy);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--coral-dark);
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.cta-band :focus-visible,
.who-bar :focus-visible {
  outline-color: #ffffff;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: #ffffff;
  font-weight: 700;
}

.skip-link:hover,
.skip-link:focus {
  color: #ffffff;
}

.skip-link:focus {
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--wide), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

/* Lange deutsche Woerter (Barrierefreiheitsstaerkungsgesetz) umbrechen statt ueberstehen. */
h1,
h2,
h3,
h4,
.tile,
.topic-list,
.who-bar,
.hero,
.content,
.cta-band,
.faq,
.breadcrumb {
  hyphens: auto;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
  text-wrap: balance;
}

/* ------------------------------------------------------------------ Kopfzeile */

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--coral);
  color: #ffffff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy);
  text-decoration: none;
}

.nav a:hover {
  color: var(--coral-dark);
  text-decoration: underline;
}

.nav .nav-cta {
  padding: 0 1.1rem;
  background: var(--coral);
  color: #ffffff;
}

.nav .nav-cta:hover {
  background: var(--coral-dark);
  color: #ffffff;
  text-decoration: none;
}

/* Menue ohne JavaScript: <details> mit <summary>. Unter 768 px klappt die Navigation auf. */
.nav-menu > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 0.9rem;
  border: 2px solid var(--navy);
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.nav-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-menu > summary::before {
  content: "";
  flex: none;
  width: 18px;
  height: 14px;
  background:
    linear-gradient(currentColor 0 0) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) 0 100% / 100% 2px no-repeat;
}

.nav-menu[open] > summary {
  background: var(--navy);
  color: #ffffff;
}

@media (max-width: 767.98px) {
  .nav-menu .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem var(--gutter) 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(26, 36, 48, 0.12);
    font-size: 1.05rem;
  }

  .nav-menu .nav a {
    min-height: 48px;
    border-bottom: 1px solid var(--line);
  }

  .nav-menu .nav .nav-cta {
    justify-content: center;
    margin-top: 0.75rem;
    border-bottom: 0;
  }
}

@media (min-width: 768px) {
  /* Ab 768 px steht die Navigation offen in der Kopfzeile, die Schaltflaeche entfaellt. */
  @supports selector(::details-content) {
    .nav-menu > summary {
      display: none;
    }

    .nav-menu::details-content {
      content-visibility: visible;
      display: block;
    }
  }
}

/* ------------------------------------------------------------------ Kopfbereich */

.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.75rem);
}

.hero--kompakt {
  padding: 1rem 0 clamp(1.25rem, 3.5vw, 2.25rem);
}

.eyebrow {
  margin: 0 0 0.5rem;
  /* Koralle als Text nur auf Weiss; auf Grau und Dunkelblau siehe unten. */
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.on-ground .eyebrow {
  color: var(--navy);
}

.hero h1 {
  max-width: 30em;
  font-size: clamp(1.6rem, 5.2vw, 2.5rem);
}

.hero .lead,
.lead {
  max-width: 40em;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.6vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--coral);
  background: var(--coral);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

/* ------------------------------------------------------------------ Brotkrumen */

.breadcrumb {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "\203A";
  margin: 0 0.5rem;
  color: var(--muted);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--navy);
}

/* ------------------------------------------------------------------ Zielgruppenleiste */

.who-bar {
  background: var(--navy);
  color: var(--on-navy);
}

.who-bar > .wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.who-bar a {
  display: block;
  min-height: var(--tap);
  padding: 0.9rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--on-navy);
  font-size: 0.9rem;
  text-decoration: none;
}

.who-bar a:first-child {
  padding-left: 0;
}

.who-bar a:last-child {
  border-right: 0;
}

.who-bar a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.who-bar strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
}

@media (max-width: 767.98px) {
  .who-bar > .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .who-bar a,
  .who-bar a:first-child {
    padding: 0.8rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .who-bar a:last-child {
    border-bottom: 0;
  }
}

/* ------------------------------------------------------------------ Kacheln */

.section {
  padding: clamp(1.75rem, 5vw, 3rem) 0;
}

.section > .wrap > h2,
.section-head h2 {
  font-size: clamp(1.3rem, 3.6vw, 1.7rem);
}

.tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.tile {
  min-width: 0;
  background: var(--surface);
  border-left: 4px solid var(--coral);
}

.tile a {
  display: block;
  height: 100%;
  min-height: var(--tap);
  padding: 0.9rem 1rem;
  color: var(--ink);
  text-decoration: none;
}

.tile a:hover {
  background: #fbfcfd;
  color: var(--ink);
}

.tile strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
}

.tile a:hover strong {
  text-decoration: underline;
}

.tile span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Zielgruppen-Auswahl: die Sprungmarken stehen unmittelbar vor der Kachelliste im Abschnitt
   #rechtsgebiete (<span id="kaufen"></span> usw.). Eine Kachel darf mehrere Klassen tragen. */
#rechtsgebiete [id] {
  scroll-margin-top: 1rem;
}

#kaufen:target ~ .tiles .tile--kaufen,
#anbieten:target ~ .tiles .tile--anbieten,
#verbraucher:target ~ .tiles .tile--verbraucher {
  border-left-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
}

#kaufen:target ~ .tiles .tile--kaufen strong::after,
#anbieten:target ~ .tiles .tile--anbieten strong::after,
#verbraucher:target ~ .tiles .tile--verbraucher strong::after {
  content: " \2713";
  color: var(--navy);
}

/* ------------------------------------------------------------------ Themenliste (Bereichsseite) */

/* Gleiche Breite wie der Textkasten darunter; Beschreibung unter dem Titel, Pfeil rechts. */
.topic-list {
  max-width: calc(var(--measure) + 2 * 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
}

.topic-list li + li {
  border-top: 1px solid var(--line);
}

.topic-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  min-height: var(--tap);
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.topic-list a::after {
  content: "\203A";
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--coral);
  font-size: 1.5rem;
  line-height: 1;
}

.topic-list a:hover {
  background: #fbfcfd;
  color: var(--ink);
}

.topic-list strong {
  grid-column: 1;
  min-width: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.topic-list a:hover strong {
  text-decoration: underline;
}

.topic-list span {
  grid-column: 1;
  min-width: 0;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Reserviert, derzeit ungenutzt: Thema, das noch nicht erscheint. */
.topic-soon {
  padding: 0.85rem 1rem;
  color: var(--muted);
}

.topic-soon strong,
.topic-soon span {
  color: var(--muted);
  font-weight: 400;
}

/* ------------------------------------------------------------------ Textseite */

.page-body {
  padding: 1.25rem 0 0;
}

.content {
  max-width: calc(var(--measure) + 2 * 2.25rem);
  margin: 1.5rem 0;
  padding: clamp(1.1rem, 4vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
}

.content > :first-child,
.content > section:first-child > :first-child {
  margin-top: 0;
}

.content h2 {
  margin: 2rem 0 0.6rem;
  font-size: clamp(1.25rem, 3.4vw, 1.5rem);
}

.content h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.1rem;
}

.content p,
.content ul,
.content ol {
  max-width: var(--measure);
  margin: 0 0 1rem;
}

.content ul,
.content ol {
  padding-left: 1.4rem;
}

.content li + li {
  margin-top: 0.35rem;
}

.content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: normal;
  hyphens: manual;
  border-collapse: collapse;
}

.content th,
.content td {
  overflow-wrap: normal;
  hyphens: manual;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.support ul {
  list-style: none;
  padding-left: 0;
}

.support li {
  position: relative;
  padding-left: 1.4rem;
}

.support li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--coral);
}

.faq h3 {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.faq h3:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.stand {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------ Abschlussband */

.cta-band {
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 4.5vw, 2.5rem) 0;
  background: var(--navy);
  color: var(--on-navy);
}

.cta-band .cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.cta-band .cta-text {
  flex: 1 1 22rem;
  min-width: 0;
}

.cta-band h2 {
  color: #ffffff;
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
}

.cta-band p {
  margin: 0.5rem 0 0;
}

.cta-band .eyebrow {
  color: var(--on-navy);
}

.cta-band .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta-band .btn-secondary {
  border-color: #ffffff;
  color: #ffffff;
}

.cta-band .btn-secondary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--navy);
}

/* ------------------------------------------------------------------ Fusszeile */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding: 0.75rem 0;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--navy);
}

.site-footer a:hover {
  color: var(--coral-dark);
}

@media (max-width: 767.98px) {
  .site-footer .footer-inner {
    padding: 1rem 0 0.25rem;
  }

  .site-footer nav,
  .site-footer ul {
    width: 100%;
  }

  .site-footer ul {
    flex-direction: column;
  }

  .site-footer a {
    width: 100%;
    border-top: 1px solid var(--line);
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .skip-link {
    display: none;
  }

  body {
    background: #ffffff;
  }
}

/* Kein Zeilenumbruch innerhalb kurzer Begriffe mit Bindestrich, etwa "IT-Recht" in der h1. */
.nowrap {
  white-space: nowrap;
}
