/* =========================================================== */
/* Title: styles.css                                            */
/* Version: 2.3.0                                               */
/* Folder: CR-Media-QR-Code/assets/css/                         */
/* =========================================================== */

/* ===== THEME ===== */

:root {
  --bg: #f4f8fc;
  --card-bg: #ffffff;
  --text-primary: #1b2a4a;
  --text-secondary: #4a5e80;
  --text-muted: #8899b3;
  --border: #e2e8f0;
  --divider: #e2e8f0;
  --shadow-sm: rgba(27, 42, 74, 0.06);
  --shadow-lg: rgba(27, 42, 74, 0.10);
  --shadow-icon: rgba(27, 42, 74, 0.25);
  --icon-gradient-start: #1b2a4a;
  --icon-gradient-end: #2a3f6e;
  --qr-frame-border: #e2e8f0;
  --qr-dark: #1b2a4a;
  --qr-light: #ffffff;
  --theme-btn-bg: rgba(27, 42, 74, 0.06);
  --theme-btn-hover: rgba(27, 42, 74, 0.12);
  --theme-btn-icon: #4a5e80;
  --meta-color: #1b2a4a;
}

html[data-theme="dark"] {
  --bg: #0f1724;
  --card-bg: #1a2538;
  --text-primary: #e8edf5;
  --text-secondary: #a0b0c8;
  --text-muted: #5e7290;
  --border: #2a3a54;
  --divider: #2a3a54;
  --shadow-sm: rgba(0, 0, 0, 0.15);
  --shadow-lg: rgba(0, 0, 0, 0.3);
  --shadow-icon: rgba(0, 0, 0, 0.4);
  --icon-gradient-start: #2a3f6e;
  --icon-gradient-end: #1b2a4a;
  --qr-frame-border: #2a3a54;
  --qr-dark: #e8edf5;
  --qr-light: #1a2538;
  --theme-btn-bg: rgba(255, 255, 255, 0.06);
  --theme-btn-hover: rgba(255, 255, 255, 0.12);
  --theme-btn-icon: #a0b0c8;
  --meta-color: #0f1724;
}


/* ===== RESET & BASE ===== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}


/* ===== THEME TOGGLE ===== */

.theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 13px;
  background: var(--theme-btn-bg);
  color: var(--theme-btn-icon);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  background: var(--theme-btn-hover);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

html[data-theme="light"] .icon-moon,
html[data-theme="dark"] .icon-sun {
  display: block;
}

html[data-theme="light"] .icon-sun,
html[data-theme="dark"] .icon-moon {
  display: none;
}


/* ===== LAYOUT ===== */

.page-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem 0.5rem;
}

.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 2.25rem 2.5rem 1.5rem;
  text-align: center;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 1px 3px var(--shadow-sm), 0 8px 32px var(--shadow-lg);
  animation: cardIn 0.5s ease-out both;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ===== BRANDING ===== */

.brand-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 4px 14px var(--shadow-icon);
}


/* ===== TYPOGRAPHY ===== */

.church-name {
  margin-bottom: 0.3rem;
  color: #c5a059;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.app-title {
  margin-bottom: 0.65rem;
  color: var(--text-primary);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  transition: color 0.25s ease;
}

.app-description {
  max-width: 360px;
  margin: 0 auto 1.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  transition: color 0.25s ease;
}


/* ===== DOWNLOAD BUTTON ===== */

.download-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #c5a059 0%, #b08d42 100%);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(197, 160, 89, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(197, 160, 89, 0.45);
}

.download-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3);
}

.download-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: #ffffff;
}

.download-btn-coming-soon,
.download-btn-coming-soon:hover,
.download-btn-coming-soon:active {
  background: linear-gradient(135deg, #8899b3 0%, #6d7f99 100%);
  box-shadow: 0 2px 8px rgba(136, 153, 179, 0.25);
  cursor: default;
  pointer-events: none;
  transform: none;
}


/* ===== DIVIDER ===== */

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
  transition: background 0.25s ease;
}

.divider span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: color 0.25s ease;
}


/* ===== QR CODE ===== */

.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.qr-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.25s ease;
}

.qr-frame {
  display: inline-block;
  padding: 12px;
  line-height: 0;
  background: var(--card-bg);
  border: 2px solid var(--qr-frame-border);
  border-radius: 12px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

#qrcode {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.15s ease;
}

#qrcode.qr-fading {
  opacity: 0;
}

/* qrcode.js creates both canvas and image; use the image */
#qrcode canvas {
  display: none !important;
}

#qrcode img {
  display: block !important;
  border-radius: 4px;
}

.qr-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: color 0.25s ease;
}


/* ===== DEVICE VISIBILITY ===== */

.download-action {
  display: block;
}

.scan-action {
  display: none;
}

@media (min-width: 769px) {
  .download-action {
    display: none;
  }

  .scan-action {
    display: flex;
  }
}


/* ===== FOOTER ===== */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  transition: color 0.25s ease;
}

.site-footer a {
  color: #c5a059;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: #b08d42;
}

.footer-rights,
.footer-url {
  display: inline;
}


/* ===== ACCESSIBILITY ===== */

.theme-toggle:focus-visible,
.download-btn:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid #c5a059;
  outline-offset: 3px;
}


/* ===== MOBILE ===== */

@media (max-width: 768px) {
  .page-wrapper {
    padding: 0.75rem 1rem 0.35rem;
  }

  .card {
    padding: 1.5rem 1.5rem 1.25rem;
  }

  .brand-logo {
    width: 68px;
    height: 68px;
    margin-bottom: 1rem;
    border-radius: 16px;
  }

  /* Church name: two lines on mobile */
  .church-name {
    white-space: pre-line;
  }

  .app-title {
    margin-bottom: 0.45rem;
    font-size: 1.4rem;
  }

  /* Description: line break before second sentence on mobile */
  .app-description {
    margin-bottom: 1.35rem;
    font-size: 0.9rem;
    white-space: pre-line;
  }

  .download-btn {
    padding: 0.85rem 1.75rem;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .theme-toggle svg {
    width: 20px;
    height: 20px;
  }

  .footer-rights,
  .footer-url {
    display: block;
  }
}


/* ===== EXTRA SMALL PHONES ===== */

@media (max-width: 380px) {
  .page-wrapper {
    padding: 0.5rem 0.75rem 0.25rem;
  }

  .card {
    padding: 1.25rem 1.25rem 1rem;
  }

  .app-title {
    font-size: 1.3rem;
  }

  .brand-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 0.85rem;
    border-radius: 14px;
  }

  .app-description {
    margin-bottom: 1.15rem;
    font-size: 0.85rem;
  }

  .download-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }
}


/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ===== SAFE AREA ===== */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}
/* =========================================================== */
/* End of File: styles.css                                      */
/* Version: 2.3.0                                               */
/* Folder: CR-Media-QR-Code/assets/css/                         */
/* =========================================================== */