/* affiliforce.de one‑pager with animations */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
}

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

:root {
  --teal: #005F60;
  --bg: #F1F8F7;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: #000;
  line-height: 1.4;
  overflow-x: hidden;
}

.container {
  max-width: 768px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

header.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.logo {
  width: 48px;
  height: 48px;
}

.brand {
  font-size: 1.75rem;
  font-weight: 700;
}

.brand i {
  font-weight: 500;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 56px;
}

.hero-text h1 {
  font-size: 3.3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 320px;
}

.hero-visual {
  position: relative;
  min-height: 400px;
}

.hero-visual .chart {
  position: absolute;
  width: 80%;
  bottom: -20px;
  right: 0;
  z-index: 1;
}

.hero-visual .video {
  position: absolute;
  width: 220px;
  top: 0;
  right: 20px;
  border-radius: 12px;
  z-index: 2;
}

.hero-visual .badge {
  position: absolute;
  width: 160px;
  top: 120px;
  left: 10px;
  transform: translate(-20px, 0);
  border-radius: 14px;
  z-index: 3;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.feature {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);

  min-width: 0;

  opacity: 0;
  transform: translateY(20px);
  animation: feature-pop 0.6s forwards ease-out;
  animation-delay: calc(var(--i) * 0.1s + 0.3s);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
}

.feature span {
  display:block;
  font-weight: 600;
  font-size: 0.95rem;
}

a.cta {
  display: block;
  max-width: 100%;
  background: var(--teal);             /* #005F60   */
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.25rem;
  margin: 0 auto 48px;

  /* <<< 1. Animation beim Load  >>> */
  animation: cta-slide-up 0.7s ease-out 0.8s forwards;

  /* <<< 2. Hover / Focus Transition >>> */
  transition:
    transform       0.25s cubic-bezier(.25,.8,.25,1),
    background-color 0.25s ease-in-out,
    box-shadow       0.25s ease-in-out;

  will-change: transform, background-color, box-shadow;
}

/* Hover / Fokus */
a.cta:hover,
a.cta:focus-visible {
  transform: translateY(-6px) scale(1.02);     /* mehr Bewegung */
  background-color: #008b86;                   /* etwas heller  */
  box-shadow: 0 10px 24px rgba(0,0,0,.15);
}

/* Aktiv-Klick (macht Button nicht „kleben“) */
a.cta:active {
  transform: translateY(-2px) scale(0.99);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.footer {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 0.9rem;
  opacity: 0;
  animation: fade-in 0.7s forwards ease-out 1s;
}

.footer a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

.footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.footer a:hover::after {
  transform: scaleX(1);
}

/* ---------- Overlay ---------- */
.modal {
  position: fixed;
  inset: 0;
  display: none;                   /* HIDDEN */
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal.open { display: flex; }

/* ---------- Hintergrund ---------- */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}

/* ---------- Box ---------- */
.modal-box {
  position: relative;
  width: min(600px, 92%);
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 32px 36px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);

  transform: scale(.9);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.modal.open .modal-box {
  transform: scale(1);
  opacity: 1;
}
.modal-box h2   { margin-top: 0; }
.modal-box h3   { margin: 1.5rem 0 .5rem; font-size: 1.05rem; }
.modal-box p    { margin: .5rem 0; }

/* ---------- Close-Button ---------- */
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: color .2s;
}
.modal-close:hover,
.modal-close:focus-visible { color: #111; }


/* Animations */
@keyframes cta-slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }  /* wichtig: none statt 0/…  */
}

@keyframes slide-left {
  from {transform: translateX(-40px); opacity:0;}
  to   {transform: translateX(0); opacity:1;}
}

@keyframes slide-right {
  from {transform: translateX(40px); opacity:0;}
  to   {transform: translateX(0); opacity:1;}
}

@keyframes slide-up {
  from {transform: translateY(30px); opacity:0;}
  to   {transform: translateY(0); opacity:1;}
}

@keyframes fade-in {
  from {opacity:0;}
  to   {opacity:1;}
}

@keyframes pop-in {
  from {transform: scale(0.8); opacity:0;}
  to   {transform: scale(1); opacity:1;}
}

@keyframes rise-in {
  from {transform: translateY(40px); opacity:0;}
  to   {transform: translateY(0); opacity:1;}
}

@keyframes feature-pop {
  from {transform: translateY(20px); opacity:0;}
  to   {transform: translateY(0); opacity:1;}
}

.slide-left { animation: slide-left 0.8s forwards ease-out 0.2s; }
.slide-right { animation: slide-right 0.8s forwards ease-out 0.2s; }
.slide-up { animation: slide-up 0.7s forwards ease-out 0.8s; }
.fade-in { animation: fade-in 0.7s forwards ease-out 0.2s; }
.pop-in-delay { animation: pop-in 0.6s forwards ease-out 0s; }
.rise-in { animation: rise-in 0.8s forwards ease-out 0.4s; }

/* Mobile adjustments */
@media (max-width: 600px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .slide-left, .slide-right {
    animation-duration: 0.5s;
    transform: none;
  }
  .hero-text h1 {
    font-size: 2.25rem;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }  
  .feature {
    animation-duration: 0.4s;
    transform: none;
  }
}
