/* =========================================================
   Gasthaus Goldener Stern · Startseite (Konzeptentwurf)
   Silberschmidt Media · Vanilla-CSS, mobile-first, Token-System
   Design-Quelle: Figma „Lead-Websites“ (Node 409:167)
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Farben (aus Figma-Variablen) */
  --bg-canvas: #fbf9f4;
  --surface-tint: #f1e5d7;
  --dark-scrim: #2a211e;
  --text-primary: #403131;
  --text-secondary: #6f625c;
  --text-invers: #fffdf8;
  --line-hairline: #e7e0d4;
  --accent-primary: #526319; /* dunkelgrün, für helle Flächen */
  --accent-bright: #9abb4d;  /* frischgrün, für dunkle Flächen */
  --accent-bright-hover: #a9c95f; /* aufgehellter Frischgrün-Hover */

  /* Schrift-Stacks */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* Type-Scale (fluide, Figma-Werte als Min/Max) */
  --fs-hero: clamp(2.85rem, 6.6vw + 1rem, 6.25rem);   /* 46 → 100 */
  --fs-h2-xl: clamp(2.2rem, 4.4vw + 0.9rem, 4.75rem);  /* 35 → 76 */
  --fs-h2: clamp(1.95rem, 2.4vw + 1rem, 3rem);         /* 31 → 48 */
  --fs-h3: clamp(1.5rem, 1.2vw + 1rem, 1.875rem);      /* 24 → 30 */
  --fs-body-l: clamp(1.06rem, 0.5vw + 0.9rem, 1.25rem);/* 17 → 20 */
  --fs-body: 1rem;                                     /* 16 */
  --fs-body-s: 0.875rem;                               /* 14 */
  --fs-item: 1.125rem;                                 /* 18 */
  --fs-nav: 0.875rem;                                  /* 14 */
  --fs-label: 0.8125rem;                               /* 13 */
  --fs-mono: 0.8125rem;                                /* 13 */
  --fs-button: 0.9375rem;                              /* 15 */

  /* Abstände & Layout */
  --pad: clamp(1.25rem, 5.5vw, 7.5rem);  /* 20 → 120 */
  --maxw: 90rem;                          /* 1440 */
  --section-y: clamp(4rem, 8vw, 8rem);    /* 64 → 128 */
  --radius: 12px;
  --radius-sm: 6px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.625;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Fokusring auf dunklen Flächen (Header/Hero/Mobil-Panel): heller Kontrast */
.site-header :focus-visible,
.hero :focus-visible {
  outline-color: var(--text-invers);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--accent-bright);
  color: var(--dark-scrim);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Wiederkehrende Typo ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.eyebrow--bright { color: var(--accent-bright); }
/* Hero-Eyebrow weiss statt grün: über Foto zuverlässig kontrastreich (Grün fällt
   über hellen Bildstellen unter 4,5:1; Grün bleibt Akzent auf soliden Flächen) */
.eyebrow--hero { color: var(--text-invers); text-shadow: 0 1px 10px rgba(42, 33, 30, 0.85); }
.hero__subline { text-shadow: 0 1px 12px rgba(42, 33, 30, 0.5); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  padding: 1rem 1.75rem;
  min-height: 52px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn--primary {
  background: var(--accent-bright);
  color: var(--dark-scrim);
  box-shadow: 0 6px 22px -12px rgba(42, 33, 30, 0.6);
}
.btn--primary:hover { background: var(--accent-bright-hover); transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--text-invers);
  border-color: var(--text-invers);
}
.btn--ghost:hover { background: rgba(255, 253, 248, 0.12); transform: translateY(-2px); }

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 100;
}
.site-header__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(1rem, 2.4vw, 2.5rem) var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header__logo { display: inline-flex; flex: none; }
.site-header__logo img {
  width: clamp(140px, 14vw, 196px);
  height: auto;
}

/* Nav-Toggle (nur Mobil, nur mit JS) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 0;
  color: var(--text-invers);
  font-family: var(--font-sans);
  font-size: var(--fs-nav);
  font-weight: 500;
  padding: 10px;
  margin: -10px;
  min-height: 44px;
  cursor: pointer;
}
html.is-ready .nav-toggle { display: inline-flex; }
.nav-toggle__box {
  width: 22px;
  height: 16px;
  position: relative;
  display: inline-block;
}
.nav-toggle__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease), top 0.3s var(--ease);
}
.nav-toggle__bar:nth-child(1) { top: 0; }
.nav-toggle__bar:nth-child(2) { top: 7px; }
.nav-toggle__bar:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { top: 7px; transform: rotate(-45deg); }
.nav-toggle__label { font-weight: 500; }

/* Nav-Liste (mobile-first: gestapelt) */
.site-nav__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
}
.site-nav li + li { border-top: 1px solid rgba(255, 253, 248, 0.1); }
.site-nav a {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-nav);
  font-weight: 500;
  color: var(--text-invers);
  text-decoration: none;
  position: relative;
  padding: 14px 12px;
  min-height: 44px;
  transition: color 0.2s var(--ease);
}
.site-nav a::after { display: none; }
/* Noch nicht verlinkbare Navigationspunkte (Teaser: Seite noch nicht gebaut) */
.site-nav__soon {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-nav);
  font-weight: 500;
  color: var(--text-invers);
  opacity: 0.45;
  padding: 14px 12px;
  min-height: 44px;
  cursor: default;
}

