/* Mein Dossenheim — Local Field Guide
 * Final design layer: a calm, editorial guide that is unmistakably local,
 * rather than a generic directory full of floating cards.
 */

:root {
  /* Field guide palette: ink for text and actions, one muted step,
   * clay only for small wayfinding marks (labels, today, rules). */
  --fg-ink: #1a332b;
  --fg-muted: #3c5248;
  --fg-moss: var(--fg-ink);
  --fg-fern: var(--fg-clay);
  --fg-clay: #b04e2a;
  --fg-apricot: var(--fg-accent-on-dark);
  --fg-accent-on-dark: #f0c2a4;
  --fg-paper: #f3efe4;
  --fg-cream: #faf7f0;
  --fg-line: rgba(26, 51, 43, 0.16);
  --fg-radius: 14px;
  --fg-radius-sm: 10px;
  --fg-font-display: "Playfair Display", Georgia, serif;
  --fg-font-body: "Avenir Next", "Segoe UI", sans-serif;
  --fg-scroll-offset: 6.5rem;

  --primary-green: var(--fg-ink);
  --primary-light: #6d8b7c;
  --primary-dark: var(--fg-ink);
  --secondary-green: var(--fg-cream);
  --text-main: var(--fg-ink);
  --text-muted: var(--fg-muted);
  --text-on-dark: var(--fg-cream);
  --bg-light: var(--fg-paper);
  --bg-card: var(--fg-cream);

  --v2-ink: var(--fg-ink);
  --v2-muted: var(--fg-muted);
  --v2-green: var(--fg-ink);
  --v2-green-dark: var(--fg-ink);
  --v2-mint: var(--fg-cream);
  --v2-orange: var(--fg-clay);
  --v2-paper: var(--fg-paper);
  --v2-surface: var(--fg-cream);
  --v2-line: var(--fg-line);

  --revamp-ink: var(--fg-ink);
  --revamp-ink-soft: var(--fg-muted);
  --revamp-green: var(--fg-ink);
  --revamp-green-dark: var(--fg-ink);
  --revamp-green-soft: var(--fg-cream);
  --revamp-orange: var(--fg-clay);
  --revamp-canvas: var(--fg-paper);
  --revamp-surface: var(--fg-cream);
  --revamp-line: var(--fg-line);
}

html {
  background: var(--fg-paper);
  scroll-padding-top: var(--fg-scroll-offset);
}

#kategorien,
#info {
  scroll-margin-top: var(--fg-scroll-offset);
}

body {
  min-width: 320px;
  background:
    radial-gradient(ellipse 70% 42% at 100% -8%, rgba(176, 78, 42, 0.08), transparent 62%),
    var(--fg-paper);
  color: var(--fg-ink);
  font-family: var(--fg-font-body);
}

body::before {
  content: none;
}

#fixed-header {
  height: 78px;
  background: rgba(243, 239, 228, 0.94);
  border-bottom: 1px solid var(--fg-line);
  box-shadow: none;
}

#fixed-header > div { display: flex; align-items: center; width: 100%; height: 100%; min-width: 0; }
#fixed-card { max-width: 1360px; padding: 0 2rem; display: flex; align-items: center; justify-content: flex-start; min-width: 0; }

#fixed-header .logo,
#fixed-header img.logo {
  width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  padding: 4px;
  border: 1px solid var(--fg-line);
  border-radius: 50%;
  background: var(--fg-cream);
}

#fixed-header h1,
#fixed-header .brand-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--fg-ink);
  font-family: var(--fg-font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

#site-nav { gap: 0.15rem; }
#site-nav a {
  padding: 0.42rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--fg-ink);
  font-family: var(--fg-font-body);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#site-nav a:hover,
#site-nav a[aria-current="page"] {
  background: var(--fg-ink);
  color: var(--fg-cream);
}

#hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  box-sizing: border-box;
  height: auto;
  min-height: clamp(510px, 64vh, 720px);
  padding: 78px 0 3rem;
  overflow: visible;
  background-size: cover;
  background-position: center;
}
#hero > .container {
  width: 100%;
}
#hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: clamp(1.5rem, 7vw, 9rem);
  bottom: clamp(1.6rem, 6vw, 5rem);
  width: min(30vw, 390px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 253, 247, 0.52);
  border-radius: 48% 52% 42% 58% / 56% 38% 62% 44%;
  box-shadow: 0 0 0 24px rgba(255, 253, 247, 0.12), 0 0 0 48px rgba(255, 253, 247, 0.07);
  transform: rotate(-14deg);
}
#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(10, 38, 28, 0.90) 0%, rgba(10, 38, 28, 0.60) 43%, rgba(10, 38, 28, 0.11) 86%), linear-gradient(0deg, rgba(10, 38, 28, 0.27), transparent 50%);
}

