/* ============================================
   CardioLog – Static Website Styles
   Apple-Style: Clean, minimal, lots of whitespace
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #1d1d1f;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #0071e3;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #0077ed;
  text-decoration: underline;
}

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

/* --- Container --- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.3px;
}

.nav-logo:hover {
  text-decoration: none;
  color: #1d1d1f;
}

.nav-logo span {
  color: #e34040;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: #6e6e73;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #1d1d1f;
  text-decoration: none;
}

.nav-links a.active {
  color: #1d1d1f;
  font-weight: 500;
}

/* Language Switcher */
.lang-switch {
  display: flex;
  align-items: center;
}

.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  background: #f5f5f7;
  border: 1px solid #d2d2d7;
  border-radius: 6px;
  padding: 4px 24px 4px 8px;
  font-size: 13px;
  font-family: inherit;
  color: #1d1d1f;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236e6e73'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color 0.2s;
}

.lang-switch select:hover {
  border-color: #0071e3;
}

.lang-switch select:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.15);
}

/* Legal Notice Banner */
.legal-notice {
  background: #f5f5f7;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: #6e6e73;
  margin-bottom: 24px;
  text-align: center;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1d1d1f;
  margin: 4px 0;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 100px 24px 80px;
  background: linear-gradient(180deg, #f5f5f7 0%, #fff 100%);
}

.hero h1 {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #1d1d1f;
  margin-bottom: 16px;
}

.hero h1 span {
  background: linear-gradient(90deg, #e34040, #0071e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 21px;
  color: #6e6e73;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

.app-store-badge {
  display: inline-block;
  transition: opacity 0.2s;
}

.app-store-badge:hover {
  opacity: 0.85;
}

.app-store-badge img {
  height: 54px;
}

/* Fallback badge (wenn kein Bild) */
.badge-fallback {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1d1d1f;
  color: #fff;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s;
}

.badge-fallback:hover {
  background: #333;
  color: #fff;
  text-decoration: none;
}

.badge-fallback .badge-icon {
  font-size: 24px;
}

/* --- Features --- */
.features {
  padding: 80px 24px;
}

.features h2 {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  color: #1d1d1f;
}

.features .subtitle {
  text-align: center;
  font-size: 19px;
  color: #6e6e73;
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

/* Flip-Card Container */
.feature-card {
  perspective: 1000px;
  height: 280px;
  cursor: pointer;
}

.feature-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.feature-card.flipped .feature-card-inner {
  transform: rotateY(180deg);
}

/* Gemeinsame Seiten-Styles */
.feature-front,
.feature-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
}

/* Vorderseite */
.feature-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background: #f5f5f7;
  transition: box-shadow 0.2s;
}

.feature-card:hover .feature-front {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  font-size: 44px;
  margin-bottom: 20px;
  display: block;
}

.feature-front h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1d1d1f;
}

.feature-front p {
  font-size: 15px;
  color: #6e6e73;
  line-height: 1.5;
}

.flip-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #aeaeb2;
  letter-spacing: 0.3px;
}

/* Rueckseite */
.feature-back {
  transform: rotateY(180deg);
  background: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.feature-back img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Platzhalter wenn noch kein Screenshot */
.screenshot-placeholder {
  color: #86868b;
  font-size: 14px;
  text-align: center;
  line-height: 1.5;
}

.screenshot-placeholder span {
  display: block;
  font-size: 40px;
  margin-bottom: 12px;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: pointer;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-height: 85vh;
  max-width: 90vw;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active img {
  transform: scale(1);
}

/* --- CTA Section --- */
.cta {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(180deg, #fff 0%, #f5f5f7 100%);
}

.cta h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1d1d1f;
}

.cta p {
  font-size: 19px;
  color: #6e6e73;
  margin-bottom: 32px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #6e6e73;
  font-size: 13px;
}

.footer-links a:hover {
  color: #1d1d1f;
  text-decoration: none;
}

.footer p {
  color: #86868b;
  font-size: 13px;
}

.footer-disclaimer {
  max-width: 600px;
  margin: 0 auto 12px;
  font-size: 11px;
  color: #aeaeb2;
  line-height: 1.5;
  font-style: italic;
}

/* --- Page Content (Datenschutz, Impressum, Kontakt) --- */
.page-header {
  text-align: center;
  padding: 80px 24px 40px;
  background: #f5f5f7;
}

.page-header h1 {
  font-size: 40px;
  font-weight: 700;
  color: #1d1d1f;
}

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
  color: #1d1d1f;
}

.page-content h3 {
  font-size: 19px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.page-content p {
  margin-bottom: 16px;
  color: #424245;
  line-height: 1.7;
}

.page-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
  color: #424245;
}

.page-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* --- Contact Form --- */
.contact-form {
  max-width: 540px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1f;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  background: #fff;
  color: #1d1d1f;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  color: #fff;
  background: #0071e3;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: #0077ed;
  color: #fff;
  text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero {
    padding: 60px 20px 50px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 18px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .features h2,
  .cta h2 {
    font-size: 28px;
  }

  .page-header h1 {
    font-size: 30px;
  }

  /* Mobile Nav */
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

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

  .nav-links a {
    font-size: 16px;
  }

  .lang-switch {
    padding-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .lang-switch select {
    width: 100%;
    padding: 8px 28px 8px 12px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .feature-card {
    height: 240px;
  }
}
