/* ═══════════════════════════════════════════════════════════
   AIM WebEngine — Components v2
   Buttons, Cards, Navigation, UI Elements
   ═══════════════════════════════════════════════════════════ */

@layer components {

/* ── Buttons ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75em 1.75em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  border: 1.5px solid transparent;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-normal) var(--ease-out),
              background-color var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
  background: var(--color-primary-light);
}

.btn--primary:active {
  transform: translateY(0) scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.2);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

.btn--outline:hover {
  background: rgba(var(--color-primary-rgb), 0.08);
  border-color: var(--color-primary);
}

/* White Button — für dunkle Hintergründe (Hero) */
.btn--white {
  background: #fff;
  color: var(--color-secondary);
  border-color: #fff;
}

.btn--white:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--gold {
  background: var(--color-secondary);
  color: var(--color-bg, #1a1a1a);
  border: none;
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--color-secondary-light);
}

.btn--lg {
  padding: 1em 2.25em;
  font-size: var(--text-base);
}

.btn--sm {
  padding: 0.5em 1.25em;
  font-size: var(--text-xs);
}

/* Magnetic button wrapper */
.magnetic-wrap {
  display: inline-block;
  position: relative;
}

/* ── Card — Solide Oberfläche mit Top-Edge-Shine ─────── */

.card {
  background: var(--card-bg, var(--color-bg-card));
  border: 1px solid var(--card-border, var(--color-border));
  border-radius: var(--card-radius);
  padding: var(--space-6);
  position: relative;
  transition: transform var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

/* Top-Edge Shine ("Frosted Edge") */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--space-6);
  right: var(--space-6);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--color-primary-rgb), 0.2) 30%,
    rgba(var(--color-primary-rgb), 0.3) 50%,
    rgba(var(--color-primary-rgb), 0.2) 70%,
    transparent
  );
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-border-hover, rgba(255, 255, 255, 0.12));
}

.card:hover::before {
  opacity: 1;
}

.card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(var(--color-primary-rgb), 0.08);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__icon--round {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.06);
}

.card__icon--secondary {
  background: rgba(var(--color-secondary-rgb), 0.08);
  color: var(--color-secondary);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  letter-spacing: var(--tracking-tight);
}

.card__text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
}

/* Featured Card Variante */
.card--featured {
  background: var(--color-surface);
  border-color: rgba(var(--color-primary-rgb), 0.15);
}

.card--featured::before {
  opacity: 0.6;
}

.card--featured:hover::before {
  opacity: 1;
}

/* Card mit animiertem Border — nur für Handwerker */
.card--border-animate {
  position: relative;
}

.card--border-animate::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    var(--color-primary) 60deg,
    transparent 120deg
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: -1;
}

.card--border-animate:hover::after {
  opacity: 1;
  animation: spin-slow 4s linear infinite;
}

/* Centered card variant for service cards */
.card--centered {
  text-align: center;
}

/* Padded card variant for forms */
.card--padded {
  padding: var(--space-8);
}

/* Notdienst card with gold accent border */
.card--notdienst {
  border-color: rgba(var(--color-secondary-rgb), 0.3);
}

.card__title--lg {
  font-size: var(--text-2xl);
}

.card__title--sm {
  font-size: var(--text-lg);
}

/* Glass Card — NUR für Overlays, CTA-Sections, Popups */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

/* ── Bento Grid ──────────────────────────────────────── */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  container-type: inline-size;
}

.bento-grid__item--wide {
  grid-column: span 2;
}

.bento-grid__item--tall {
  grid-row: span 2;
}

