/* styles.css */

:root {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --brand: #4f46e5;
  --brand2: #06b6d4;
  --card: #0f172a;
  --border: rgba(255, 255, 255, 0.06);
  --warn-border: #f59e0b;
}

/* Light mode support */
@media (prefers-color-scheme: light) {
  :root:not(.force-dark) {
    --bg: #ffffff;
    --text: #1a1a1a;
    --muted: #666666;
    --brand: #4f46e5;
    --brand2: #06b6d4;
    --card: #f8f8f8;
    --border: #e0e0e0;
    --warn-border: #f59e0b;
  }
  :root:not(.force-dark) body {
    background: linear-gradient(180deg, #ffffff, #f5f5f5 45%, #fafafa);
  }
  :root:not(.force-dark) .header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border);
  }
  :root:not(.force-dark) .lang button {
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
  }
  :root:not(.force-dark) .tab-btn {
    background: #f0f0f0;
    border: 1px solid #d0d0d0;
  }
  :root:not(.force-dark) .card {
    background: linear-gradient(180deg, #ffffff, #fafafa);
    border: 1px solid var(--border);
  }
  :root:not(.force-dark) a { color: #4f46e5; }
}

* { box-sizing: border-box; }
html { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #0d1324 45%, #0b1020);
  color: var(--text);
  line-height: 1.6;
}
a { color: #c7d2fe; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 18, 32, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: saturate(160%) blur(10px);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand span { font-weight: 800; letter-spacing: 0.06em; }

.lang { display: flex; align-items: center; gap: 0.6rem; }
.lang button {
  background: #10182a; border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text); border-radius: 999px; padding: 0.35rem 0.6rem; cursor: pointer;
}
.lang button.active { background: linear-gradient(90deg, var(--brand), var(--brand2)); border: none; }

.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: center; padding: 18px 0;
}
.hero-copy h1 { margin: 0.2rem 0 0.3rem; font-size: clamp(22px, 3.4vw, 34px); font-weight: 900; line-height: 1.2; }
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; padding: 0.22rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
}
.badge-link { text-decoration: none; }
.badge-link:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* Hero crossfade */
.hero-fader {
  position: relative; aspect-ratio: 16/9; background: #0e1626;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 2s ease;
}
.hero-img.active { opacity: 1; }
.hero-status {
  position: absolute; right: 10px; top: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem; border-radius: 999px; font-size: 0.8rem;
}

/* Dynamic always-on label that follows the image state */
.hero-label-dyn {
  position: absolute; bottom: 12px; left: 12px;
  pointer-events: none;
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45), 0 0 6px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.hero-label-dyn.fade {
  opacity: 0.0;
  transform: translateY(2px);
}

/* Hide legacy direct-children labels to avoid duplication (kept in DOM, not deleted) */
.hero-fader > .hero-label { display: none; }

.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0% {opacity: .6;} 50% {opacity: 1;} 100% {opacity: .6;} }

/* Tabs & cards */
.tabs { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.tab-btn {
  background: #10182a; border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text); border-radius: 10px; padding: 0.44rem 0.66rem; cursor: pointer; font-size: 0.9rem;
}
.tab-btn.active { background: linear-gradient(90deg, var(--brand), var(--brand2)); border: none; }
.tab { display: none; }
.tab.active { display: block; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }

.card {
  background: linear-gradient(180deg, #0f172a, #0b1220);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px; padding: 18px;
}
.card.warn { border-color: var(--warn-border); border-width: 2px; }

h2 { font-size: clamp(18px, 3vw, 24px); margin: 0.1rem 0 0.8rem; }
h3 { font-size: clamp(16px, 2.5vw, 20px); margin: 1.2rem 0 0.6rem; }
.small { font-size: 0.95rem; }
.tiny { font-size: 0.82rem; color: var(--muted); }

ul { margin: 0.5rem 0; padding-left: 1.5rem; }
li { margin-bottom: 0.6rem; }

.footer { padding: 16px 0; color: #9aa3b2; border-top: 1px solid rgba(255, 255, 255, 0.06); margin-top: 18px; }

/* i18n language switching */
.i18n[lang="en"] { display: none; }
:root.lang-en .i18n[lang="de"] { display: none; }
:root.lang-en .i18n[lang="en"] { display: block; }

/* Responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .pair { grid-template-columns: 1fr; }
  .tabs { font-size: 0.85rem; }
}
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .brand span { font-size: 0.85rem; }
  .badge { font-size: 0.7rem; }
}