#hero-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 2rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: left;
}
#hero-card::before { display: none; }
.hero-eyebrow {
  margin: 0 0 1.4rem;
  color: var(--fg-accent-on-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}
#hero h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--fg-cream);
  font-family: var(--fg-font-display);
  font-size: clamp(3.5rem, 7vw, 7.1rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.82;
}
.hero-deck {
  max-width: 36rem;
  margin: 1.4rem 0 1.25rem;
  color: rgba(255, 253, 247, 0.9);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
}
.hero-link {
  display: inline-flex;
  gap: 1.4rem;
  align-items: center;
  padding: 0.9rem 1.15rem;
  border: 1px solid rgba(255, 253, 247, 0.75);
  color: var(--fg-cream);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.hero-link:hover { background: var(--fg-cream); color: var(--fg-ink); transform: translateY(-2px); }
.hero-link span { color: var(--fg-accent-on-dark); font-size: 1.25rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.65rem 1.35rem; margin: 1.5rem 0 0; color: rgba(250, 247, 240, 0.86); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-meta span + span::before { content: "•"; margin-right: 1.35rem; color: var(--fg-accent-on-dark); }

#info {
  position: relative;
  max-width: 1240px;
  margin: clamp(3rem, 8vw, 7.5rem) auto clamp(2.2rem, 5vw, 4rem);
  padding: 0 2rem;
}
#info p:first-child {
  max-width: 12ch;
  margin: 0;
  color: var(--fg-ink);
  font-family: var(--fg-font-display);
  font-size: clamp(2.8rem, 6.1vw, 6.25rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.88;
}
#info p + p { max-width: 34rem; margin: 1.8rem 0 0; color: var(--fg-muted); font-size: 1.08rem; }

/* Homepage orientation: a short factual introduction, with its sources kept
 * visible as part of the reading order rather than as decorative labels. */
#info.orientation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.48fr);
  gap: 2.25rem clamp(2rem, 7vw, 8rem);
  align-items: end;
  padding-top: 1.25rem;
  border-top: 1px solid var(--fg-line);
}
#info.orientation p:first-child {
  max-width: 14ch;
  font-size: clamp(2.6rem, 4.6vw, 4.7rem);
  line-height: 0.94;
}
.orientation-copy { min-width: 0; }
.orientation-markers {
  display: grid;
  gap: 0.55rem;
  align-self: center;
}
.orientation-markers a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border-top: 1px solid var(--fg-line);
  color: var(--fg-moss);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}
.orientation-markers a::before { content: "↗"; margin-right: 0.65rem; color: var(--fg-clay); font-size: 0.95rem; }
.orientation-markers a:hover { color: var(--fg-ink); background: rgba(255, 253, 247, 0.68); }

.local-rhythm {
  max-width: 1240px;
  margin: clamp(2.5rem, 6vw, 4.5rem) auto clamp(2rem, 4vw, 3rem);
  padding: 0 2rem;
}
.local-rhythm-heading { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; align-items: baseline; margin-bottom: 1.5rem; }
.section-label {
  margin: 0;
  color: var(--fg-clay);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.local-rhythm h2 { margin: 0; color: var(--fg-ink); font-family: var(--fg-font-display); font-size: clamp(1.8rem, 3.4vw, 3rem); letter-spacing: -0.045em; line-height: 1; }
.local-rhythm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--fg-line);
  border-bottom: 1px solid var(--fg-line);
}
.rhythm-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 164px;
  padding: 1.35rem 1.25rem 1.5rem;
  border-right: 1px solid var(--fg-line);
  background: rgba(255, 253, 247, 0.40);
  color: var(--fg-ink);
  text-decoration: none;
}
.rhythm-tile:last-child { border-right: 0; }
.rhythm-tile:hover, .rhythm-tile:focus-within { background: rgba(255, 253, 247, 0.90); }
.rhythm-time { color: var(--fg-clay); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.rhythm-category, .rhythm-category-links { margin-top: 1.25rem; color: var(--fg-ink); font-family: var(--fg-font-display); font-size: clamp(1.25rem, 2.3vw, 1.85rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; }
.rhythm-copy { margin-top: 0.55rem; color: var(--fg-muted); font-size: 0.88rem; line-height: 1.4; }
.rhythm-tile-evening .rhythm-copy { margin-top: 1.25rem; }
.rhythm-category-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-top: 0.5rem; }
.rhythm-category-links a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration-color: var(--fg-fern); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.rhythm-category-links a:hover { color: var(--fg-moss); }
.local-rhythm-aside { margin: 1rem 0 0; color: var(--fg-muted); font-size: 0.9rem; }
.local-rhythm-aside a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-moss); font-weight: 700; }

