/* ============================================
   Baunach Trading Cards – Stylesheet
   ============================================ */

:root {
  --clr-bg: #0f0f0f;
  --clr-surface: #1a1a1a;
  --clr-surface-2: #242424;
  --clr-gold: #c9a84c;
  --clr-gold-light: #e8c96e;
  --clr-text: #e8e8e8;
  --clr-text-muted: #999;
  --clr-white: #ffffff;
  --clr-border: #2e2e2e;

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --transition: 0.2s ease;
  --max-w: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--clr-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--clr-white);
  font-weight: 700;
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.6rem;
  color: var(--clr-gold);
}

.logo-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--clr-text-muted);
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--clr-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.main-nav a:hover { color: var(--clr-gold); }

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--clr-border);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  transition: border-color var(--transition);
}

.lang-switch:hover { border-color: var(--clr-gold); }

.lang-active {
  color: var(--clr-gold);
}

.lang-sep {
  color: var(--clr-border);
}

.lang-other {
  color: var(--clr-text-muted);
  transition: color var(--transition);
}

.lang-switch:hover .lang-other { color: var(--clr-gold); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--clr-text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #0f0f0f 0%, #1c1408 50%, #0f0f0f 100%);
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--clr-border);
}

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

.hero-text { max-width: 580px; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--clr-white);
  margin-bottom: 1.25rem;
}

.hero h1 span { color: var(--clr-gold); }

.hero-sub {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  max-width: 480px;
}

/* Card stack decoration */
.hero-card-stack {
  flex-shrink: 0;
  position: relative;
  width: 180px;
  height: 240px;
}

.card-visual {
  position: absolute;
  width: 110px;
  height: 155px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 2px solid;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.card-1 {
  background: #1e1e1e;
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  left: 50px; top: 0;
  transform: rotate(8deg);
  z-index: 1;
}
.card-2 {
  background: #1e1e1e;
  border-color: #c0392b;
  color: #c0392b;
  left: 25px; top: 40px;
  transform: rotate(-3deg);
  z-index: 2;
}
.card-3 {
  background: #1e1e1e;
  border-color: #c0392b;
  color: #c0392b;
  left: 0; top: 80px;
  transform: rotate(-12deg);
  z-index: 3;
}

/* Floating card animation – starts after fly-in */
.hero-card-stack.is-visible .card-1 { animation: cardFloat1 5s ease-in-out 0.9s infinite; }
.hero-card-stack.is-visible .card-2 { animation: cardFloat2 5s ease-in-out 1.3s infinite; }
.hero-card-stack.is-visible .card-3 { animation: cardFloat3 5s ease-in-out 1.7s infinite; }

@keyframes cardFloat1 {
  0%, 100% { transform: rotate(8deg)  translateY(0px);  }
  50%       { transform: rotate(8deg)  translateY(-9px); }
}
@keyframes cardFloat2 {
  0%, 100% { transform: rotate(-3deg)  translateY(0px); }
  50%       { transform: rotate(-3deg)  translateY(-6px); }
}
@keyframes cardFloat3 {
  0%, 100% { transform: rotate(-12deg) translateY(0px); }
  50%       { transform: rotate(-12deg) translateY(-7px); }
}

/* ---- Sections ---- */
.section { padding: 4.5rem 0; }
.section-light { background: var(--clr-surface); }
.section-dark  { background: var(--clr-bg); }

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  background: var(--clr-gold);
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s;
}

.section h2.is-visible::after { transform: scaleX(1); }

/* Centered underline (contact section) */
.contact-inner h2::after {
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
}
.contact-inner h2.is-visible::after { transform: translateX(-50%) scaleX(1); }

/* ---- Feature Grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--clr-gold);
  transform: translateY(-3px);
}

/* After scroll-in, restore hover transitions (override the animation transition) */
.feature-card.is-visible {
  transition: border-color var(--transition), transform var(--transition);
}