/* Ohne JS: Nav sichtbar mit eigenem Scrim (Kontrast über dem Hero-Bild) */
html.no-js .site-nav {
  background: rgba(42, 33, 30, 0.92);
  border-radius: var(--radius);
  padding: 0.25rem 0.75rem;
  margin-top: 0.5rem;
}

/* Mit JS: Nav als aufklappbares Panel */
html.is-ready .site-nav {
  position: absolute;
  top: 100%;
  left: var(--pad);
  right: var(--pad);
  background: var(--dark-scrim);
  border: 1px solid rgba(255, 253, 248, 0.12);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: 0 24px 48px -24px rgba(42, 33, 30, 0.7);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease), visibility 0.25s;
}
html.is-ready .site-nav.is-open {
  max-height: min(70vh, calc(100svh - 5rem));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: clamp(560px, 90vh, 820px);  /* Fallback ohne svh */
  min-height: clamp(560px, 90svh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero:focus { outline: none; }
.hero:focus-visible { outline: none; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(42, 33, 30, 0.55) 0%, rgba(42, 33, 30, 0) 24%),
    linear-gradient(to bottom, rgba(42, 33, 30, 0.20) 0%, rgba(42, 33, 30, 0.38) 42%, rgba(42, 33, 30, 0.74) 74%, rgba(42, 33, 30, 0.92) 100%);
}
/* Lichterketten-Glimmen (rein dekorativ, ohne JS/Reduced-Motion unsichtbar) */
.hero__lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.hero__lights i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 12px);
  height: var(--s, 12px);
  margin: calc(var(--s, 12px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 156, 0.95) 0%, rgba(246, 197, 110, 0.5) 38%, rgba(246, 197, 110, 0) 72%);
  mix-blend-mode: screen;
  opacity: 0;
  will-change: opacity, transform;
}
.hero__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--pad) clamp(2.75rem, 6vw, 6rem);
  position: relative;
}
.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: 52rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--text-invers);
}
.hero__title .line { display: block; }
.hero__title .line > span { display: block; }
.hero__subline {
  font-size: var(--fs-body-l);
  line-height: 1.6;
  color: var(--text-invers);
  max-width: 40rem;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.35rem;
}

/* =========================================================
   Sektion A · Feiern & Festsaal
   ========================================================= */
.feiern { background: var(--bg-canvas); }
.feiern__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--section-y) var(--pad);
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 4vw, 3.5rem);
}
.feiern__head {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.feiern__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2-xl);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}
.feiern__intro {
  font-size: var(--fs-body-l);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 34rem;
}
.feiern__grid { display: grid; gap: 2rem; }
.feiern__col { display: grid; gap: 2rem; }

.tile { display: flex; flex-direction: column; gap: 0.75rem; }
.tile__img {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-tint);
}
.tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.9s var(--ease);
}
.tile:hover .tile__img img { transform: scale(1.04); }
.tile--lg .tile__img img { aspect-ratio: 4 / 3; }

.caption { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.25rem; }
.caption__rule { width: 100px; height: 1px; background: var(--line-hairline); }
.caption__row { display: flex; gap: 0.75rem; align-items: baseline; }
.caption__num {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-primary);
  flex: none;
}
.caption__text {
  font-size: var(--fs-body-s);
  line-height: 1.57;
  color: var(--text-secondary);
}

/* =========================================================
   Sektion B · Gasthaus & Küche (dunkel)
   ========================================================= */
.kueche {
  background: var(--dark-scrim);
  display: grid;
  gap: 0;
}
.kueche__text {
  padding: var(--section-y) var(--pad);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.kueche__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--text-invers);
}
.kueche__intro {
  font-size: var(--fs-body-l);
  line-height: 1.6;
  color: var(--surface-tint);
}
.feature-list { display: flex; flex-direction: column; }
.feature { padding: 1.25rem 0; }
.feature + .feature { border-top: 1px solid rgba(241, 229, 215, 0.22); }
.feature__title {
  font-size: var(--fs-item);
  font-weight: 600;
  line-height: 1.44;
  color: var(--accent-bright);
  margin-bottom: 0.25rem;
}
.feature__desc {
  font-size: var(--fs-body);
  line-height: 1.625;
  color: var(--surface-tint);
}
.kueche__micro {
  font-size: var(--fs-body-s);
  line-height: 1.57;
  color: var(--accent-bright);
}
.kueche__media { position: relative; overflow: hidden; min-height: 60vw; }
.kueche__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =========================================================
   Vorschau-Fade · Zimmer
   ========================================================= */
