/* web-wismar.de – Stylesheet für Startseite und Unterseiten
   Farben nach Backsteingotik und Hafen: Hafenblau, Backsteinrot, Glasurgrün, Kalkweiß. */

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --hafen: #173447;
  --hafen-tief: #0f2433;
  --backstein: #9e3d25;
  --backstein-hell: #e8b8a6;
  --glasur: #2e4b40;
  --kalk: #f1f2f0;
  --putz: #e2e6e3;
  --text: #1b2429;
  --text-leise: #4a5860;
  --linie: #c3cbc8;
  --weiss: #ffffff;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --breite: 72rem;
  --mass: 40rem;
  --rand: clamp(1rem, 4vw, 2.5rem);
  --abstand: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 4px;
}

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

html {
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--kalk);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  /* Fließtext darf lange Komposita trennen, Überschriften nicht (siehe unten) */
  hyphens: auto;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
  hyphens: none;
  overflow-wrap: normal;
}

/* Die vw-Obergrenze hält lange Komposita wie „Sehenswürdigkeiten“ auch bei
   200 % Textvergrößerung in der Zeile, ohne mitten im Wort zu trennen. */
h1 {
  font-size: min(clamp(2.5rem, 6.2vw, 4.5rem), 9.5vw);
  line-height: 1.02;
}

h2 {
  font-size: min(clamp(1.85rem, 3.6vw, 2.65rem), 8vw);
}

/* Notbremse nur für kleinere Zwischenüberschriften; h1 und h2 trennen nie im Wort,
   dort regelt die vw-Obergrenze der Schriftgröße den Platz. */
h3 {
  overflow-wrap: break-word;
}

h3 {
  font-size: 1.4rem;
  line-height: 1.2;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

a {
  color: var(--backstein);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--weiss);
  color: var(--hafen);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2 * var(--rand), var(--breite));
  margin-inline: auto;
}

/* Kopfbereich */

.site-header {
  background: var(--hafen-tief);
  color: var(--kalk);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin-inline: -0.6rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.6rem;
  color: var(--kalk);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--backstein-hell);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.site-header :focus-visible {
  outline-color: var(--backstein-hell);
}

/* 404-Hinweis */

.redirect-note {
  background: var(--putz);
  border-bottom: 1px solid var(--linie);
}

.redirect-note p {
  width: min(100% - 2 * var(--rand), var(--breite));
  margin: 0 auto;
  padding-block: 0.9rem;
  font-weight: 600;
}

/* Hero der Startseite */

.hero {
  position: relative;
  background: var(--hafen);
  color: var(--kalk);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4.5rem, 9vw, 6.5rem);
}

/* Das eine Erkennungsmerkmal: eine Giebelreihe als Unterkante */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: clamp(2rem, 4vw, 3rem);
  background: url("assets/giebel.svg") repeat-x left bottom / auto 100%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

.hero h1 {
  color: var(--weiss);
}

.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  max-width: 36rem;
  color: #dfe6ea;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 0.7rem 1.25rem;
  border: 2px solid transparent;
  /* Bei starker Textvergrößerung sind lange Einzelwörter breiter als der Bildschirm */
  hyphens: auto;
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--backstein);
  color: var(--weiss);
}

.button-primary:hover {
  background: #86321d;
}

.button-quiet {
  border-color: rgb(241 242 240 / 0.55);
  color: var(--kalk);
}

.button-quiet:hover {
  border-color: var(--kalk);
}

.hero :focus-visible {
  outline-color: var(--backstein-hell);
}

.hero-figure {
  margin: 0;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  background: var(--hafen-tief);
}

.ai-label {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #cbd5da;
}

.ai-label strong {
  color: var(--weiss);
  font-weight: 600;
}

/* Kopf der Unterseiten */

.page-head {
  background: var(--hafen);
  color: var(--kalk);
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3.5rem, 7vw, 5rem);
  position: relative;
}

.page-head::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: clamp(1.5rem, 3vw, 2.25rem);
  background: url("assets/giebel.svg") repeat-x left bottom / auto 100%;
  pointer-events: none;
}

.page-head h1 {
  color: var(--weiss);
  font-size: min(clamp(2.3rem, 5.4vw, 3.9rem), 9vw);
}

.page-head .lead {
  max-width: 44rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: #cbd5da;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: #8fa3ae;
}

.breadcrumb a {
  color: var(--kalk);
}

.breadcrumb :focus-visible {
  outline-color: var(--backstein-hell);
}

/* Abschnitte */

.section {
  padding-block: var(--abstand) 0;
}

.section:last-of-type {
  padding-bottom: var(--abstand);
}

.section-head {
  max-width: var(--mass);
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--text-leise);
}

.prose {
  max-width: var(--mass);
}

.split {
  display: grid;
  gap: 2rem clamp(2rem, 5vw, 4rem);
}

.split > * {
  min-width: 0;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
  }
}

/* Kurzprofil als Definitionsliste */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  border-top: 1px solid var(--linie);
}

.profile > div {
  min-width: 0;
  padding: 1.1rem 1.25rem 1.2rem 0;
  border-bottom: 1px solid var(--linie);
}

/* Sechs Einträge: zwei oder drei Spalten ergeben volle Reihen */
@media (min-width: 36rem) {
  .profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .profile {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.profile dt {
  font-size: 0.9375rem;
  color: var(--text-leise);
  margin-bottom: 0.2rem;
}

.profile dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.3;
}

.profile dd small {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-leise);
}

.source-note {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-leise);
  max-width: var(--mass);
}

/* Randspalte mit Hinweis */

