/* ============================================
   LifeRosary — Premium Website Styles
   ============================================ */

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

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

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* --- Variables --- */
:root {
  --bg: #F3F2ED;
  --surface: #FFFFFF;
  --surface-secondary: #F5F4F0;
  --text: #1A1A18;
  --text-2: #6B6B65;
  --text-3: #9E9E96;
  --gold: #C4A96A;
  --gold-light: #F5E6C8;
  --gold-dark: #8B7355;
  --gold-subtle: rgba(196,169,106,0.06);
  --border: #E8E6E0;
  --divider: #F0EEE8;

  --mystery-joyful: #7BA38E;
  --mystery-luminous: #C4A96A;
  --mystery-sorrowful: #8B6B7B;
  --mystery-glorious: #6B8BAB;

  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px;
  --sp-lg: 24px; --sp-xl: 32px; --sp-xxl: 48px; --sp-3xl: 64px; --sp-4xl: 96px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 32px; --r-full: 9999px;

  --font-display: 'Josefin Sans', Georgia, serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F0E;
    --surface: #1A1A18;
    --surface-secondary: #242422;
    --text: #F0EEE8;
    --text-2: #C0C0B8;
    --text-3: #9E9E96;
    --border: #2A2A28;
    --divider: #1F1F1D;
    --gold-subtle: rgba(196,169,106,0.08);
  }
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.container--narrow { max-width: 720px; }

.section { padding: var(--sp-4xl) 0; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(243,242,237,0.9);
}

@media (prefers-color-scheme: dark) {
  .nav { background: rgba(15,15,14,0.9); }
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
}

.nav__logo svg, .nav__logo img {
  width: 36px; height: 36px;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
}

.nav__links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  opacity: 1;
  color: var(--gold);
}

.nav__links a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Language switcher */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 6px 28px 6px 12px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239E9E96' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.2s;
}

.lang-select:hover {
  border-color: var(--gold);
}

.lang-select:focus {
  outline: none;
  border-color: var(--gold);
}

.lang-select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-sm);
  color: var(--text);
}

.nav__burger svg { width: 24px; height: 24px; }

.nav__burger:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.nav__logo img { border-radius: var(--r-sm); }

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--sp-xxl) var(--sp-lg);
    gap: var(--sp-xl);
    background: var(--bg);
    z-index: 99;
  }
  .nav__links.open { display: flex; }
  .nav__links a { font-size: 1.125rem; opacity: 1; }
  .nav__burger { display: block; }
}

/* ===== HERO ===== */
.hero {
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--bg) 30%, transparent 70%);
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    opacity: 0.08;
  }
  .hero::after {
    background: linear-gradient(135deg, var(--bg) 40%, rgba(15,15,14,0.6) 100%);
  }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-lg);
  width: 100%;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-xxl);
    padding-top: var(--sp-xxl);
    padding-bottom: var(--sp-xxl);
  }
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.hero__badge-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 6px 16px;
  background: var(--gold-subtle);
  border: 1px solid rgba(196,169,106,0.15);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-dark);
  width: fit-content;
}

@media (max-width: 768px) {
  .hero__badge-label { margin: 0 auto; }
}

