/* layout.css — Header, Nav, Warning Bar, Footer — lottojaxxplus.de */

/* ══════════════════════════════════════
   UTILITY BAR (36px top strip)
══════════════════════════════════════ */
.utility-bar {
  height: var(--header-utility);
  background: var(--c-bg-deep);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--c-muted);
  position: relative;
  z-index: var(--z-header);
}
.utility-bar__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.utility-bar__left,
.utility-bar__right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.utility-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  color: var(--c-muted);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.utility-bar__item:hover { color: var(--c-text); }
.utility-bar__item--license {
  font-weight: var(--weight-medium);
  color: var(--c-success);
}
.utility-bar__item--license:hover { color: #16a34a; }
.utility-bar__icon {
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.utility-bar__divider {
  width: 1px;
  height: 16px;
  background: var(--c-border);
}


/* ══════════════════════════════════════
   WARNING BANNER (Pflichthinweis)
══════════════════════════════════════ */
.warning-bar {
  background: var(--c-warning);
  color: #000;
  font-size: 13px;
  font-weight: var(--weight-medium);
  line-height: 1.4;
  padding: 10px var(--gutter);
  text-align: center;
  z-index: var(--z-warning);
  position: relative;
}
.warning-bar a {
  color: #000;
  font-weight: var(--weight-bold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.warning-bar a:hover { color: #333; }
.warning-bar__18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: #000;
  color: var(--c-warning);
  font-weight: var(--weight-black);
  font-size: 10px;
  border-radius: 4px;
  margin-right: var(--space-2);
  vertical-align: middle;
  flex-shrink: 0;
}
.warning-bar__inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}


/* ══════════════════════════════════════
   MAIN HEADER (80px sticky)
══════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--ease-base);
}
.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.main-header {
  height: var(--header-main);
  display: flex;
  align-items: center;
}
.main-header__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

/* Logo */
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,196,0,0), 0 2px 8px rgba(0,0,0,0.2); }
  50%       { box-shadow: 0 0 20px 3px rgba(255,196,0,0.22), 0 2px 8px rgba(0,0,0,0.2); }
}
@keyframes logoShimmer {
  0%   { transform: translateX(-220%); }
  100% { transform: translateX(220%); }
}
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  /* Helle Plate: das Logo („JAXX" dunkelblau, „plus" grau) ist für hellen
     Hintergrund gezeichnet — auf dunklem Theme sonst kaum lesbar (WCAG). */
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  animation: logoPulse 4s ease-in-out infinite;
  transition: background var(--ease-fast), border-color var(--ease-fast), box-shadow var(--ease-fast);
}
.site-logo::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.10), transparent);
  transform: translateX(-220%);
  animation: logoShimmer 6s ease-in-out infinite;
  animation-delay: 1.5s;
  pointer-events: none;
}
.site-logo:hover {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.25);
}
.site-logo__svg {
  height: 40px;
  width: auto;
  position: relative;
  z-index: 1;
}
.site-logo__img {
  height: 40px;
  width: auto;
  display: block;
  position: relative;
  z-index: 1;
}


/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.nav-item {
  position: relative;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  color: var(--c-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: color var(--ease-fast), background var(--ease-fast);
  white-space: nowrap;
  /* button reset */
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
}
.nav-link:hover, .nav-link:focus-visible,
.nav-item.active > .nav-link {
  color: var(--c-text);
  background: var(--c-surface);
}
.nav-link--spielerschutz {
  color: var(--c-warning);
  font-weight: var(--weight-semi);
}
.nav-link--spielerschutz:hover { color: #f0c800; background: rgba(255,212,0,0.06); }

.nav-arrow {
  width: 14px; height: 14px;
  transition: transform var(--ease-fast);
  flex-shrink: 0;
}
.nav-item:hover .nav-arrow,
.nav-item[aria-expanded="true"] .nav-arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--ease-base), transform var(--ease-base), visibility var(--ease-base);
  z-index: var(--z-nav);
}
.nav-item:hover .nav-dropdown,
.nav-item[aria-expanded="true"] .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--c-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: background var(--ease-fast), color var(--ease-fast);
}
.nav-dropdown__item:hover {
  background: var(--c-bg);
  color: var(--c-text);
}
.nav-dropdown__item-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--c-accent);
}
.nav-dropdown__item-label { font-weight: var(--weight-medium); color: var(--c-text); }
.nav-dropdown__item-desc  { font-size: var(--text-xs); color: var(--c-subtle); margin-top: 1px; }
.nav-dropdown__divider {
  height: 1px;
  background: var(--c-border);
  margin: var(--space-2) 0;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
  flex-shrink: 0;
}
.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--c-muted);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--ease-fast);
}
.header-icon-btn:hover {
  background: var(--c-surface);
  border-color: var(--c-border);
  color: var(--c-text);
}
.header-icon-btn svg { width: 20px; height: 20px; }

