/* ==========================================================================
   Hofladen Eibel – Übergangsseite
   Werte 1:1 aus design-reference/Hofladen Eibel Onepager.dc.html übernommen.
   ========================================================================== */

/* --- Schriften (selbst gehostet, OFL – siehe fonts/OFL-*.txt) ------------ */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/manrope-latin-var.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/newsreader-latin-var.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/newsreader-latin-300-italic.woff2") format("woff2");
}

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

:root {
  /* Farbpalette */
  --color-bg: #f6f4ee;
  --color-bg-header: rgba(246, 244, 238, 0.94);
  --color-text: #1d2418;
  --color-text-soft: #4e5548;
  /* Mockup: #858b7c (Kontrast 3,19:1). Für WCAG AA (4,5:1) bei gleichem Farbton abgedunkelt. */
  --color-text-muted: #6c7265;
  --color-green: #2c6130;
  --color-green-dark: #1b3d20;
  --color-sage: #b6c4a6;
  /* Mockup: Eyebrow im Banner in #b6c4a6 (Kontrast 3,99:1). Für WCAG AA (4,5:1) aufgehellt. */
  --color-eyebrow: #c3cfb6;
  --color-sage-light: #dbe4cf;
  --color-sage-bg: #e8eee0;
  --color-sage-line: #d3ddc5;
  --color-line: #e0ddd1;

  /* Schriften */
  --font-sans: Manrope, system-ui, sans-serif;
  --font-serif: Newsreader, Georgia, serif;

  /* Layout */
  --max-width: 1320px;
  --gutter: clamp(20px, 4vw, 32px);
}

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

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
}

body {
  min-height: 100vh;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.62;
}

a {
  color: var(--color-green);
  text-decoration: none;
}

a:hover {
  color: var(--color-green-dark);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.heading-section {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 2.8vw, 34px);
  font-weight: 300;
}

.label {
  margin: 0 0 14px;
  font-size: 13px;
  text-transform: uppercase;
}

/* --- Header ------------------------------------------------------------- */

.site-header {
  background: var(--color-bg-header);
  border-bottom: 1px solid var(--color-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-header__logo {
  display: block;
  height: 46px;
  width: auto;
}

/* --- Umbau-Banner ------------------------------------------------------- */

.banner {
  background: var(--color-green);
  color: var(--color-bg);
}

.banner .container {
  padding-top: clamp(36px, 6vw, 72px);
  padding-bottom: clamp(36px, 6vw, 72px);
}

.banner__eyebrow {
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--color-eyebrow);
}

.banner__title {
  margin: 0 0 18px;
  max-width: 24ch;
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.banner__lead {
  max-width: 58ch;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--color-sage-light);
  text-wrap: pretty;
}

/* --- Hofladen & Anfahrt ------------------------------------------------- */

.shop {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(44px, 6vw, 80px);
}

.shop__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(26px, 5vw, 64px);
  align-items: start;
}

.shop__address {
  margin: 0 0 30px;
  font-size: 19px;
  font-style: normal;
  line-height: 1.6;
}

/* Telefonnummer als tel:-Link, optisch wie der umgebende Text; Hover nur dezent unterstrichen */
.shop__phone {
  color: inherit;
}

.shop__phone:hover {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.shop__hours-label {
  letter-spacing: 0.12em;
  font-weight: 300;
  color: var(--color-text-muted);
}

.hours {
  border-top: 1px solid var(--color-green);
}

.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--color-line);
}

.hours__day {
  color: var(--color-text-soft);
}

.hours__time--closed {
  color: var(--color-text-muted);
}

/* Karte (2-Klick-Lösung, siehe js/map.js) */

.map {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
}

.map--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: clamp(20px, 4vw, 48px);
  background: var(--color-sage-bg);
  text-align: center;
}

.map__notice {
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text-soft);
}

.map__notice a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.map__button {
  padding: 11px 22px;
  border: 0;
  border-radius: 0;
  background: var(--color-green);
  color: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.map__button:hover {
  background: var(--color-green-dark);
}

.map-link {
  margin: 12px 0 0;
}

/* --- Märkte ------------------------------------------------------------- */

.markets {
  padding-bottom: clamp(52px, 8vw, 100px);
}

.markets__box {
  padding: clamp(20px, 4vw, 48px);
  background: var(--color-sage-bg);
}

.markets__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
}

.market-list {
  border-top: 1px solid var(--color-sage);
}

.market-list__item {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) 1fr;
  gap: 6px 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-sage-line);
}

.market-list__time {
  color: var(--color-text-soft);
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--color-line);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  align-items: baseline;
  padding-top: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(28px, 4vw, 44px);
  font-size: 14px;
  color: var(--color-text-muted);
}

.site-footer__claim {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--color-green);
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* --- Impressum / Datenschutz als Modal (siehe js/modal.js) -------------- */

/* Scroll-Sperre, solange ein Modal offen ist */
body.is-modal-open {
  overflow: hidden;
}

.modal {
  width: 640px;
  max-width: calc(100% - 2 * var(--gutter));
  max-height: 80vh;
  max-height: 80svh;
  margin: auto;
  padding: 0;
  border: 0;
  border-top: 3px solid var(--color-green);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 24px 64px rgba(29, 36, 24, 0.28);
  overflow: hidden;
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(29, 36, 24, 0.55);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px) clamp(12px, 2vw, 16px) clamp(14px, 2vw, 18px) clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--color-line);
}

.modal__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, 30px);
  font-weight: 300;
  line-height: 1.15;
}

/* Steht im Markup vor dem Titel, optisch rechts daneben */
.modal__close {
  order: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-soft);
  cursor: pointer;
}

.modal__close:hover {
  color: var(--color-green);
}

.modal__close svg {
  display: block;
}

/* Eigener Scrollbereich; overscroll-behavior verhindert, dass die Seite mitscrollt */
.modal__body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px clamp(20px, 4vw, 40px) clamp(24px, 4vw, 36px);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Typografie für die Rechtstexte (z. B. aus e-recht24) */
.modal__body > :first-child {
  margin-top: 0;
}

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

.modal__body h2 {
  margin: 32px 0 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
}

.modal__body h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-green);
}

.modal__body h4 {
  margin: 20px 0 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.modal__body h5 {
  margin: 16px 0 4px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-soft);
}

.modal__body p,
.modal__body ul,
.modal__body ol {
  margin: 0 0 14px;
}

/* ul ist seitenweit ohne Aufzählungszeichen (Marktlisten), hier wieder mit */
.modal__body ul {
  list-style: disc;
}

.modal__body ul,
.modal__body ol {
  padding-left: 1.3em;
}

.modal__body li {
  margin: 0 0 6px;
}

.modal__body li::marker {
  color: var(--color-green);
}

.modal__body strong {
  font-weight: 600;
}

.modal__body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