@media (prefers-color-scheme: dark) {
  .hero__badge-label { color: var(--gold); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero__title strong {
  font-weight: 600;
  color: var(--gold);
}

@media (max-width: 768px) {
  .hero__title { font-size: 2.5rem; }
}

.hero__desc {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 480px;
}

@media (max-width: 768px) {
  .hero__desc { max-width: 100%; }
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.hero__stores {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero__stores { justify-content: center; }
}

.store-badge {
  display: inline-block;
  height: 48px;
  transition: transform 0.2s;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.store-badge:hover { transform: translateY(-2px); }

.store-badge--soon {
  opacity: 0.45;
  cursor: default;
  pointer-events: auto;
}

.store-badge--soon:hover {
  transform: none;
  opacity: 0.55;
}

.store-badge img,
.store-badge svg {
  height: 40px;
  width: auto;
}

.store-badge--lg img,
.store-badge--lg svg { height: 54px; }

.hero__note {
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* Hero visual — phone mockup */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero__phone {
  width: 280px;
  border-radius: 36px;
  overflow: hidden;
  border: 8px solid var(--text);
  box-shadow:
    0 24px 64px rgba(26,26,24,0.15),
    0 8px 24px rgba(26,26,24,0.08);
  position: relative;
  z-index: 2;
}

@media (prefers-color-scheme: dark) {
  .hero__phone {
    border-color: #3A3A35;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  }
}

.hero__phone img {
  width: 100%;
  display: block;
  border-radius: 28px;
}

.hero__phone-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
  opacity: 0.4;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero__phone-glow { opacity: 0.15; }
}

@media (max-width: 768px) {
  .hero__phone { width: 220px; }
  .hero__visual { order: -1; }
}

/* ===== FEATURES ===== */
.features { background: var(--surface-secondary); }

.features__header {
  text-align: center;
  margin-bottom: var(--sp-3xl);
}

.features__header h2 {
  font-size: 2rem;
  margin-bottom: var(--sp-sm);
}

.features__header p {
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
  font-size: 1.0625rem;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

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

@media (min-width: 1024px) {
  .features__grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,26,24,0.08);
}

@media (prefers-color-scheme: dark) {
  .feature-card:hover { box-shadow: none; }
}

.feature-card__icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--gold-subtle), rgba(196,169,106,0.12));
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-md);
}

.feature-card__icon svg {
  width: 24px; height: 24px;
  stroke: var(--gold);
  stroke-width: 1.5;
  fill: none;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--sp-sm);
}

.feature-card p {
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ===== SCREENSHOTS ===== */
.screenshots { overflow: hidden; }

.screenshots__header {
  text-align: center;
  margin-bottom: var(--sp-3xl);
}

.screenshots__header h2 {
  font-size: 2rem;
  margin-bottom: var(--sp-sm);
}

.screenshots__header p { color: var(--text-2); font-size: 1.0625rem; }

.screenshots__row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--sp-xl);
}

.phone-frame {
  flex-shrink: 0;
  width: 240px;
  border-radius: 36px;
  overflow: hidden;
  border: 6px solid var(--text);
  background: var(--text);
  transition: transform 0.3s;
}

@media (prefers-color-scheme: dark) {
  .phone-frame { border-color: #3A3A35; }
}

.phone-frame img {
  width: 100%;
  display: block;
  border-radius: 30px;
}

.phone-frame--left { transform: rotate(-5deg) translateY(20px); }
.phone-frame--right { transform: rotate(5deg) translateY(20px); }
.phone-frame--center { transform: scale(1.05); z-index: 2; box-shadow: 0 20px 60px rgba(26,26,24,0.15); }

@media (max-width: 768px) {
  .screenshots__row {
    overflow-x: auto;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--sp-lg);
  }
  .phone-frame { scroll-snap-align: center; width: 200px; }
  .phone-frame--left, .phone-frame--right { transform: none; }
  .phone-frame--center { transform: none; box-shadow: none; }
}

/* ===== MYSTERIES ===== */
.mysteries { background: var(--surface-secondary); }

.mysteries__header {
  text-align: center;
  margin-bottom: var(--sp-3xl);
}

.mysteries__header h2 { font-size: 2rem; margin-bottom: var(--sp-sm); }
.mysteries__header p { color: var(--text-2); font-size: 1.0625rem; }

.mysteries__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

@media (min-width: 640px) { .mysteries__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .mysteries__grid { grid-template-columns: repeat(4, 1fr); } }

.mystery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform 0.25s;
}

.mystery-card:hover { transform: translateY(-4px); }

.mystery-card__image { width: 100%; height: 200px; object-fit: cover; }

.mystery-card__accent { height: 3px; width: 100%; }

.mystery-card__body { padding: var(--sp-md) var(--sp-lg); }