/* CTA in header */
.header-cta {
  padding: 10px 20px;
  font-size: var(--text-sm);
}

/* OASIS Sticky Button */
.oasis-sticky {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(calc(100% - 10px));
  z-index: var(--z-above);
  background: var(--c-warning);
  color: #000;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  padding: var(--space-4) var(--space-2);
  text-decoration: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  white-space: nowrap;
  writing-mode: vertical-rl;
  transition: background var(--ease-fast), transform var(--ease-fast);
}
.oasis-sticky:hover { background: #f0c800; color: #000; transform: translateY(-50%) translateX(0); }


/* ══════════════════════════════════════
   HAMBURGER (mobile)
══════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  justify-content: center;
  align-items: center;
  margin-left: auto;
}
.hamburger__line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-muted);
  border-radius: 2px;
  transition: all var(--ease-base);
  transform-origin: center;
}
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: calc(var(--header-utility) + var(--header-main) + var(--warning-bar));
  background: var(--c-bg);
  z-index: var(--z-overlay);
  overflow-y: auto;
  padding: var(--space-6) var(--gutter);
  border-top: 1px solid var(--c-border);
  animation: slideDown var(--ease-base) forwards;
}
.mobile-nav.open { display: block; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.mobile-nav__link:hover { color: var(--c-accent); }
.mobile-nav__sub {
  padding-left: var(--space-4);
}
.mobile-nav__sub .mobile-nav__link {
  font-size: var(--text-sm);
  color: var(--c-muted);
  padding-block: var(--space-3);
}
.mobile-nav__ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}


/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  background: var(--c-bg-deep);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}

/* Pre-footer CTA */
.pre-footer {
  background: linear-gradient(135deg, var(--c-surface) 0%, rgba(228,5,33,0.04) 100%);
  border-bottom: 1px solid var(--c-border);
  padding: var(--space-20) 0;
  text-align: center;
}
.pre-footer__title {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  margin-bottom: var(--space-4);
}
.pre-footer__desc {
  color: var(--c-muted);
  margin-bottom: var(--space-8);
  max-width: 50ch;
  margin-inline: auto;
}
.pre-footer__ctas {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer columns */
.footer-main {
  padding: var(--space-12) 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-8);
}
.footer-col__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--c-subtle);
  margin-bottom: var(--space-4);
}
.footer-col__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col__list li { color: var(--c-muted); }
.footer-col__link {
  color: var(--c-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--ease-fast);
  line-height: var(--leading-snug);
}
.footer-col__link:hover { color: var(--c-text); }
.footer-col__link--warning { color: var(--c-warning); }
.footer-col__link--warning:hover { color: #f0c800; }

/* Footer trust bar */
.footer-trust {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.footer-trust__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer-trust__badges {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-trust__badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--c-muted);
  padding: var(--space-2) var(--space-3);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--ease-fast);
}
.footer-trust__badge:hover { border-color: var(--c-border-2); color: var(--c-text); }
.footer-trust__badge svg { width: 16px; height: 16px; flex-shrink: 0; }
.footer-trust__badge-logo { height: 22px; width: auto; display: block; flex-shrink: 0; filter: brightness(0.85); }
.footer-trust__badge:hover .footer-trust__badge-logo { filter: brightness(1); }

/* Trust-Logos auf heller Plate (für dunkles Theme lesbar) */
.footer-trust__logos {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.footer-trust__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: var(--space-2) var(--space-4);
  background: #fff;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  transition: box-shadow var(--ease-fast), transform var(--ease-fast);
}
.footer-trust__logo:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.footer-trust__logo img { height: 28px; width: auto; max-width: 130px; display: block; object-fit: contain; }
.footer-trust__wohnsitz {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--c-muted);
  font-weight: var(--weight-medium);
}

