:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --surface-soft: #f8f2ec;
  --text: #2f2f2f;
  --muted: #646464;
  --accent: #6a4b3f;
  --accent-soft: #d8c6bd;
  --border: rgba(106, 75, 63, 0.15);
  --shadow: 0 24px 60px rgba(39, 35, 33, 0.08);
  --radius: 28px;
  --max-width: 1080px;
}

[data-theme="dark"] {
  --bg: #111214;
  --surface: #1d1f22;
  --surface-soft: #232529;
  --text: #f2f2f2;
  --muted: #b0b3b8;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top, rgba(106, 75, 63, 0.12), transparent 28%), linear-gradient(180deg, var(--bg) 0%, #e8e2dd 100%);
  color: var(--text);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

header {
  padding: 3rem 0 2rem;
  text-align: center;
}

main {
  padding: 2rem 0 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.75rem;
  box-shadow: 0 20px 40px rgba(106, 75, 63, 0.22);
}

.brand-title {
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-subtitle {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.97rem;
}

h1 {
  margin: 0 auto 1rem;
  font-size: clamp(2.5rem, 4.5vw, 3.75rem);
  line-height: 1.03;
  max-width: 840px;
}

.lead {
  margin: 0 auto;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  margin: 2rem auto 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 35px rgba(106, 75, 63, 0.18);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(39, 35, 33, 0.08);
}

.grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(39, 35, 33, 0.12);
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.card h2 {
  font-size: 1.3rem;
}

.card h3 {
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.prayer-text {
  margin-top: 0.75rem;
}

.quote {
  margin-top: 3rem;
  display: grid;
  gap: 1rem;
  padding: 2rem;
  border-left: 4px solid var(--accent);
  background: var(--surface-soft);
  border-radius: 24px;
  color: var(--text);
}

.quote-text {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.7;
}

.quote-ref {
  color: var(--muted);
  font-weight: 600;
}

.stacked-section {
  margin-top: 2.5rem;
}

.section {
  margin-top: 2.5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  color: var(--text);
}

.section-description {
  margin-top: 0.75rem;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.daily-card,
.saint-card {
  display: grid;
  gap: 1rem;
  background: var(--surface);
}

.guide-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.8;
}

  .guide-intro {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
    font-size: 0.95rem;
  }

  .rosary-guide {
    display: grid;
    gap: 1rem;
    padding-top: 1rem;
  }

  .meditation-card {
    display: grid;
    gap: 1.25rem;
  }

  .step-block {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 3rem 1fr;
    align-items: flex-start;
  }

  .step-block h3 {
    margin: 0;
  }

  .tip-badge {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
  }

  .guide-list li,
  .mystery-list {
    margin-bottom: 0.65rem;
  }

  .mystery-list {
    padding: 0.9rem 1rem;
    background: var(--surface-soft);
    border-radius: 18px;
    border: 1px solid var(--border);
    color: var(--text);
  }

  .guide-sequence,
  .mystery-names,
  .rosary-daily-mystery,
  .rosary-final,
  .salve-regina,
  .litanie-lauretane,
  .st-michael-prayer {
    margin: 1rem 0 0;
    padding: 0.95rem 1rem;
    background: var(--surface-soft);
    border-radius: 18px;
    border: 1px solid var(--border);
    color: var(--text);
  }

  .guide-sequence li,
  .mystery-names li {
    margin-bottom: 0.65rem;
  }

  .saint-prayer {
    margin: 1rem 0 0;
    color: var(--text);
    font-style: italic;
    line-height: 1.7;
  }

.prayer-block {
  padding: 1rem;
  background: var(--surface-soft);
  border-radius: 18px;
  border: 1px solid var(--border);
}

.prayer-block strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.top-nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.75rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(106, 75, 63, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1rem;
    background: rgba(106, 75, 63, 0.08);
    border-radius: 999px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .top-nav a:hover {
    background: rgba(106, 75, 63, 0.16);
  }
.scripture-card {
  padding: 2rem;
  background: rgba(106, 75, 63, 0.06);
  border-left: 4px solid var(--accent);
}

.scripture-book {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.scripture-text {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.scripture-ref {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.scripture-reflection {
  margin-top: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
}

.donation-card {
  display: grid;
  gap: 1rem;
  background: rgba(106, 75, 63, 0.05);
  padding: 2rem;
  border-radius: var(--radius);
}

.donation-text,
.donation-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.donation-link {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  min-width: 220px;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 16px 38px rgba(106, 75, 63, 0.18);
}

.donation-link:hover {
  transform: translateY(-1px);
}

footer {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  header {
    padding-top: 2rem;
  }

  .brand {
    flex-direction: column;
    gap: 0.65rem;
  }
}

@media (max-width: 480px) {
  .card,
  .quote,
  .daily-card,
  .meditation-card,
  .saint-card,
  .donation-card,
  .scripture-card {
    padding: 1.4rem;
  }

  .hero-actions,
  .top-nav {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .top-nav {
    justify-content: space-around;
    padding: 0.75rem;
  }

  .btn {
    width: 100%;
  }

  .step-block {
    grid-template-columns: 1fr;
  }

  .tip-badge {
    justify-self: start;
  }

  .guide-list {
    padding-left: 1rem;
  }

  .top-nav {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .top-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