.mystery-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  margin-bottom: 2px;
}

.mystery-card__days { font-size: 0.8125rem; color: var(--text-2); }

.mystery-card--joyful .mystery-card__accent { background: var(--mystery-joyful); }
.mystery-card--joyful .mystery-card__name { color: var(--mystery-joyful); }
.mystery-card--luminous .mystery-card__accent { background: var(--mystery-luminous); }
.mystery-card--luminous .mystery-card__name { color: var(--mystery-luminous); }
.mystery-card--sorrowful .mystery-card__accent { background: var(--mystery-sorrowful); }
.mystery-card--sorrowful .mystery-card__name { color: var(--mystery-sorrowful); }
.mystery-card--glorious .mystery-card__accent { background: var(--mystery-glorious); }
.mystery-card--glorious .mystery-card__name { color: var(--mystery-glorious); }

/* ===== DOWNLOAD CTA ===== */
.download-cta {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(196,169,106,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.download-cta__quote {
  max-width: 560px;
  margin: 0 auto var(--sp-xxl);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-2);
  position: relative;
}

.download-cta__attribution {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--gold);
  margin-top: var(--sp-sm);
  font-size: 0.875rem;
}

.download-cta h2 {
  font-size: 2rem;
  margin-bottom: var(--sp-lg);
  position: relative;
}

.download-cta__badges {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-lg);
  position: relative;
}

.download-cta__note {
  color: var(--text-3);
  font-size: 0.875rem;
  position: relative;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--sp-xxl) 0 var(--sp-lg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xxl);
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
}

.footer__col h3 {
  font-size: 1rem;
  margin-bottom: var(--sp-md);
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer__col a {
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.2s;
}

.footer__col a:hover { color: var(--gold); }

.footer__col p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-lg);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-sm);
}

.footer__bottom p {
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ===== PROSE (Privacy, Terms, Support) ===== */
.prose {
  padding-top: calc(var(--nav-h) + var(--sp-xxl));
  padding-bottom: var(--sp-3xl);
}

.prose h1 { font-size: 2rem; margin-bottom: var(--sp-sm); }

.prose .last-updated {
  color: var(--text-3);
  font-size: 0.875rem;
  margin-bottom: var(--sp-xxl);
}

.prose h2 {
  font-size: 1.375rem;
  margin-top: var(--sp-xxl);
  margin-bottom: var(--sp-md);
}

.prose p {
  color: var(--text-2);
  margin-bottom: var(--sp-md);
  line-height: 1.75;
}

.prose .tldr-box {
  background: var(--gold-subtle);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-sm);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.prose .tldr-box p { color: var(--text); font-weight: 600; margin: 0; }

.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* Support page */
.support-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xxl);
}

@media (min-width: 640px) { .support-cards { grid-template-columns: repeat(2, 1fr); } }

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  text-align: center;
}

.support-card h3 { margin-bottom: var(--sp-md); }
.support-card a { color: var(--gold); font-size: 1.125rem; font-weight: 600; }
.support-card p { color: var(--text-2); font-size: 0.875rem; margin-top: var(--sp-sm); line-height: 1.6; }

/* FAQ */
.faq { max-width: 640px; margin: 0 auto; }
.faq h2 { text-align: center; margin-bottom: var(--sp-xl); }

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-md);
  overflow: hidden;
}

.faq summary {
  padding: var(--sp-md) var(--sp-lg);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--sp-md);
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.25rem; color: var(--gold); flex-shrink: 0; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { padding: 0 var(--sp-lg) var(--sp-md); color: var(--text-2); font-size: 0.875rem; line-height: 1.6; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.sr-only:focus {
  position: fixed;
  top: var(--sp-sm); left: var(--sp-sm);
  width: auto; height: auto;
  padding: var(--sp-sm) var(--sp-md);
  margin: 0; overflow: visible;
  clip: auto;
  background: var(--gold);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--r-sm);
  z-index: 200;
}
