/* web-greifswald.de
   Gestaltung: warmes Papier, Backsteinrot und Dunkelgruen als Anklang an
   Backsteingotik, Hanse und Boddenlandschaft. Serifenschriften lokal. */

/* Lora, auf Latein reduziert und als WOFF2 ausgeliefert: 96 KB fuer vier
   Schnitte. Vorher standen hier Amiri und Caladea als volle TTF-Dateien mit
   zusammen 948 KB. Lizenz und Herkunft siehe assets/fonts/SCHRIFTEN.md. */

@font-face {
  font-family: "Lora Local";
  src: url("assets/fonts/lora-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lora Local";
  src: url("assets/fonts/lora-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Lora Local";
  src: url("assets/fonts/lora-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #172326;
  --ink-soft: #4c5a58;
  --muted: #596866;
  --paper: #f7f2e9;
  --paper-deep: #eadfce;
  --green: #203b3d;
  --green-light: #526954;
  --brick: #a13f2d;
  --brick-dark: #7d2e23;
  --gold: #b7822c;
  --sand: #f1c46b;
  --white: #fffaf2;
  --line: rgba(23, 35, 38, .16);
  --shadow: 0 24px 60px rgba(24, 35, 38, .16);
  --max: 1180px;
  --header-h: 4.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Ankerziele nicht unter dem klebenden Kopfbereich parken */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lora Local", Georgia, serif;
  /* rem statt px, damit die Schriftgroesseneinstellung des Nutzers greift */
  font-size: 1.125rem;
  line-height: 1.65;
}

/* Das Rasterblatt bleibt der Lageskizze vorbehalten, wo es als Kartengrund
   etwas bedeutet. Ueber der ganzen Seite waere es blosse Dekoration. */

a {
  color: inherit;
}

img {
  max-width: 100%;
}

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

::selection {
  background: var(--green);
  color: var(--white);
}

.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: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 40;
  padding: .7rem 1.15rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding: .7rem clamp(1rem, 4vw, 3rem);
  background: rgba(247, 242, 233, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(.75rem, 2vw, 1.4rem);
  font-size: .95rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--brick);
  border-bottom-color: var(--brick);
}

/* ---------- Hinweis nach Weiterleitung ---------- */

.redirect-note {
  background: #f6e6cd;
  border-bottom: 1px solid var(--gold);
}

.redirect-note p {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  padding-block: .8rem;
  color: #4a3410;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: "Lora Local", Georgia, serif;
  line-height: 1.08;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.lead {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
}

.hero-actions,
.booking-links {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}

/* Schematische Lageskizze. Bewusst als Skizze gekennzeichnet: Sie zeigt die
   Abfolge entlang des Ryck, keine massstabsgetreuen Ortslagen. */
.hero-map {
  margin: 0;
}

.map-canvas {
  position: relative;
  /* verhindert, dass absolut gesetzte Marken den Viewport aufziehen */
  overflow: hidden;
  min-height: 26rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 250, 242, .9), rgba(234, 223, 206, .85)),
    linear-gradient(90deg, rgba(32, 59, 61, .06) 1px, transparent 1px),
    linear-gradient(rgba(32, 59, 61, .06) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
}

.map-canvas::before {
  content: "";
  position: absolute;
  left: 6%;
  top: 8%;
  width: 76%;
  height: 76%;
  border: 2px solid rgba(125, 46, 35, .4);
  border-radius: 48% 42% 56% 44%;
  transform: rotate(-10deg);
}

.map-line,
.map-dot,
.map-river {
  position: absolute;
}

.map-line.ryck {
  left: 3%;
  top: 43%;
  width: 92%;
  height: 18%;
  border-top: 4px double rgba(32, 59, 61, .62);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.map-line.wall {
  left: 20%;
  top: 26%;
  width: 30%;
  height: 30%;
  border: 2px dashed rgba(183, 130, 44, .62);
  border-radius: 46%;
}

.map-river {
  left: 6%;
  top: 56%;
  color: var(--green);
  font-family: "Lora Local", Georgia, serif;
  font-size: 1.4rem;
  font-style: italic;
  transform: rotate(-8deg);
}

.map-dot {
  max-width: 46%;
  padding: .3rem .6rem;
  background: var(--green);
  color: var(--white);
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 30px rgba(23, 35, 38, .16);
}

.map-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 12px;
  height: 12px;
  background: var(--brick);
  border: 2px solid var(--paper);
  border-radius: 50%;
  transform: translateX(-50%);
}

.dot-altstadt {
  left: 8%;
  top: 24%;
}

.dot-hafen {
  left: 36%;
  top: 40%;
}

.dot-eldena {
  right: 6%;
  top: 62%;
}

.hero-map figcaption {
  margin-top: .8rem;
  font-size: .9rem;
  color: var(--muted);
}

/* ---------- Schaltflaechen ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.2rem;
  border: 2px solid var(--green);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.15;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.button.primary {
  background: var(--green);
  color: var(--white);
}

.button.primary:hover {
  background: #16292b;
}

.button.ghost {
  background: rgba(255, 250, 242, .5);
  color: var(--green);
}

.button.ghost:hover {
  background: var(--white);
}

/* ---------- Abschnitte ---------- */

.section {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.section-intro {
  max-width: 46rem;
  margin-bottom: 1.75rem;
}

.section-intro p {
  margin: .9rem 0 0;
  color: var(--muted);
}

/* 20rem: ergibt bei 1180 px Satzbreite drei Spalten, also bei sechs Eintraegen
   zwei volle Reihen statt einer Reihe zu vier plus zwei Luecken. */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.facts-grid article {
  padding: 1.35rem;
  background: rgba(255, 250, 242, .82);
}

.facts-grid span {
  display: block;
  margin-bottom: .5rem;
  font-family: "Lora Local", Georgia, serif;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--brick-dark);
}

.facts-grid p,
.source-note,
.affiliate-note,
.card-note {
  margin: 0;
  color: var(--muted);
}

.source-note {
  margin-top: 1rem;
  font-size: .95rem;
}

/* ---------- Stadtbild ---------- */

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}

.story-copy > * {
  min-width: 0;
}

.story-copy p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
}