.subpage .category-intro {
  grid-column: 1 / -1;
  margin: 0.2rem 0 0.55rem;
  color: var(--fg-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* A directory already has a prominent H1 in its image hero.  Its following
 * sentence is a useful orientation line, not a second display headline.
 * Keep the homepage's editorial question large, but make collection-page
 * introductions quick to read and bring the results closer to the fold. */
body.is-directory #info {
  max-width: 1320px;
  margin: clamp(2.6rem, 5vw, 5rem) auto 1.9rem;
}
body.is-directory #info p:first-child {
  max-width: 43rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--fg-clay);
  color: var(--fg-muted);
  font-family: var(--fg-font-body);
  font-size: clamp(1.12rem, 1.7vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.48;
}

.subpage {
  max-width: 1320px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  padding: 0 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.subpage-card {
  position: relative;
  display: grid;
  grid-column: auto;
  grid-template-columns: 4.7rem minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
  align-items: center;
  min-width: 0;
  min-height: 174px;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--fg-line);
  border-left: 0;
  border-radius: var(--fg-radius);
  background: rgba(250, 247, 240, 0.88);
  box-shadow: none;
  color: var(--fg-ink);
}
/* The intro is the first child, so card indexes are not 1–5.
   Pair the tiles, and let an odd last card take the whole row. */