.bento-grid__item--featured {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bento-grid__item--featured {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid__item--wide,
  .bento-grid__item--tall,
  .bento-grid__item--featured {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ── Card Grid (Container Query Host) ────────────────── */

.card-grid {
  container-type: inline-size;
}

/* ── Container Queries for Cards ─────────────────────── */

@container (max-width: 500px) {
  .card {
    padding: var(--space-4);
  }

  .card__icon {
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: var(--space-3);
  }

  .card__icon svg {
    width: 1rem;
    height: 1rem;
  }

  .card__title {
    font-size: var(--text-lg);
  }

  .card__text {
    font-size: var(--text-xs);
  }
}

@container (max-width: 320px) {
  .card__icon--round {
    width: 2.75rem;
    height: 2.75rem;
  }

  .card__title--lg {
    font-size: var(--text-xl);
  }
}

/* ── Badge ───────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.3em 0.8em;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary-light, var(--color-primary));
  border: 1px solid rgba(var(--color-primary-rgb), 0.12);
}

.badge--pulse {
  position: relative;
}

.badge--pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse-glow 2.5s ease-in-out infinite;
  z-index: -1;
}

.badge--success {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.15);
}

.badge--gold {
  background: rgba(var(--color-secondary-rgb), 0.15);
  color: var(--color-secondary);
  border-color: rgba(var(--color-secondary-rgb), 0.2);
}

/* ── Logo Bar ────────────────────────────────────────── */

.logo-bar {
  overflow: hidden;
  padding-block: var(--space-6);
  border-block: 1px solid var(--color-border);
}

.logo-bar__item {
  flex-shrink: 0;
  padding-inline: var(--space-8);
  opacity: 0.35;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.logo-bar__item:hover {
  opacity: 0.8;
}

.logo-bar__item img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* ── Navigation ──────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding-block: var(--space-4);
  transition: all var(--duration-normal) var(--ease-out);
}

.nav.is-scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding-block: var(--space-3);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}

.nav__logo .logo-accent {
  color: var(--color-primary);
}

.nav__logo-icon {
  height: 36px;
  width: auto;
}

.nav__logo-img {
  height: auto;
  max-width: 160px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  background-image: linear-gradient(var(--color-primary), var(--color-primary));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color var(--duration-fast) var(--ease-out),
              background-size var(--duration-normal) var(--ease-out);
  position: relative;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--color-text);
  background-size: 100% 1.5px;
}

.nav__link:focus-visible {
  background-size: 100% 1.5px;
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Mobile Menu Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: all var(--duration-normal) var(--ease-out);
}

.nav__toggle.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-7);
    background: var(--color-bg);
    padding: var(--space-8);
    transition: right var(--duration-normal) var(--ease-out);
    border-left: 1px solid var(--color-border);
  }

  .nav__links.is-open {
    right: 0;
  }

  .nav__link {
    font-size: var(--text-lg);
  }
}

/* ── Noise Overlay — subtiler, höhere Frequenz ───────── */

