/* Homepage: light, media-led layout modelled on Elevation Church's welcome page —
   inset hero with caption bar + pill actions, dot pager, centered sections. */
.madison-home{--home-bg:var(--brand-bg,#fff);--home-ink:var(--brand-text,#1d1a21);--home-muted:var(--brand-muted,#6b6570);--home-line:var(--brand-line,#e6e2ea);--home-soft:var(--brand-surface,#f6f4f8);--home-accent:var(--brand-primary,#241236);--home-gold:var(--brand-accent-ink,#b8902e);--home-gutter:36px;background:var(--home-bg);color:var(--home-ink);font-family:var(--brand-font-body,"DM Sans",Raleway,Arial,sans-serif)}
.madison-home .site-shell{background:var(--home-bg);overflow:clip}

/* Hero: inset media card. */
.madison-home .hero{margin:0 var(--home-gutter);margin-top:0;height:min(calc(100svh - 190px),52vw);min-height:460px;max-height:none;background:#111;overflow:hidden;border-radius:0 0 18px 18px;isolation:isolate}
.madison-home .hero::before,.madison-home .hero-slide:after{display:none}
.madison-home .hero-slide::before{z-index:1;background:linear-gradient(0deg,#000000f5 0%,#000000c7 14%,#00000080 28%,#00000026 42%,transparent 54%)}
.madison-home .hero-slide:not(.hero-slide--video){background:var(--slide-image) center/cover no-repeat}
/* Tablet / mobile crops made in Admin → Homepage → Crop (falls back to the larger crop, then the photo).
   Portrait only: a phone or tablet held sideways shows the 16:9 desktop crop. */
@media (max-width:1199px) and (orientation:portrait){.madison-home .hero-slide:not(.hero-slide--video){background-image:var(--slide-crop-md,var(--slide-image))}}
@media (max-width:767px) and (orientation:portrait){.madison-home .hero-slide:not(.hero-slide--video){background-image:var(--slide-crop-sm,var(--slide-crop-md,var(--slide-image)))}}
.madison-home .hero-slide{align-items:end;place-items:unset}
.madison-home .hero-overlay{display:none}
.madison-home .hero-content{position:absolute;left:0;right:0;bottom:0;width:auto;max-width:none;margin:0;padding:0 15% 42px;display:flex;align-items:center;justify-content:space-between;gap:32px;text-align:left;opacity:1;transform:none}
.madison-home .hero-copy{max-width:58%}
.madison-home .hero h1{font-size:clamp(24px,2.1vw,32px);line-height:1.2;font-weight:700;letter-spacing:-.2px;text-transform:none;text-shadow:none}
.madison-home .hero p{margin:6px 0 0;font-size:clamp(15px,1.2vw,19px);line-height:1.4;font-weight:400;color:#ffffffe6;text-shadow:none}
.madison-home .hero-actions{margin:0;flex-wrap:nowrap;gap:18px;flex-shrink:0}
.madison-home .hero-actions .button{min-width:0;width:clamp(170px,17vw,246px);min-height:46px;padding:0 22px;border-radius:12px;font-size:17px;font-weight:600;letter-spacing:.3px;text-transform:none;box-shadow:none;gap:10px;white-space:nowrap}
.madison-home .hero-actions .button::before{display:none}
.madison-home .hero-actions .button:hover{transform:none}
.madison-home .hero-actions .button-outline{background:var(--brand-bg,#fff);color:#111;border:0}
.madison-home .hero-actions .button-outline:hover{background:#ececec}
.madison-home .hero-actions .button-gold{background:#ffffff38;color:#fff;border:0;backdrop-filter:blur(10px)}
.madison-home .hero-actions .button-gold:hover{background:#ffffff52}
.button-chevron{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.madison-home .slider-arrow{--arrow-shift:0px;top:50%;bottom:auto;transform:translate(var(--arrow-shift),-50%);width:56px;height:56px;min-height:56px;display:grid;place-items:center;border:1px solid #ffffff2e;border-radius:50%;background:color-mix(in srgb,var(--brand-dark,#14091f) 65.1%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:#fff;padding:0;font-size:0;z-index:6;opacity:0;visibility:hidden;box-shadow:0 8px 24px #0000004d;transition:opacity .28s ease,transform .28s cubic-bezier(.22,1,.36,1),visibility .28s,background .2s,border-color .2s}
.madison-home .slider-arrow-left{--arrow-shift:-10px}.madison-home .slider-arrow-right{--arrow-shift:10px}
.madison-home .hero:hover .slider-arrow,.madison-home .hero.is-touched .slider-arrow{--arrow-shift:0px;opacity:1;visibility:visible}
.madison-home .hero:has(:focus-visible) .slider-arrow{--arrow-shift:0px;opacity:1;visibility:visible}
.madison-home .slider-arrow:hover{background:color-mix(in srgb,var(--brand-primary,#241236) 90.2%,transparent);border-color:color-mix(in srgb,var(--brand-accent,#d9b24c) 60%,transparent)}
.madison-home .slider-arrow:active{transform:translate(0,-50%) scale(.92)}
.madison-home .slider-arrow:focus-visible{outline:3px solid var(--brand-accent,#d9b24c);outline-offset:3px}
/* Touch screens: a tap leaves :hover stuck, so there the arrows follow .is-touched (assets/home.js) instead. */
@media(hover:none){.madison-home .hero:hover:not(.is-touched) .slider-arrow{opacity:0;visibility:hidden}}
.madison-home .slider-arrow svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.madison-home .slider-arrow-left{left:28px;right:auto}
.madison-home .slider-arrow-right{right:28px;left:auto}
.madison-home .hero-pause{top:20px;right:20px;bottom:auto;left:auto;min-height:36px;padding:6px 14px;font-size:12px;font-weight:600;border:0;background:#0000006b;backdrop-filter:blur(8px)}
.madison-home .slide-count,.madison-home .scroll-down{display:none}

/* Dot pager under the hero. */
.hero-dots{display:flex;justify-content:center;align-items:center;gap:6px;padding:14px 0 0}
.hero-dot{width:24px;height:24px;padding:0;border:0;background:none;cursor:pointer;display:grid;place-items:center}
.hero-dot::before{content:"";width:9px;height:9px;border-radius:9px;background:#c4c0c8;transition:width .25s,background .25s}
.hero-dot.is-active::before{width:20px;background:var(--home-ink)}
.hero-dot:hover::before{background:#8c8792}
.hero-dot.is-active:hover::before{background:var(--home-ink)}

/* Sections. */
.madison-home .promo{background:var(--home-bg);color:var(--home-ink);padding:78px 0 40px}
.home-section-heading{max-width:820px;margin:0 auto 48px;text-align:center;padding:0 24px}
.home-eyebrow{display:block;color:var(--home-gold);font-size:12px;font-weight:700;letter-spacing:2px;text-transform:uppercase;margin-bottom:14px}
.madison-home .home-section-heading h2{font-family:inherit;font-size:clamp(30px,3vw,44px);letter-spacing:-.4px;line-height:1.15;color:var(--home-ink);margin:0 0 18px;font-weight:600;text-transform:none}
.madison-home .home-section-heading p{color:var(--home-muted);font-size:clamp(17px,1.4vw,22px);line-height:1.5;font-weight:400;margin:0}
.home-pathways{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;width:min(1200px,calc(100% - 2*var(--home-gutter)));margin:auto}
.home-pathways article{padding:32px;display:flex;flex-direction:column;align-items:start;background:var(--home-soft);border-radius:16px;border:1px solid var(--home-line);transition:border-color .2s,transform .2s}
.home-pathways article:hover{border-color:var(--brand-line,#cfc8d6);transform:translateY(-2px)}
.path-icon{font-size:13px;font-weight:700;color:var(--home-accent);background:var(--brand-bg,#fff);border:1px solid var(--home-line);border-radius:50%;width:42px;height:42px;display:grid;place-items:center;margin-bottom:22px}
.home-pathways h3{font-size:23px;font-weight:600;letter-spacing:-.3px;margin:0 0 12px;color:var(--home-ink)}
.madison-home .home-pathways p{color:var(--home-muted);font-size:16px;line-height:1.7;margin:0 0 12px}
.home-times strong{color:var(--home-ink);font-weight:600}
.home-pathways a{margin-top:auto;padding-top:18px;min-height:44px;display:inline-flex;align-items:center;font-weight:600;font-size:15px;color:var(--home-ink)}
.home-pathways a span{margin-left:10px;color:var(--home-gold)}
.home-pathways a:hover{text-decoration:underline;text-underline-offset:4px}
.home-discover{padding-top:56px;margin-bottom:36px}
.madison-home .tile-grid{background:var(--home-bg);grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;padding:0 max(var(--home-gutter),calc((100% - 1200px*var(--brand-width,1))/2)) 96px}
.madison-home .feature-tile{height:auto;border-radius:16px;overflow:hidden;background:var(--home-soft);border:1px solid var(--home-line);box-shadow:none;transition:transform .2s,box-shadow .2s}
.madison-home .feature-tile a{height:auto;display:block;color:var(--home-ink)}
.madison-home .feature-tile img{height:auto;aspect-ratio:16/9;object-fit:cover;filter:none;transform:none}
.madison-home .feature-tile a::before,.madison-home .feature-tile a::after,.madison-home .feature-tile span::before,.madison-home .feature-tile span::after{display:none}
.madison-home .feature-tile span{position:static;display:flex;align-items:center;justify-content:space-between;padding:20px 24px;margin:0;font-size:20px;font-weight:600;color:var(--home-ink);text-transform:none;letter-spacing:-.2px;transform:none;text-shadow:none;opacity:1}
.madison-home .feature-tile b{font-size:22px;font-weight:400;color:var(--home-gold);margin-left:16px}
.madison-home .feature-tile:hover{transform:translateY(-3px);box-shadow:0 14px 34px color-mix(in srgb,var(--brand-text,#1d1a21) 7.8%,transparent)}
.madison-home .feature-tile:hover img{transform:none;filter:none}
.madison-home .site-footer{background:var(--home-accent);border-top:0}
.madison-home .to-top{background:var(--home-ink);color:#fff}

@media(max-width:1180px){.madison-home .hero-content{padding:0 8% 36px}}
@media(max-width:980px){
.madison-home{--home-gutter:20px}
.madison-home .hero{height:auto;min-height:0;aspect-ratio:4/5;max-height:calc(100svh - 150px)}
.madison-home .hero-content{display:block;padding:0 24px 28px}
.madison-home .hero-copy{max-width:100%}
.madison-home .hero-actions{display:flex;flex-direction:row;align-items:stretch;margin-top:18px;gap:10px}
.madison-home .hero-actions .button{flex:1;width:auto;font-size:15px;padding:0 14px}
.madison-home .hero-slide::before{background:linear-gradient(0deg,#000000f7 0%,#000000cc 26%,#00000073 46%,transparent 66%)}
.madison-home .slider-arrow{top:40%;width:44px;height:44px;min-height:44px}
.madison-home .slider-arrow-left{left:14px}.madison-home .slider-arrow-right{right:14px}
.home-pathways{grid-template-columns:minmax(0,1fr);gap:16px}
.home-pathways article{padding:26px}
.madison-home .tile-grid{grid-template-columns:1fr;gap:20px;padding-bottom:64px}
}
/* Phones and small tablets held sideways: a full-width 16:9 hero. No max-height here: aspect-ratio carries a max-height
   over to the width, which is what shrank the old 4:5 hero to a narrow strip in landscape Safari. */
@media(max-width:980px) and (orientation:landscape){
.madison-home .hero{aspect-ratio:16/9;width:auto;height:auto;max-height:none}
.madison-home .hero-content{display:flex;align-items:flex-end;gap:16px;padding:0 20px 18px}
.madison-home .hero h1{font-size:22px}
.madison-home .hero p{font-size:14px;margin-top:4px}
.madison-home .hero-actions{margin-top:0;flex:none}
.madison-home .hero-actions .button{min-height:40px;font-size:14px}
.madison-home .hero-pause{top:12px;right:12px}
}
@media(max-width:620px){
.madison-home .hero{margin:0 12px;border-radius:0 0 14px 14px}
.madison-home .hero h1{font-size:24px}
.madison-home .hero p{font-size:15px}
.madison-home .promo{padding:52px 0 24px}
.home-section-heading{margin-bottom:28px}
.madison-home .feature-tile span{font-size:18px;padding:18px 20px}
}

/* ---------- Interactive homepage pieces (assets/home.js) ---------- */
/* Autoplay progress on the active dot. */
.hero-dot{position:relative}
.hero-dot.is-active::after{content:"";position:absolute;left:2px;top:50%;width:20px;height:9px;margin-top:-4.5px;border-radius:9px;background:var(--home-gold);transform-origin:left;transform:scaleX(0);opacity:0}
.hero.is-autoplaying~.hero-dots .hero-dot.is-active::after{opacity:1;animation:dotFill 6.5s linear forwards}
@keyframes dotFill{to{transform:scaleX(1)}}

/* Next gathering card. */
.next-up{display:grid;grid-template-columns:minmax(0,1.2fr) auto minmax(0,1.3fr);align-items:center;gap:32px;width:min(1200px,calc(100% - 2*var(--home-gutter)));margin:36px auto 0;padding:26px 32px;background:var(--brand-bg,#fff);border:1px solid var(--home-line);border-radius:20px;box-shadow:0 12px 36px color-mix(in srgb,var(--brand-text,#1d1a21) 5.1%,transparent)}
.next-up[hidden]{display:none}
.next-up-label{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:1.6px;text-transform:uppercase;color:var(--home-gold)}
.next-up-dot{width:8px;height:8px;border-radius:50%;background:currentColor}
.next-up h2{margin:8px 0 4px;font-family:inherit;font-size:26px;font-weight:700;letter-spacing:-.4px;text-transform:none;color:var(--home-ink)}
.next-up p{margin:0;color:var(--home-muted);font-size:16px}
.next-up-clock{display:flex;gap:10px}
.next-up-clock[hidden]{display:none}
.next-up-clock div{min-width:66px;padding:10px 8px;border-radius:12px;background:var(--home-soft);text-align:center}
.next-up-clock b{display:block;font-size:26px;font-weight:700;line-height:1.1;font-variant-numeric:tabular-nums;color:var(--home-ink)}
.next-up-clock span{font-size:11px;font-weight:600;letter-spacing:.8px;text-transform:uppercase;color:var(--home-muted)}
.next-up-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
.next-up.is-live{grid-template-columns:minmax(0,1fr) auto;border-color:#d42f2f55;box-shadow:0 12px 36px #d42f2f1f}
.next-up.is-live .next-up-actions{grid-column:auto}
.next-up.is-live .next-up-label{color:#d42f2f}
.next-up.is-live .next-up-dot{animation:livePulse 1.4s ease-out infinite}
@keyframes livePulse{0%{box-shadow:0 0 0 0 #d42f2f88}100%{box-shadow:0 0 0 10px #d42f2f00}}
.pill-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border-radius:12px;border:0;background:var(--home-ink);color:#fff;font:inherit;font-size:15px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s,transform .2s}
.pill-button:hover{background:#3a3540}
.pill-button:active{transform:scale(.97)}
.pill-button[hidden]{display:none}
.pill-button svg,.event-card-ics svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pill-button--ghost{background:var(--home-soft);color:var(--home-ink);border:1px solid var(--home-line)}
.pill-button--ghost:hover{background:#ece8f0}
.pill-button--live{background:#d42f2f}.pill-button--live:hover{background:#b82222}
[data-ics-start].is-added{background:#1f7a4d;color:#fff}

/* Events rail. */
.events-rail{width:min(1200px,calc(100% - 2*var(--home-gutter)));margin:0 auto;padding:72px 0 8px}
.events-rail-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:26px}
.events-rail-head .home-eyebrow{margin-bottom:10px}
.events-rail-head h2{margin:0;font-family:inherit;font-size:clamp(26px,2.6vw,36px);font-weight:600;letter-spacing:-.4px;text-transform:none;color:var(--home-ink)}
.events-rail-nav{display:flex;align-items:center;gap:10px}
.events-rail-all{margin-right:8px;white-space:nowrap;font-weight:600;font-size:15px;color:var(--home-ink);text-decoration:underline;text-underline-offset:4px}
.events-rail-nav button{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--home-line);background:var(--brand-bg,#fff);color:var(--home-ink);cursor:pointer;transition:background .2s,opacity .2s}
.events-rail-nav button:hover:not(:disabled){background:var(--home-soft)}
.events-rail-nav button:disabled{opacity:.35;cursor:default}
.events-rail-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.events-rail-track{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 3*20px)/4);gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:4px 2px 18px;margin:-4px -2px 0}
.events-rail-track::-webkit-scrollbar{display:none}
.events-rail-track:focus-visible{outline:3px solid var(--home-gold);outline-offset:4px;border-radius:12px}
.event-card{position:relative;scroll-snap-align:start;border-radius:16px;overflow:hidden;background:var(--brand-bg,#fff);border:1px solid var(--home-line);transition:transform .2s,box-shadow .2s}
.event-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px color-mix(in srgb,var(--brand-text,#1d1a21) 7.8%,transparent)}
.event-card-link{display:block;color:var(--home-ink)}
.event-card-photo{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;background:var(--home-soft)}
.event-card-photo img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.event-card:hover .event-card-photo img{transform:scale(1.04)}
.event-card-date{position:absolute;left:14px;top:14px;display:grid;place-items:center;min-width:52px;padding:6px 8px;border-radius:12px;background:var(--brand-bg,#fff);color:var(--home-ink);font-size:22px;font-weight:700;line-height:1}
.event-card-date b{font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#d42f2f;margin-bottom:3px}
.event-card-copy{display:flex;flex-direction:column;gap:4px;padding:18px 60px 20px 20px}
.event-card-kicker{font-size:12px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:var(--home-gold)}
.event-card-copy strong{font-size:19px;font-weight:600;letter-spacing:-.2px}
.event-card-copy span:last-child{color:var(--home-muted);font-size:15px}
.event-card-ics{position:absolute;right:14px;bottom:18px;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--home-line);background:var(--brand-bg,#fff);color:var(--home-ink);cursor:pointer;transition:background .2s}
.event-card-ics:hover{background:var(--home-soft)}

/* Scroll-in reveals (only once JS has confirmed motion is OK). */
.has-reveal .reveal{opacity:0;transform:translateY(24px);transition:opacity .7s ease,transform .7s cubic-bezier(.22,1,.36,1)}
.has-reveal .reveal.is-visible{opacity:1;transform:none}

@media(max-width:1180px){.next-up{grid-template-columns:1fr auto;}.next-up-actions{grid-column:1/-1;justify-content:flex-start}.events-rail-track{grid-auto-columns:calc((100% - 2*20px)/3)}}
@media(max-width:980px){.events-rail-track{grid-auto-columns:calc((100% - 20px*var(--brand-width,1))/2)}}
@media(max-width:620px){
.next-up,.next-up.is-live{grid-template-columns:1fr;gap:18px;margin-top:24px;padding:22px 20px}
.next-up h2{font-size:22px}
.next-up-clock{justify-content:space-between}.next-up-clock div{flex:1;min-width:0}
.next-up-actions .pill-button{flex:1 1 auto}
.events-rail{padding-top:52px}
.events-rail-nav button{display:none}.events-rail-all{margin:0}
.events-rail-track{grid-auto-columns:78%;gap:14px}
}

/* ---------- Polish pass (Mobbin refs: Mistral AI carousel, ClassPass / YLLW hero controls) ---------- */
/* Caption: a soft shadow keeps white text crisp over bright photos. */
.madison-home .hero h1,.madison-home .hero p{text-shadow:0 1px 14px #00000059}
.madison-home .hero-actions .button{transition:background .2s,transform .2s cubic-bezier(.22,1,.36,1),box-shadow .2s}
.madison-home .hero-actions .button-outline{box-shadow:0 6px 18px #0000002e}
.madison-home .hero-actions .button:hover{transform:translateY(-1px)}
.madison-home .hero-actions .button:active{transform:scale(.97)}
.madison-home .hero-actions .button:focus-visible,.madison-home .hero-pause:focus-visible,.hero-dot:focus-visible{outline:3px solid var(--brand-accent,#d9b24c);outline-offset:3px}
.madison-home .hero-actions .button-chevron{transition:transform .2s}
.madison-home .hero-actions .button:hover .button-chevron{transform:translateX(3px)}
.madison-home .hero-actions .button-gold{border:1px solid #ffffff33}
.madison-home .hero-pause{border:1px solid #ffffff26;transition:background .2s}
.madison-home .hero-pause:hover{background:#000000a6}
/* Dot pager sits in a soft pill, like Mistral's carousel. */
.hero-dots{width:max-content;margin:16px auto 0;padding:2px 6px;border-radius:999px;background:var(--home-soft);border:1px solid var(--home-line);gap:0}
/* "Pause slides" appears with the arrows: on hover, on keyboard focus, or after a touch (.is-touched, assets/home.js), then fades
   away again. While the slides are paused it stays visible so they can be resumed. */
.madison-home .hero .hero-pause{opacity:0;visibility:hidden;transition:opacity .28s ease,visibility .28s,background .2s}
.madison-home .hero:hover .hero-pause,.madison-home .hero.is-touched .hero-pause,.madison-home .hero:has(:focus-visible) .hero-pause,.madison-home .hero .hero-pause[aria-pressed=true]{opacity:1;visibility:visible}
@media(hover:none){.madison-home .hero:hover:not(.is-touched) .hero-pause:not([aria-pressed=true]){opacity:0;visibility:hidden}}