/* Icon pops in with spring after the card flies in */
.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.feature-card.is-visible .feature-icon {
  animation: iconPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes iconPop {
  from { transform: scale(0.2) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1)   rotate(0deg);   opacity: 1; }
}

.feature-card h3 {
  font-size: 1.1rem;
  color: var(--clr-white);
  margin-bottom: 0.5rem;
}

.feature-card p { color: var(--clr-text-muted); font-size: 0.95rem; }

/* ---- Contact ---- */
.contact-inner { text-align: center; }
.contact-inner p { color: var(--clr-text-muted); margin-bottom: 1.5rem; }
.contact-email { font-size: 1rem; letter-spacing: 0.01em; }

/* ---- Footer ---- */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  font-weight: 700;
  color: var(--clr-gold);
  font-size: 1rem;
}

.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }

.footer-nav a {
  color: var(--clr-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--clr-gold); }

.footer-copy { color: var(--clr-text-muted); font-size: 0.8rem; }

/* ---- Prose (legal pages) ---- */
.page-section { min-height: 70vh; }

.prose h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--clr-white);
  margin-bottom: 0.5rem;
}

.prose .lead {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.prose h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--clr-gold);
  margin: 2.5rem 0 0.75rem;
}

.prose h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--clr-white);
  margin: 1.5rem 0 0.5rem;
}

.prose p, .prose ul, .prose address {
  color: var(--clr-text-muted);
  margin-bottom: 1rem;
}

.prose ul {
  padding-left: 1.5rem;
}

.prose ul li { margin-bottom: 0.25rem; }

.prose address {
  font-style: normal;
  background: var(--clr-surface-2);
  border-left: 3px solid var(--clr-gold);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
  line-height: 2;
}

.prose code {
  background: var(--clr-surface-2);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--clr-gold-light);
}

.prose a {
  color: var(--clr-gold);
  transition: color var(--transition);
}
.prose a:hover { color: var(--clr-gold-light); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--clr-gold);
  color: #000;
  border-color: var(--clr-gold);
}
.btn-primary:hover { background: var(--clr-gold-light); border-color: var(--clr-gold-light); }

.btn-outline {
  background: transparent;
  color: var(--clr-text-muted);
  border-color: var(--clr-border);
}
.btn-outline:hover { border-color: var(--clr-gold); color: var(--clr-gold); }

/* ---- Cookie Banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 999;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 1.25rem 1.5rem;
}

.cookie-banner[hidden] { display: none; }

.cookie-content {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-content p {
  color: var(--clr-text-muted);
  font-size: 0.875rem;
  flex: 1;
  min-width: 220px;
  margin: 0;
}

.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text { max-width: 100%; }
  .hero-sub { margin: 0 auto; }
  .hero-card-stack { display: none; }

  .main-nav { display: none; }
  .main-nav.open {
    display: block;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 1rem 1.5rem;
  }
  .main-nav.open ul { flex-direction: column; gap: 0; }
  .main-nav.open a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--clr-border); }
  .nav-toggle { display: block; }
  .lang-switch { font-size: 0.75rem; padding: 0.25rem 0.5rem; }

  .section h2::after {
    left: 50%;
    transform-origin: center;
    transform: translateX(-50%) scaleX(0);
  }
  .section h2.is-visible::after { transform: translateX(-50%) scaleX(1); }
  .section h2 { text-align: center; }

  .cookie-content { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   Scroll Animations
   ============================================ */

/* Base hidden state */
[data-animate] {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity  0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Default: fly up */
[data-animate],
[data-animate="fade-up"] {
  transform: translateY(40px);
}

/* Fly in from right */
[data-animate="fade-right"] {
  transform: translateX(60px);
}

/* Fly in from left */
[data-animate="fade-left"] {
  transform: translateX(-60px);
}

/* Scale up */
[data-animate="scale"] {
  transform: scale(0.88) translateY(24px);
}

/* Visible state – same for all variants */
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* Prose sections on legal pages */
.prose [data-animate] { transform: translateY(24px); }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