.story-copy p:last-child {
  margin-bottom: 0;
}

.travel-card {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1.4rem;
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow);
}

.travel-card h3 {
  margin-bottom: .35rem;
}

.card-note {
  margin-bottom: .9rem;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sand);
}

.travel-card a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: .7rem 0;
  color: var(--white);
  text-decoration-color: rgba(255, 250, 242, .5);
  text-underline-offset: 5px;
  border-top: 1px solid rgba(255, 250, 242, .2);
}

.travel-card a:hover {
  text-decoration-color: var(--white);
}

.travel-card :focus-visible {
  outline-color: var(--sand);
}

/* ---------- Sehenswuerdigkeiten ---------- */

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

.sight-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(23, 35, 38, .06);
}

.sight-card.featured {
  grid-column: 1 / -1;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  overflow: hidden;
}

.sight-body {
  padding: 1.4rem;
}

.sight-symbol {
  position: relative;
  min-height: 13rem;
  background:
    linear-gradient(180deg, rgba(32, 59, 61, .08), rgba(161, 63, 45, .16)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(32, 59, 61, .08) 28px 30px);
}

.sight-symbol span {
  position: absolute;
  bottom: 18%;
  width: 24%;
  border: 5px solid var(--brick-dark);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.sight-symbol span:nth-child(1) {
  left: 14%;
  height: 38%;
}

.sight-symbol span:nth-child(2) {
  left: 38%;
  height: 55%;
}

.sight-symbol span:nth-child(3) {
  right: 14%;
  height: 32%;
}

.sight-card h3 {
  margin-bottom: .6rem;
}

.sight-card p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Freizeit ---------- */

.leisure {
  border-block: 1px solid var(--line);
}

.leisure-list {
  columns: 2;
  column-gap: 3rem;
}

.leisure-list p {
  break-inside: avoid;
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
}

/* ---------- Reisen ---------- */

.booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-inline: clamp(1.25rem, 3vw, 2.5rem);
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: var(--white);
  box-shadow: var(--shadow);
}

