@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Sans+3:wght@400;600&display=swap');

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

:root {
  --bg: #faf9f6;
  --bg-card: #f5f2ec;
  --text: #2c2c2c;
  --text-secondary: #6b6b6b;
  --text-dim: #9a9a9a;
  --gold: #b8860b;
  --gold-light: #d4a843;
  --burgundy: #6b1c23;
  --divider: #d4c5a0;
  --border: #e0d8c8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.85rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--burgundy);
}

::selection {
  background: var(--gold);
  color: #fff;
}

/* ── Paper texture overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo svg { width: 26px; height: 26px; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-header nav a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}
.site-header nav a:hover {
  color: var(--gold);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text);
}
.menu-toggle svg { width: 24px; height: 24px; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 9rem 1.5rem 5rem;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.hero-cross {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: block;
  opacity: 0.7;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-nav a {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--gold);
  color: var(--gold);
  transition: background 0.2s, color 0.2s;
}
.hero-nav a:hover {
  background: var(--gold);
  color: #fff;
  text-decoration: none;
}

/* ── Gold divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--divider), transparent);
  margin: 3rem auto;
  max-width: 400px;
}

.divider-ornament {
  text-align: center;
  margin: 3rem 0;
  color: var(--divider);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
}

/* ── Section headers ── */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* ── Cards grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: var(--divider);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

.card h3 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}
.card-link:hover { color: var(--burgundy); }

/* ── Quote block ── */
.quote-section {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.quote-mark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 4rem;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
  display: block;
  margin-bottom: -1rem;
}

.quote-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}

.quote-attr {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ── Posts list ── */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-item {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.3s;
}
.post-item:hover {
  border-color: var(--divider);
}

.post-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.post-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* ── Content pages ── */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
}

.page-content > h1:first-child {
  margin-top: 0;
  text-align: center;
}

.page-intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 3rem;
}

/* ── Prayer blocks ── */
.prayer {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.prayer:last-child {
  border-bottom: none;
}

.prayer h2 {
  margin-top: 0;
  color: var(--burgundy);
}

.prayer-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.9;
  white-space: pre-line;
}

.prayer-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 1rem;
}

.drop-cap::first-letter {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.2rem;
  font-weight: 700;
  float: left;
  line-height: 0.8;
  padding: 0.1em 0.15em 0 0;
  color: var(--gold);
}

/* ── Saint cards ── */
.saint {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.saint:last-child { border-bottom: none; }

.saint-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.saint-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.saint-meta h2 {
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.saint-dates {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.saint-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin: 1.5rem 0;
}

/* ── Calendar tables ── */
.cal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.cal-table th {
  text-align: left;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 0.75rem;
  border-bottom: 2px solid var(--divider);
  color: var(--burgundy);
}

.cal-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.cal-table tr:hover td {
  background: rgba(180, 134, 11, 0.03);
}

.cal-date {
  font-weight: 600;
  white-space: nowrap;
  color: var(--gold);
}

/* ── Table scroll wrapper (mobile) ── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
}

/* ── Basics page ── */
.basics-section {
  margin-bottom: 3rem;
}

.basics-section h2 {
  color: var(--burgundy);
  margin-top: 0;
}

.basics-list {
  list-style: none;
  padding: 0;
}

.basics-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.basics-list li:last-child { border-bottom: none; }

.basics-list strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── 404 page ── */
.not-found {
  max-width: 600px;
  margin: 0 auto;
  padding: 10rem 1.5rem 4rem;
  text-align: center;
}

.not-found-cross {
  font-size: 4rem;
  color: var(--gold);
  opacity: 0.5;
  margin-bottom: 1.5rem;
  display: block;
}

.not-found h1 {
  font-size: 5rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.not-found .nf-message {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.not-found .nf-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.not-found .nf-back {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--gold);
  color: var(--gold);
  transition: background 0.2s, color 0.2s;
}
.not-found .nf-back:hover {
  background: var(--gold);
  color: #fff;
  text-decoration: none;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
  .site-header nav.open { display: flex; }
  .menu-toggle { display: block; }

  .hero { padding: 7rem 1.25rem 3rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero .subtitle { font-size: 1.05rem; }

  .cards-grid { grid-template-columns: 1fr; }
  .section { padding: 0 1.25rem 3rem; }
  .page-content { padding: 6rem 1.25rem 3rem; }

  .saint-header { flex-direction: column; gap: 0.5rem; }

  .not-found { padding: 7rem 1.25rem 3rem; }
  .not-found h1 { font-size: 3.5rem; }
}
