/* ===================================================
   Klinikheld App Landing Page – Styles
   Brand: #0D3B66 (dark), #0066cc (primary), #00a85a (green)
   =================================================== */

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  background: #e8edf2;
  color: #1e293b;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Hero ──────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0d3b66 0%, #0066cc 60%, #004fa3 100%);
  padding: 60px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.04) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.logo-badge {
  display: inline-block;
  max-width: 240px;
  margin-bottom: 28px;
}

.logo-badge img {
  width: 100%;
  height: auto;
  display: block;
}

.hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 12px;
}

.hero-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin-bottom: 28px;
}

/* ─── CTA Buttons ───────────────────────────────── */
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #0d3b66;
  padding: 15px 36px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.2px;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ─── Main Content ──────────────────────────────── */
.main-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ─── QR Section ────────────────────────────────── */
.qr-section {
  margin-top: -32px;
  position: relative;
  z-index: 2;
}

.qr-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.qr-frame {
  display: inline-block;
  padding: 14px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
}

.qr-frame img {
  display: block;
  width: 180px;
  height: 180px;
}

.qr-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
}

/* ─── Features ──────────────────────────────────── */
.features-section {
  margin-top: 48px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #0d3b66;
  text-align: center;
  margin-bottom: 24px;
}

.features-grid {
  display: grid;
  gap: 16px;
}

.feature-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon--blue {
  background: #dbeafe;
  color: #0066cc;
}

.feature-icon--green {
  background: #d1fae5;
  color: #059669;
}

.feature-icon--amber {
  background: #fef3c7;
  color: #d97706;
}

.feature-icon--red {
  background: #fee2e2;
  color: #dc2626;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

/* ─── Install Instructions ──────────────────────── */
.install-section {
  margin-top: 48px;
}

.install-grid {
  display: grid;
  gap: 16px;
}

.install-card {
  padding: 24px;
  border-radius: 16px;
  border-left: 4px solid transparent;
}

.install-card--android {
  background: #fef9ee;
  border-left-color: #f59e0b;
}

.install-card--ios {
  background: #eef6ff;
  border-left-color: #0066cc;
}

.install-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.install-card-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.install-card--android .install-card-header {
  color: #92400e;
}

.install-card--ios .install-card-header {
  color: #1e3a8a;
}

.install-card ol {
  margin-left: 20px;
  line-height: 1.8;
}

.install-card--android ol {
  color: #78350f;
}

.install-card--ios ol {
  color: #1e40af;
}

.install-card li {
  margin-bottom: 6px;
}

.install-card a {
  color: inherit;
  font-weight: 600;
}

/* On mobile: only show instructions matching user's device */
@media (max-width: 767px) {
  .install-card--android,
  .install-card--ios {
    display: none;
  }

  .install-card.is-device {
    display: block;
  }

  /* If no device detected (desktop browser on phone?), show both */
  .install-card--android:only-child,
  .install-card--ios:only-child {
    display: block;
  }
}

/* Highlight the matching card with a subtle glow */
.install-card.is-device {
  box-shadow: 0 2px 16px rgba(0, 102, 204, 0.1);
}

/* ─── Footer ────────────────────────────────────── */
.footer {
  background: #0d3b66;
  padding: 32px 24px;
  margin-top: 48px;
}

.footer-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-copyright {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ─── Legal Pages ───────────────────────────────── */
.legal-page {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.legal-page h1 {
  color: #1e293b;
  margin-bottom: 24px;
}

.legal-page h2 {
  color: #0066cc;
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 24px;
}

.legal-page p {
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-page ul,
.legal-page ol {
  color: #64748b;
  margin-left: 24px;
  margin-bottom: 16px;
}

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

.back-link {
  display: inline-block;
  margin-top: 32px;
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    padding: 44px 20px 44px;
  }

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

  .hero-subtitle {
    font-size: 15px;
  }

  .logo-badge {
    max-width: 180px;
  }

  .qr-frame img {
    width: 150px;
    height: 150px;
  }

  .feature-card {
    padding: 20px;
  }

  .legal-page {
    margin: 20px;
    padding: 24px;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 72px 32px 64px;
  }

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

  .hero-subtitle {
    font-size: 19px;
  }

  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }

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

  .install-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* On desktop show both install instructions */
  .install-card--android,
  .install-card--ios {
    display: block !important;
  }
}