.booking-copy > * {
  min-width: 0;
}

.booking h2 {
  color: var(--white);
}

.booking p {
  margin: .9rem 0 0;
  color: rgba(255, 250, 242, .88);
}

.booking-links {
  margin-top: 0;
  flex-direction: column;
  align-items: stretch;
}

.booking .button.primary {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}

.booking .button.primary:hover {
  background: var(--paper-deep);
}

.booking .button.ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 250, 242, .7);
}

.booking .button.ghost:hover {
  background: rgba(255, 250, 242, .14);
}

.booking :focus-visible {
  outline-color: var(--sand);
}

.affiliate-note {
  grid-column: 1 / -1;
  font-size: .92rem;
  color: rgba(255, 250, 242, .85);
}

/* ---------- Quellen ---------- */

.source-list {
  display: grid;
  gap: .7rem;
  max-width: 46rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  min-width: 0;
}

.source-list a {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  overflow-wrap: break-word;
}

.source-list a:hover {
  border-color: var(--green);
  background: var(--paper);
}

.source-list strong {
  color: var(--green);
}

.source-list small {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-size: .88rem;
}

/* ---------- Fusszeile ---------- */

.site-footer {
  color: rgba(255, 250, 242, .84);
  background: var(--ink);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 2rem;
  align-items: start;
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
  padding-block: 1.75rem;
}

.footer-inner p {
  margin: 0;
  max-width: 44rem;
  font-size: .94rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--sand);
  text-underline-offset: 4px;
}

.footer-stand {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding-block: .9rem;
  border-top: 1px solid rgba(255, 250, 242, .16);
  font-size: .85rem;
}

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

/* ---------- Schmale Ansichten ---------- */

@media (max-width: 62rem) {
  .hero,
  .story,
  .booking {
    grid-template-columns: minmax(0, 1fr);
  }

  .travel-card {
    position: static;
  }

  .sight-card.featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-links {
    flex-direction: row;
  }
}

@media (max-width: 46rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .nav {
    width: 100%;
  }

  /* Lange Ortsnamen und Komposita duerfen umbrechen, statt seitlich aus dem
     Viewport zu laufen. Die h1 bleibt ausgenommen, damit die Kernaussage
     nicht willkuerlich bricht. */
  p, li, figcaption, h2, h3, .facts-grid span {
    hyphens: auto;
    overflow-wrap: break-word;
  }

  /* Bei stark vergroesserter Systemschrift liefe "Greifswald" sonst seitlich
     aus dem Viewport. Statt den Stadtnamen zu trennen, wird die Untergrenze
     der Ueberschrift abgesenkt. */
  h1 {
    font-size: clamp(1.9rem, 10vw, 3.2rem);
  }

  .map-canvas {
    min-height: 22rem;
  }

  .map-dot {
    max-width: 52%;
    font-size: .78rem;
  }

  .leisure-list {
    columns: 1;
  }

  .hero-actions .button,
  .booking-links .button {
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Nutzervorlieben ---------- */

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

@media (prefers-contrast: more) {
  :focus-visible {
    outline-width: 4px;
  }

  .facts-grid p,
  .sight-card p,
  .section-intro p,
  .source-note,
  .source-list small,
  .hero-map figcaption {
    color: #3b4a48;
  }

  .sight-card,
  .source-list a,
  .map-canvas,
  .facts-grid {
    border-color: var(--ink);
  }
}

@media (forced-colors: active) {
  .brand-mark,
  .map-dot,
  .sight-card,
  .source-list a {
    border: 1px solid CanvasText;
  }
}
