/*
 * MAITRI HerzYoga – Stylesheet
 * Aufbau nach CUBE CSS: Tokens → Reset → Global → Compositions (Layout) → Blocks (Komponenten) → Utilities
 * Kein Framework. Alle Farben, Abstände und Schriftgrößen stehen als Variablen in :root.
 */

@layer reset, global, composition, block, utility;

/* ---------- Schriften (lokal gehostet, OFL-Lizenz) ---------- */
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-italic-var.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Farben – abgeleitet aus dem Lotus-Logo und der warmen Bildwelt */
  --c-bg: #fbf8f2;
  --c-surface: #ffffff;
  --c-sand: #f3ecdf;
  --c-sand-deep: #e8dcc6;
  --c-ink: #2d3127;
  --c-ink-soft: #545a4b;
  --c-lotus: #95ae1e;
  --c-green: #5b6d17;
  --c-green-deep: #45530f;
  --c-gold: #b0843f;
  --c-line: #e3d9c6;
  --c-error: #9b2c1f;
  --c-success-bg: #eef3dc;
  --c-error-bg: #f8e7e2;

  /* Typografie */
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.88rem, 0.85rem + 0.12vw, 0.94rem);
  --step-0: clamp(1.03rem, 0.99rem + 0.2vw, 1.14rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.38vw, 1.42rem);
  --step-2: clamp(1.44rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.2vw, 2.45rem);
  --step-4: clamp(2.1rem, 1.7rem + 2vw, 3.3rem);

  /* Abstände */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: clamp(2rem, 1.6rem + 2vw, 3rem);
  --space-xl: clamp(3rem, 2.2rem + 4vw, 5.5rem);
  --space-2xl: clamp(4rem, 3rem + 5vw, 7.5rem);

  --radius: 14px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgb(45 49 39 / 0.05), 0 8px 28px rgb(45 49 39 / 0.07);
  --wrapper: 72rem;
  --wrapper-narrow: 42rem;
  --header-h: 5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100vh; line-height: 1.7; -webkit-font-smoothing: antialiased; }
  img, picture, svg { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  :target { scroll-margin-top: calc(var(--header-h) + 1rem); }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }
}

/* ---------- Global ---------- */
@layer global {
  body {
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: var(--font-sans);
    font-size: var(--step-0);
  }
  h1, h2, h3, h4, .h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.2;
    color: var(--c-ink);
    text-wrap: balance;
    letter-spacing: -0.005em;
  }
  h1 { font-size: var(--step-4); }
  h2 { font-size: var(--step-3); }
  h3, .h3 { font-size: var(--step-2); }
  h4 { font-size: var(--step-1); }
  p, li { text-wrap: pretty; }
  a { color: var(--c-green); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
  a:hover { color: var(--c-green-deep); text-decoration-thickness: 2px; }
  :focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; border-radius: 3px; }
  strong { font-weight: 650; }
  address { font-style: normal; }
  main:focus { outline: none; }
  ::selection { background: var(--c-lotus); color: #fff; }
}

/* ---------- Compositions (Layout-Bausteine) ---------- */
@layer composition {
  .wrapper {
    width: min(100% - 2.5rem, var(--wrapper));
    margin-inline: auto;
  }
  .wrapper--narrow { width: min(100% - 2.5rem, var(--wrapper-narrow)); }

  /* Vertikaler Rhythmus: Abstand zwischen Geschwistern */
  .flow > * + * { margin-block-start: var(--flow-space, 1em); }
  .prose > h2 { --flow-space: var(--space-l); }
  .prose > h2 + * { --flow-space: var(--space-s); }

  .section { padding-block: var(--space-2xl); }
  .section--tight { padding-block: var(--space-xl); }
  .section--sand { background: var(--c-sand); }

  /* Bild + Text nebeneinander */
  .split {
    display: grid;
    gap: var(--space-l) var(--space-xl);
    align-items: center;
  }
  @media (min-width: 60em) {
    .split { grid-template-columns: 1fr 1fr; }
    .split--reverse > .split__media { order: 2; }
    .split--top { align-items: start; }
    .split--form { grid-template-columns: 5fr 6fr; }
  }
  .split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
  .split__media--portrait img { aspect-ratio: 5 / 6; object-position: 50% 30%; }

  .cards {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  }
  .cards--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }

  .event-list { display: grid; gap: var(--space-s); }
}

