/* ===============================================================
   DOZMI · The Revival Center — "Regal Sanctuary" custom styles
   Complements Tailwind. Uses the palette defined in tw-config.js.
   =============================================================== */

:root {
  --primary: #6B1D1D;
  --primary-container: #4A1212;
  --primary-hi: #A81D1D;
  --on-primary: #F8F1E5;
  --secondary: #B08D57;
  --secondary-container: #D4AF37;
  --on-secondary: #1A100F;
  --background: #FDFCF9;
  --surface-low: #F7F3EA;
  --surface-container: #F2EEE5;
  --surface-variant: #F2E8DA;
  --surface-highest: #E6E2D9;
  --on-surface: #1F1A17;
  --on-surface-variant: #5A403E;
  --outline: #85736C;
  --outline-variant: #E2BEBA;
}

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--on-surface);
  font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography accents ----------
   Editorial pairing sourced from stitch/home_page_desktop_1:
   Noto Serif headlines for traditional authority,
   Work Sans body/labels for clean modern legibility.
   ----------------------------------------- */
.font-headline {
  font-family: 'Noto Serif', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.01em;
  font-feature-settings: "kern" 1, "liga" 1;
}
.font-body     { font-family: 'Work Sans', system-ui, sans-serif; }
.font-label    { font-family: 'Work Sans', system-ui, sans-serif; }

.text-shadow-regal { text-shadow: 0 2px 12px rgba(0,0,0,0.45); }

/* ---------- Signature gradients ---------- */
.velvet-gradient {
  background: linear-gradient(135deg, #6B1D1D 0%, #A81D1D 100%);
}
.gold-shimmer {
  background: linear-gradient(135deg, #B08D57 0%, #D4AF37 50%, #B08D57 100%);
}
.parchment-gradient {
  background:
    radial-gradient(ellipse at top left, rgba(176,141,87,0.08), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(107,29,29,0.06), transparent 55%),
    #FDFCF9;
}
.sanctuary-overlay {
  background: linear-gradient(180deg, rgba(26,16,15,0.25) 0%, rgba(26,16,15,0.55) 55%, rgba(74,18,18,0.82) 100%);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(74, 18, 18, 0.92);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid rgba(176, 141, 87, 0.18);
  transition: background .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  background: rgba(74, 18, 18, 0.97);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.site-header.is-solid {
  background: #4A1212;
}
.header-logo {
  height: 48px;
  width: auto;
}
.nav-link {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: rgba(248, 241, 229, 0.7);
  transition: color .25s;
  position: relative;
  padding-bottom: 4px;
}
.nav-link:hover { color: var(--secondary-container); }
.nav-link.is-active {
  color: var(--secondary-container);
  font-weight: 700;
}
.nav-link.is-active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--secondary-container);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn-regal {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 0.95rem 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #6B1D1D, #A81D1D);
  color: #F8F1E5;
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 14px; font-weight: 500; text-transform: none;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 30px rgba(107,29,29,0.28);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn-regal:hover { filter: brightness(1.08); transform: translateY(-2px); }

.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #B08D57 0%, #D4AF37 50%, #B08D57 100%);
  color: #1A100F;
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(176,141,87,0.28);
  transition: filter .2s, transform .2s;
}
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 0.95rem 2rem;
  border-radius: 0.5rem;
  background: transparent;
  border: 2px solid rgba(107,29,29,0.22);
  color: var(--primary);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0.01em;
  transition: background .2s, border-color .2s;
}
.btn-ghost:hover { background: rgba(107,29,29,0.05); border-color: rgba(107,29,29,0.42); }

.btn-ghost-light {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 0.95rem 2rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(248,241,229,0.4);
  color: #F8F1E5;
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0.01em;
  transition: background .2s;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.18); }

