/* The church's main site, carried over from its Squarespace design. Loaded on every
   page for the shared header; everything else is under .church-site so none of it
   reaches the scramble, giving or sermon pages. The Squarespace headings use Adobe's "fino",
   which isn't freely served; Bodoni Moda is the closest Google Fonts match. */

.church-site {
    --church-navy: #0b1b6b;
    --church-ink: #0a1445;
    --church-gray: #f6f6f6;
    --church-gutter: clamp(16px, 4vw, 64px);

    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--church-ink);
    font-family: Abel, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.3rem;
    line-height: 1.5;
    letter-spacing: -0.02em;
}

.church-site main {
    flex: 1;
}

.church-site h1,
.church-site h2,
.church-site h3,
.church-site h4 {
    font-family: "Bodoni Moda", Didot, "Times New Roman", serif;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--church-ink);
    letter-spacing: -0.01em;
    line-height: 1.08;
    margin: 0 0 .6em;
}

.church-site h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
.church-site h2 { font-size: clamp(2.3rem, 5.5vw, 4.5rem); }
.church-site h3 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); }
.church-site h4 { font-size: clamp(1.3rem, 2.4vw, 2rem); }

.church-site p {
    margin: 0 0 1em;
}

.church-site a {
    color: inherit;
}

.church-site main p a {
    color: #6b6b6b;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.church-skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 20;
    background: #fff;
    padding: 8px 14px;
}

.church-skip:focus {
    left: 8px;
}

/* ---- Header -------------------------------------------------------------- */

/* Every layout in the app shows this bar, not just the church pages, so its rules
   stand on their own rather than hanging off .church-site. Bootstrap and app.css
   are loaded alongside it on those other pages, hence the explicit font, colors
   and margins. */
.church-header {
    --church-navy: #0b1b6b;
    --church-ink: #0a1445;
    --church-gutter: clamp(16px, 4vw, 64px);

    background: var(--church-navy);
    color: #fff;
    position: relative;
    z-index: 900;
    font-family: Abel, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

/* Embedded in another site's page (the old site's /media-2), whose own header is
   already above the frame. data-framed is set in App.razor. */
html[data-framed] .church-header {
    display: none;
}

.church-header-inner {
    display: flex;
    align-items: center;
    gap: 12px 28px;
    min-height: 72px;
    padding: 8px var(--church-gutter);
}

.church-menu-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.church-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    color: #fff;
    text-decoration: none;
    /* Saira Condensed is the nearest Google Fonts match for the lettering in the
       CBC logo itself, so the name reads as part of the mark. */
    font-family: "Saira Condensed", "Arial Narrow", sans-serif;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
}

.church-brand:hover {
    color: #fff;
}

.church-brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.church-brand-name {
    font-size: 1.6rem;
}

.church-brand-tagline {
    font-size: 1rem;
    margin-top: 2px;
}

.church-brand img {
    display: block;
    height: 46px;
    width: auto;
}

.church-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 24px;
    font-size: 1.15rem;
}

.church-nav a,
.church-nav-folder-title {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.church-nav a:hover,
.church-nav a.active,
.church-nav-folder-title:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.church-nav-folder {
    position: relative;
}

.church-nav-folder-items {
    display: none;
    position: absolute;
    top: 100%;
    left: -14px;
    z-index: 10;
    min-width: 180px;
    padding: 14px;
    background: var(--church-navy);
    flex-direction: column;
    gap: 8px;
}

.church-nav-folder:hover .church-nav-folder-items,
.church-nav-folder:focus-within .church-nav-folder-items {
    display: flex;
}

.church-site .church-btn,
.church-header .church-btn {
    display: inline-block;
    font-family: Spectral, Georgia, serif;
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: 0;
    text-decoration: none;
    padding: 14px 26px;
    border-radius: 6px;
    background: var(--church-navy);
    color: #fff;
    border: 5px solid var(--church-ink);
    transition: opacity .15s;
}

.church-site .church-btn:hover,
.church-header .church-btn:hover {
    opacity: .85;
}

.church-site .church-btn--inverse,
.church-header .church-btn--inverse {
    background: #fff;
    color: var(--church-ink);
}

.church-header .church-btn {
    padding: 7px 16px;
    border-width: 2px;
    font-size: .95rem;
    white-space: nowrap;
}

.church-burger {
    display: none;
    cursor: pointer;
    width: 32px;
    height: 22px;
    margin: 0;
    position: relative;
    flex: none;
}

.church-burger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
    transition: transform .2s, top .2s;
}

.church-burger span:first-child { top: 5px; }
.church-burger span:last-child { top: 15px; }

