/* ==========================================================================
   Katrin Haak's Landfreude — design tokens
   The taxonomy is the palette: every season/category keeps one fixed color,
   used everywhere a date would otherwise sit (chips, nav dots, archive tint).
   ========================================================================== */
:root {
  --ink: #241a10;
  --ink-soft: #4a3c2c;
  --linen: #f4ecd8;
  --linen-soft: #faf6ec;
  --pine: #24503c;
  --pine-deep: #1a3527;
  --pine-mid: #26463790;
  --moss: #5f7d4f;
  --ochre: #c99a3b;
  --taupe: #ded1b4;
  --taupe-line: #d8c9a8;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', -apple-system, Segoe UI, sans-serif;

  --wrap: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(28, 51, 38, 0.06), 0 10px 24px -12px rgba(28, 51, 38, 0.25);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; color: var(--pine); }
h1 { font-size: clamp(2.1rem, 3.2vw + 1rem, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--pine); color: var(--linen-soft);
  padding: 10px 16px; border-radius: var(--radius-sm); z-index: 200; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--ochre); outline-offset: 2px;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header { background: var(--pine); color: var(--linen-soft); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 8px; gap: 24px; }
/* flex-shrink: 0 — .header-inner won't ever squeeze the logo to make room
   for a too-wide nav; the nav itself should give way first (see .nav-list
   above, and the 1280px breakpoint that keeps it from getting that tight
   in the first place). Without this, a global `img { max-width: 100% }`
   clamps the logo's width once its flex box is forced narrower, while its
   fixed height stays put — the logo visibly squashes. */
.brand { flex-shrink: 0; }
.brand-mark { height: 58px; width: auto; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--linen-soft); display: block; }

/* Never wraps to a second row in desktop mode — a season's dropdown is
   positioned under its own item assuming a single nav row, so a wrapped
   second row would sit right where the dropdown renders (see the
   1200px breakpoint note below). Below that breakpoint this becomes a
   column instead, where wrapping isn't relevant. */
.nav-list { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; flex-wrap: nowrap; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 0.95rem;
  font-weight: 600; letter-spacing: .01em; border-radius: 999px; transition: background .15s ease;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.is-current { background: rgba(255,255,255,.1); }
.nav-link .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.nav-cta { background: var(--ochre); color: var(--pine-deep); }
.nav-cta:hover { background: #dcae55; }

.nav-item.has-children:hover .sub-nav,
.nav-item.has-children:focus-within .sub-nav { display: block; }
.sub-nav {
  display: none; position: absolute; top: 100%; left: 0; padding: 8px;
  background: var(--pine); border-radius: var(--radius-sm); min-width: 180px; box-shadow: var(--shadow-card);
  list-style: none;
}
/* Sits flush against the parent link (no gap) so moving the mouse straight
   down into the dropdown never crosses a dead zone that would close it
   first — a few pixels of breathing room go on the dropdown's own padding
   instead, which doesn't break the hover chain. */
.sub-nav { margin-top: 6px; }
.nav-item.has-children { padding-bottom: 6px; margin-bottom: -6px; }
.sub-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: .9rem; font-weight: 500; }
.sub-nav a:hover, .sub-nav a.is-current { background: rgba(255,255,255,.1); }
.sub-nav .dot { width: 8px; height: 8px; border-radius: 50%; }

/* This nav has ten top-level items plus the logo — that genuinely needs
   ~1180px in one row (measured via the unwrapped .nav-list's scrollWidth).
   Below that, .nav-list's own flex-wrap used to let it spill onto a second
   line while staying in "desktop hover" mode, and a season's dropdown
   (position: absolute, anchored under that season's own item on row 1)
   would then render right where row 2's items sit in normal flow — e.g.
   Frühling's "Ostern" flyout landing underneath "Über mich"/"Kontakt",
   which then visually and functionally cover it. Switching to the static
   mobile menu well before that wrap point avoids the collision entirely —
   the 1280px cutoff below leaves ~100px of margin over the measured
   minimum, so slightly different font rendering or a scrollbar's width
   can't tip it back into the same trap. */
@media (max-width: 1280px) {
  .nav-toggle { display: flex; }
  .main-nav { position: absolute; inset: 100% 0 auto 0; background: var(--pine); padding: 8px 24px 20px; display: none; }
  .main-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-top: 1px solid rgba(255,255,255,.08); }
  .nav-item.has-children .sub-nav,
  .sub-nav { position: static; display: block; box-shadow: none; background: rgba(0,0,0,.15); }
}

/* ==========================================================================
   Chips — the visible stand-in for a hidden date
   ========================================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body);
  font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  color: color-mix(in srgb, var(--chip-color) 55%, var(--ink-soft));
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--chip-color); flex: none; }
.chip:hover { text-decoration: underline; }

/* Larger variant used where a chip acts as an actual navigation button
   (e.g. "related categories" on an archive page) — keeps the pill shape. */