.subpage > .category-intro ~ .subpage-card:last-child:nth-child(even),
.subpage:not(:has(.category-intro)) > .subpage-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.subpage-card::before { content: ""; position: absolute; inset: 0.85rem auto 0.85rem 0; width: 4px; border-radius: 0 3px 3px 0; background: var(--fg-clay); transform: scaleY(0.35); transform-origin: bottom; transition: transform 220ms ease; }
.subpage-card:hover { border-color: var(--fg-ink); box-shadow: 0 10px 24px rgba(26, 51, 43, 0.08); transform: translateY(-2px); }
.subpage-card:hover::before { transform: scaleY(1); }
.subpage-card::after { right: 1.35rem; border-color: var(--fg-line); border-radius: 0; color: var(--fg-ink); }
.subpage-card:hover::after { border-color: var(--fg-ink); background: var(--fg-ink); color: var(--fg-cream); }
.subpage-card > img { width: 62px; height: 62px; margin: 0; }
.category-copy { display: block; min-width: 0; }
.subpage-card h2 { margin: 0; padding: 0; color: var(--fg-ink); font-family: var(--fg-font-display); font-size: clamp(1.45rem, 2.2vw, 2.25rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; text-align: left; }
.category-copy > span { display: block; margin-top: 0.6rem; color: var(--fg-muted); font-size: 0.9rem; line-height: 1.35; }

/* Collection pages: information-dense, but airy and easy to scan. */
#search-bar { max-width: 1320px; margin-top: 1.4rem; padding: 0 2rem; }
#search { width: min(100%, 760px); border: 0; border-bottom: 1.5px solid rgba(26, 51, 43, 0.55); border-radius: 0; background: transparent; box-shadow: none; color: var(--fg-ink); font-family: var(--fg-font-body); font-size: 1.05rem; }
#search::placeholder { color: var(--fg-muted); opacity: 1; }
#search:focus { border-bottom-color: var(--fg-ink); box-shadow: none; }
#filter-section { max-width: 1320px; margin-top: 1.1rem; padding-right: 2rem; padding-left: 2rem; border-color: var(--fg-line) !important; }
#filter-section .filter-group h4 { color: var(--fg-muted) !important; }
.filter-button { min-height: 44px; border-radius: 999px; border-color: var(--fg-line); background: var(--fg-cream); color: var(--fg-ink); }
.filter-button:hover, .filter-button.active { border-color: var(--fg-ink) !important; background: var(--fg-ink) !important; color: var(--fg-cream) !important; box-shadow: none; }
.listing-status { max-width: 1320px; padding: 0 2rem; }
.result-count { color: var(--fg-ink); font-size: 0.75rem; font-weight: 750; letter-spacing: 0.11em; text-transform: uppercase; }
#restaurants, #bakeries, #cafes, #venues, #hairdressers { max-width: 1320px; gap: 1.1rem; margin-top: 1.1rem; padding: 0 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 370px), 1fr)); }
.restaurant, .bakery, .cafe, .venue, .hairdresser { display: grid !important; grid-template-columns: minmax(106px, 31%) minmax(0, 1fr); grid-template-areas: "title title" "media content"; grid-template-rows: auto auto; gap: 0.85rem 1rem; min-height: 0; padding: 1.15rem 1.15rem 1rem; border: 1px solid var(--fg-line) !important; border-top: 1px solid var(--fg-line) !important; border-radius: var(--fg-radius) !important; background: var(--fg-cream); box-shadow: 0 1px 2px rgba(26, 51, 43, 0.04) !important; scroll-margin-top: var(--fg-scroll-offset); }
.restaurant:hover, .bakery:hover, .cafe:hover, .venue:hover, .hairdresser:hover { border-color: rgba(26, 51, 43, 0.28) !important; box-shadow: 0 12px 28px rgba(26, 51, 43, 0.08) !important; transform: translateY(-2px); }
.restaurant.closed, .bakery.closed, .cafe.closed, .venue.closed, .hairdresser.closed { opacity: 0.58; filter: grayscale(1); }
.restaurant.closed:hover, .bakery.closed:hover, .cafe.closed:hover, .venue.closed:hover, .hairdresser.closed:hover { transform: none; box-shadow: none !important; }
.restaurant h2, .bakery h2, .cafe h2, .venue h2, .hairdresser h2 { grid-area: title; position: relative; z-index: 1; margin: 0; color: var(--fg-ink) !important; font-family: var(--fg-font-display); font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.04; }
.img_container, .img_container.media-wide, .img_container.media-square, .img_container.media-portrait { grid-area: media; width: 100%; height: auto; min-height: 128px; margin: 0; padding: 0.45rem; border: 1px solid var(--fg-line); border-radius: var(--fg-radius-sm); background: var(--fg-paper); }
.img_container > img { max-height: 160px; }
.info_container { grid-area: content; min-width: 0; }
.contact-buttons { display: flex; flex-wrap: wrap; gap: 0.38rem; margin: 0 !important; min-width: 0; max-width: 100%; }
.contact-button { min-height: 44px; max-width: 100%; box-sizing: border-box; padding: 0.4rem 0.5rem; border: 1px solid var(--fg-line); border-radius: var(--fg-radius-sm); background: transparent; color: var(--fg-ink); font-size: 0.75rem; font-weight: 650; overflow-wrap: break-word; word-break: normal; hyphens: manual; -webkit-hyphens: manual; }
.contact-button > span { overflow-wrap: break-word; word-break: normal; hyphens: manual; -webkit-hyphens: manual; }
.contact-button:first-child { flex: 1.6 1 9rem; min-width: min(8.75rem, 100%); max-width: 100%; }
.contact-button:hover { border-color: var(--fg-ink); background: var(--fg-ink); color: var(--fg-cream); }
.contact-button.detail-link { flex: 1 1 100%; width: 100%; max-width: 100%; box-sizing: border-box; justify-content: flex-start; gap: 0.45rem; padding: 0.55rem 0.15rem; border: 0; border-top: 1px solid var(--fg-line); border-radius: 0; background: transparent; color: var(--fg-ink); font-size: 0.82rem; letter-spacing: 0.01em; }
.contact-button.detail-link:hover { background: transparent; color: var(--fg-clay); }
.venue-description { margin-top: 0.8rem; color: var(--fg-muted); font-size: 0.9rem; line-height: 1.55; }
.hours-block, .info_container > div[style*="margin-top"] { border-color: var(--fg-line); color: var(--fg-muted); font-size: 0.88rem; }
.hours-block b, .info_container > div[style*="margin-top"] b { color: var(--fg-ink); }

footer { position: relative; overflow: hidden; margin-top: 1.25rem; padding: 1.5rem 0 1.35rem; background: var(--fg-ink); color: var(--fg-cream); border-top: 4px solid var(--fg-clay); }
footer::before { content: "Mein Dossenheim"; position: relative; display: block; max-width: 1240px; margin: 0 auto 0.45rem; padding: 0 2rem; color: var(--fg-cream); font-family: var(--fg-font-display); font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; pointer-events: none; }
#footer-card { align-items: flex-start; width: min(1240px, 100%); padding: 0 2rem; box-sizing: border-box; text-align: left; }
footer a { color: var(--fg-cream); opacity: 1; }
footer p { margin: 0.3rem 0 0; color: #e4ddd0; font-family: var(--fg-font-body); font-size: 0.88rem; }

.breadcrumb-nav { color: var(--fg-muted); font-size: 0.95rem; }
.breadcrumb-nav a { color: var(--fg-ink); font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* Category heroes carry a short title. Keep the photograph visible and
 * the band short, especially on a phone. */
body.is-directory #hero {
  height: auto;
  min-height: 0;
  padding-top: 78px;
  padding-bottom: 1.7rem;
}
body.is-directory #hero::after {
  background:
    linear-gradient(105deg, rgba(18, 36, 30, 0.74) 0%, rgba(18, 36, 30, 0.40) 62%, rgba(18, 36, 30, 0.16) 100%),
    linear-gradient(0deg, rgba(18, 36, 30, 0.18), transparent 55%);
}
body.is-directory #hero h1 { max-width: 16ch; font-size: clamp(2.35rem, 5vw, 4rem); }

/* The location marker belongs to the home hero. On category pages it fights
 * the subject of the individual photo, so the image and title get the stage. */
body.is-directory #hero::before { display: none; }
body.directory-bakeries #hero { background-position: 64% center; }
body.directory-cafes #hero { background-position: 58% center; }
body.directory-venues #hero { background-position: 62% center; }
body.directory-hairdressers #hero { background-position: 65% center; }

@media (max-width: 900px) {
  :root { --fg-scroll-offset: 6.5rem; }
  #fixed-header { height: 70px; }
  #fixed-header > div { display: flex; align-items: center; width: 100%; height: 100%; min-width: 0; }
  #fixed-card { padding: 0 1rem; display: flex; align-items: center; justify-content: flex-start; width: 100%; height: 100%; min-width: 0; }
  #fixed-header h1, #fixed-header .brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #mobile-nav-toggle { display: grid; place-items: center; align-self: center; flex: 0 0 44px; width: 44px; height: 44px; margin: 0 0 0 auto; }
  #site-nav { top: 70px; border-radius: 0; background: var(--fg-paper); }
  #site-nav a { font-size: 0.8rem; }
  #hero { height: auto; min-height: 500px; padding: 70px 0 2.5rem; }
  body.is-directory #hero { min-height: 0; padding: 70px 0 1.35rem; }
  #hero-card { width: 100%; max-width: 1320px; padding: 1.6rem 2rem 0; }
  #hero::before { right: 2rem; width: 210px; }
  #info.orientation { grid-template-columns: 1fr; gap: 1.5rem; }
  .subpage-card { grid-column: auto; min-width: 0; }
  .info_container, .contact-buttons { min-width: 0; max-width: 100%; }
  .contact-buttons { display: flex; flex-wrap: wrap; }
  .contact-button, .contact-button:first-child { flex: 1 1 calc(50% - 0.2rem); min-width: 0; max-width: 100%; }
  .contact-button:first-child { flex: 1 1 100%; }
  .contact-button.detail-link { flex: 1 1 100%; width: 100%; max-width: 100%; }
}

@media (max-width: 600px) {
  :root { --fg-scroll-offset: 6.5rem; }
  #fixed-header { height: 66px; }
  #fixed-header h1,
  #fixed-header .brand-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #mobile-nav-toggle { flex: 0 0 44px; align-self: center; width: 44px; height: 44px; margin: 0 0 0 auto; }
  #site-nav { top: 66px; }
  #hero { height: auto; min-height: 460px; padding: 66px 0 2rem; background-position: 58% center; }
  body.is-directory #hero { min-height: 0; padding: 66px 0 1.05rem; }
  body.is-directory #hero h1 { font-size: clamp(2.05rem, 9vw, 2.65rem); line-height: 0.96; }
  #hero::before { right: 1.4rem; bottom: 2.4rem; width: 140px; }
  #hero-card { width: 100%; padding: 1.35rem 1rem 0; }
  .hero-eyebrow { margin-bottom: 0.85rem; font-size: 0.64rem; }
  #hero h1 { font-size: clamp(3.15rem, 16vw, 5rem); line-height: 0.84; }
  .hero-deck { max-width: 29rem; margin: 1.15rem 0 1.1rem; font-size: 0.98rem; }
  .hero-meta { margin-top: 1.25rem; font-size: 0.62rem; }
  .hero-meta span + span::before { margin-right: 0.65rem; }
  #info { margin-top: 3.6rem; padding: 0 1rem; }
  #info p:first-child { font-size: clamp(3rem, 14.5vw, 4.8rem); }
  #info p + p { font-size: 1rem; }
  #info.orientation { margin-top: 3.2rem; padding-top: 1rem; }
  #info.orientation p:first-child { max-width: 11ch; font-size: clamp(2.55rem, 12vw, 3.4rem); }
  .orientation-markers { gap: 0.3rem; }
  .orientation-markers a { padding-right: 0.55rem; padding-left: 0.55rem; font-size: 0.68rem; }
  .local-rhythm { margin-top: 2.6rem; margin-bottom: 2.2rem; padding: 0 1rem; }
  .local-rhythm-heading { display: block; margin-bottom: 1.2rem; }
  .local-rhythm h2 { margin-top: 0.65rem; font-size: 1.9rem; }
  .local-rhythm-grid { grid-template-columns: 1fr; }
  .rhythm-tile { min-height: 0; padding: 1.05rem 0; border-right: 0; border-bottom: 1px solid var(--fg-line); background: transparent; }
  .rhythm-tile:last-child { border-bottom: 0; }
  .rhythm-category, .rhythm-category-links { margin-top: 0.7rem; font-size: 1.45rem; }
  .rhythm-tile-evening .rhythm-copy { margin-top: 0.7rem; }
  .local-rhythm-aside { margin-top: 0.65rem; }
  body.is-directory #info { margin-top: 2.4rem; margin-bottom: 1.55rem; }
  body.is-directory #info p:first-child { padding-left: 0.85rem; font-size: 1.12rem; line-height: 1.5; }
  .subpage { padding: 0 1rem; gap: 0.75rem; }
  .subpage-card,
  .subpage > .category-intro ~ .subpage-card:last-child:nth-child(even),
  .subpage:not(:has(.category-intro)) > .subpage-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    min-height: 132px;
    grid-template-columns: 3.55rem minmax(0, 1fr);
    gap: 0.65rem;
    padding: 1.1rem 1rem;
  }
  .subpage-card > img { width: 50px; height: 50px; }
  .subpage-card h2 { font-size: 1.5rem; }
  .category-copy > span { margin-top: 0.38rem; font-size: 0.77rem; }
  .subpage-card::after { right: 0.9rem; }
  #search-bar, #filter-section, .listing-status, #restaurants, #bakeries, #cafes, #venues, #hairdressers { padding-right: 1rem; padding-left: 1rem; }
  #search { font-size: 1.1rem; }
  .restaurant, .bakery, .cafe, .venue, .hairdresser { grid-template-columns: 92px minmax(0, 1fr); grid-template-areas: "title title" "media content"; padding: 0.95rem; min-width: 0; }
  footer::before, #footer-card { padding-left: 1rem; padding-right: 1rem; }
  .img_container, .img_container.media-wide, .img_container.media-square, .img_container.media-portrait { min-height: 108px; }
  .img_container > img { max-height: 130px; }
}

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

