/* Allzeit Gut – globale und gemeinsam verwendete Styles */

/* Reset und Grundlayout */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Einheitliche Tastaturfokusanzeige */
:where(a, button, summary, [tabindex]):focus {
  outline: none;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: var(--focus-outline-width) solid var(--focus-dark);
  outline-offset: var(--focus-outline-offset);
}

:where(
  .section-night,
  .site-header,
  .site-footer,
  .contact-card,
  .cookie-banner
) :where(a, button, summary, [tabindex]):focus-visible {
  outline-color: var(--focus-light);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 9999;
  padding: .8rem 1rem;
  color: #fff;
  background: var(--night);
  border-radius: .6rem;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
}

.section-cream {
  background: var(--cream);
}

.section-night {
  color: #fff;
  background: var(--night);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1rem;
  color: var(--green-dark);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.8rem;
  height: 2px;
  content: "";
  background: currentColor;
}

.section-night .eyebrow {
  color: #bce36b;
}

h1,
h2,
h3 {
  margin: 0;
  padding: 0;
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.75rem, 6vw, 5.7rem);
}

h2 {
  margin-bottom: .85rem;
  font-size: clamp(2rem, 4.5vw, 3.65rem);
}

h3 {
  margin-bottom: .65rem;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

p {
  margin: 0 0 1rem;
}

.lead {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.section-night .lead {
  color: rgba(255, 255, 255, .72);
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: .9rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  transition: background .25s, box-shadow .25s, backdrop-filter .25s;
}

.site-header.is-scrolled,
.site-header.header-solid {
  background: rgba(7, 21, 18, .94);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  color: #fff;
  min-width: 170px;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  letter-spacing: .015em;
}

.brand-text span {
  margin-top: .24rem;
  color: rgba(255, 255, 255, .65);
  font-size: .62rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav a {
  position: relative;
  color: rgba(255, 255, 255, .84);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
}

.site-nav a:not(.button)::after {
  position: absolute;
  left: 0;
  bottom: -.55rem;
  width: 0;
  height: 2px;
  content: "";
  background: var(--green);
  transition: width .2s;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
}

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.menu-button span,
.menu-button::before,
.menu-button::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  content: "";
  background: currentColor;
  transition: transform .2s, opacity .2s;
}

.menu-button[aria-expanded="true"] span {
  opacity: 0;
}

.menu-button[aria-expanded="true"]::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-button[aria-expanded="true"]::after {
  transform: translateY(-7px) rotate(-45deg);
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 850;
  line-height: 1;
  transition: transform .18s, box-shadow .18s, background .18s;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #11200d;
  background: var(--green);
  box-shadow: 0 12px 28px rgba(145, 189, 60, .22);
}

.button-primary:hover {
  background: #a3cf4f;
  box-shadow: 0 16px 34px rgba(145, 189, 60, .30);
}

.button-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .07);
}

.button-ghost {
  border-color: var(--line);
  background: transparent;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-sm {
  min-height: 44px;
  padding: .65rem 1rem;
  font-size: .84rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.75rem;
}

/* Gemeinsam verwendete Layout-Komponenten */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 14px 40px rgba(8, 25, 19, .06);
}

.card-number {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
  border-radius: 50%;
  color: #10200c;
  background: var(--green);
  font-weight: 900;
}

.card p {
  margin-top: .75rem;
  color: var(--ink-soft);
}

.icon-card {
  padding: 2rem;
}

.icon-card .icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 1.35rem;
  border-radius: 15px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 1.25rem;
  font-weight: 900;
}

/* Zitat und allgemeiner Seitenkopf */

.page-hero {
  padding: 11rem 0 6rem;
  color: #fff;
  background: radial-gradient(circle at 75% 20%, #27472c 0, var(--night) 55%);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: 1fr .8fr;
  align-items: center;
  gap: 4rem;
}

.page-hero .lead {
  max-width: 720px;
  margin-top: 1.35rem;
  color: rgba(255, 255, 255, .7);
}

.page-hero-mark {
  width: min(100%, 390px);
  margin-inline: auto;
  opacity: .88;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, .25));
}

/* Informationsband und Hinweise */

/* Produktdarstellung und Werte-Karten */

/* Call-to-Action, Footer, Video, Cookies und Meldungen */

.site-footer {
  padding: 4.5rem 0 1.5rem;
  color: rgba(255, 255, 255, .7);
  background: #050d0b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr .75fr;
  gap: 3rem;
}

.footer-brand {
  max-width: 380px;
}

.footer-logo {
  width: 230px;
  max-height: 85px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(2.2) saturate(.75);
}

.footer-title {
  margin-bottom: 1rem;
  color: #fff;
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: .55rem;
}

.footer-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .82rem;
}

.cookie-banner {
  position: fixed;
  z-index: 1200;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 980px;
  margin-inline: auto;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  color: #fff;
  background: rgba(7, 21, 18, .97);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-inner p {
  margin: 0;
  font-size: .9rem;
  color: rgba(255, 255, 255, .75);
}

.cookie-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}