.chip-lg {
  font-size: .8rem; padding: 7px 15px; border-radius: 999px;
  background: color-mix(in srgb, var(--chip-color) 16%, var(--linen-soft));
  border: 1px solid color-mix(in srgb, var(--chip-color) 35%, transparent);
}
.chip-lg:hover { background: color-mix(in srgb, var(--chip-color) 26%, var(--linen-soft)); text-decoration: none; }

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero {
  background:
    linear-gradient(180deg, rgba(36,80,60,.90) 0%, rgba(26,53,39,.94) 100%),
    url('/assets/img/hero-bg.webp') center/cover no-repeat;
  color: var(--linen-soft); overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-block: 64px; }
.hero-eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--ochre); margin-bottom: 14px; display: block; }
.hero h1 { color: var(--linen-soft); }
.hero .tagline-script { font-family: var(--font-display); font-style: italic; font-weight: 500; color: #d7c48a; font-size: 1.3rem; margin-top: -6px; }
.hero p.lede { color: #d9d0c0; font-size: 1.08rem; max-width: 46ch; }
.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; background: var(--pine-deep); }
.hero-media img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 40px; }
  .hero-media { aspect-ratio: 16/10; }
}

/* ==========================================================================
   Season rail
   ========================================================================== */
.section { padding-block: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { color: var(--ink-soft); margin: 0; max-width: 60ch; }

.season-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.season-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); background: var(--linen-soft);
}
.season-card-media { display: block; position: relative; aspect-ratio: 3/4; background: var(--taupe); overflow: hidden; }
.season-card-media img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; transition: transform .4s ease; }
.season-card:hover .season-card-media img { transform: scale(1.04); }
.season-card-info { padding: 14px 16px; border-top: 3px solid var(--card-color, var(--moss)); }
.season-card-name { display: block; font-family: var(--font-display); color: var(--pine); font-size: 1.15rem; }
.season-card-count { color: var(--ink-soft); font-size: .82rem; font-weight: 600; }
.season-card.is-current { outline: 3px solid var(--ochre); outline-offset: 3px; }

@media (max-width: 880px) { .season-rail { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Post grid & cards
   ========================================================================== */
/* align-items: start is the important bit here — cards are never stretched
   to match a taller neighbor in the same row, so a post with no excerpt
   never ends up with a slab of dead space at the bottom of its card. */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: start; }
/* The featured item is simply wider (spans 2 of 3 columns), not taller by
   force — its own content still decides its own height. */
.post-grid.feature-grid > :first-child { grid-column: span 2; }

.card { display: flex; flex-direction: column; background: var(--linen-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.card-media { display: block; position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--taupe); }
.feature-grid > :first-child .card-media { aspect-ratio: 16/9; }
.card-media img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.045); }
/* When a photo doesn't match the card's aspect ratio (portrait shot in a
   landscape box), fill the gap with a softly blurred copy of the same photo
   instead of leaving flat dead space. */
.media-fill::before {
  content: ''; position: absolute; inset: -16px; z-index: 0;
  background-image: var(--bg-image); background-size: cover; background-position: center;
  filter: blur(22px) brightness(.9) saturate(1.1);
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.15rem; }
.card-body h3 a::after { content: ''; position: absolute; inset: 0; }
.card { position: relative; }
.card-excerpt { color: var(--ink-soft); font-size: .95rem; margin: 0; flex: 1; }

@media (max-width: 980px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid.feature-grid > :first-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-grid.feature-grid > :first-child { grid-column: span 1; }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 12px 22px;
  border-radius: 999px; background: var(--pine); color: var(--linen-soft); border: 1px solid var(--pine);
}
.btn:hover { background: var(--pine-deep); }
.btn-ghost { background: transparent; color: var(--pine); border-color: var(--taupe-line); }
.btn-ghost:hover { background: var(--taupe); }

/* ==========================================================================
   Category archive
   ========================================================================== */
.archive-head { padding-block: 48px 36px; position: relative; }
.archive-head::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--band-color, var(--moss)) 22%, var(--linen)) 0%, var(--linen) 100%);
}
.archive-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--ink-soft); }
.archive-eyebrow .dot { width: 10px; height: 10px; border-radius: 50%; }
.archive-siblings { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ==========================================================================
   Single post
   ========================================================================== */
.post-hero { padding-block: 40px 0; }
.post-hero-media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); margin-top: 24px; background: var(--taupe); cursor: zoom-in; }
.post-hero-media img { width: 100%; max-height: 560px; object-fit: contain; position: relative; z-index: 1; margin: 0 auto; display: block; }
.post-body { max-width: 72ch; margin: 0 auto; padding-block: 40px; font-size: 1.08rem; }
.post-body img { border-radius: var(--radius-sm); margin: 1.4em 0; }
.post-body h2, .post-body h3 { margin-top: 1.4em; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1.6em 0; }
.post-gallery img { border-radius: var(--radius-sm); aspect-ratio: 1; object-fit: contain; background: var(--taupe); margin: 0; }
.post-meta-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }

.related { background: var(--linen-soft); border-top: 1px solid var(--taupe-line); }

/* ==========================================================================
   Static page
   ========================================================================== */
.page-hero { padding-block: 48px 8px; }
.page-body { max-width: 72ch; margin: 0 auto; padding-block: 24px 56px; }
.page-body img { border-radius: var(--radius-sm); }
/* Some migrated legal/contact content still has a raw HTML table — keep
   normal table layout (so cells/images size correctly) but never let it
   force the page wider than the viewport. */
.page-body table, .post-body table { max-width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.page-body td, .post-body td { padding: 6px 10px; vertical-align: top; }
.page-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 2em 0; }
.page-gallery img { aspect-ratio: 1; object-fit: contain; background: var(--taupe); border-radius: var(--radius-sm); }
@media (max-width: 700px) { .page-gallery, .post-gallery { grid-template-columns: repeat(2, 1fr); } }

blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--ochre);
  font-family: var(--font-display); font-style: italic; color: var(--pine); font-size: 1.15rem;
}

/* Pages with a photo/video showcase (e.g. the Häusl page) get a wider column
   than the plain-text legal/contact pages. */
.page-body--haeusl { max-width: 1180px; }

.haeusl-videos, .haeusl-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 1.6em 0 2.4em;
}
.haeusl-videos figure, .haeusl-gallery figure { margin: 0; }
.haeusl-videos video, .haeusl-gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-card);
  background: var(--taupe); display: block;
}
.haeusl-gallery img { object-fit: contain; }
.haeusl-videos figcaption, .haeusl-gallery figcaption {
  margin-top: 8px; font-size: .88rem; color: var(--ink-soft); text-align: center;
}
@media (max-width: 880px) { .haeusl-videos, .haeusl-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .haeusl-videos, .haeusl-gallery { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--pine); color: #cfd9cd; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-block: 48px; }
.footer-brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--linen-soft); margin-bottom: 6px; }
.footer-tagline { font-family: var(--font-display); font-style: italic; color: #d7c48a; }
.footer-col-title { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: #9fb09a; margin-bottom: 14px; }
.season-legend, .footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.season-legend a, .footer-links a { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.season-legend a:hover, .footer-links a:hover { color: #fff; }
.season-legend .dot { width: 9px; height: 9px; border-radius: 50%; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 18px; font-size: .82rem; color: #90a08d; }
@media (max-width: 780px) { .footer-inner { grid-template-columns: 1fr; gap: 28px; } }

/* ==========================================================================
   Share bar — fixed corner stack, present on every page (like the old site's
   floating icons), but pointing at real share actions instead of a generic
   plugin default.
   ========================================================================== */
.share-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
}
.share-btn {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--pine); color: var(--linen-soft); box-shadow: var(--shadow-card);
  border: 0; cursor: pointer; transition: background .15s ease, transform .15s ease;
}
.share-btn svg { width: 19px; height: 19px; }
.share-btn:hover { background: var(--ochre); color: var(--pine-deep); transform: translateY(-2px); }
.share-btn.is-copied { background: var(--ochre); color: var(--pine-deep); }
@media (max-width: 640px) {
  .share-bar { right: 10px; bottom: 10px; gap: 6px; }
  .share-btn { width: 36px; height: 36px; }
  .share-btn svg { width: 17px; height: 17px; }
}

/* ==========================================================================
   Post prev/next — fixed left/right arrows on a post's own detail page so
   you can click through the rest of its category like a slideshow without
   going back to the grid in between.
   ========================================================================== */
.post-nav-arrow {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 80;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28,51,38,.55); color: var(--linen-soft); box-shadow: var(--shadow-card);
  transition: background .15s ease, transform .15s ease;
}
.post-nav-arrow:hover { background: var(--pine); transform: translateY(-50%) scale(1.08); }
.post-nav-arrow svg { width: 22px; height: 22px; }
.post-nav-prev { left: 14px; }
.post-nav-next { right: 14px; }
@media (max-width: 640px) {
  .post-nav-arrow { width: 34px; height: 34px; background: rgba(28,51,38,.4); }
  .post-nav-arrow svg { width: 17px; height: 17px; }
  .post-nav-prev { left: 8px; }
  .post-nav-next { right: 8px; }
}

/* ==========================================================================
   Misc
   ========================================================================== */
.empty-state { padding: 60px 0; text-align: center; color: var(--ink-soft); }

/* Any thumbnail inside a gallery grid can be opened full-size — the cursor
   is the only hint needed, everything else (dark overlay, arrows) only
   appears once you actually click one. */
.page-gallery img, .post-gallery img, .haeusl-gallery img { cursor: zoom-in; }

/* ==========================================================================
   Lightbox — click any gallery photo to see it full-size
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(18, 26, 20, .92);
  display: none; align-items: center; justify-content: center; padding: 32px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(92vw, 1400px); max-height: 86vh; object-fit: contain;
  border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.18); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 10px; }
}