.church-menu-toggle:checked ~ .church-header-inner .church-burger span:first-child {
    top: 10px;
    transform: rotate(45deg);
}

.church-menu-toggle:checked ~ .church-header-inner .church-burger span:last-child {
    top: 10px;
    transform: rotate(-45deg);
}

.church-menu-toggle:focus-visible ~ .church-header-inner .church-burger {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

@media (max-width: 1099px) {
    .church-header-inner {
        flex-wrap: wrap;
        column-gap: 12px;
        min-height: 64px;
    }

    .church-brand {
        flex: 1 1 0;
        min-width: 0;
    }

    .church-brand-name {
        font-size: 1.35rem;
    }

    .church-brand-tagline {
        font-size: .85rem;
    }

    .church-brand img {
        height: 40px;
    }

    .church-burger {
        display: block;
    }

    /* On a phone the whole menu, the About Us folder included, opens as one list. */
    .church-nav,
    .church-header-actions {
        display: none;
        width: 100%;
    }

    .church-menu-toggle:checked ~ .church-header-inner .church-nav {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 12px 0 4px;
        font-size: 1.4rem;
    }

    .church-menu-toggle:checked ~ .church-header-inner .church-header-actions {
        display: block;
        text-align: center;
        padding-bottom: 14px;
    }

    .church-nav-folder {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .church-nav-folder-title {
        display: none;
    }

    .church-nav-folder-items,
    .church-nav-folder:hover .church-nav-folder-items {
        display: contents;
    }
}

@media print {
    .church-header {
        display: none !important;
    }
}

/* ---- Footer -------------------------------------------------------------- */

.church-footer {
    background: var(--church-navy);
    color: #fff;
    text-align: center;
    padding: 56px var(--church-gutter);
    font-size: 1.3rem;
}

.church-footer a {
    color: #fff;
    text-decoration: none;
}

.church-footer-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 1.1rem;
    opacity: .9;
}

.church-footer-social:hover {
    opacity: 1;
    text-decoration: underline;
}

.church-footer-social .bi {
    font-size: 1.4rem;
}

/* ---- Page building blocks ------------------------------------------------ */

.church-section {
    padding: clamp(48px, 8vw, 110px) var(--church-gutter);
}

.church-section--gray {
    background: var(--church-gray);
}

.church-section--tight {
    padding-block: clamp(32px, 5vw, 64px);
}

.church-container {
    max-width: 1200px;
    margin: 0 auto;
}

.church-container--narrow {
    max-width: 1000px;
}

.church-center {
    text-align: center;
}

/* Home page: the week's services as cards. */
.church-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: clamp(24px, 4vw, 48px);
}

.church-service {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e3e5ee;
}

.church-service img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.church-service-body {
    padding: 24px 26px 28px;
    font-size: 1.15rem;
}

.church-site .church-service-time {
    font-family: "Bodoni Moda", Didot, "Times New Roman", serif;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 2.1vw, 1.75rem);
    line-height: 1.1;
    margin-bottom: .25em;
}

.church-site .church-service h3 {
    font-family: Abel, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 1.05rem;
    color: #4a5280;
    margin-bottom: 1em;
}

/* Home page: the newest sermon. */
.church-sermon {
    display: grid;
    grid-template-columns: minmax(0, 340px) 1fr;
    gap: 28px 56px;
    align-items: center;
    max-width: 1000px;
    margin: clamp(24px, 4vw, 48px) auto 0;
}

.church-sermon-art {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(160deg, #0b1b6b, #0a1445);
}

.church-sermon-art-logo {
    width: 40%;
    height: auto;
}

.church-sermon-art-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.church-site .church-sermon-date {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 1.05rem;
    color: #4a5280;
    margin-bottom: .4em;
}

.church-site .church-sermon-meta {
    margin-bottom: .3em;
}

.church-sermon .church-btn {
    margin-top: 1em;
}

.church-lead {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.church-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 1.5em;
}

@media (max-width: 991px) {
    .church-services {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-inline: auto;
    }
}

@media (max-width: 767px) {
    .church-sermon {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

/* A photo beside its story: Who We Are. */
.church-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 60px;
    align-items: start;
    margin-bottom: clamp(48px, 7vw, 90px);
}

.church-story:last-child {
    margin-bottom: 0;
}

.church-story:nth-child(even) .church-story-photo {
    order: 2;
}

.church-story-photo img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 767px) {
    .church-story {
        grid-template-columns: 1fr;
    }

    .church-story:nth-child(even) .church-story-photo {
        order: 0;
    }
}

/* Leadership portraits. */
.church-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px 32px;
    margin-bottom: clamp(48px, 7vw, 90px);
}