.toast {
  position: fixed;
  z-index: 1500;
  left: 50%;
  bottom: 2rem;
  max-width: calc(100% - 2rem);
  transform: translate(-50%, 30px);
  padding: .9rem 1.1rem;
  border-radius: 12px;
  color: #fff;
  background: #10201b;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  box-shadow: var(--shadow);
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Gemeinsame responsive Regeln */
@media (max-width: 1040px) {
  .site-nav {
    position: fixed;
    inset: var(--header-height) 1rem auto;
    display: none;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(7, 21, 18, .98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: .75rem .4rem;
  }

  .site-nav .button {
    margin-top: .3rem;
  }

  .menu-button {
    display: block;
  }

  .page-hero-grid,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .header-inner {
    min-height: var(--header-height-mobile);
  }

  .site-nav {
    inset-block-start: var(--header-height-mobile);
  }

  .brand-text span {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 9rem 0 4rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .cookie-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 2.75rem;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .button-row {
    display: grid;
  }

  .button-row .button {
    width: 100%;
  }

  .cookie-banner {
    right: .65rem;
    bottom: .65rem;
    left: .65rem;
    padding: .9rem;
  }

  .cookie-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Cookie-Einstellungen und Footer-Aktion */
.cookie-copy {
  max-width: 650px;
}

.cookie-copy > strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--white);
}

.cookie-policy-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--white);
  font-size: .85rem;
  font-weight: 800;
  text-underline-offset: .2rem;
}

.footer-settings-button {
  min-height: 32px;
  align-items: center;
  width: fit-content;
  padding: 0;
  border: 0;
  display: inline-flex;
  color: inherit;
  background: transparent;
  text-align: left;
}

.footer-settings-button:hover {
  color: var(--white);
}

/* Vollständiger Cookie-Consent-Dialog */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.cookie-banner {
  max-width: 1180px;
}

.cookie-copy p {
  margin-bottom: .35rem;
}

.cookie-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-actions .button {
  min-width: 145px;
}

.cookie-settings-button {
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  background: transparent;
}

.cookie-settings-button:hover {
  background: rgba(255, 255, 255, .08);
}

.cookie-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 9, 7, .74);
  backdrop-filter: blur(8px);
}

.cookie-dialog {
  width: min(100%, 720px);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .38);
}

.cookie-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cookie-dialog-header h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.cookie-dialog-eyebrow {
  display: block;
  margin-bottom: .35rem;
  color: var(--green-dark);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.cookie-dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--cream);
  font-size: 1.75rem;
  line-height: 1;
}

.cookie-dialog-close:hover {
  background: var(--green-soft);
}

.cookie-dialog-intro {
  color: var(--ink-soft);
}

.cookie-choice-list {
  display: grid;
  gap: .85rem;
  margin: 1.5rem 0;
}

.cookie-choice {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream);
}

.cookie-choice strong {
  display: block;
  margin-bottom: .25rem;
}

.cookie-choice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.55;
}

.cookie-switch {
  position: relative;
  width: 54px;
  height: 30px;
  flex: 0 0 54px;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid #a8b0ad;
  border-radius: 999px;
  background: #d7dcda;
  transition: background .18s, border-color .18s;
}

.cookie-switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  transition: transform .18s;
}

.cookie-switch input:checked + .cookie-switch-track {
  border-color: var(--green-dark);
  background: var(--green);
}

.cookie-switch input:checked + .cookie-switch-track::after {
  transform: translateX(24px);
}

.cookie-switch input:focus-visible + .cookie-switch-track {
  outline: var(--focus-outline-width) solid var(--focus-dark);
  outline-offset: var(--focus-outline-offset);
}

.cookie-switch-locked {
  cursor: not-allowed;
  opacity: .75;
}

.cookie-dialog-policy {
  padding: .9rem 1rem;
  border-left: 3px solid var(--green);
  color: var(--ink-soft);
  background: var(--green-soft);
  font-size: .9rem;
}

.cookie-dialog-policy a {
  color: var(--green-dark);
  font-weight: 850;
  text-underline-offset: .18rem;
}

.cookie-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1.5rem;
}

.cookie-dialog-neutral {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.cookie-dialog-neutral:hover {
  background: var(--cream);
}

@media (max-width: 760px) {
  .cookie-actions {
    grid-template-columns: 1fr;
  }

  .cookie-actions .button {
    width: 100%;
  }

  .cookie-dialog-backdrop {
    align-items: end;
    padding: 0;
  }

  .cookie-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .cookie-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-dialog-actions .button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .cookie-choice {
    grid-template-columns: 1fr;
  }

  .cookie-switch {
    justify-self: end;
  }
}

/* iOS-Safari-Fix: Consent muss sicher über allen mobilen Overlays liegen */
.cookie-banner,
.cookie-dialog-backdrop {
  pointer-events: auto !important;
  isolation: isolate;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.cookie-banner {
  z-index: 2147483646 !important;
  padding-bottom: max(1.1rem, env(safe-area-inset-bottom));
}

.cookie-dialog-backdrop {
  z-index: 2147483647 !important;
  padding-bottom: env(safe-area-inset-bottom);
}

.cookie-banner button,
.cookie-dialog button,
.cookie-dialog input,
.cookie-banner a,
.cookie-dialog a {
  position: relative;
  z-index: 1;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@supports (-webkit-touch-callout: none) {
  .cookie-banner {
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Zugängliche mobile Navigation und allgemeine Overlay-Sperre */
body.has-open-overlay {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  background: rgba(2, 9, 7, 0.68);
  backdrop-filter: blur(5px);
  transition: opacity 0.2s ease;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.nav-backdrop:not([hidden]) {
  pointer-events: auto;
}

.nav-backdrop.is-visible {
  opacity: 1;
}

.cookie-dialog-backdrop {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cookie-dialog-backdrop.is-open {
  opacity: 1;
}

@media (max-width: 1040px) {
  .site-nav {
    z-index: 1002;
    max-height: calc(100svh - var(--header-height) - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .menu-button {
    position: relative;
    z-index: 1003;
  }
}

@media (max-width: 760px) {
  .site-nav {
    max-height: calc(100svh - var(--header-height-mobile) - 1.5rem);
  }
}

@media (min-width: 1041px) {
  .nav-backdrop {
    display: none !important;
  }
}
