/**
 * dieAbnehmstation — Shared Styles
 * Requires: tokens.css (loaded before this file)
 *
 * Contains: Reset, Typography, Utility, Buttons, Header, Footer,
 * Mobile Nav, Scroll Animations, Print Styles
 */

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--p-text-primary);
  background: var(--p-warm-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--p-sky);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--p-forest);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-h1); font-weight: var(--weight-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--text-h2); font-weight: var(--weight-h2); }
h3 { font-size: var(--text-h3); font-weight: var(--weight-h3); }
h4 { font-size: var(--text-h4); font-weight: var(--weight-h4); }

p {
  color: var(--p-text-secondary);
  font-size: var(--text-body);
}

/* ========================================
   UTILITY
   ======================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

.section-padding {
  padding: var(--space-3xl) 0;
}

@media (min-width: 768px) {
  .section-padding { padding: var(--space-4xl) 0; }
}

@media (min-width: 1024px) {
  .section-padding { padding: 7rem 0; }
}

.text-center { text-align: center; }

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--p-sky);
  background: linear-gradient(135deg, rgba(75, 159, 213, 0.08), rgba(61, 155, 79, 0.06));
  border: 1px solid rgba(75, 159, 213, 0.12);
  padding: 0.4rem 1.15rem;
  border-radius: 2rem;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  max-width: 640px;
  margin: var(--space-md) auto 0;
  color: var(--p-text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
}

/* ========================================
   SECTION DIVIDERS
   ======================================== */
.section-divider {
  height: 2px;
  border: none;
  background: linear-gradient(90deg, transparent 0%, var(--p-emerald) 20%, var(--p-sky) 50%, var(--p-emerald) 80%, transparent 100%);
  opacity: 0.25;
  margin: 0;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: 3rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: 3rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--p-sky) 0%, var(--p-emerald) 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(75, 159, 213, 0.3), 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(75, 159, 213, 0.4), 0 0 20px rgba(75,159,213,0.15);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: 3rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  background: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: #FFFFFF;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  line-height: 1.4;
  background: transparent;
  color: #FFFFFF;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

.btn-sm {
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
}

/* ========================================
   SKIP LINK
   ======================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--p-sky);
  color: #FFFFFF;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   HEADER / NAV
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .header-inner { padding: 0 2rem; }
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-logo img {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
}

.header-nav {
  display: none;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
  }

  .header-nav a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .site-header.scrolled .header-nav a {
    color: var(--p-text-secondary);
  }

  .header-nav a:hover {
    color: #FFFFFF;
  }

  .site-header.scrolled .header-nav a:hover {
    color: var(--p-sky);
  }
}

.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .header-cta {
    display: inline-flex;
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
  }

  .header-cta.btn-primary {
    background: linear-gradient(135deg, var(--p-sky) 0%, var(--p-emerald) 100%);
    box-shadow: var(--shadow-glow-blue);
  }

  .header-cta.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(75, 159, 213, 0.35), 0 0 16px rgba(75, 159, 213, 0.15);
  }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

@media (min-width: 768px) {
  .hamburger { display: none; }
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled .hamburger span {
  background: var(--p-forest);
}

/* Mobile Nav Overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #FFFFFF;
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--p-forest);
}

.mobile-nav-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--p-forest);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: #F5F2ED;
  color: #1A1A1A;
  padding: 3.5rem 0 0;
  border-top: 2px solid;
  border-image: linear-gradient(to right, #3D9B4F, #4B9FD5) 1;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  border-bottom: 1px solid rgba(26,77,46,0.1);
}

@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .footer-inner { padding: 0 2rem 2rem; }
}

.footer-brand img {
  height: 32px;
  width: auto;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-sm);
}

.footer-brand p {
  color: #4A5568;
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.7;
}

.footer-phone {
  margin-top: var(--space-sm);
}

.footer-phone a {
  color: #1A4D2E;
  font-family: var(--font-display);
  font-weight: 600;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-phone a:hover {
  color: #3D9B4F;
}

.footer-links h4,
.footer-legal h4 {
  color: #1A4D2E;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.footer-links a,
.footer-legal a {
  display: block;
  color: #1A4D2E;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover,
.footer-legal a:hover {
  color: #3D9B4F;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

@media (min-width: 768px) {
  .footer-bottom { padding: 1.5rem 2rem; }
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #4A5568;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .site-header,
  .mobile-nav,
  .hero-shape,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    background: none !important;
    min-height: auto;
    padding: 2rem 0;
  }

  .hero h1,
  .hero .hero-sub {
    color: black;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .site-footer {
    background: none;
    color: black;
    border-top: 2px solid #ccc;
  }
}