/* Footer bottom */
.footer-bottom {
  padding: var(--space-6) 0;
}
.footer-bottom__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-legal {
  font-size: var(--text-xs);
  color: var(--c-subtle);
  line-height: var(--leading-loose);
}
.footer-legal strong { color: var(--c-muted); }
.footer-copy {
  font-size: var(--text-xs);
  color: var(--c-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-copy__links {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.footer-copy__links a {
  color: var(--c-subtle);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: color var(--ease-fast);
}
.footer-copy__links a:hover { color: var(--c-muted); }

/* Footer Pflichthinweis band */
.footer-pflicht {
  background: rgba(255,212,0,0.05);
  border-top: 2px solid var(--c-warning);
  padding: var(--space-4) var(--gutter);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--c-muted);
  line-height: var(--leading-loose);
}
.footer-pflicht strong { color: var(--c-text); }
.footer-pflicht a { color: var(--c-warning); }


/* ══════════════════════════════════════
   MAIN CONTENT AREA
══════════════════════════════════════ */
.site-main {
  min-height: calc(100vh - var(--header-total) - 400px);
}

/* Page with sidebar */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-8);
  align-items: start;
}
.page-layout__sidebar {
  position: sticky;
  top: calc(var(--header-total) + var(--space-6));
}

/* Sidebar nav (legal, spielerschutz) */
.sidebar-nav {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sidebar-nav__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--c-subtle);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--c-border);
}
.sidebar-nav__link {
  display: block;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--c-border);
  transition: all var(--ease-fast);
}
.sidebar-nav__link:last-child { border-bottom: none; }
.sidebar-nav__link:hover { color: var(--c-text); background: var(--c-bg); }
.sidebar-nav__link.active {
  color: var(--c-accent);
  background: rgba(228,5,33,0.06);
  border-left: 3px solid var(--c-accent);
  padding-left: calc(var(--space-5) - 3px);
}


/* ══════════════════════════════════════
   BREADCRUMBS
══════════════════════════════════════ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--c-subtle);
  padding: var(--space-4) 0;
}
.breadcrumbs__item { display: flex; align-items: center; gap: var(--space-2); }
.breadcrumbs__link { color: var(--c-muted); text-decoration: none; transition: color var(--ease-fast); }
.breadcrumbs__link:hover { color: var(--c-accent); }
.breadcrumbs__sep { color: var(--c-border-2); }
.breadcrumbs__current { color: var(--c-muted); font-weight: var(--weight-medium); }


/* ══════════════════════════════════════
   RESPONSIVE LAYOUT
══════════════════════════════════════ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .main-nav .nav-item:nth-child(n+6) { display: none; }
}

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .page-layout__sidebar { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .utility-bar { display: none; }
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .header-cta { display: none; }
  /* Mobile-Header entzerren: nur Logo + Burger.
     Suche/Konto sind im Mobile-Menü erreichbar → keine gequetschten Icons,
     Burger wird nicht mehr am Rand abgeschnitten. */
  .header-icon-btn { display: none; }
  .main-header__inner { gap: var(--space-4); }
  /* Tap-Target 44px (WCAG 2.5.5) */
  .hamburger { width: 44px; height: 44px; }
  .site-logo { padding: var(--space-1) var(--space-3); }
  .site-logo__img { height: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .footer-trust__inner { justify-content: center; }
  .footer-copy { flex-direction: column; align-items: center; text-align: center; }
  .oasis-sticky { display: none; }
}

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


/* ══════════════════════════════════════
   SCROLL REVEAL — ключевая анимация сайта
   Все секции и карточки появляются снизу
   с единым easing — как шар из барабана
══════════════════════════════════════ */
/* Inhalt nur verstecken, wenn JS aktiv ist (.js wird im <head> gesetzt).
   Ohne JS bleiben alle Blöcke sichtbar — keine leeren Sektionen mehr. */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Reduzierte Bewegung: Inhalt sofort sichtbar, keine Animation
   (UX + vestibuläre Beeinträchtigungen + Pflichthinweise nie verdeckt). */
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.16s; }
.reveal--d3 { transition-delay: 0.24s; }
.reveal--d4 { transition-delay: 0.32s; }
.reveal--d5 { transition-delay: 0.40s; }

/* Hero enter — текст и шар появляются при загрузке */
@keyframes heroEnterLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroEnterRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}
.hero__copy  { animation: heroEnterLeft  0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero__visual { animation: heroEnterRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