.noise-overlay {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

/* ── Hero Visual Clip ───────────────────────────────── */

.hero-visual-clip {
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-visual-clip__icon {
  opacity: 0.12;
}

/* ── About Visual Block ─────────────────────────────── */

.about-visual {
  aspect-ratio: 4/3;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.about-visual__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-badge {
  bottom: -1rem;
  right: -1rem;
  padding: var(--space-4);
  text-align: center;
}

/* ── Noise Overlay Variant ──────────────────────────── */

.noise-overlay--subtle {
  opacity: 0.02;
}

/* ── Label Uppercase Utility ────────────────────────── */

.label--uppercase {
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* ── Section Header ──────────────────────────────────── */

.section-header {
  max-width: 640px;
  margin-bottom: var(--space-9);
}

.section-header--center {
  text-align: center;
  margin-inline: auto;
}

.section-header--center p {
  margin-inline: auto;
}

.section-header--tight {
  margin-bottom: var(--space-6);
}

.section-header__label {
  display: block;
  margin-bottom: var(--space-3);
}

.section-header__title {
  margin-bottom: var(--space-4);
}

.section-header__text {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

/* ── Footer ──────────────────────────────────────────── */

.footer {
  padding-block: var(--space-9);
  border-top: 1px solid var(--color-border);
}

.footer--primary {
  background: var(--color-primary);
  color: #fff;
  border-top: none;
}

.footer--primary .footer__title {
  color: rgba(255, 255, 255, 0.75);
}

.footer--primary .footer__link {
  color: rgba(255, 255, 255, 0.8);
}

.footer--primary .footer__link:hover {
  color: #fff;
}

.footer--primary .footer__bottom {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
}

.footer--primary .nav__logo {
  color: #fff;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

.footer__title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.footer__link {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  padding-block: var(--space-1);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__link:hover {
  color: var(--color-text);
}

.footer__bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.footer__bottom a {
  color: inherit;
  display: inline;
}

.footer__bottom a:hover {
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* ── Hero ────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero--light {
  background: var(--color-bg);
  min-height: var(--hero-min-height);
}

/* Cinematic Hero — immer dunkel, unabhängig vom Page-Theme */
.hero--cinematic {
  background: #070a12;
  color: #fff;
}

.hero--cinematic .hero__subtitle {
  color: rgba(255, 255, 255, 0.75);
}

/* Gradient Hero — Dark gradient with animated blobs */
.hero--gradient {
  background: linear-gradient(160deg, #1D4E89 0%, #0E2643 50%, #0a1a30 100%);
  color: #fff;
}

.hero--gradient .hero__subtitle {
  color: rgba(255, 255, 255, 0.75);
}

.hero__bg--gradient-dark {
  background: linear-gradient(160deg, #1D4E89 0%, #0E2643 50%, #0a1a30 100%);
}

/* Decorative Blobs */
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}

.hero__blob--primary {
  width: 36rem;
  height: 36rem;
  left: -8rem;
  top: -10rem;
  background: radial-gradient(circle, #4A7BB3 0%, transparent 70%);
  opacity: 0.5;
  animation: float-blob-1 20s ease-in-out infinite;
}

.hero__blob--accent {
  width: 28rem;
  height: 28rem;
  right: -6rem;
  bottom: -8rem;
  background: radial-gradient(circle, #DE8419 0%, transparent 70%);
  opacity: 0.2;
  animation: float-blob-2 25s ease-in-out infinite;
}

.hero__blob--subtle {
  width: 20rem;
  height: 20rem;
  left: 40%;
  top: 20%;
  background: radial-gradient(circle, #F9AB49 0%, transparent 70%);
  opacity: 0.1;
  animation: float-blob-3 18s ease-in-out infinite;
}

.hero__bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7, 10, 18, 0.5) 0%,
    rgba(7, 10, 18, 0.35) 40%,
    rgba(7, 10, 18, 0.7) 80%,
    rgba(7, 10, 18, 0.95) 100%
  );
  z-index: 1;
}

.hero__title-accent {
  background: linear-gradient(135deg, #DE8419, #F9AB49);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Trust Pillars im Hero */
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Inline Trust-Variant (mit Pipe-Separatoren, ohne Border) */
.hero__trust--inline {
  border-top: none;
  padding-top: 0;
  margin-top: var(--space-6);
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-8);
}

.hero__trust-separator {
  color: rgba(255, 255, 255, 0.25);
  font-size: var(--text-sm);
  user-select: none;
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

.hero__trust-item svg {
  color: #DE8419;
  flex-shrink: 0;
}

/* Hero Visual Frame — Bild rechts mit abgerundeten Ecken */
.hero__visual-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  max-width: 520px;
  width: 100%;
}

.hero__visual-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

@media (max-width: 768px) {
  .hero__visual-frame {
    max-width: 360px;
    margin-inline: auto;
    margin-top: var(--space-8);
  }
}

/* Badge Light — für dunkle Hintergründe */
.badge--light {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Outline Button Light — für dunkle Hintergründe */
.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg--gradient-hero {
  background: var(--gradient-hero);
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 90dvh;
  width: 100%;
}

@media (max-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

.hero__grid-content {
  display: flex;
  align-items: center;
  padding: var(--space-9) var(--container-padding) var(--space-9) calc(var(--container-padding) + 5vw);
}

/* Gradient Hero — kompaktere Proportionen für Zwei-Spalten-Layout */
.hero--gradient .hero__title {
  font-size: var(--text-4xl);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero--gradient .hero__grid {
  grid-template-columns: 55fr 45fr;
}

.hero--gradient .hero__grid-content {
  padding-right: var(--space-8);
}

.hero--gradient .hero__grid-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-9) calc(var(--container-padding) + 2vw) var(--space-9) 0;
}

@media (max-width: 768px) {
  .hero--gradient .hero__title {
    font-size: var(--text-3xl);
  }
  .hero--gradient .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero--gradient .hero__grid-visual {
    padding: 0 var(--container-padding) var(--space-9);
  }
}

.hero__grid-visual {
  position: relative;
  overflow: hidden;
}

.hero__grid-visual--autoreveal {
  clip-path: inset(0 100% 0 0);
  animation: hero-clip-reveal 1s var(--ease-out) 0.3s both;
}

@keyframes hero-clip-reveal {
  to { clip-path: inset(0 0 0 0); }
}

.hero__title {
  margin-bottom: var(--space-5);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 48ch;
  font-weight: var(--weight-light);
  line-height: var(--leading-relaxed);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ── Section Backgrounds ─────────────────────────────── */

.section--bg-alt {
  background: var(--color-bg-alt);
}

.section--bg-primary {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.section--bg-primary-solid {
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.section--ambient {
  position: relative;
  overflow: hidden;
}

.section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.section__bg--gradient {
  background: var(--gradient-primary);
}

.section__bg--mesh {
  background: var(--gradient-mesh);
}

.pattern-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 35px,
    rgba(255, 255, 255, 0.1) 35px,
    rgba(255, 255, 255, 0.1) 70px
  );
  z-index: 1;
}

/* ── Testimonial Card ────────────────────────────────── */

.testimonial-card {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--card-bg, var(--color-bg-card));
  border: 1px solid var(--card-border, var(--color-border));
}

.testimonial-card__stars {
  color: var(--color-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  letter-spacing: 0.1em;
}

.testimonial-card__text {
  font-style: italic;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  color: var(--color-text);
  font-size: var(--text-base);
  hanging-punctuation: first;
  text-wrap: pretty;
}

.testimonial-card__author {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

.testimonial-card__role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Scroll Snap Slider ──────────────────────────────── */

.snap-slider {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--container-padding);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.snap-slider::-webkit-scrollbar {
  display: none;
}

.snap-slider > * {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: min(380px, 85vw);
}

/* ── Counter ─────────────────────────────────────────── */

.counter {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
}

.counter.is-counting {
  animation: counter-pulse 0.3s ease-out;
}

/* ── Gallery Masonry ─────────────────────────────────── */

.masonry-grid {
  columns: 3;
  column-gap: var(--space-4);
}

.masonry-grid__item {
  break-inside: avoid;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 768px) {
  .masonry-grid {
    columns: 2;
  }
}

@media (max-width: 480px) {
  .masonry-grid {
    columns: 1;
  }
}

/* ── Gallery Placeholder ─────────────────────────────── */

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-placeholder--warm    { background: linear-gradient(135deg, #e8e0d4, #d4c5b0); }
.gallery-placeholder--cool    { background: linear-gradient(135deg, #d4dde8, #b0c5d4); }
.gallery-placeholder--green   { background: linear-gradient(135deg, #e0e8d4, #c5d4b0); }
.gallery-placeholder--rose    { background: linear-gradient(135deg, #e8d4d4, #d4b0b0); }
.gallery-placeholder--indigo  { background: linear-gradient(135deg, #d4d8e8, #b0b5d4); }
.gallery-placeholder--sand    { background: linear-gradient(135deg, #e8e4d4, #d4ceb0); }

.gallery-placeholder__inner {
  text-align: center;
  opacity: 0.4;
}

/* ── Gallery Image (Real Photo) ────────────────────────── */

.gallery-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery-image__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-image:hover .gallery-image__img {
  transform: scale(1.05);
}

.gallery-image__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-image:hover .gallery-image__caption {
  opacity: 1;
  transform: translateY(0);
}

/* ── Project Blog — Zig-Zag Rows ─────────────────────── */

.project-blog__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.project-blog__item {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--space-8);
  align-items: center;
}

.project-blog__item--reverse {
  direction: rtl;
}

.project-blog__item--reverse > * {
  direction: ltr;
}

.project-blog__item--hidden {
  display: none;
}

.project-blog__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-blog__image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-blog__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.project-blog__item:hover .project-blog__img {
  transform: scale(1.03);
}

.project-blog__image .gallery-placeholder {
  transition: transform 0.4s var(--ease-out);
}

.project-blog__item:hover .project-blog__image .gallery-placeholder {
  transform: scale(1.03);
}

.project-blog__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.project-blog__text,
.project-blog__meta {
  align-self: stretch;
}

.project-blog__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.project-blog__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.project-blog__meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  opacity: 0.7;
}

.project-blog__meta span::before {
  margin-right: 0.35em;
}

.project-blog__meta span:first-child::before {
  content: "\1F4CD";
}

.project-blog__meta span:last-child::before {
  content: "\1F4C5";
}

.project-blog__more {
  text-align: center;
  margin-top: var(--space-8);
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .project-blog__item {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .project-blog__item--reverse {
    direction: ltr;
  }

  .project-blog__image {
    order: -1;
  }
}

/* ── Form (Floating Labels) ──────────────────────────── */

.form-group {
  position: relative;
  margin-bottom: var(--space-5);
}

.form-group__input,
.form-group__textarea {
  width: 100%;
  padding: var(--space-4) var(--space-4) var(--space-2);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

.form-group__input:focus,
.form-group__textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
  outline: 2px solid transparent;
}

.form-group__input:focus-visible,
.form-group__textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.form-group__label {
  position: absolute;
  top: 50%;
  left: var(--space-4);
  transform: translateY(-50%);
  font-size: var(--text-base);
  color: var(--color-text-subtle);
  pointer-events: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.form-group__textarea ~ .form-group__label {
  top: var(--space-4);
  transform: none;
}

.form-group__input:focus ~ .form-group__label,
.form-group__input:not(:placeholder-shown) ~ .form-group__label,
.form-group__textarea:focus ~ .form-group__label,
.form-group__textarea:not(:placeholder-shown) ~ .form-group__label {
  top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-primary);
  transform: none;
}

.form-group__textarea {
  min-height: 120px;
  resize: vertical;
}

/* Honeypot field (hidden from real users) */
.form-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* ── Divider ─────────────────────────────────────────── */

.section-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-border) 30%,
    var(--color-border) 70%,
    transparent
  );
  border: none;
  margin: 0;
}

/* ── Timeline ────────────────────────────────────────── */

.timeline-line-bg {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-secondary));
}

.timeline-node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  color: #fff;
  position: relative;
  z-index: 2;
  font-size: var(--text-sm);
}

/* ── CTA Icon Circle ─────────────────────────────────── */

.cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Status Dot (for badges) ─────────────────────────── */

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

/* ── Logo Bar Item Sizing ────────────────────────────── */

.logo-bar__item--placeholder {
  min-width: 180px;
  height: 40px;
}

/* ── Performance: Content-Visibility ─────────────────── */

.section {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.hero {
  content-visibility: visible;
  contain-intrinsic-size: none;
}

/* ── Performance: CSS Containment ────────────────────── */

.card {
  contain: layout style;
}

.bento-grid__item--featured,
.bento-grid__item--wide,
.bento-grid__item--tall {
  contain: layout style;
}

.masonry-grid__item {
  contain: layout;
}

/* .nav — kein contain! Bricht position:fixed auf Mobile */

/* ── Theme Toggle ────────────────────────────────────── */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              background-color var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-text-subtle);
}

/* Light mode: show moon (to switch to dark) */
.theme-toggle__icon--sun { display: none; }
.theme-toggle__icon--moon { display: block; }

/* Dark mode: show sun (to switch to light) */
[data-mode="dark"] .theme-toggle__icon--sun { display: block; }
[data-mode="dark"] .theme-toggle__icon--moon { display: none; }

/* ── Saison Banner ─────────────────────────────────────── */

.saison-banner {
  padding: var(--space-3) 0;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-nav) + 1);
}

.saison-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.saison-banner--warnung {
  background: var(--color-accent, #c4a265);
  color: var(--color-text, #2d2d2d);
}

.saison-banner--info {
  background: var(--color-secondary, #6b7c5e);
  color: #fff;
}

.saison-banner--hinweis {
  background: var(--color-bg-alt, #f0ebe2);
  color: var(--color-text);
}

.saison-banner__text {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.saison-banner__text a {
  text-decoration: underline;
  font-weight: var(--weight-bold);
}

.saison-banner__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
  padding: var(--space-1);
  line-height: 1;
  color: inherit;
}

.saison-banner__close:hover { opacity: 1; }

/* ── Intro Grid (Geschäftsbereiche) ────────────────────── */

.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.intro-card {
  padding: var(--space-8);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.intro-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-glow-md);
}

.intro-card__icon { font-size: 2.5rem; margin-bottom: var(--space-4); }
.intro-card__title { font-family: var(--font-heading); font-size: var(--text-2xl); color: var(--color-primary); margin-bottom: var(--space-3); }
.intro-card__text { color: var(--color-text-muted); margin-bottom: var(--space-6); line-height: 1.7; }
.intro-card__link { font-weight: var(--weight-semibold); color: var(--color-secondary); }
.intro-card__link:hover { color: var(--color-secondary-dark); }

@media (max-width: 768px) {
  .intro-grid { grid-template-columns: 1fr; }
}

/* ── Leistung Split ────────────────────────────────────── */

.leistung-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.leistung-split--reverse { direction: rtl; }
.leistung-split--reverse > * { direction: ltr; }

.leistung-split__image { border-radius: var(--radius-lg); overflow: hidden; }
.leistung-split__image img { width: 100%; height: 100%; object-fit: cover; }

.leistung-split__list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
}

.leistung-split__list li {
  padding: var(--space-2) 0;
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-text-muted);
}

.leistung-split__list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: var(--weight-bold);
}

@media (max-width: 768px) {
  .leistung-split,
  .leistung-split--reverse { grid-template-columns: 1fr; direction: ltr; }
}

/* ── Sortiment Grid ────────────────────────────────────── */

.sortiment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.sortiment-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}

.sortiment-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-glow-md);
}

.sortiment-card__image { aspect-ratio: 4/3; }
.sortiment-card__image img { width: 100%; height: 100%; object-fit: cover; }

.sortiment-card__body { padding: var(--space-5); }
.sortiment-card__title { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-primary); margin-bottom: var(--space-2); }
.sortiment-card__text { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.sortiment-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-1); }

@media (max-width: 1024px) { .sortiment-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .sortiment-grid { grid-template-columns: 1fr; } }

/* ── Hint Box ──────────────────────────────────────────── */

.hint-box {
  text-align: center;
  padding: var(--space-8);
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  margin-top: var(--space-8);
}

.hint-box__title { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-primary); margin-bottom: var(--space-2); }
.hint-box__text { color: var(--color-text-muted); margin-bottom: var(--space-5); margin-inline: auto; }

/* ── Maps Embed ────────────────────────────────────────── */

.maps-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.maps-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.maps-tour-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
}

.maps-tour-link:hover { color: var(--color-secondary-dark); }

/* ── Additional Placeholder Colors (Naturstein) ───────── */

.gallery-placeholder--moss   { background: linear-gradient(135deg, #d4ddc8, #b5c4a0); }
.gallery-placeholder--slate  { background: linear-gradient(135deg, #c8cdd4, #a0a8b5); }

/* ── Projekte Preview Grid ─────────────────────────────── */

.projekte-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.projekte-preview-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal), transform var(--duration-normal);
}

.projekte-preview-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-glow-md);
  transform: translateY(-2px);
}

.projekte-preview-card__image { aspect-ratio: 4/3; overflow: hidden; }
.projekte-preview-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.projekte-preview-card:hover .projekte-preview-card__image img { transform: scale(1.05); }

.projekte-preview-card__body { padding: var(--space-4); }
.projekte-preview-card__badge { margin-bottom: var(--space-2); }
.projekte-preview-card__title { font-family: var(--font-heading); font-size: var(--text-base); color: var(--color-primary); }

@media (max-width: 768px) { .projekte-preview-grid { grid-template-columns: 1fr; } }

/* ── CTA Band ──────────────────────────────────────────── */

.cta-band {
  background: var(--gradient-accent, linear-gradient(135deg, #c4a265, #d4b87a));
  padding: var(--space-8) 0;
}

.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.cta-band__text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-text, #2d2d2d);
}

.cta-band__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.cta-band__phone {
  font-weight: var(--weight-bold);
  color: var(--color-text, #2d2d2d);
}

@media (max-width: 768px) {
  .cta-band .container { flex-direction: column; text-align: center; }
}

/* ── Hero-Varianten (Formsprache) ─────────────────────── */

/* hero--centered: Text zentriert, kein visuelles Grid */
.hero--centered .hero__grid {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}
.hero--centered .hero__grid-visual { display: none; }
.hero--centered .hero__actions { justify-content: center; }
.hero--centered .hero__subtitle { margin-inline: auto; }

/* hero--fullbleed: Vollbild-Foto mit Text-Overlay */
.hero--fullbleed {
  min-height: 100dvh;
}
.hero--fullbleed .hero__grid {
  grid-template-columns: 1fr;
  position: relative;
  z-index: 2;
  text-align: center;
  align-items: center;
  justify-items: center;
}
.hero--fullbleed .hero__grid-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero--fullbleed .hero__grid-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero--fullbleed .hero__title {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}
.hero--fullbleed .hero__subtitle {
  color: rgba(255, 255, 255, 0.85);
  margin-inline: auto;
}
.hero--fullbleed .hero__grid-content {
  padding: var(--space-12) var(--container-padding);
}

/* hero--split-reverse: Bild links, Text rechts */
.hero--split-reverse .hero__grid {
  direction: rtl;
}
.hero--split-reverse .hero__grid > * {
  direction: ltr;
}

/* hero--minimal: Nur Text, maximal reduziert */
.hero--minimal {
  min-height: 60dvh;
}
.hero--minimal .hero__grid {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  min-height: 60dvh;
}
.hero--minimal .hero__grid-visual { display: none; }
.hero--minimal .hero__subtitle { display: none; }
.hero--minimal .hero__actions { justify-content: center; }

/* ── Card-Stil-Varianten (Formsprache) ────────────────── */

.card--flat {
  box-shadow: none;
  border: none;
}
.card--flat::before { display: none; }

.card--bordered {
  box-shadow: none;
  border: 1px solid var(--color-border);
}
.card--bordered::before { display: none; }
.card--bordered:hover {
  border-color: var(--color-primary);
  box-shadow: none;
}

.card--glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: none;
}
.card--glass::before { display: none; }

.card--outlined {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--color-border);
}
.card--outlined::before { display: none; }
.card--outlined:hover {
  background: var(--color-bg-card);
}

/* ── Section-Hintergrund-Varianten ────────────────────── */

.section--diagonal {
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
  padding-top: calc(var(--section-gap) + 2rem);
  padding-bottom: calc(var(--section-gap) + 2rem);
}

.section--wave-top {
  position: relative;
}
.section--wave-top::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 80px;
  background: inherit;
  clip-path: ellipse(60% 100% at 50% 100%);
}

.section--overlap {
  margin-top: calc(-1 * var(--space-10));
  position: relative;
  z-index: 2;
}

/* ── Nav zentriert — Logo oben, Links darunter ────────── */

.nav--centered .nav__inner {
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.nav--centered .nav__logo {
  font-size: var(--text-2xl);
}

.nav--centered .nav__links {
  gap: var(--space-8);
}

.nav--centered.is-scrolled .nav__inner {
  flex-direction: row;
}

.nav--centered.is-scrolled .nav__logo {
  font-size: var(--text-xl);
}

/* ── Image Divider — Atmosphärisches Vollbild-Trennbild ── */

.image-divider {
  width: 100%;
  height: 50vh;
  overflow: hidden;
  position: relative;
}

.image-divider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-divider--tall {
  height: 70vh;
}

.image-divider--short {
  height: 30vh;
}

/* ── Photo Gallery Grid (erweitert) ───────────────────── */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.photo-gallery--dense {
  grid-template-columns: repeat(6, 1fr);
}

.photo-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
  transition: transform 0.4s var(--ease-out);
}

.photo-gallery img:hover {
  transform: scale(1.05);
}

.photo-gallery__item {
  overflow: hidden;
  border-radius: var(--img-radius);
}

.photo-gallery__item--wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-gallery--dense {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Lightbox (opt-in via lightbox.js) ────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox--open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.15s;
}
.lightbox__close:hover { color: #fff; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 3.5rem;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
  transition: color 0.15s;
}
.lightbox__nav:hover { color: #fff; }
.lightbox__nav--prev { left: 0.5rem; }
.lightbox__nav--next { right: 0.5rem; }
.lightbox__counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 768px) {
  .lightbox__nav { font-size: 2.5rem; padding: 0.5rem; }
  .lightbox__img { max-width: 95vw; max-height: 80vh; }
}

/* ── Menu Card (Speisekarte-Darstellung) ──────────────── */

.menu-card {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.menu-card:last-child {
  border-bottom: none;
}

.menu-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.menu-card__text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.menu-card__price {
  font-weight: var(--weight-semibold);
  color: var(--color-secondary-dark);
  margin-top: var(--space-2);
}

/* ── Skip-Link (Barrierefreiheit) ────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  z-index: 10000;
}

/* ── Footer-Links Focus ─────────────────────────────── */

.footer__link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.footer__social:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.footer__bottom a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ── Fullscreen Scroll Snap ──────────────────── */
.snap-container {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
}

.snap-section {
  min-height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Dot navigation (right edge) */
.snap-nav {
  position: fixed;
  right: var(--space-4, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.snap-nav__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--color-text, #fff);
  background: transparent;
  cursor: pointer;
  transition: background 300ms var(--ease-out), transform 300ms var(--ease-out);
  padding: 0;
}

.snap-nav__dot[aria-current="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: scale(1.3);
}

.snap-nav__dot:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* Hide snap-nav on mobile (too small) */
@media (max-width: 768px) {
  .snap-nav { display: none; }
}

/* Scroll indicator arrow */
.snap-scroll-hint {
  position: absolute;
  bottom: var(--space-6, 2rem);
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
  transition: opacity 600ms var(--ease-out);
  z-index: 10;
}

.snap-scroll-hint[hidden] {
  opacity: 0;
  pointer-events: none;
}

.snap-scroll-hint__arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-primary, currentColor);
  border-bottom: 2px solid var(--color-primary, currentColor);
  transform: rotate(45deg);
  animation: snap-bounce 2s var(--ease-out) infinite;
}

@keyframes snap-bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .snap-scroll-hint__arrow { animation: none; }
}

/* ── Frame Scroll (Sticky Crossfade) ─────────── */
.frame-scroll {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  z-index: 1;
}

.frame-scroll__stack {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.frame-scroll__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 800ms var(--ease-out, ease);
  will-change: opacity;
  padding: 10vh 10vw;
}

.frame-scroll__image.is-active {
  opacity: 1;
}

.frame-scroll__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.frame-scroll__overlay > * {
  pointer-events: auto;
}

/* Feature trigger sections (scroll height) */
.frame-trigger {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.frame-trigger__content {
  max-width: 480px;
  padding: var(--space-6, 2rem);
}

/* Alternate left/right positioning */
.frame-trigger:nth-child(odd) .frame-trigger__content {
  margin-left: auto;
  margin-right: 8%;
  text-align: right;
}

.frame-trigger:nth-child(even) .frame-trigger__content {
  margin-left: 8%;
  margin-right: auto;
  text-align: left;
}

@media (max-width: 768px) {
  .frame-trigger__content {
    max-width: 100%;
    margin: 0 !important;
    text-align: center !important;
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
  }

  .frame-scroll__image {
    padding: 15vh 5vw;
  }
}

/* ═══════════════════════════════════════════════════════
   HORIZONTAL SCROLL (Vertical-to-Horizontal)
   ═══════════════════════════════════════════════════════ */

.hscroll-wrapper {
  position: relative;
}

.hscroll {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hscroll__track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.hscroll__panel {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.hscroll__progress {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 50;
  pointer-events: none;
}

} /* end @layer components */
