/* Chapters landing page + chapter detail pages */

/* ======== /chapters */

/* hero: city photos dissolving into each other (desktop), static photo on phones */
.hero-chapters { overflow: hidden; }
.hero-chapters::before { z-index: 1; }
.hero-chapters .hero-text { z-index: 2; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 2s ease-in-out; }
.hero-slide.active { opacity: 1; }
.hero-chapters .hero-photo { background-image: linear-gradient(to top, rgba(34,34,34,0) 54.9%, var(--neutral-darker)), url('/res/img/hero-chapters-mobile.webp'); }

.chapters-title { padding-top: 40px; }

/* wide city tiles, 2 per row. Hover (Figma "Hover Components"): bottom padding 25 -> 50, letter spacing 4%, desaturated photo */
.chapter-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; padding: 10px 40px; }
.chapter-tile { display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 623 / 550; overflow: hidden; border-radius: var(--radius-md);
    box-shadow: 0 4px 4px rgba(0,0,0,.25); background: #ccc var(--wide) center / cover no-repeat; color: #fff; text-decoration: none; transition: filter .3s; }
.chapter-tile .tile-text { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 50px 0 25px; background: linear-gradient(to bottom, rgba(4,1,24,0), var(--dark-blue-900)); transition: padding .3s; }
.chapter-tile .name { font: 400 48px/1 var(--font-display); text-align: center; transition: letter-spacing .3s; }
.chapter-tile .details { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 50px; font: 700 14px/1 var(--font-body); text-transform: uppercase; white-space: nowrap; transition: letter-spacing .3s; }
.chapter-tile .details::before, .chapter-tile .details::after { content: ''; flex: 1; border-top: 1px solid #fff; }
.chapter-tile:hover, .chapter-tile:focus-visible { filter: saturate(50%); }
.chapter-tile:hover .tile-text, .chapter-tile:focus-visible .tile-text { padding-bottom: 50px; }
.chapter-tile:hover .name, .chapter-tile:hover .details, .chapter-tile:focus-visible .name, .chapter-tile:focus-visible .details { letter-spacing: .04em; }

.chapters-not-in-area { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 100px 60px; text-align: center; }
.chapters-not-in-area p { font-size: 20px; font-weight: 500; line-height: 1.5; text-transform: uppercase; color: #000; }

/* ======== /chapters/{slug} */

.chapter-hero { position: relative; display: flex; align-items: center; height: 400px; padding: 10px 120px; background: var(--neutral-darker) center / cover no-repeat; color: #fff; }
.chapter-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to left, rgba(34,34,34,0), var(--neutral-darker)); }
.chapter-hero-text { position: relative; display: flex; flex-direction: column; gap: 10px; max-width: 620px; padding: 50px 10px 10px; }
.chapter-hero .kicker { font-size: 18px; font-weight: 700; line-height: 1.5; text-transform: uppercase; }
.chapter-hero h1 { color: #fff; }

/* section heading flanked by divider lines */
.headline-lines { display: flex; align-items: center; gap: 10px; padding: 40px 40px 10px; }
.headline-lines::before, .headline-lines::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.headline-lines .headline { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0 40px; text-align: center; }
.chapter-hero + .headline-lines { padding-top: var(--pad-global); }
.headline-events { padding-bottom: 30px; }

/* upcoming events: navy chapter bar, photo with date/time on the left, beige text panel on the right */
.chapter-events { display: flex; flex-direction: column; gap: 40px; padding: 0 40px 40px; }
.chapter-event { overflow: hidden; border: 1px solid var(--beige-border); border-radius: var(--radius-sm); background: var(--beige-50); box-shadow: 0 4px 4px rgba(0,0,0,.25); }
.event-chapter { padding: 10px 20px 7px; background: var(--navy); font-size: 14px; line-height: 1.5; text-transform: uppercase; color: #fff; }
.event-info { display: flex; align-items: stretch; }
.event-pic { flex: 1 1 0; max-width: 500px; min-height: 400px; display: flex; align-items: flex-end; background: var(--neutral-darker) center / cover no-repeat; }
.event-when { flex: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 30px 40px; background: linear-gradient(to bottom, rgba(0,0,0,0), var(--neutral-darker) 80.3%); color: #fff; white-space: nowrap; }
.event-when > div { display: flex; flex-direction: column; }
.event-when .small { font-size: 20px; font-weight: 700; line-height: 1.5; }
.event-when .big { font: 700 48px/1 var(--font-display); text-transform: uppercase; }
.event-content { flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; padding: 0 40px 20px; }
.event-content .neighborhood { padding-top: 15px; font-size: 16px; font-weight: 700; line-height: 1.5; text-transform: uppercase; color: var(--navy); }
.event-content h3 { padding-bottom: 15px; font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--navy); }
.event-content h3 a { color: inherit; text-decoration: none; }
.event-content h3 a:hover { color: var(--orange); }
.event-content .description { width: 100%; padding: 15px 0; border-top: 1px solid var(--beige-border); border-bottom: 1px solid var(--beige-border); font-size: 18px; font-weight: 300; line-height: 1.6; }
.event-content .teaser-short { display: none; }
.event-content .read-more { margin-left: 5px; font-size: 14px; font-weight: 700; line-height: 1.5; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.event-content .read-more:hover { color: var(--orange-300); }
.event-content .btn-wrap { padding: 20px 0; }

/* about the chapter: two columns of highlights, then the city photo fading in from white */
.chapter-about { display: flex; flex-direction: column; }
.about-cols { position: relative; z-index: 2; display: flex; gap: 20px; max-width: 1400px; margin: auto; padding: 20px 40px; }
.about-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 10px 0; font-size: 18px; font-weight: 300; line-height: 1.6; }
.about-col h3 { font-size: 18px; font-weight: 700; line-height: 1.5; }
.about-col .btn { margin-top: 10px; }
/* full width at its own proportions - capping the height cropped the skyline on wide screens */
.about-pic { aspect-ratio: 2000 / 841; background: center / cover no-repeat; }

.chapter-sponsors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; padding: 40px 40px 64px; }
.chapter-sponsors .sponsor { display: flex; align-items: center; justify-content: center; aspect-ratio: 302.75 / 306; padding: 30px; border: 1px solid #eee; border-radius: var(--radius-sm); background: #fff; box-shadow: 0 4px 4px rgba(0,0,0,.1); }
.chapter-sponsors .sponsor img { max-height: 100%; object-fit: contain; }

/* ======== tablet */
@media (max-width: 1200px) {
    .chapter-tile .name { font-size: 40px; }
    .chapter-tile .details { padding: 0 30px; }
    .chapter-hero { padding-left: 60px; padding-right: 60px; }
    .event-pic { min-height: 360px; }
    .event-when { padding: 20px; }
    .event-content { padding: 0 30px 10px; }
    .chapter-sponsors { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
    .chapter-tiles { gap: 20px; padding: 10px 20px; }
    .chapter-tile .name { font-size: 32px; }
    .event-info { flex-direction: column; }
    .event-pic { flex-basis: auto; max-width: none; min-height: 0; height: 350px; }
}

/* ======== phones (Figma mobile frames are 390 wide) */
@media (max-width: 768px) {
    .hero-slides { display: none; }
    .hero-chapters h1 { font-size: 40px; }
    .hero-chapters p { font-size: 18px; line-height: 1.5; }
    .chapters-title, .headline-lines { padding: 40px 20px 20px; }
    .chapters-title { padding-top: 20px; padding-bottom: 10px; }
    .chapters-title .eyebrow, .headline-lines .eyebrow { font-size: 16px; }
    .chapters-title h2, .headline-lines h2 { font-size: 36px; }

    /* tall photo tiles with the city name only */
    .chapter-tiles { grid-template-columns: 1fr; gap: 20px; padding: 10px 40px; }
    .chapter-tile { aspect-ratio: 310 / 353; background-image: var(--tall); }
    .chapter-tile .tile-text { justify-content: center; height: 71px; padding: 0; }
    .chapter-tile .name { font: 700 14px/1 var(--font-body); text-transform: uppercase; }
    .chapter-tile .details { display: none; }
    .chapter-tile:hover .tile-text, .chapter-tile:focus-visible .tile-text { padding-bottom: 0; }

    .chapters-not-in-area { gap: 15px; padding: 10px 20px 40px; }
    .chapters-not-in-area p { font-weight: 400; line-height: 1; color: var(--body-text); }
    .chapters-not-in-area .btn { width: 100%; padding: 20px 24px; }

    .chapter-hero { align-items: flex-end; height: 550px; padding: 0; background-position: center top; }
    .chapter-hero::before { background: linear-gradient(to top, var(--neutral-darker), rgba(34,34,34,0) 50%, var(--neutral-darker)); }
    .chapter-hero-text { gap: 8px; max-width: none; padding: 40px 20px; }
    .chapter-hero h1 { font-size: 48px; }

    /* no divider lines on phones */
    .headline-lines::before, .headline-lines::after { display: none; }
    .headline-lines .headline { width: 100%; padding: 0; }
    .chapter-hero + .headline-lines { padding-top: 40px; }

    .chapter-events { padding: 0 20px 40px; }
    .event-pic { height: 350px; }
    .event-when { padding: 30px 20px 20px; }
    .event-content { padding: 0 20px 20px; }
    .event-content .teaser-long { display: none; }
    .event-content .teaser-short { display: inline; }
    .event-content .btn-wrap { width: 100%; }
    .event-content .btn-wrap .btn { width: 100%; padding: 20px 24px; }

    .chapter-about { padding-bottom: 40px; }
    .about-cols { flex-direction: column; gap: 10px; padding: 0 40px; }
    .about-col { padding: 0; }
    .about-col .btn { width: calc(100% + 40px); margin: 20px -20px; padding: 20px 24px; }
    .about-pic { display: none; }

    .chapter-sponsors { grid-template-columns: 1fr; gap: 20px; padding: 0 40px 40px; }
}