.aside-panel {
  background: var(--putz);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.aside-panel h3 {
  margin-bottom: 0.5rem;
}

.aside-panel p:last-child,
.aside-panel ul:last-child {
  margin-bottom: 0;
}

/* Liste der Sehenswürdigkeiten auf der Startseite */

.sight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--linie);
}

.sight-list li {
  min-width: 0;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--linie);
}

.sight-list h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.sight-list p {
  margin: 0;
  color: var(--text-leise);
}

.more-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1rem;
  font-weight: 600;
}

/* Zeitleiste */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 48rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1rem;
  border-top: 1px solid var(--linie);
}

.timeline li:last-child {
  border-bottom: 1px solid var(--linie);
}

.timeline .year {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--backstein);
  font-variant-numeric: lining-nums tabular-nums;
}

.timeline h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.timeline p {
  margin: 0;
}

@media (max-width: 30rem) {
  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

/* Ausführliche Einträge auf Unterseiten */

.entry {
  display: grid;
  gap: 0.5rem clamp(1.5rem, 4vw, 3rem);
  padding-block: 2rem;
  border-top: 1px solid var(--linie);
}

.entry > * {
  min-width: 0;
}

.entry:last-child {
  border-bottom: 1px solid var(--linie);
}

@media (min-width: 52rem) {
  .entry {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }
}

.entry h2,
.entry h3 {
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  margin: 0;
}

.entry .meta {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.9375rem;
  color: var(--text-leise);
}

.entry-body p:last-child {
  margin-bottom: 0;
}

/* Wegweiser zu Unterseiten */

.signposts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.signpost {
  display: block;
  min-width: 0;
  padding: 1.25rem 1.4rem 1.35rem;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}

.signpost:hover {
  border-color: var(--hafen);
}

.signpost strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--hafen);
  margin-bottom: 0.3rem;
  text-decoration: underline;
  text-decoration-color: var(--linie);
  text-underline-offset: 0.2em;
}

.signpost:hover strong {
  text-decoration-color: var(--backstein);
}

.signpost span {
  display: block;
  color: var(--text-leise);
}

/* Suchband */

.search-band {
  margin-top: var(--abstand);
  background: var(--glasur);
  color: var(--kalk);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.search-grid {
  display: grid;
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
  align-items: end;
}

.search-grid > * {
  min-width: 0;
}

@media (min-width: 56rem) {
  .search-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

.search-band h2 {
  color: var(--weiss);
}

.search-band p {
  color: #dbe5e0;
  margin-bottom: 0;
}

.search-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.search-row input {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 50px;
  padding: 0.6rem 0.85rem;
  border: 2px solid var(--weiss);
  border-radius: var(--radius);
  background: var(--weiss);
  color: var(--text);
  font: inherit;
}

.search-row input:focus-visible {
  outline: 3px solid var(--backstein-hell);
  outline-offset: 2px;
}

.search-row .button {
  flex: 0 0 auto;
  min-height: 50px;
  background: var(--backstein);
  color: var(--weiss);
}

.search-row .button:hover {
  background: #86321d;
}

.search-band :focus-visible {
  outline-color: var(--backstein-hell);
}

.search-hint {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.search-suggestions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--weiss);
}

/* Quellen */

.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 50rem;
}

.source-list li {
  padding-block: 0.8rem;
  border-top: 1px solid var(--linie);
}

.source-list li:last-child {
  border-bottom: 1px solid var(--linie);
}

.source-list a {
  font-weight: 600;
}

.source-list small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  color: var(--text-leise);
}

/* Mietwagen-Vorschaltseite */

.consent-box {
  max-width: 46rem;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-top: 4px solid var(--hafen);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.consent-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.consent-box ul {
  padding-left: 1.2rem;
}

.consent-box li + li {
  margin-top: 0.35rem;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}

.consent-actions .button-primary {
  border: 0;
}

.consent-actions .button-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.consent-error {
  margin: 1rem 0 0;
  color: var(--backstein);
  font-weight: 600;
}

.consent-error:empty {
  display: none;
}

.ad-note {
  font-size: 0.9375rem;
  color: var(--text-leise);
}

.rental-slot h2:focus {
  outline: none;
}

.rental-slot h2:focus-visible {
  outline: 3px solid var(--backstein);
}

.rental-status {
  color: var(--text-leise);
}

#c24pp-rentalcar-iframe {
  min-height: 20rem;
}

/* Fußbereich */

.site-footer {
  margin-top: var(--abstand);
  background: var(--hafen-tief);
  color: #d5dde1;
  padding-block: 2.5rem;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem 3rem;
}

.footer-grid > * {
  min-width: 0;
}

@media (min-width: 52rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.site-footer p {
  max-width: 44rem;
}

.site-footer a {
  color: var(--weiss);
}

.site-footer :focus-visible {
  outline-color: var(--backstein-hell);
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-stand {
  margin: 1rem 0 0;
  color: #aab8bf;
}

/* Bedürfnisse der Nutzer */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-leise: #1b2429;
    --linie: #6b7880;
  }

  .lead,
  .ai-label,
  .breadcrumb ol,
  .search-band p,
  .site-footer {
    color: var(--weiss);
  }

  .button-quiet {
    border-color: var(--weiss);
  }

  a {
    text-decoration-thickness: 2px;
  }
}

@media (forced-colors: active) {
  .hero::after,
  .page-head::after {
    display: none;
  }

  .button,
  .signpost,
  .consent-box {
    border: 2px solid ButtonText;
  }
}

@media print {
  .site-header nav,
  .search-band,
  .hero::after,
  .page-head::after {
    display: none;
  }
}
