/* ============================================================
   Components · Buttons, Cards, Forms, Badges, Ripple, Logo
   Skeleton, wird mit Inhalt der Startseite erweitert.
   ============================================================ */

/* --- Brand · Echte Logo-Datei, Light/Dark automatisch --- */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--t-fast) var(--ease-out);
}
.brand:hover { opacity: .85; }
.brand:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 220px;
}
@media (max-width: 540px) { .brand-logo { height: 36px; } }

.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo--light { display: none; }
  :root:not([data-theme="light"]) .brand-logo--dark  { display: block; }
}

.brand-logo--footer { height: 56px; }
@media (max-width: 540px) { .brand-logo--footer { height: 48px; } }

/* --- Buttons --- */
.btn {
  --pad-y: 14px;
  --pad-x: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              background var(--t-fast),
              color var(--t-fast),
              border-color var(--t-fast);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease-out); }
.btn:hover svg { transform: translateX(2px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn--primary {
  background: var(--c-blue);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 151, 215, 0.32);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(0, 151, 215, 0.42);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--bg-soft); color: var(--fg); }

.btn--quiet {
  background: transparent;
  color: var(--fg-muted);
  padding: 12px 6px;
}
.btn--quiet:hover { color: var(--fg); }

.btn--sm  { --pad-y: 10px; --pad-x: 16px; font-size: 13px; }
.btn--lg  { --pad-y: 18px; --pad-x: 28px; font-size: 16px; }

/* --- Cards --- */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: var(--space-6);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), border-color var(--t-fast);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3, .card h4 { margin-bottom: var(--space-2); }
.card p { color: var(--fg-muted); }

.card--feature .card__icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--c-blue);
  margin-bottom: var(--space-4);
}
.card--feature .card__icon svg { width: 22px; height: 22px; }

.card--quote {
  background: var(--bg-soft);
  border: 0;
}
.card--quote blockquote { border: 0; padding: 0; margin: 0; }

/* --- Badges / Pills --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  background: var(--accent-soft);
  color: var(--c-blue);
}
.badge--solid { background: var(--c-blue); color: #fff; }
.badge--dark { background: var(--c-black); color: #fff; }

/* --- Forms --- */
.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--fg);
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--fg);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: var(--focus-ring);
}
.field textarea { min-height: 140px; resize: vertical; }
.field--inline { display: flex; gap: var(--space-3); align-items: flex-start; }
.field--check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--c-blue); margin-top: 2px; }
.field__hint { font-size: 12px; color: var(--fg-faint); }
.field__error { font-size: 12px; color: #C73E3A; }

/* Eingebettete Microsoft-Forms-Formulare
   Microsoft Forms laeuft cross-origin und meldet seine Inhaltshoehe nicht nach
   aussen, ein automatisches Mitwachsen des iframes ist daher nicht moeglich.
   Die Hoehen unten sind gemessen (gerenderte Inhaltshoehe bei schmaler Spalte)
   plus Reserve fuer Validierungsmeldungen, damit kein innerer Scrollbalken
   entsteht. Bei groesseren Aenderungen am Formular ggf. nachjustieren. */
.form-embed { width: 100%; }
.form-embed__frame {
  display: block;
  width: 100%;
  height: 1650px; /* Fallback */
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}
.form-embed__frame--kontakt       { height: 1660px; }
.form-embed__frame--herbstkontakt { height: 1620px; }
.form-embed__frame--mitglied      { height: 1560px; }

/* --- Navigation --- */
.nav { display: flex; align-items: center; gap: var(--space-5); }
.nav__list { display: flex; gap: var(--space-5); list-style: none; padding: 0; margin: 0; }
.nav__list a {
  color: var(--fg);
  font-weight: var(--fw-medium);
  font-size: 15px;
  position: relative;
}
.nav__list a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--c-blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-fast) var(--ease-out);
}
.nav__list a:hover::after,
.nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  align-items: center; justify-content: center;
}
.nav__toggle svg { width: 18px; height: 18px; color: var(--fg); }