.church-people:last-child {
    margin-bottom: 0;
}

.church-person {
    text-align: center;
}

.church-person img {
    width: 210px;
    max-width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 14px;
}

.church-person p {
    margin: 0;
}

.church-person-role {
    color: #4a5280;
}

/* A plain navy band with the page title, after the All Saints site's page header.
   Set in the confession's fonts, since it heads nothing else. */
/* The darker of the two navies, so the band reads apart from the menu bar above. */
.church-page-header {
    background: var(--church-ink);
    color: #fff;
    text-align: center;
    padding: clamp(40px, 6vw, 56px) var(--church-gutter) clamp(36px, 5vw, 48px);
}

.church-site .church-page-header h1 {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.2;
    color: #fff;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    margin-bottom: .25rem;
}

.church-site .church-page-header p {
    font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.15rem;
    letter-spacing: normal;
    opacity: .85;
    margin: 0;
}

/* The confession: a chapter list beside the text, following the All Saints site,
   in its fonts too (Cormorant Garamond headings over Source Sans 3), since a long
   run of reading text sits better in them than in the display faces above it.
   On a wide screen the list stays in view while the chapters scroll past it. */
.church-confession-layout {
    display: grid;
    gap: 40px;
    font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    letter-spacing: normal;
}

.church-site .church-confession-layout h2 {
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.2;
}

@media (min-width: 992px) {
    .church-confession-layout {
        grid-template-columns: 290px 1fr;
        gap: 56px;
    }

    .church-confession-toc {
        position: sticky;
        top: 24px;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        align-self: start;
    }
}

.church-confession-toc {
    background: var(--church-gray);
    border-left: 4px solid var(--church-navy);
    padding: 22px 22px 22px 10px;
    font-size: .95rem;
    line-height: 1.4;
}

.church-site .church-confession-toc h2 {
    font-size: 1.5rem;
    padding-left: 18px;
    margin-bottom: .5em;
}

.church-confession-toc ol {
    margin: 0;
    padding-left: 44px;
}

.church-confession-toc li {
    margin-bottom: 6px;
}

.church-confession-toc li::marker {
    color: #4a5280;
}

.church-site .church-confession-toc a {
    text-decoration: none;
}

.church-site .church-confession-toc a:hover {
    text-decoration: underline;
}

.church-confession {
    min-width: 0;
}

.church-confession-chapter {
    scroll-margin-top: 24px;
    padding-bottom: 28px;
    margin-bottom: 36px;
    border-bottom: 1px solid #dfe2ec;
}

.church-confession-chapter:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}

.church-site .church-confession-chapter h2 {
    font-size: 2rem;
    margin-bottom: .55em;
}

.church-chapter-number {
    display: block;
    font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #4a5280;
    margin-bottom: .35em;
}

/* Chapter 1's paragraph 2 carries its lists of books on lines of their own. */
.church-confession-chapter p {
    white-space: pre-line;
    margin-bottom: 1.1rem;
}

.church-paragraph-number {
    font-weight: 600;
    color: var(--church-navy);
}

.church-site .church-back-to-top {
    font-size: .9rem;
    color: #4a5280;
    text-decoration: none;
}

.church-site .church-back-to-top:hover {
    text-decoration: underline;
}

/* Glides between chapters instead of jumping, on this page only. */
html:has(.church-confession-layout) {
    scroll-behavior: smooth;
}

/* The church's own words ahead of chapter 1, at All Saints' lead-paragraph size. */
.church-confession-intro {
    font-size: 1.2rem;
    padding-bottom: 12px;
    margin-bottom: 36px;
    border-bottom: 1px solid #dfe2ec;
}

.church-confession-intro p {
    margin-bottom: 1.1rem;
}

/* Affiliations. */
.church-affiliation {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px 60px;
    align-items: start;
}

.church-affiliation img {
    width: 210px;
    height: auto;
    display: block;
}

.church-rule {
    border: 0;
    border-top: 1px solid var(--church-ink);
    opacity: 1;
    max-width: 440px;
    margin: 0 0 24px;
}

@media (max-width: 767px) {
    .church-affiliation {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}

/* Contact. */
.church-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 60px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto clamp(48px, 6vw, 80px);
}

.church-contact:last-child {
    margin-bottom: 0;
}

.church-contact iframe {
    width: 100%;
    aspect-ratio: 3 / 2;
    border: 0;
    display: block;
}

.church-contact-email {
    max-width: 1000px;
    margin: 0 auto;
}

.church-contact-email p {
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .church-contact {
        grid-template-columns: 1fr;
    }
}