/* ---------- Overline / Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  color: var(--secondary);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
}
.eyebrow::before {
  content: ""; width: 42px; height: 1px; background: currentColor;
}

/* ---------- Hero next-event bar ---------- */
.hero-event-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(26,16,15,0) 0%, rgba(26,16,15,0.55) 35%, rgba(26,16,15,0.82) 100%);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  border-top: 1px solid rgba(176,141,87,0.28);
}
.hero-event-bar-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: #F8F1E5;
}
.hero-event-date {
  flex-shrink: 0;
  width: 78px; height: 78px;
  background: linear-gradient(135deg, #6B1D1D, #A81D1D);
  border-radius: 16px;
  border: 2px solid rgba(212,175,55,0.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 18px 32px rgba(0,0,0,0.35);
  line-height: 1;
}
.hero-event-date .d {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 900;
  color: #D4AF37;
}
.hero-event-date .m {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #F8F1E5;
  margin-top: 4px;
}
.hero-event-body {
  flex: 1;
  min-width: 0;
}
.hero-event-label {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #D4AF37;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-event-label::before {
  content: "";
  width: 22px; height: 1px; background: currentColor;
}
.hero-event-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #F8F1E5;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-event-meta {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 13px;
  font-style: italic;
  color: rgba(248,241,229,0.72);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.hero-event-meta span {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.hero-event-meta .material-symbols-outlined {
  font-size: 16px;
  color: #B08D57;
}
.hero-event-cta {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(212,175,55,0.45);
  color: #F8F1E5;
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  backdrop-filter: blur(10px);
}
.hero-event-cta:hover {
  background: rgba(212,175,55,0.18);
  border-color: rgba(212,175,55,0.9);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .hero-event-bar-inner {
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem 1.5rem;
    gap: 1rem;
  }
  .hero-event-date { width: 64px; height: 64px; }
  .hero-event-date .d { font-size: 24px; }
  .hero-event-title { font-size: 1.1rem; white-space: normal; }
  .hero-event-cta { width: 100%; justify-content: center; }
}

/* ---------- Hero calendar widget ---------- */
.calendar-card {
  background: linear-gradient(165deg, rgba(253,252,249,0.96) 0%, rgba(247,243,234,0.95) 100%);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid rgba(176,141,87,0.28);
  border-radius: 1.8rem;
  box-shadow:
    0 40px 80px rgba(26,16,15,0.42),
    0 0 0 1px rgba(248,241,229,0.06) inset;
  overflow: hidden;
}
.calendar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem 1.75rem;
  border-bottom: 1px solid rgba(176,141,87,0.18);
}
.calendar-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.calendar-nav-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(107,29,29,0.18);
  color: var(--primary);
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background .2s, transform .2s;
  font-size: 20px;
}
.calendar-nav-btn:hover { background: var(--primary); color: var(--on-primary); transform: scale(1.06); }

.cal-grid { padding: 1.25rem 1.75rem 1.75rem 1.75rem; }
.cal-dow-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 9px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--secondary);
  margin-bottom: .6rem;
  text-align: center;
}
.cal-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: .3rem;
}
.cal-day {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--on-surface);
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  user-select: none;
}
.cal-day:hover {
  background: rgba(176,141,87,0.14);
  color: var(--primary);
}
.cal-day.is-outside { color: rgba(31,26,23,0.22); cursor: default; }
.cal-day.is-outside:hover { background: transparent; color: rgba(31,26,23,0.22); }
.cal-day.is-today {
  background: rgba(107,29,29,0.07);
  color: var(--primary);
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(107,29,29,0.2) inset;
}
.cal-day.is-selected {
  background: linear-gradient(135deg, #6B1D1D, #A81D1D);
  color: var(--on-primary);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(107,29,29,0.35);
  transform: translateY(-1px);
}
.cal-day.has-event::after {
  content: "";
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px;
  background: var(--secondary-container);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(212,175,55,0.25);
}
.cal-day.is-selected.has-event::after { background: #FFE088; }

.calendar-event-pane {
  padding: 1.1rem 1.75rem 1.6rem 1.75rem;
  background: linear-gradient(180deg, rgba(107,29,29,0.03), rgba(107,29,29,0.06));
  border-top: 1px solid rgba(176,141,87,0.18);
}
.cal-pane-label {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.25em;
  color: var(--secondary);
  margin-bottom: .3rem;
}
.cal-event-item {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(176,141,87,0.18);
}
.cal-event-item:last-child { border-bottom: 0; }
.cal-event-bullet {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6B1D1D, #A81D1D);
  color: #F8F1E5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
}
.cal-event-bullet .d { font-size: 15px; font-weight: 800; color: var(--secondary-container); }
.cal-event-bullet .m { font-size: 8px; font-weight: 700; letter-spacing: 0.12em; margin-top: 2px; }
.cal-event-meta h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 14px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.cal-event-meta p {
  font-size: 12px;
  font-style: italic;
  color: var(--on-surface-variant);
  margin-top: 2px;
}
.cal-empty {
  padding: 1rem 0;
  font-size: 13px;
  font-style: italic;
  color: var(--on-surface-variant);
}

/* ---------- Event card (grid) ---------- */
.event-card {
  background: #FDFCF9;
  border-radius: 1.6rem;
  overflow: hidden;
  border: 1px solid rgba(176,141,87,0.18);
  box-shadow: 0 12px 36px rgba(28,28,23,0.07);
  transition: transform .35s, box-shadow .35s;
}
.event-card:hover { transform: translateY(-6px); box-shadow: 0 26px 48px rgba(74,18,18,0.16); }
.event-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.event-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s;
}
.event-card:hover .thumb img { transform: scale(1.06); }
.event-card .date-chip {
  position: absolute; top: 1rem; left: 1rem;
  background: linear-gradient(135deg, #6B1D1D, #A81D1D);
  color: #F8F1E5;
  padding: .75rem 1rem;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 12px 22px rgba(107,29,29,0.35);
  line-height: 1.1;
}
.date-chip .d {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 800;
  color: var(--secondary-container);
  display: block;
}
.date-chip .m {
  font-family: 'Work Sans', sans-serif;
  font-size: 9px; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.18em;
  display: block;
  margin-top: 2px;
}

/* ---------- Ministry tile ---------- */
.ministry-tile {
  position: relative;
  overflow: hidden;
  border-radius: 1.4rem;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(28,28,23,0.1);
}
.ministry-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s;
}
.ministry-tile:hover img { transform: scale(1.08); }
.ministry-tile .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,16,15,0) 40%, rgba(26,16,15,0.92) 100%);
}
.ministry-tile .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2rem 1.75rem;
  color: #F8F1E5;
}
.ministry-tile .caption h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ministry-tile .caption p {
  font-size: 13px;
  font-style: italic;
  color: rgba(248,241,229,0.75);
  margin-top: .4rem;
  opacity: 0; max-height: 0;
  transition: opacity .4s, max-height .4s;
}
.ministry-tile:hover .caption p {
  opacity: 1; max-height: 120px;
}