/* Venue detail pages drop the category hero and keep a compact, always-on header. */
body.is-venue-detail #hero,
body.is-venue-detail #search-bar,
body.is-venue-detail #filter-section,
body.is-venue-detail #info { display: none; }
body.is-venue-detail #fixed-header {
  opacity: 1 !important;
  pointer-events: auto !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--fg-ink);
  outline-offset: 3px;
}

/* Ortsfeste: a calm yearly chapter, separate from the business directory. */
.ortsveste {
  max-width: 1240px;
  margin: clamp(2.2rem, 5vw, 4rem) auto clamp(1.5rem, 4vw, 2.5rem);
  padding: 0 2rem;
}
.ortsveste-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
}
.ortsveste h2 {
  margin: 0;
  color: var(--fg-ink);
  font-family: var(--fg-font-display);
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.ortsveste-deck {
  max-width: 42rem;
  margin: 0 0 1.5rem;
  color: var(--fg-muted);
  font-size: 1.02rem;
  line-height: 1.55;
}
.ortsveste-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
}
.ortsveste h3 {
  margin: 0 0 0.35rem;
  color: var(--fg-clay);
  font-family: var(--fg-font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ortsveste-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ortsveste-list a {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--fg-line);
  color: inherit;
  text-decoration: none;
}
.ortsveste-list li:last-child a {
  border-bottom: 1px solid var(--fg-line);
}
.ortsveste-list a:hover .ortsveste-name,
.ortsveste-list a:focus-visible .ortsveste-name {
  color: var(--fg-clay);
}
.ortsveste-name {
  font-family: var(--fg-font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.ortsveste-when {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.ortsveste-note {
  max-width: 46rem;
  margin: 1.15rem 0 0;
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.ortsveste-note a {
  color: var(--fg-ink);
  font-weight: 700;
}
.ortsveste-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.85rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--fg-ink);
  color: var(--fg-ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.ortsveste-more:hover,
.ortsveste-more:focus-visible {
  background: var(--fg-ink);
  color: var(--fg-cream);
}

body.is-kultur {
  padding-top: 78px;
}
.kultur-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.35rem 2rem 3.25rem;
}
.kultur-page .breadcrumb-nav {
  max-width: none;
  margin: 0 0 1.4rem;
  padding: 0;
}
.kultur-masthead {
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--fg-line);
}
.kultur-masthead h1 {
  max-width: 14ch;
  margin: 0.35rem 0 0;
  color: var(--fg-ink);
  font-family: var(--fg-font-display);
  font-size: clamp(2.5rem, 5.4vw, 4.3rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.92;
}
.kultur-deck {
  max-width: 40rem;
  margin: 1.15rem 0 0;
  color: var(--fg-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.kultur-disclaimer {
  max-width: 40rem;
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--fg-line);
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.kultur-disclaimer a,
.fest-source a {
  color: var(--fg-ink);
  font-weight: 700;
}
.kultur-group {
  margin-top: 2.4rem;
}
.kultur-group h2 {
  margin: 0.25rem 0 0.35rem;
  color: var(--fg-ink);
  font-family: var(--fg-font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.kultur-group > p {
  max-width: 40rem;
  margin: 0 0 0.4rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}
.fest {
  padding: 1.35rem 0 1.2rem;
  border-top: 1px solid var(--fg-line);
  scroll-margin-top: var(--fg-scroll-offset);
}
.kultur-group .fest:last-child {
  border-bottom: 1px solid var(--fg-line);
}
.fest-kicker {
  margin: 0;
  color: var(--fg-clay);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.fest h3 {
  margin: 0.3rem 0 0;
  color: var(--fg-ink);
  font-family: var(--fg-font-display);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.fest-summary {
  max-width: 40rem;
  margin: 0.55rem 0 0;
  color: var(--fg-muted);
  line-height: 1.55;
}
.fest-meta {
  display: grid;
  gap: 0.35rem;
  margin: 0.9rem 0 0;
}
.fest-meta div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
}
.fest-meta dt {
  margin: 0;
  color: var(--fg-clay);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.fest-meta dd {
  margin: 0;
  color: var(--fg-ink);
  line-height: 1.45;
}
.fest-note {
  max-width: 40rem;
  margin: 0.85rem 0 0;
  padding-left: 0.8rem;
  border-left: 3px solid var(--fg-clay);
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.fest-source {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}
.fest-source a + a {
  margin-left: 0.85rem;
}

@media (max-width: 900px) {
  body.is-kultur { padding-top: 70px; }
  .ortsveste-groups { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 600px) {
  body.is-kultur { padding-top: 66px; }
  .ortsveste { margin-top: 2.4rem; padding: 0 1rem; }
  .ortsveste-heading { display: block; }
  .ortsveste h2 { margin-top: 0.55rem; font-size: 1.9rem; }
  .ortsveste-name { font-size: 1.25rem; }
  .kultur-page { padding: 1rem 1rem 2.6rem; }
  .kultur-masthead h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
  .fest-meta div { grid-template-columns: 1fr; gap: 0.1rem; }
  .fest-source a { display: inline-flex; align-items: center; min-height: 44px; }
  .fest-source a + a { margin-left: 0; }
}