.handoff {
  position: relative;
  background: var(--bg-canvas);
  padding: var(--section-y) 0 clamp(4.5rem, 7vw, 6.5rem);
  overflow: hidden;
}
.handoff__preview {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: start;
}
.handoff__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.handoff__lead {
  font-size: var(--fs-body-l);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 34rem;
}
.handoff__media {
  overflow: hidden;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0) 98%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 58%, rgba(0, 0, 0, 0) 98%);
}
.handoff__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.handoff__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74%;
  background: linear-gradient(to bottom,
    rgba(251, 249, 244, 0) 0%,
    rgba(251, 249, 244, 0.55) 44%,
    rgba(251, 249, 244, 0.9) 74%,
    var(--bg-canvas) 100%);
  pointer-events: none;
  z-index: 2;
}
.handoff__note {
  position: absolute;
  left: 50%;
  bottom: clamp(1.75rem, 3vw, 2.5rem);
  transform: translateX(-50%);
  z-index: 3;
  width: max-content;
  max-width: calc(100% - 2 * var(--pad));
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-align: center;
}

/* =========================================================
   Pflicht-CTA · Silberschmidt Media
   ========================================================= */
.pitch {
  background: var(--bg-canvas);
  border-top: 1px solid var(--line-hairline);
}
.pitch__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 6.5rem) var(--pad);
  display: grid;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}
.pitch__photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.pitch__photo img {
  width: clamp(200px, 40vw, 300px);
  height: clamp(200px, 40vw, 300px);
  object-fit: cover;
  border-radius: 16px;
}
.pitch__photo figcaption {
  font-size: var(--fs-body-s);
  color: var(--text-secondary);
}
.pitch__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.875rem;
}
.pitch__eyebrow { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: var(--fs-body-s); }
.pitch__eyebrow-link { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.pitch__eyebrow-link:hover { color: var(--accent-primary); }
.pitch__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.26;
  color: var(--text-primary);
}
.pitch__lead {
  font-size: var(--fs-body-l);
  line-height: 1.6;
  color: var(--text-secondary);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 0.35rem;
  padding: 0.875rem 1.5rem;
  min-height: 48px;
  border: 1.5px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.cta:hover { background: var(--accent-primary); color: var(--text-invers); transform: translateY(-2px); }
.cta__icon { flex: none; }
.pitch__fine {
  font-size: var(--fs-body-s);
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* =========================================================
   Desktop-Layout
   ========================================================= */
@media (min-width: 48rem) {
  .handoff__preview { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); }
  .handoff__media { align-self: stretch; }
}

@media (min-width: 60rem) {
  /* Desktop: Toggle aus, Nav inline (Panel-Stile zurücksetzen) */
  .nav-toggle { display: none !important; }
  .site-nav,
  html.no-js .site-nav,
  html.is-ready .site-nav {
    position: static;
    background: none;
    border: 0;
    padding: 0;
    margin-top: 0;
    max-height: none;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
  }
  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: clamp(0.9rem, 1.6vw, 1.65rem);
    flex-wrap: nowrap;
  }
  .site-nav li + li { border-top: 0; }
  .site-nav a,
  .site-nav__soon {
    padding: 10px 6px;
    min-height: 0;
    white-space: nowrap;
  }
  .site-nav a::after {
    display: block;
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 2px;
    height: 1.5px;
    background: var(--accent-bright);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
  }
  .site-nav a:hover::after,
  .site-nav a:focus-visible::after { transform: scaleX(1); }

  /* Feiern: großes Kachel-Raster */
  .feiern__head {
    flex-direction: row;
    align-items: flex-end;
    gap: clamp(2rem, 4vw, 4.5rem);
  }
  .feiern__title { flex: 1 1 auto; }
  .feiern__intro { flex: none; width: 23.25rem; }
  .feiern__grid { grid-template-columns: minmax(0, 736fr) minmax(0, 432fr); align-items: start; }
  .tile--lg .tile__img img { aspect-ratio: 736 / 560; }
  .tile:not(.tile--lg) .tile__img img { aspect-ratio: 432 / 247; }

  /* Küche: Text links, Bild randabfallend rechts */
  .kueche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .kueche__text {
    padding-right: clamp(2rem, 5vw, 6rem);
    padding-left: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad)));
    justify-content: center;
    max-width: none;
  }
  .kueche__media { min-height: 100%; }

  /* Pitch: Foto links, Text rechts */
  .pitch__inner { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .pitch__photo { align-items: flex-start; }
}

/* =========================================================
   Reduced Motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * , *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .tile:hover .tile__img img { transform: none; }
}
