/* 01 Base */
:root {
  --wine-950: #350710;
  --wine-900: #4a0c18;
  --wine-800: #5a0f1d;
  --wine-700: #6c1628;
  --wine-600: #741d30;
  --cream-50: #fdfbf9;
  --cream-100: #fbf9f7;
  --cream-200: #f3eeea;
  --ink: #171717;
  --text: #343434;
  --muted: #6b6460;
  --serif: "Libre Caslon Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --shadow-sm: 0 12px 30px rgba(50, 26, 29, .07);
  --shadow-lg: 0 24px 55px rgba(29, 8, 12, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; overflow-x: hidden; background: var(--cream-50); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.site-container { width: min(100% - 7rem, 1420px); }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 9999; transform: translateY(-140%); padding: .75rem 1rem; border-radius: 4px; background: #fff; color: var(--wine-900); box-shadow: var(--shadow-sm); }
.skip-link:focus { transform: translateY(0); }

/* 02 Typography and controls */
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 400; }
.eyebrow { margin-bottom: .45rem; color: var(--wine-700); font-size: .82rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow-light { color: rgba(255,255,255,.83); }
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: .75rem 1.55rem; border-radius: 7px; font-size: .78rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; transition: transform .35s var(--ease), background-color .35s, border-color .35s, color .35s, box-shadow .35s; }
.btn:hover { transform: translateY(-2px); }
.btn-wine { border: 1px solid var(--wine-800); background: var(--wine-800); color: #fff; }
.btn-wine:hover, .btn-wine:focus { border-color: var(--wine-950); background: var(--wine-950); color: #fff; box-shadow: 0 10px 22px rgba(90,15,29,.2); }
.btn-outline-wine { border: 1px solid var(--wine-700); background: transparent; color: var(--wine-800); }
.btn-outline-wine:hover, .btn-outline-wine:focus { border-color: var(--wine-800); background: var(--wine-800); color: #fff; }
.btn-outline-light-custom { border: 1px solid rgba(255,255,255,.75); color: #fff; }
.btn-outline-light-custom:hover, .btn-outline-light-custom:focus { background: #fff; color: var(--wine-900); }
:focus-visible { outline: 3px solid #b66576 !important; outline-offset: 4px; }

/* 03 Header */
.site-navbar { min-height: 88px; padding: .7rem 0; background: linear-gradient(to bottom, rgba(251,249,247,.98), rgba(251,249,247,.86), transparent); transition: min-height .35s, background-color .35s, box-shadow .35s, backdrop-filter .35s; }
.site-navbar.is-scrolled { min-height: 72px; background: rgba(253,251,249,.96); box-shadow: 0 8px 28px rgba(31,17,18,.08); backdrop-filter: blur(14px); }
.navbar-brand img { width: 204px; height: auto; }
.navbar-nav { gap: 1.7rem; }
.navbar-nav .nav-link { position: relative; padding: .7rem .1rem !important; color: #2a2524; font-size: .75rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.navbar-nav .nav-link::after { position: absolute; right: 50%; bottom: .35rem; left: 50%; height: 1px; content: ""; background: var(--wine-700); transition: left .3s, right .3s; }
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after { right: 0; left: 0; }
.donate-btn { min-height: 44px; padding-inline: 1.4rem; }
.navbar-toggler { width: 48px; height: 44px; display: grid; place-content: center; gap: 5px; border: 0; border-radius: 5px; box-shadow: none !important; }
.navbar-toggler span { width: 24px; height: 2px; display: block; background: var(--wine-800); transition: transform .3s; }

/* 04 Hero */
.hero { min-height: 850px; position: relative; display: flex; align-items: center; overflow: hidden; background: var(--cream-100); }
.hero::after { position: absolute; inset: auto 0 0; height: 120px; z-index: 2; content: ""; background: linear-gradient(to top, var(--cream-100), transparent); pointer-events: none; }
.hero-media { position: absolute; inset: 0 0 0 39%; overflow: hidden; }
.hero-media::before { position: absolute; inset: 0; z-index: 1; content: ""; background: linear-gradient(90deg, var(--cream-100) 0%, rgba(251,249,247,.92) 10%, rgba(251,249,247,.22) 35%, transparent 55%), linear-gradient(0deg, rgba(251,249,247,.38), transparent 30%); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 59% center; filter: saturate(.83) contrast(.96); }
.hero-inner { position: relative; z-index: 3; padding-top: 76px; }
.hero-copy { width: min(590px, 48%); }
.hero h1 { margin-bottom: 1.3rem; font-size: clamp(4.5rem, 6.1vw, 6.8rem); line-height: .91; letter-spacing: -.045em; }
.hero h1 span { display: block; color: var(--wine-800); }
.hero-lead { max-width: 475px; margin-bottom: 2rem; color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-social { display: flex; align-items: center; gap: 1.55rem; margin-top: 3.7rem; color: var(--wine-800); }
.hero-social span { margin-right: .2rem; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.hero-social a { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; transition: color .25s, background .25s, transform .25s; }
.hero-social a:hover { background: var(--wine-800); color: #fff; transform: translateY(-2px); }

/* 05 Teachings */
.teachings-section { position: relative; padding: 4.8rem 0 5.7rem; background: radial-gradient(circle at 52% 18%, #7b2133 0, var(--wine-800) 38%, var(--wine-950) 118%); color: #fff; }
.teaching-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; margin-bottom: 2.2rem; }
.teaching-heading h2 { margin: 0; color: #fff; font-size: 2.8rem; line-height: 1; }
.teaching-heading > div:first-child { position: relative; }
.teaching-heading > div:first-child::after { position: absolute; bottom: .3rem; left: 190px; width: 90px; height: 1px; content: ""; background: rgba(255,255,255,.5); }
.teaching-heading .btn { justify-self: end; }
.teaching-filters { display: flex; gap: 2rem; }
.teaching-filters button { position: relative; padding: .7rem .05rem; border: 0; background: none; color: rgba(255,255,255,.72); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.teaching-filters button::after { position: absolute; right: 50%; bottom: 0; left: 50%; height: 1px; content: ""; background: #fff; transition: left .25s, right .25s; }
.teaching-filters button.active { color: #fff; }
.teaching-filters button.active::after { right: 0; left: 0; }
.teachings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.teaching-card { min-height: 350px; position: relative; overflow: hidden; border-radius: 7px; background: #201214; box-shadow: 0 18px 40px rgba(0,0,0,.18); opacity: 0; transform: translateY(18px); transition: opacity .55s, transform .5s var(--ease), box-shadow .4s; }
.teaching-card.is-visible { opacity: 1; transform: none; }
.teaching-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }
.teaching-card > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .65s var(--ease), filter .5s; }
.teaching-card:hover > img { transform: scale(1.035); filter: saturate(.8); }
.teaching-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17,8,10,.04) 18%, rgba(17,8,10,.9) 100%); }
.teaching-card--audio { background: linear-gradient(135deg, #7a1c30, #450a16); }
.teaching-card--audio .teaching-overlay { background: linear-gradient(180deg, rgba(95,20,35,.15), rgba(33,5,11,.55)); }
.waveform { position: absolute; inset: 30% 8% auto; height: 90px; display: flex; align-items: center; gap: 4px; opacity: .35; }
.waveform i { width: 2px; height: var(--h); flex: 1 1 auto; border-radius: 2px; background: #fff; }
.play-control { width: 54px; height: 54px; position: absolute; z-index: 3; top: 50%; left: 50%; display: grid; place-items: center; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(255,255,255,.17); color: #fff; backdrop-filter: blur(8px); transition: background .25s, transform .25s; }
.play-control:hover, .play-control.is-playing { background: var(--wine-700); transform: translate(-50%,-50%) scale(1.08); }
.teaching-content { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; padding: 1.5rem; }
.teaching-meta { display: flex; justify-content: space-between; margin-bottom: .65rem; color: rgba(255,255,255,.85); font-size: .72rem; letter-spacing: .06em; }
.teaching-meta span:first-child { font-weight: 700; }
.teaching-meta i { margin-right: .4rem; }
.teaching-content h3 { max-width: 315px; margin-bottom: .55rem; color: #fff; font-size: 1.65rem; line-height: 1.1; }
.teaching-content time { color: rgba(255,255,255,.65); font-size: .74rem; }
.filter-empty { padding: 2rem; text-align: center; }

/* 06 Events */
.events-section { padding: 5.8rem 0; background: var(--cream-200); }
.events-layout { display: grid; grid-template-columns: minmax(210px, .78fr) 2.3fr; align-items: center; gap: 4.8rem; }
.section-intro h2 { margin-bottom: .6rem; font-size: 3rem; }
.accent-line { width: 42px; height: 2px; display: block; margin: 1rem 0 1.5rem; background: var(--wine-700); }
.section-intro > p:not(.eyebrow) { max-width: 260px; margin-bottom: 1.8rem; color: var(--muted); }
.events-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.event-card { min-height: 310px; padding: 2rem 1.8rem; border: 1px solid rgba(73,48,50,.08); border-radius: 8px; background: rgba(255,255,255,.76); box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(18px); transition: transform .4s var(--ease), box-shadow .4s, opacity .55s; }
.event-card.is-visible { opacity: 1; transform: none; }
.event-card:hover { transform: translateY(-6px); box-shadow: 0 18px 38px rgba(50,26,29,.11); }
.event-date { display: flex; align-items: center; gap: 1.05rem; margin-bottom: 2.1rem; }
.calendar-icon { width: 62px; height: 62px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--wine-800); color: #fff; font-size: 1.15rem; }
.event-date > div { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: .35rem; }
.day-name { grid-column: 1 / -1; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.event-date strong { color: var(--ink); font-family: var(--serif); font-size: 2.8rem; font-weight: 400; line-height: 1; }
.event-date .month { padding-bottom: .25rem; color: var(--muted); font-size: .68rem; font-weight: 600; }
.event-card h3 { min-height: 2.3rem; margin-bottom: 1.1rem; font-family: var(--sans); font-size: 1.1rem; font-weight: 500; }
.event-card p { display: flex; align-items: center; gap: .65rem; margin-bottom: .42rem; color: var(--muted); font-size: .82rem; }
.event-card p i { width: 15px; color: var(--wine-700); text-align: center; }

/* 07 Weekly activities */
.activities-section { padding: 5rem 0; background: #fff; }
.activities-layout { display: grid; grid-template-columns: 210px 1fr; gap: 2rem; }
.activities-intro { padding-right: 1.6rem; border-right: 1px solid #e5dcda; }
.activities-intro h2 { font-family: var(--sans); font-size: 1.2rem; font-weight: 700; line-height: 1.35; text-transform: uppercase; }
.activities-intro .btn { margin-top: .45rem; line-height: 1.35; }
.activities-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); }
.activity-item { min-width: 0; padding: .25rem 1.5rem; border-right: 1px solid #e5dcda; text-align: center; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s var(--ease); }
.activity-item:last-child { border-right: 0; }
.activity-item.is-visible { opacity: 1; transform: none; }
.activity-icon { height: 48px; display: grid; place-items: center; margin-bottom: 1.05rem; color: var(--wine-700); font-size: 2.45rem; }
.activity-day { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.activity-item h3 { margin: .28rem 0 .2rem; font-family: var(--sans); font-size: .9rem; font-weight: 700; }
.activity-item time { color: var(--ink); font-size: .78rem; }
.activity-item p { margin: .85rem auto 0; color: var(--muted); font-size: .73rem; line-height: 1.55; }

/* 08 Footer */
.site-footer { background: radial-gradient(circle at 60% 20%, #68192a 0, #4b0d19 55%, #32070f 125%); color: rgba(255,255,255,.8); }
.footer-main { display: grid; grid-template-columns: 1.8fr .9fr .95fr 1.65fr; gap: 3.2rem; padding-top: 4.3rem; padding-bottom: 3.7rem; }
.footer-brand { padding-right: 3rem; }
.footer-brand img { width: 200px; margin-bottom: 1.4rem; filter: brightness(0) invert(1); opacity: .92; }
.footer-brand p { max-width: 330px; margin-bottom: 1.5rem; font-size: .9rem; }
.social-links { display: flex; gap: .75rem; }
.social-links a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.23); border-radius: 50%; transition: background .25s, color .25s; }
.social-links a:hover { background: #fff; color: var(--wine-800); }
.footer-column { display: flex; flex-direction: column; gap: .55rem; padding-left: 1.8rem; border-left: 1px solid rgba(255,255,255,.13); }
.footer-column h2 { margin-bottom: .8rem; color: #fff; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.footer-column a { width: fit-content; font-size: .84rem; transition: color .25s; }
.footer-column > a:hover, .footer-contact a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-contact { gap: .9rem; }
.footer-contact p { display: flex; gap: .8rem; margin: 0; font-size: .84rem; }
.footer-contact i { width: 17px; margin-top: .35rem; color: #fff; text-align: center; }
.footer-bottom { padding: 1.05rem; background: rgba(17,14,14,.66); color: rgba(255,255,255,.7); font-size: .74rem; text-align: center; }

/* Interior pages */
.interior-main { padding-top: 88px; }
.interior-hero { padding: 8rem 0 6rem; background: linear-gradient(105deg, var(--cream-100), var(--cream-200)); }
.interior-hero h1 { margin-bottom: 1rem; font-size: clamp(4rem, 8vw, 7rem); color: var(--wine-800); }
.interior-hero p:last-child { max-width: 670px; color: var(--muted); font-size: 1.15rem; }
.interior-content { padding: 5rem 0; background: #fff; }
.interior-card { max-width: 760px; padding: 3rem; border-left: 1px solid #dfd2ce; }
.interior-card h2 { font-size: 2.4rem; }
.interior-card p { margin-bottom: 1.8rem; color: var(--muted); }

/* 09 Animations */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* 10 Responsive */
@media (max-width: 1199.98px) {
  .site-container { width: min(100% - 3.5rem, 1120px); }
  .site-navbar, .site-navbar.is-scrolled { min-height: 76px; background: rgba(253,251,249,.97); box-shadow: 0 7px 24px rgba(31,17,18,.07); }
  .navbar-brand img { width: 184px; }
  .navbar-collapse { max-height: calc(100vh - 76px); overflow-y: auto; margin: .75rem -1.75rem -1rem; padding: 1.3rem 1.75rem 1.6rem; background: var(--cream-50); box-shadow: 0 18px 26px rgba(35,17,19,.08); }
  .navbar-nav { gap: .15rem; }
  .navbar-nav .nav-link { padding: .8rem 0 !important; }
  .navbar-nav .nav-link::after { display: none; }
  .donate-btn { width: 100%; margin-top: .75rem; }
  .hero { min-height: 760px; }
  .hero-media { left: 34%; }
  .hero h1 { font-size: clamp(4.2rem, 7.5vw, 5.8rem); }
  .events-layout { gap: 2.4rem; }
  .event-card { padding: 1.6rem 1.35rem; }
  .calendar-icon { width: 54px; height: 54px; }
  .activities-layout { grid-template-columns: 180px 1fr; }
  .activity-item { padding-inline: .8rem; }
}

@media (max-width: 991.98px) {
  .site-navbar, .site-navbar.is-scrolled { min-height: 76px; background: rgba(253,251,249,.97); box-shadow: 0 7px 24px rgba(31,17,18,.07); }
  .site-container { width: min(100% - 2.5rem, 900px); }
  .navbar-brand img { width: 184px; }
  .navbar-collapse { max-height: calc(100vh - 76px); overflow-y: auto; margin: .75rem -1.25rem -1rem; padding: 1.3rem 1.25rem 1.6rem; background: var(--cream-50); box-shadow: 0 18px 26px rgba(35,17,19,.08); }
  .navbar-nav { gap: .15rem; }
  .navbar-nav .nav-link { padding: .8rem 0 !important; }
  .navbar-nav .nav-link::after { display: none; }
  .donate-btn { width: 100%; margin-top: .75rem; }
  .hero { min-height: auto; display: block; padding-top: 76px; }
  .hero-media { height: 560px; position: relative; inset: auto; }
  .hero-media::before { background: linear-gradient(0deg, var(--cream-100) 0%, rgba(251,249,247,.45) 25%, transparent 52%); }
  .hero-media img { object-position: 66% center; }
  .hero-inner { margin-top: -125px; padding: 0 0 5.5rem; }
  .hero-copy { width: 100%; max-width: 610px; }
  .hero h1 { font-size: clamp(4rem, 11vw, 6.2rem); }
  .teaching-heading { grid-template-columns: 1fr auto; row-gap: 1.4rem; }
  .teaching-filters { grid-column: 1 / -1; grid-row: 2; }
  .teachings-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .teaching-card:last-child { grid-column: 1 / -1; }
  .events-layout { grid-template-columns: 1fr; }
  .section-intro > p:not(.eyebrow) { max-width: 480px; }
  .activities-layout { grid-template-columns: 1fr; }
  .activities-intro { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-right: 0; border-right: 0; }
  .activities-intro .accent-line { display: none; }
  .activities-intro h2 { margin: 0; }
  .activities-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
  .activity-item { min-height: 245px; padding: 1.6rem 1.1rem; border: 1px solid #e8deda; border-radius: 7px; }
  .activity-item:last-child { border-right: 1px solid #e8deda; }
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,1fr); padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.13); border-left: 0; }
  .footer-contact h2 { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  .site-container { width: min(100% - 2rem, 680px); }
  .hero-media { height: 470px; }
  .hero-inner { margin-top: -75px; }
  .hero h1 { font-size: clamp(3.45rem, 15vw, 5.6rem); }
  .hero-lead { font-size: 1rem; }
  .teaching-heading { display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; }
  .teaching-heading > div:first-child::after { display: none; }
  .teaching-filters { width: 100%; order: 3; overflow-x: auto; }
  .teachings-grid { grid-template-columns: 1fr; }
  .teaching-card, .teaching-card:last-child { min-height: 335px; grid-column: auto; }
  .events-grid { grid-template-columns: 1fr; }
  .event-card { min-height: auto; }
  .activities-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-main { grid-template-columns: repeat(2,1fr); gap: 2.5rem 1.5rem; }
  .footer-brand { grid-column: 1 / -1; padding-right: 0; }
  .footer-column { padding-left: 0; border-left: 0; }
  .footer-contact { display: flex; grid-column: 1 / -1; padding-top: 2rem; }
}

@media (max-width: 479.98px) {
  .site-container { width: calc(100% - 1.5rem); }
  .navbar-brand img { width: 166px; }
  .hero-media { height: 400px; }
  .hero-media::before { background: linear-gradient(0deg, var(--cream-100) 0%, rgba(251,249,247,.78) 22%, transparent 52%); }
  .hero-media img { object-position: 70% center; }
  .hero-inner { margin-top: -45px; padding-bottom: 4rem; }
  .hero-copy .eyebrow { font-size: .72rem; }
  .hero h1 { margin-bottom: 1rem; font-size: clamp(3.2rem, 17vw, 4.6rem); }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-social { gap: 1.05rem; margin-top: 2.6rem; }
  .hero-social span { margin-right: 0; }
  .teachings-section, .events-section, .activities-section { padding-block: 4rem; }
  .teaching-heading h2, .section-intro h2 { font-size: 2.45rem; }
  .teaching-heading .btn { padding-inline: 1rem; }
  .teaching-filters { gap: 1.45rem; }
  .activities-intro { display: block; }
  .activities-intro .btn { width: 100%; margin-top: 1rem; }
  .activities-grid { grid-template-columns: 1fr; }
  .activity-item { min-height: auto; text-align: left; }
  .activity-icon { height: auto; display: block; margin-bottom: .8rem; font-size: 2rem; }
  .activity-item p { margin-left: 0; }
  .footer-main { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .footer-brand, .footer-column, .footer-contact { grid-column: auto; }
  .footer-contact { border-top: 1px solid rgba(255,255,255,.13); }
  .interior-hero { padding: 5.5rem 0 4rem; }
  .interior-card { padding: 2rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal, .teaching-card, .event-card, .activity-item { opacity: 1; transform: none; }
}