/* ---------- Blocks (Komponenten) ---------- */
@layer block {
  /* Sprunglink */
  .skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--c-green-deep); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-s);
  }
  .skip-link:focus { top: 1rem; color: #fff; }

  /* Kopfbereich */
  .site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgb(251 248 242 / 0.97);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
  }
  .site-header.is-scrolled { border-color: var(--c-line); box-shadow: 0 4px 20px rgb(45 49 39 / 0.05); }
  .site-header__inner {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-m);
    min-height: var(--header-h);
  }
  .site-header__logo { flex-shrink: 0; }
  .site-header__logo img { width: auto; height: 3.1rem; }
  @media (min-width: 60em) { .site-header__logo img { height: 3.9rem; } }

  /* Navigation */
  .nav__list { display: flex; align-items: center; gap: 0.25rem; }
  .nav__item { position: relative; display: flex; align-items: center; }
  .nav__link {
    display: block; padding: 0.5rem 0.75rem;
    color: var(--c-ink); text-decoration: none; font-size: 1rem; letter-spacing: 0.01em;
    border-radius: var(--radius-s);
  }
  .nav__link:hover { color: var(--c-green); }
  .nav__link[aria-current="page"], .nav__link[data-active] { color: var(--c-green); box-shadow: inset 0 -2px 0 var(--c-lotus); border-radius: 0; }
  .nav__item--cta .nav__link {
    background: var(--c-green); color: #fff; border-radius: 99px; padding-inline: 1.15rem; margin-inline-start: 0.5rem; box-shadow: none;
  }
  .nav__item--cta .nav__link:hover, .nav__item--cta .nav__link[aria-current="page"] { background: var(--c-green-deep); color: #fff; }
  .nav__sub-toggle {
    display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-inline-start: -0.4rem;
    background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--c-ink-soft);
  }
  .nav__sub-toggle svg { transition: transform 0.2s var(--ease); }
  .nav__sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .nav__sub {
    position: absolute; top: calc(100% + 0.25rem); left: 0; min-width: 15rem;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 0.5rem;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity 0.18s, transform 0.18s var(--ease), visibility 0s linear 0.18s;
  }
  .nav__item--has-sub:hover .nav__sub,
  .nav__item--has-sub:focus-within .nav__sub,
  .nav__sub.is-open {
    opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
  }
  .nav__sub-link { display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius-s); color: var(--c-ink); text-decoration: none; }
  .nav__sub-link:hover { background: var(--c-sand); color: var(--c-green-deep); }
  .nav__sub-link[aria-current="page"] { color: var(--c-green); font-weight: 600; }

  .nav-toggle {
    display: none; align-items: center; gap: 0.6rem;
    background: none; border: 1px solid var(--c-line); border-radius: 99px; padding: 0.5rem 1rem; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after,
  .nav-toggle__bars span { display: block; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
  .nav-toggle__bars { position: relative; background: transparent; height: 12px; width: 18px; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; transition: transform 0.2s; }
  .nav-toggle__bars::before { top: 0; }
  .nav-toggle__bars span { position: absolute; top: 5px; }
  .nav-toggle__bars::after { bottom: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5.5px) rotate(-45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }

  /* Mobile Navigation: nur wenn JavaScript aktiv ist, sonst bleibt die Liste sichtbar */
  @media (max-width: 63.99em) {
    .js .nav-toggle { display: inline-flex; }
    .js .nav {
      position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
      background: var(--c-bg); overflow-y: auto; padding: var(--space-m) 1.25rem var(--space-xl);
      display: none;
    }
    .js .nav.is-open { display: block; }
    .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--c-line); }
    .nav__link { flex: 1; padding: 0.9rem 0.25rem; font-family: var(--font-serif); font-size: var(--step-1); }
    .nav__link[aria-current="page"], .nav__link[data-active] { box-shadow: none; }
    .nav__sub-toggle { display: none; }
    .nav__sub {
      position: static; opacity: 1; visibility: visible; transform: none;
      border: 0; box-shadow: none; background: none; padding: 0 0 0.75rem 1rem; min-width: 0; width: 100%;
    }
    .nav__sub li:first-child { display: none; }
    .nav__item--cta { border: 0; margin-top: var(--space-m); }
    .nav__item--cta .nav__link { text-align: center; margin: 0; padding: 0.85rem; }
    html:not(.js) .nav { width: 100%; }
    html:not(.js) .site-header__inner { flex-wrap: wrap; }
    html:not(.js) .site-header { position: static; }
  }
  body.nav-open { overflow: hidden; }

  /* Startseite: Hero */
  .hero {
    position: relative; isolation: isolate;
    min-height: clamp(30rem, 82vh, 50rem);
    display: grid; align-items: end;
    color: #fff;
  }
  .hero__media { position: absolute; inset: 0; z-index: -1; }
  .hero__media picture, .hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
  .hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgb(35 38 28 / 0) 30%, rgb(35 38 28 / 0.55) 100%);
  }
  .hero__content { padding-block: var(--space-xl); }
  .hero__text { max-width: 40rem; --flow-space: var(--space-s); }
  .hero__brand {
    font-family: var(--font-sans); font-size: var(--step--1); font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase; color: #fff;
  }
  .hero__title {
    font-family: var(--font-serif); font-size: var(--step-4); line-height: 1.12; color: #fff;
    text-shadow: 0 2px 24px rgb(0 0 0 / 0.25);
  }
  .hero__lead { font-size: var(--step-1); max-width: 30ch; }

  /* Unterseiten-Kopf */
  .page-hero { padding-block: var(--space-xl) var(--space-m); }
  .page-hero:not(.page-hero--image) + .section { padding-top: var(--space-m); }
  .page-hero__text { max-width: 44rem; --flow-space: var(--space-s); }
  .page-hero__lead { font-size: var(--step-1); color: var(--c-ink-soft); font-family: var(--font-serif); font-style: italic; }
  .page-hero--image {
    position: relative; isolation: isolate; padding: 0;
    min-height: clamp(20rem, 55vh, 34rem); display: grid; align-items: end; color: #fff;
  }
  .page-hero--image .page-hero__media { position: absolute; inset: 0; z-index: -1; }
  .page-hero--image .page-hero__media img, .page-hero--image picture { width: 100%; height: 100%; object-fit: cover; }
  .page-hero--image::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgb(35 38 28 / 0.05) 20%, rgb(35 38 28 / 0.6) 100%);
  }
  .page-hero--image .page-hero__content { padding-block: var(--space-xl) var(--space-l); }
  .page-hero--image h1, .page-hero--image .page-hero__lead, .page-hero--image .eyebrow { color: #fff; }
  .page-hero--image h1 { text-shadow: 0 2px 24px rgb(0 0 0 / 0.25); }

  .eyebrow {
    font-size: var(--step--1); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-green);
  }

  /* Texte */
  .lead { font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.55; }
  .statement {
    font-family: var(--font-serif); font-style: italic; font-size: var(--step-1); line-height: 1.5; color: var(--c-green-deep);
  }
  .statement--large { font-size: var(--step-2); }
  .questions {
    font-family: var(--font-serif); font-style: italic; font-size: var(--step-1); line-height: 1.7;
    padding-inline-start: var(--space-m); border-inline-start: 2px solid var(--c-lotus);
  }
  .triad {
    font-family: var(--font-serif); font-size: var(--step-1); letter-spacing: 0.02em; color: var(--c-green-deep);
  }
  .quote {
    margin-block: var(--space-l); padding: calc(var(--space-m) + 0.4rem) var(--space-l) var(--space-m);
    background: var(--c-sand); border-radius: var(--radius); position: relative;
    font-family: var(--font-serif); font-size: var(--step-1); font-style: italic; line-height: 1.55; color: var(--c-green-deep);
  }
  .section--sand .quote { background: var(--c-surface); }
  .quote::before {
    content: "\201E"; position: absolute; top: -0.62em; left: 0.3em;
    font-size: 4.5rem; line-height: 1; color: var(--c-lotus); font-style: normal;
  }
  .ornament { display: flex; justify-content: center; }
  .ornament img { width: 40px; height: auto; opacity: 0.9; }

  /* Links & Buttons */
  .more-link {
    display: inline-flex; gap: 0.4em; align-items: baseline;
    font-weight: 600; text-decoration: none; color: var(--c-green);
  }
  .more-link span:first-child { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color 0.2s; }
  .more-link:hover span:first-child { text-decoration-color: currentColor; }
  .more-link [aria-hidden] { transition: transform 0.2s var(--ease); }
  .more-link:hover [aria-hidden] { transform: translateX(3px); }
  .more-link--quiet { font-weight: 500; font-size: var(--step--1); }

  .button {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    padding: 0.8rem 1.6rem; border: 0; border-radius: 99px; cursor: pointer;
    background: var(--c-green); color: #fff; font-weight: 600; text-decoration: none; line-height: 1.3;
    transition: background 0.2s, transform 0.2s var(--ease);
  }
  .button:hover { background: var(--c-green-deep); color: #fff; transform: translateY(-1px); }
  .button--small { padding: 0.55rem 1.15rem; font-size: var(--step--1); }

  /* Angebots-Kacheln (Startseite) */
  .tiles {
    display: grid; gap: var(--space-s);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  }
  .tile__link {
    display: flex; flex-direction: column; gap: var(--space-2xs); height: 100%;
    padding: var(--space-m); background: var(--c-surface); border-radius: var(--radius);
    color: var(--c-ink); text-decoration: none; border-top: 3px solid var(--c-lotus);
    box-shadow: var(--shadow); transition: transform 0.25s var(--ease), box-shadow 0.25s;
  }
  .tile__link:hover { transform: translateY(-3px); color: var(--c-ink); box-shadow: 0 12px 36px rgb(45 49 39 / 0.1); }
  .tile__title { font-size: var(--step-1); }
  .tile__link p { color: var(--c-ink-soft); flex: 1; }
  .tile__more { color: var(--c-green); font-weight: 600; font-size: var(--step--1); }

  /* Karten */
  .card { background: var(--c-surface); border-radius: var(--radius); padding: var(--space-m); box-shadow: var(--shadow); }
  .section--sand .card { box-shadow: none; }
  .card--link { padding: 0; overflow: hidden; }
  .card--link > a { display: flex; flex-direction: column; height: 100%; color: var(--c-ink); text-decoration: none; }
  .card--link img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.6s var(--ease); }
  .card--link picture { overflow: hidden; }
  .card--link:hover img { transform: scale(1.03); }
  .card__body { padding: var(--space-m); flex: 1; display: flex; flex-direction: column; }
  .card__body p { color: var(--c-ink-soft); flex: 1; }
  .card--link h2 { font-size: var(--step-2); }
  .card--link h3 { font-size: var(--step-1); }

  .offers { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
  .offer { display: flex; flex-direction: column; border-top: 3px solid var(--c-lotus); }
  .offer h3 { font-size: var(--step-1); }
  .offer__claim { font-family: var(--font-serif); font-style: italic; color: var(--c-green-deep); }
  .offer__action { margin-top: auto !important; padding-top: var(--space-s); }

  .check-list li { position: relative; padding-inline-start: 1.6rem; }
  .check-list li + li { margin-top: 0.4rem; }
  .check-list li::before {
    content: ""; position: absolute; left: 0; top: 0.62em; width: 0.55rem; height: 0.55rem;
    border-radius: 50% 0 50% 0; background: var(--c-lotus); transform: rotate(-45deg);
  }
  .pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .pill-list li { background: var(--c-sand); border-radius: 99px; padding: 0.35rem 0.95rem; font-size: var(--step--1); }
  .link-list li + li { margin-top: 0.5rem; }

  .rounded img { border-radius: var(--radius); }

  /* Bildband & Motto */
  .section--image-band { padding: 0; }
  .image-band img { width: 100%; height: clamp(14rem, 38vw, 26rem); object-fit: cover; }
  .motto { position: relative; isolation: isolate; color: #fff; padding-block: var(--space-2xl); text-align: center; }
  .motto__media { position: absolute; inset: 0; z-index: -1; }
  .motto__media img, .motto__media picture { width: 100%; height: 100%; object-fit: cover; }
  .motto::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(35 38 28 / 0.45); }
  .motto__text p { font-family: var(--font-serif); font-size: var(--step-3); line-height: 1.3; text-shadow: 0 2px 20px rgb(0 0 0 / 0.3); }

  /* Galerie Goldschmiede (Bilder automatisch aus assets/img/goldschmiede) */
  .galerie {
    display: grid; gap: var(--space-s); padding-top: var(--space-m);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  }
  .galerie__item figure { margin: 0; }
  .galerie__link { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--c-sand-deep); }
  .galerie__link img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.3s; }
  .galerie__link:hover img, .galerie__link:focus-visible img { transform: scale(1.04); filter: brightness(1.04); }
  .galerie__zoom {
    position: absolute; right: 0.6rem; bottom: 0.6rem; display: grid; place-items: center;
    width: 2.3rem; height: 2.3rem; border-radius: 50%; background: rgb(251 248 242 / 0.9); color: var(--c-green-deep);
    opacity: 0; transform: translateY(4px); transition: opacity 0.25s, transform 0.25s var(--ease);
  }
  .galerie__link:hover .galerie__zoom, .galerie__link:focus-visible .galerie__zoom { opacity: 1; transform: none; }
  .galerie figcaption { font-size: var(--step--1); color: var(--c-ink-soft); padding-top: 0.45rem; font-style: italic; font-family: var(--font-serif); }
  /* erstes Bild als großes Titelbild, danach gleichmäßiges Raster */
  .galerie__item:first-child { grid-column: 1 / -1; }
  .galerie__item:first-child .galerie__link img { aspect-ratio: 16 / 9; }
  @media (min-width: 60em) {
    .galerie { grid-template-columns: repeat(3, 1fr); }
    .galerie__item:first-child .galerie__link img { aspect-ratio: 21 / 9; }
  }

  /* Großansicht */
  .lightbox {
    width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: rgb(24 26 20 / 0.97); color: #f4efe4;
  }
  .lightbox::backdrop { background: rgb(24 26 20 / 0.6); }
  .lightbox[open] { display: grid; place-items: center; }
  .lightbox__figure { margin: 0; display: grid; justify-items: center; gap: 0.75rem; padding: 3.5rem 4.5rem 3rem; }
  .lightbox__img { max-width: min(92vw, 1600px); max-height: calc(100vh - 9rem); width: auto; height: auto; border-radius: var(--radius-s); box-shadow: 0 20px 60px rgb(0 0 0 / 0.4); touch-action: pan-y; user-select: none; }
  .lightbox__caption { font-family: var(--font-serif); font-style: italic; font-size: var(--step-1); text-align: center; }
  .lightbox__count { position: absolute; top: 1.1rem; left: 1.25rem; font-size: var(--step--1); letter-spacing: 0.1em; color: #cfc8b8; }
  .lightbox__btn {
    position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
    border: 1px solid rgb(244 239 228 / 0.3); background: rgb(24 26 20 / 0.5); color: #fff;
    font-size: 1.9rem; line-height: 1; cursor: pointer; transition: background 0.2s;
  }
  .lightbox__btn:hover { background: rgb(149 174 30 / 0.55); }
  .lightbox__close { top: 0.75rem; right: 0.75rem; }
  .lightbox__prev { left: 0.75rem; top: 50%; translate: 0 -50%; }
  .lightbox__next { right: 0.75rem; top: 50%; translate: 0 -50%; }
  @media (max-width: 40em) {
    .lightbox__figure { padding: 3.5rem 0.75rem 5rem; }
    .lightbox__prev, .lightbox__next { top: auto; bottom: 1rem; translate: none; }
  }
  body.lightbox-open { overflow: hidden; }
  .info-box { background: var(--c-sand); border-radius: var(--radius); padding: var(--space-s) var(--space-m); border-inline-start: 3px solid var(--c-lotus); }
  .section--sand .info-box { background: var(--c-surface); }

  /* Termine */
  .event {
    display: grid; grid-template-columns: auto 1fr; gap: var(--space-m);
    background: var(--c-surface); border-radius: var(--radius); padding: var(--space-m);
    box-shadow: var(--shadow);
  }
  .section--sand .event { box-shadow: none; }
  .event__date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 4.5rem; height: 4.8rem; border-radius: var(--radius-s);
    background: var(--c-sand); color: var(--c-green-deep); line-height: 1.1; text-align: center;
  }
  .section--sand .event__date { background: var(--c-bg); }
  .event__date--regular img { width: 36px; }
  .event__weekday, .event__month { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
  .event__day { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 500; }
  .event__body { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
  .event__cat { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-gold); }
  .event__title { font-size: var(--step-1); }
  .event__meta { display: flex; flex-direction: column; color: var(--c-ink-soft); font-size: var(--step--1); }
  .event__text { font-size: var(--step--1); max-width: 60ch; }
  .event__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; padding-top: 0.4rem; }
  .event--compact .event__actions { padding-top: 0.2rem; }
  /* Termin mit Bild: Bild rechts (breit) bzw. oben (schmal) */
  .event__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-s); }
  @media (min-width: 48em) {
    .event--bild .event__body { display: grid; grid-template-columns: 1fr 15rem; column-gap: var(--space-m); align-content: start; }
    .event--bild .event__body > * { grid-column: 1; }
    .event--bild .event__media { grid-column: 2; grid-row: 1 / span 6; }
  }
  @media (max-width: 47.99em) {
    .event__media { order: -1; margin-bottom: 0.4rem; }
  }
  .event-summary__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-s); }
  @media (max-width: 30em) {
    .event { grid-template-columns: 1fr; gap: var(--space-s); }
    .event__date { flex-direction: row; gap: 0.4rem; width: auto; height: auto; padding: 0.35rem 0.8rem; justify-self: start; }
    .event__day { font-size: 1.1rem; }
  }
  .badge {
    display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 99px;
    background: var(--c-sand); color: var(--c-ink-soft);
  }
  .badge--open { background: var(--c-success-bg); color: var(--c-green-deep); }
  .badge--few { background: #fbefd9; color: #7a5311; }
  .badge--full { background: var(--c-error-bg); color: var(--c-error); }
  .month {
    font-size: var(--step-1); padding-bottom: 0.4rem; border-bottom: 1px solid var(--c-line);
    --flow-space: var(--space-l);
  }

  .filter__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .filter__chip {
    display: inline-block; padding: 0.45rem 1.05rem; border-radius: 99px; border: 1px solid var(--c-line);
    background: var(--c-surface); color: var(--c-ink); text-decoration: none; font-size: var(--step--1);
  }
  .filter__chip:hover { border-color: var(--c-lotus); color: var(--c-green-deep); }
  .filter__chip[aria-current="true"] { background: var(--c-green); border-color: var(--c-green); color: #fff; }

  .details { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; }
  .details dt { font-weight: 600; color: var(--c-ink-soft); font-size: var(--step--1); padding-top: 0.15em; }
  .details dd { margin: 0; }
  .event-summary { border-top: 3px solid var(--c-lotus); }
  @media (min-width: 60em) { .event-summary { position: sticky; top: calc(var(--header-h) + 1rem); } }

  /* Formulare */
  .form { display: grid; gap: var(--space-m); }
  .field { display: grid; gap: 0.35rem; }
  .field-row { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
  .field label { font-weight: 600; font-size: var(--step--1); }
  .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
    width: 100%; padding: 0.75rem 0.9rem; border: 1px solid #cfc3ab; border-radius: var(--radius-s);
    background: var(--c-surface); line-height: 1.4;
  }
  .field textarea { resize: vertical; min-height: 8rem; }
  .field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgb(149 174 30 / 0.45); outline-offset: 0; border-color: var(--c-green); }
  .field [aria-invalid="true"] { border-color: var(--c-error); }
  .field__error { color: var(--c-error); font-size: var(--step--1); }
  .field--check { grid-template-columns: auto 1fr; align-items: start; gap: 0.3rem 0.75rem; }
  .field--check input { width: 1.2rem; height: 1.2rem; margin-top: 0.25rem; accent-color: var(--c-green); }
  .field--check label { font-weight: 400; }
  .field--check .field__error { grid-column: 2; }
  .req { color: var(--c-error); }
  .optional { font-weight: 400; color: var(--c-ink-soft); }
  .form__note { font-size: var(--step--1); color: var(--c-ink-soft); }
  .form .button { justify-self: start; }
  .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

  .notice { padding: var(--space-s) var(--space-m); border-radius: var(--radius); background: var(--c-sand); }
  .notice--success { background: var(--c-success-bg); border-inline-start: 4px solid var(--c-lotus); }
  .notice--error { background: var(--c-error-bg); color: var(--c-error); border-inline-start: 4px solid var(--c-error); }

  .contact-card { display: flex; gap: var(--space-m); align-items: center; margin-top: var(--space-l); }
  .contact-card__photo { flex: 0 0 auto; }
  .contact-card__photo img { width: 6.5rem; height: 6.5rem; object-fit: cover; border-radius: 50%; }
  @media (max-width: 30em) { .contact-card { flex-direction: column; align-items: start; } }

  .legal h2 { font-size: var(--step-2); --flow-space: var(--space-l); }
  .legal h3 { font-size: var(--step-1); --flow-space: var(--space-m); }
  .legal h4 { font-family: var(--font-sans); font-size: var(--step-0); font-weight: 650; --flow-space: var(--space-s); }
  .legal ul { padding-left: 1.25rem; }
  .legal li + li { margin-top: 0.4rem; }
  .legal a { overflow-wrap: anywhere; }
  .legal__stand { color: var(--c-ink-soft); font-size: var(--step--1); }

  /* Kontakt-Einladung */
  .cta { background: linear-gradient(180deg, var(--c-bg), var(--c-sand)); }
  .section--sand + .cta { background: var(--c-bg); }

  /* Footer */
  .site-footer { background: #2f3428; color: #e9e4d8; padding-block: var(--space-xl) var(--space-m); font-size: var(--step--1); }
  .site-footer a { color: #e9e4d8; text-decoration-color: rgb(233 228 216 / 0.35); }
  .site-footer a:hover { color: #fff; text-decoration-color: currentColor; }
  .site-footer__grid { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
  .site-footer__brand img {
    width: 8.5rem; background: var(--c-bg); border-radius: var(--radius); padding: 0.9rem;
  }
  .site-footer__claim { font-family: var(--font-serif); font-style: italic; font-size: var(--step-0); color: #fff; }
  .site-footer__heading { font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #bdc98a; margin-bottom: 0.75rem; }
  .site-footer__nav li + li { margin-top: 0.35rem; }
  .site-footer__bottom { border-top: 1px solid rgb(233 228 216 / 0.15); margin-top: var(--space-l); padding-top: var(--space-m); color: #bdb6a6; }
}

/* ---------- Inspirationen & Nach-oben-Button ---------- */
@layer block {
  .post-list { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
  .post-card__link {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
    background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow);
    color: var(--c-ink); text-decoration: none; transition: transform 0.25s var(--ease), box-shadow 0.25s;
  }
  .section--sand .post-card__link { box-shadow: none; }
  .post-card__link:hover { transform: translateY(-3px); color: var(--c-ink); box-shadow: 0 12px 36px rgb(45 49 39 / 0.1); }
  .post-card__media { overflow: hidden; }
  .post-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.6s var(--ease); }
  .post-card__link:hover .post-card__media img { transform: scale(1.03); }
  .post-card__body { padding: var(--space-m); flex: 1; display: flex; flex-direction: column; --flow-space: 0.6rem; }
  .post-card__body p:not(.event__cat) { color: var(--c-ink-soft); font-size: var(--step--1); flex: 1; }
  .post-card__title { font-size: var(--step-1); }

  .post__head { padding-block: var(--space-xl) var(--space-m); --flow-space: var(--space-s); }
  .post__head .eyebrow a { color: inherit; text-decoration: none; }
  .post__head .eyebrow a:hover { text-decoration: underline; }
  .post__figure { margin-block-end: var(--space-l); max-width: 50rem; }
  .post__figure img { width: 100%; max-height: 34rem; object-fit: cover; border-radius: var(--radius); }
  .post__figure figcaption { font-size: var(--step--1); color: var(--c-ink-soft); padding-top: 0.4rem; text-align: right; }
  .post__body { padding-bottom: var(--space-2xl); font-size: calc(var(--step-0) * 1.04); }
  .post__body h2 { font-size: var(--step-2); }
  .post__body h3 { font-size: var(--step-1); }
  .post__sign { font-family: var(--font-serif); font-style: italic; font-size: var(--step-1); color: var(--c-green-deep); text-align: right; --flow-space: var(--space-l); }

  .to-top {
    position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 45;
    display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--c-green); color: #fff; box-shadow: 0 6px 20px rgb(45 49 39 / 0.25);
    transition: opacity 0.3s, transform 0.3s var(--ease), background 0.2s;
  }
  .to-top:hover, .to-top:focus-visible { background: var(--c-green-deep); color: #fff; }
  .js .to-top:not(.is-visible) { opacity: 0; transform: translateY(1rem); pointer-events: none; }
  .js .to-top:not(.is-visible):focus-visible { opacity: 1; transform: none; }
  body.nav-open .to-top, body.lightbox-open .to-top { display: none; }
  @media print { .to-top { display: none; } }
}

/* ---------- Verwaltung ---------- */
@layer block {
  .admin { background: var(--c-bg); }
  .admin-bar { background: #2f3428; color: #e9e4d8; }
  .admin-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; min-height: 3.75rem; padding-block: 0.5rem; }
  .admin-bar__brand { display: inline-flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-family: var(--font-serif); font-size: var(--step-1); }
  .admin-bar__brand img { width: 28px; background: var(--c-bg); border-radius: 50%; padding: 3px; }
  .admin-bar__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.25rem; font-size: var(--step--1); }
  .admin-bar__nav a { color: #e9e4d8; }
  .admin-bar__nav a:hover { color: #fff; }
  .admin-bar__logout { background: none; border: 1px solid rgb(233 228 216 / 0.35); color: #e9e4d8; border-radius: 99px; padding: 0.3rem 0.9rem; cursor: pointer; }
  .admin-bar__logout:hover { border-color: #fff; color: #fff; }
  .admin-main { padding-block: var(--space-l) var(--space-xl); --flow-space: var(--space-m); }
  .admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-s); }
  .admin-title { font-size: var(--step-3); }
  .admin-muted { color: var(--c-ink-soft); font-size: var(--step--1); }
  .admin-login { max-width: 26rem; margin: var(--space-xl) auto 0; }
  .admin-table-wrap { overflow-x: auto; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
  .admin-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
  .admin-table th { text-align: left; font-weight: 600; color: var(--c-ink-soft); background: var(--c-sand); padding: 0.7rem 1rem; white-space: nowrap; }
  .admin-table td { padding: 0.8rem 1rem; border-top: 1px solid var(--c-line); vertical-align: top; }
  .admin-table tbody tr:hover { background: #fdfbf7; }
  .admin-table__date { white-space: nowrap; }
  .admin-table__title { display: flex; gap: 0.75rem; align-items: flex-start; }
  .admin-table__title img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
  .admin-table__title .badge { margin-left: 0.35rem; }
  .admin-table__msg { max-width: 22rem; }
  .admin-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
  .admin-actions form { display: contents; }
  .button--ghost { background: transparent; color: var(--c-green); box-shadow: inset 0 0 0 1px var(--c-green); }
  .button--ghost:hover { background: var(--c-success-bg); color: var(--c-green-deep); }
  .button--danger { background: transparent; color: var(--c-error); box-shadow: inset 0 0 0 1px #d9b3aa; }
  .button--danger:hover { background: var(--c-error); color: #fff; }
  .button[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
  .admin-form { max-width: 52rem; gap: var(--space-l); }
  .admin-fieldset { border: 0; padding: var(--space-m); margin: 0; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: var(--space-m); }
  .admin-fieldset legend { font-family: var(--font-serif); font-size: var(--step-1); padding: 0; float: left; width: 100%; }
  .admin-fieldset legend + * { clear: both; }
  .field input[type="date"], .field input[type="time"], .field input[type="number"], .field input[type="file"] {
    width: 100%; padding: 0.7rem 0.9rem; border: 1px solid #cfc3ab; border-radius: var(--radius-s); background: var(--c-surface); line-height: 1.4;
  }
  .field input[type="password"] { width: 100%; padding: 0.75rem 0.9rem; border: 1px solid #cfc3ab; border-radius: var(--radius-s); background: var(--c-surface); }
  .field-row--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
  .admin-bild { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-m); }
  .admin-bild img, .admin-preview { width: 15rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-s); }
  .admin-preview { margin-top: 0.5rem; }
  .admin-submit { display: flex; align-items: center; gap: var(--space-m); position: sticky; bottom: 0; padding: var(--space-s) 0; background: linear-gradient(transparent, var(--c-bg) 35%); }
  .admin-order { white-space: nowrap; }
  .admin-order form { display: inline-block; }
  .admin-mailtest { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
  .admin code { font-size: 0.9em; background: var(--c-sand); padding: 0.1em 0.35em; border-radius: 4px; }
}

/* ---------- Utilities ---------- */
@layer utility {
  [hidden] { display: none !important; }
  .text-center { text-align: center; }
  .text-center .questions { border: 0; padding: 0; }
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .cta, .nav-toggle, .event__actions { display: none !important; }
  .page-hero--image, .hero { min-height: 0; color: var(--c-ink); }
  .page-hero--image h1, .hero__title { color: var(--c-ink); text-shadow: none; }
  .page-hero__media, .hero__media { display: none; }
}
