/* ==========================================================================
   OmniMentis – base.css
   Tokens, reset, keyframes, utilities and components shared by all pages
   (header, footer, buttons, language switch).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0f3d47;
  --mint: #d9f2ea;
  --teal: #17a398;
  --sun: #ffc94d;
  --coral: #ff6b4a;
  --cream: #fffdf7;
  --hand: 'Caveat', cursive;
  --h: 'Bricolage Grotesque', system-ui, sans-serif;
  --edge: clamp(20px, 5vw, 72px);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Figtree', system-ui, sans-serif;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-underline-offset: 3px; }
a:not([class]):hover { color: var(--coral); }
::selection { background: var(--sun); color: var(--ink); }
img { height: auto; }
[hidden] { display: none !important; }

/* Hide content until a non-default language is applied (see js/i18n.js). */
.i18n-pending body { visibility: hidden; }

/* ---------- Keyframes ---------- */
@keyframes om-rise  { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes om-pop   { from { opacity: 0; transform: scale(.92) rotate(-3deg); } to { opacity: 1; transform: none; } }
@keyframes om-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes om-float { 0%, 100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(14px,-22px) rotate(6deg); } }
@keyframes om-bob   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes om-draw  { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes om-rise  { from { opacity: 1; transform: none; } to { opacity: 1; transform: none; } }
  @keyframes om-pop   { from { opacity: 1; transform: none; } to { opacity: 1; transform: none; } }
  @keyframes om-float { from { transform: none; } to { transform: none; } }
  @keyframes om-bob   { from { transform: none; } to { transform: none; } }
  @keyframes om-draw  { from { transform: scaleX(1); } to { transform: scaleX(1); } }
}

/* ---------- Responsive visibility (breakpoint 860px) ---------- */
@media (max-width: 859.98px) { .only-wide { display: none !important; } }
@media (min-width: 860px)    { .only-narrow { display: none !important; } }
/* Wide desktops only: the header bar is full between 860 and 1100px */
@media (max-width: 1099.98px) { .only-xwide { display: none !important; } }

/* ---------- Language switch ---------- */
.lang-switch {
  display: inline-flex;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 7px 11px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.lang-switch button:hover { color: var(--coral); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); cursor: default; }
.hdr__menu .lang-switch { justify-self: start; margin-top: 14px; }

/* ---------- Shared components ---------- */

.icon {
  flex: none;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}
.stack {
  display: grid;
  gap: 14px;
}
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 16px;
}
.wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
}
.eyebrow--sun {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 16px;
}
.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.btn:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.link--sun {
  color: var(--sun);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,253,247,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(15,61,71,0.1);
}
.hdr__bar {
  padding: 12px var(--edge);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.hdr__brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--h);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.hdr__nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 32px);
}
.hdr__nav-link {
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.hdr__nav-link:hover {
  color: var(--coral);
}
.hdr__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hdr__cta {
  text-decoration: none;
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}
.hdr__cta:hover {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--ink);
}
.hdr__cta:active {
  transform: translate(2px,2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.hdr__burger {
  font: inherit;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
.hdr__burger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}
.hdr__menu {
  display: grid;
  border-top: 2px solid rgba(15,61,71,0.12);
  background: var(--cream);
  padding: 6px var(--edge) 14px;
}
.hdr__menu-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  padding: 13px 0;
  border-bottom: 1px solid rgba(15,61,71,0.12);
}
/* Cross-link to the other audience page (Familien <-> Organisationen) */
.hdr__sep {
  width: 2px;
  height: 20px;
  border-radius: 2px;
  background: rgba(15,61,71,0.25);
}
.hdr__nav-link--out {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hdr__menu-link--out {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  padding: 13px 0;
  margin-top: 8px;
  border-top: 2px solid rgba(15,61,71,0.25);
}
.hdr__menu-link--out:hover { color: var(--coral); }
/* Dark CTA variant (Organisationen) */
.hdr__cta--ink {
  color: var(--cream);
  background: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.hdr__cta--ink:hover { color: var(--cream); }
.hdr__menu-link--last {
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  padding: 13px 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255,253,247,0.8);
  border-top: 2px solid rgba(255,253,247,0.25);
}
.ftr__wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px var(--edge);
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.ftr__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--h);
  font-weight: 800;
  font-size: 19px;
  color: var(--cream);
}
.ftr__span {
  max-width: 34ch;
  line-height: 1.5;
}
.ftr__layout-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ftr__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,253,247,0.55);
  color: var(--cream);
  transition: background 160ms ease, border-color 160ms ease;
}
.ftr__social:hover {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--ink);
}
.ftr__div {
  border-top: 2px solid rgba(255,253,247,0.18);
}
.ftr__wrap-2 {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px var(--edge) 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}
.ftr__layout-3 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.ftr__cross {
  color: var(--cream);
  font-weight: 600;
}
.ftr__cross:hover { color: var(--sun); }
.ftr__link {
  color: rgba(255,253,247,0.75);
}
.ftr__span-2 {
  color: rgba(255,253,247,0.6);
}

/* ---------- Back-to-top button ---------- */

.to-top {
  position: fixed;
  right: clamp(16px,3vw,32px);
  bottom: clamp(16px,3vw,32px);
  z-index: 35;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  animation: om-pop 400ms cubic-bezier(.34,1.56,.64,1) both;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.to-top:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--ink);
}
.to-top:active {
  transform: translate(2px,2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- Header on narrow screens ----------
   The three-column bar (brand | nav | actions) overflowed at ~390px once
   CTA and burger sat side by side. Below the nav breakpoint the empty nav
   column is dropped and the CTA tightens on very small phones. */
@media (max-width: 859.98px) {
  .hdr__bar { grid-template-columns: auto 1fr; }
  .hdr__nav { display: none; }
}
@media (max-width: 479.98px) {
  .hdr__bar { gap: 10px; }
  .hdr__brand { font-size: 19px; gap: 8px; }
  .hdr__actions { gap: 8px; }
  .hdr__cta { padding: 8px 12px; font-size: 14px; }
  .hdr__burger { padding: 9px 10px; }
}
@media (max-width: 379.98px) {
  .hdr__brand > span { display: none; }  /* logo mark only */
}

/* ---------- Theme: business palette (organisationen, B2B shop) ----------
   The business page maps the warm accents onto mint and teal. Everything in
   base.css that reads --sun / --coral (dots, eyebrows, footer links) follows. */
.theme-org {
  --sun: #d9f2ea;
  --coral: #17a398;
  --tint: #eef4f2;
  --line: rgba(15,61,71,0.16);
  --shadow: 0 1px 2px rgba(15,61,71,0.05), 0 10px 28px rgba(15,61,71,0.06);
}
.theme-org .to-top {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
}
.theme-org .to-top:hover { color: var(--cream); }
