/* ===== CSS Custom Properties ===== */
:root {
  --primary: #0B61A4;
  --primary-light: #9ECAFF;
  --primary-container: #D1E4FF;
  --on-primary: #FFFFFF;
  --on-primary-container: #001D36;
  --secondary: #535F70;
  --secondary-container: #D7E3F8;
  --tertiary: #6B5778;
  --background: #F8F9FF;
  --on-background: #191C20;
  --surface: #F8F9FF;
  --surface-variant: #DFE2EB;
  --on-surface-variant: #43474E;
  --outline: #73777F;
  --error: #BA1A1A;
  --dark-bg: #111318;
  --dark-primary: #9ECAFF;

  --bin-restmuell: #424242;
  --bin-biomuell: #795548;
  --bin-gelbe-tonne: #FFC107;
  --bin-papier: #1976D2;

  --header-height: 64px;
  --max-width: 1200px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--on-background);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ===== Utility ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--on-background);
}

.section__subtitle {
  text-align: center;
  color: var(--on-surface-variant);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ===== Animations ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger cards in grids */
.features__grid .fade-in-up:nth-child(3n+2) { transition-delay: 0.1s; }
.features__grid .fade-in-up:nth-child(3n+3) { transition-delay: 0.2s; }
.tech-highlights__grid .fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.tech-highlights__grid .fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.screenshots__row .fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.screenshots__row .fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.screenshots__row .fade-in-up:nth-child(4) { transition-delay: 0.3s; }
.screenshots__row .fade-in-up:nth-child(5) { transition-delay: 0.4s; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}

.site-header--scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--on-primary);
  transition: color 0.3s;
}

.site-header--scrolled .nav__logo {
  color: var(--on-background);
}

.nav__logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav__links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav__links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: width 0.3s;
}

.nav__links a:hover,
.nav__links a.active {
  text-decoration: none;
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.site-header--scrolled .nav__links a {
  color: var(--on-surface-variant);
}

.site-header--scrolled .nav__links a:hover,
.site-header--scrolled .nav__links a.active {
  color: var(--primary);
}

.site-header--scrolled .nav__links a::after {
  background: var(--primary);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--on-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}

.site-header--scrolled .nav__hamburger span {
  background: var(--on-background);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #003258 0%, var(--primary) 50%, #07497D 100%);
  color: var(--on-primary);
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero__icon {
  width: 140px;
  height: 140px;
  margin: 0 auto 32px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  background: var(--primary-light);
}

.hero__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero__tagline {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--on-primary);
  color: var(--on-background);
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.hero__cta svg {
  width: 24px;
  height: 24px;
}

.hero__cta--badge {
  background: none;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

.hero__cta--badge:hover {
  box-shadow: none;
}

.hero__cta--badge img {
  display: block;
  height: 60px;
  width: auto;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  opacity: 0.7;
}

.hero__scroll svg {
  width: 32px;
  height: 32px;
  color: var(--on-primary);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== Features ===== */
.features {
  background: var(--background);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.feature-card {
  background: var(--on-primary);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--on-background);
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--on-surface-variant);
  line-height: 1.5;
}

/* ===== Screenshots ===== */
.screenshots {
  background: var(--surface-variant);
}

.screenshots__row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 20px 0;
  -webkit-overflow-scrolling: touch;
}

.screenshots__row::-webkit-scrollbar {
  display: none;
}

/* Phone Mockup */
.phone-mockup {
  flex: 0 0 260px;
  scroll-snap-align: center;
}

.phone-frame {
  background: #1a1a1a;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #333;
  position: relative;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #1a1a1a;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  background: var(--background);
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  position: relative;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.phone-label {
  text-align: center;
  margin-top: 16px;
  font-weight: 600;
  color: var(--on-surface-variant);
}


/* ===== How It Works ===== */
.how-it-works {
  background: var(--background);
}

.timeline {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  padding-left: 60px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-container);
}

.timeline__step {
  position: relative;
  padding-bottom: 48px;
}

.timeline__step:last-child {
  padding-bottom: 0;
}

.timeline__number {
  position: absolute;
  left: -60px;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  z-index: 1;
}

.timeline__step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  padding-top: 10px;
}

.timeline__step p {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
}

/* ===== Tech Highlights ===== */
.tech-highlights {
  background: var(--surface-variant);
}

.tech-highlights__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.tech-card {
  background: var(--on-primary);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.tech-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.tech-card__icon svg {
  width: 28px;
  height: 28px;
}

.tech-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tech-card p {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
}

/* ===== Download CTA ===== */
.download-cta {
  background: linear-gradient(135deg, #003258 0%, var(--primary) 50%, #07497D 100%);
  color: var(--on-primary);
  text-align: center;
  padding: 80px 20px;
}

.download-cta h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.download-cta p {
  opacity: 0.9;
  margin-bottom: 32px;
  font-size: 1.125rem;
}

.download-cta .hero__cta {
  font-size: 1.0625rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--dark-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 20px 32px;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-primary);
  font-weight: 600;
}

.footer__brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--on-primary);
  text-decoration: none;
}

.footer__copy {
  font-size: 0.8125rem;
  opacity: 0.6;
}

/* ===== Legal Pages ===== */
.legal-page {
  padding-top: calc(var(--header-height) + 32px);
}

.legal-header {
  background: var(--on-primary);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

.legal-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legal-header__back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9375rem;
}

.legal-header__back svg {
  width: 20px;
  height: 20px;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 32px;
  color: var(--on-background);
}

.legal-content h2 {
  font-size: 1.375rem;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--on-background);
}

.legal-content p {
  margin-bottom: 16px;
  color: var(--on-surface-variant);
  line-height: 1.7;
}

.legal-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
  list-style: disc;
}

.legal-content li {
  margin-bottom: 8px;
  color: var(--on-surface-variant);
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--on-primary);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav__links--open {
    right: 0;
  }

  .nav__links a {
    color: var(--on-background) !important;
    font-size: 1.0625rem;
  }

  .nav__links a::after {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero__tagline {
    font-size: 1.0625rem;
  }

  .hero__icon {
    width: 110px;
    height: 110px;
  }

  .section {
    padding: 56px 0;
  }

  .section__title {
    font-size: 1.625rem;
  }
}

@media (min-width: 768px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tech-highlights__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .screenshots__row {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
  }

  .phone-mockup {
    flex: 0 0 auto;
  }

  .timeline {
    padding-left: 80px;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .screenshots__row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
  }

  .phone-mockup {
    flex: auto;
  }

  .download-cta h2 {
    font-size: 2.5rem;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 40px;
  }
}