/* ---------- Section titles ---------- */
.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.015em;
  color: var(--primary);
  line-height: 1.1;
}
.divider-gold {
  width: 80px; height: 2px; background: var(--secondary);
  border-radius: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #4A1212;
  color: rgba(248,241,229,0.8);
  border-top: 6px solid var(--secondary-container);
}
.site-footer a { color: rgba(248,241,229,0.7); transition: color .2s; }
.site-footer a:hover { color: var(--secondary-container); }

/* ---------- Utility animations ---------- */
@keyframes fadeUp { from { opacity:0; transform: translateY(20px);} to { opacity:1; transform:none; } }
.fade-up { animation: fadeUp .8s ease both; }
.fade-up.delay-1 { animation-delay: .1s; }
.fade-up.delay-2 { animation-delay: .2s; }
.fade-up.delay-3 { animation-delay: .35s; }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0;
  background: rgba(74,18,18,0.96);
  backdrop-filter: blur(18px);
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #F8F1E5;
  font-size: 1.8rem;
  text-transform: none;
  letter-spacing: -0.01em;
  font-weight: 700;
  padding: .5rem 0;
}
.mobile-menu a:hover { color: var(--secondary-container); }
.mobile-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  color: #F8F1E5;
  font-size: 30px; cursor: pointer;
  background: transparent; border: none;
}

@media (max-width: 1023px) {
  .desktop-nav { display: none !important; }
}
@media (min-width: 1024px) {
  .mobile-toggle { display: none !important; }
}