@media (max-width: 900px) {
  .nav__list { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* Drawer (mobile) */
.drawer {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px);
  padding: 24px;
  display: none;
  z-index: var(--z-modal);
  flex-direction: column;
  gap: var(--space-5);
}
.drawer[aria-hidden="false"] { display: flex; animation: drawerIn var(--t-med) var(--ease-out); }
.drawer .nav__list { display: flex; flex-direction: column; gap: var(--space-4); }
.drawer .nav__list a { font-size: 24px; font-weight: var(--fw-semibold); }
.drawer__close { align-self: flex-end; }

/* Theme Toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  border-radius: var(--radius-pill);
  color: var(--fg);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.theme-toggle:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.theme-toggle svg { width: 16px; height: 16px; }

/* Ripple Motiv */
.ripple-deco {
  position: absolute; pointer-events: none;
  opacity: .5; color: var(--accent);
}
.ripple-deco--hero { right: -8%; bottom: -10%; width: clamp(280px, 50%, 700px); }
.ripple-deco--corner { top: -10%; right: -10%; width: 320px; }
[data-theme="dark"] .ripple-deco { opacity: .35; }

/* Section Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 18% 28%, color-mix(in oklab, var(--c-blue) 18%, transparent), transparent 60%),
    radial-gradient(70% 60% at 82% 70%, color-mix(in oklab, var(--c-teal) 14%, transparent), transparent 65%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: var(--space-7); } }
.hero .row { justify-content: flex-start; row-gap: var(--space-4); }
.hero__title { line-height: 1.12; margin: var(--space-4) 0 var(--space-5); }
.hero__title em { font-style: normal; color: var(--c-blue); }
.hero .lead { margin-bottom: var(--space-6); }
.hero__media {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, rgba(0,151,215,.2), rgba(31,71,137,.5));
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media-caption {
  position: absolute; left: 16px; bottom: 16px;
  color: #fff; opacity: .75;
  font-size: 11px; letter-spacing: var(--tracking-uppercase); text-transform: uppercase;
}

/* Event Card (Herbstkontakt, CONAKO Teaser) */
.event-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0B1B3A, #130F2D);
  color: #fff;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid rgba(255,255,255,.08);
}
.event-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(87,188,188,.25), transparent 60%),
    radial-gradient(50% 40% at 10% 90%, rgba(0,151,215,.25), transparent 60%);
}
.event-card .eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.78); }
.event-card h2, .event-card h3 { color: #fff; }
.event-card p { color: rgba(255,255,255,.78); margin: 0; max-width: 56ch; }
.event-card .agenda { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-6); }
@media (max-width: 720px) { .event-card .agenda { grid-template-columns: 1fr; } }
.event-card .step {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  font-size: 14px;
}
.event-card .step b {
  display: block; font-size: 12px; letter-spacing: var(--tracking-uppercase); text-transform: uppercase;
  opacity: .6; margin-bottom: 4px; font-weight: var(--fw-semibold);
}

/* ============================================================
   Cookie-Consent
   ============================================================ */
.cookie {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: var(--z-toast);
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}
.cookie[hidden] { display: none; }

.cookie__panel {
  pointer-events: auto;
  width: 100%;
  max-width: 460px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-5);
  transform: translateY(12px);
  opacity: 0;
  transition: transform var(--t-med) var(--ease-out),
              opacity var(--t-med) var(--ease-out);
}
.cookie.is-visible .cookie__panel { transform: none; opacity: 1; }

.cookie__title {
  font-size: var(--fs-subhead);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-snug);
  margin: 0;
  color: var(--fg);
}
.cookie__text {
  font-size: var(--fs-meta);
  line-height: var(--lh-relaxed);
  color: var(--fg-muted);
  margin: var(--space-2) 0 0;
}
.cookie__text a {
  color: var(--accent);
  font-weight: var(--fw-semibold);
  text-underline-offset: 2px;
}

/* --- Einstellungen / Kategorien --- */
.cookie__settings {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.cookie__settings[hidden] { display: none; }

.cookie__option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  cursor: pointer;
}
.cookie__option-text { display: grid; gap: 2px; }
.cookie__option-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--fg);
}
.cookie__option-desc {
  font-size: var(--fs-meta);
  line-height: var(--lh-normal);
  color: var(--fg-muted);
}

/* --- Toggle-Switch (nativer Checkbox-Ersatz) --- */
.cookie__switch {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 44px;
  height: 26px;
  margin-top: 2px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out);
}
.cookie__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease-out);
}
.cookie__switch:checked { background: var(--c-blue); }
.cookie__switch:checked::after { transform: translateX(18px); }
.cookie__switch:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cookie__switch:disabled { cursor: not-allowed; opacity: .7; }

/* --- Aktionen --- */
.cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.cookie__actions .cookie__btn {
  flex: 1 1 auto;
  min-width: 0;
  --pad-x: 14px;
  font-size: 14px;
}
.cookie__btn[hidden] { display: none; }

/* --- Mobile: Buttons untereinander, Panel volle Breite --- */
@media (max-width: 540px) {
  .cookie {
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
  }
  .cookie__panel { max-width: none; padding: var(--space-4); }
  .cookie__actions { flex-direction: column; }
  .cookie__actions .cookie__btn { width: 100%; flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie__panel { transition: opacity var(--t-fast) linear; transform: none; }
}

/* Footer-Button im Link-Look (Cookie-Einstellungen) */
.footer-link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.footer-link-btn:hover { color: var(--accent); }
