/* =========================================================
   CALVARY BAPTIST CHURCH
   V9 STYLESHEET

   File: styles.css

   Main sections:
   1. Site colors and global styles
   2. Header and navigation
   3. Page / hash navigation
   4. Home hero
   5. General page layout
   6. Home service times
   7. Buttons
   8. Articles of Faith
   9. Scripture preview cards
   10. About Us
   11. Choir privacy photo / IBBC Easter egg
   12. Events
   13. How Can I Know?
   14. Livestream placeholder
   15. Member access dialog
   16. Footer and contact form
   17. Mobile / responsive layout
   ========================================================= */


/* =========================================================
   1. SITE COLORS
   ========================================================= */

:root {
    --navy: #062b55;
    --cream: #fff9e6;
    --blue: #dbeaf1;
    --ink: #203542;

    --light-border: #ccd8dd;
    --very-light-blue: #f4f8fa;
    --scripture-background: #fffdf5;
    --yellow: #f4dd17;
}


/* =========================================================
   2. GLOBAL STYLES
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: var(--ink);
    background: #ffffff;
}

img {
    max-width: 100%;
}

a {
    color: var(--navy);
}

button,
input,
textarea {
    font: inherit;
}


/* =========================================================
   3. HEADER AND NAVIGATION
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    height: 92px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 5vw;

    background: #ffffff;

    border-bottom:
        1px solid var(--light-border);

    box-shadow:
        0 1px 8px rgba(0, 0, 0, 0.07);
}


/* ---------------------------------------------------------
   Church logo and name
   --------------------------------------------------------- */

.brand {
    display: flex;
    align-items: center;

    gap: 12px;

    color: var(--navy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.25rem;
    font-weight: 700;
}

.brand img {
    width: 70px;
    height: 70px;

    object-fit: contain;
}


/* ---------------------------------------------------------
   Desktop navigation
   --------------------------------------------------------- */

.nav {
    display: flex;
    align-items: center;

    gap: 26px;
}

.nav a {
    color: var(--navy);

    text-decoration: none;

    font-weight: 600;
}

.nav a:hover,
.nav a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 5px;
}


/* ---------------------------------------------------------
   Mobile menu button
   --------------------------------------------------------- */

.burger {
    display: none;

    padding: 6px;

    border: 0;

    background: transparent;
    color: var(--navy);

    font-size: 30px;

    cursor: pointer;
}


/* =========================================================
   4. PAGE / HASH NAVIGATION

   IMPORTANT:

   Page navigation is intentionally handled primarily by CSS.

   This means:

       #home
       #faith
       #about
       #events
       #know
       #stream

   can display their corresponding page even if JavaScript fails.

   JavaScript will enhance navigation, but it is not responsible
   for the basic ability to display these sections.
   ========================================================= */


/* Hide all page sections by default. */

.page {
    display: none;
}


/* ---------------------------------------------------------
   Default page

   When there is no target in the URL, Home is displayed.
   --------------------------------------------------------- */

#home {
    display: block;
}


/* ---------------------------------------------------------
   When any known page is targeted, hide Home first.
   --------------------------------------------------------- */

body:has(#faith:target) #home,
body:has(#about:target) #home,
body:has(#events:target) #home,
body:has(#know:target) #home,
body:has(#stream:target) #home {
    display: none;
}


/* ---------------------------------------------------------
   Display whichever section matches the URL hash.
   --------------------------------------------------------- */

#home:target,
#faith:target,
#about:target,
#events:target,
#know:target,
#stream:target {
    display: block;
}


/* ---------------------------------------------------------
   JavaScript enhancement fallback

   site.js can also assign .active.
   --------------------------------------------------------- */

.page.active {
    display: block;
}


/* =========================================================
   5. HOME PAGE - HERO
   ========================================================= */

.hero {
    position: relative;

    min-height: 72vh;

    background:
        linear-gradient(
            90deg,
            rgba(0, 25, 50, 0.72),
            rgba(0, 25, 50, 0.15)
        ),
        url("CBC_Hero.jpeg");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    color: #ffffff;
}


/*
   There is intentionally NO hero text.

   "Serving Stryker & Northwest Ohio" has been removed from V9.
*/


/* ---------------------------------------------------------
   Secret member entrance

   Desktop values were manually established during testing.

   This invisible button overlays the church double doors.
   --------------------------------------------------------- */

.door-hotspot {
    position: absolute;

    left: 35.25%;
    top: 53%;

    width: 4%;
    height: 12%;

    z-index: 5;

    padding: 0;

    border: 0;

    background: transparent;

    cursor: default;

    appearance: none;
    -webkit-appearance: none;
}

.door-hotspot:focus {
    outline: none;
}


/* =========================================================
   6. GENERAL PAGE LAYOUT
   ========================================================= */

.section {
    width: 100%;
    max-width: 1050px;

    margin: 0 auto;

    padding:
        72px
        28px;
}

.section h2 {
    margin-top: 0;

    color: var(--navy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 2.4rem;
    font-weight: 700;
}

.section h3 {
    color: var(--navy);
}

.section p {
    line-height: 1.75;
}


/* ---------------------------------------------------------
   Blue page heading area
   --------------------------------------------------------- */

.smallhero {
    padding:
        80px
        6vw
        55px;

    background: var(--navy);
    color: #ffffff;
}

.smallhero h1 {
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 3rem;
    font-weight: 700;
}

.smallhero p {
    margin-bottom: 0;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   Two-column content
   --------------------------------------------------------- */

.split {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 38px;

    align-items: center;
}

.split > img {
    width: 100%;

    max-height: 520px;

    object-fit: cover;
}


/* =========================================================
   7. HOME PAGE - SERVICE TIMES
   ========================================================= */

.times {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 20px;

    margin-top: 36px;
}

.card {
    padding: 26px;

    background: var(--cream);

    border-top:
        4px solid var(--navy);
}

.card h3 {
    margin-top: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.5rem;
}


/* =========================================================
   8. BUTTONS
   ========================================================= */

.know-button,
.map-button {
    display: inline-block;

    margin:
        4px
        7px
        4px
        0;

    padding:
        11px
        18px;

    background: var(--navy);
    color: #ffffff;

    text-decoration: none;

    font-weight: 700;
}

.know-button:hover,
.know-button:focus-visible,
.map-button:hover,
.map-button:focus-visible {
    background: #0a417b;
}


/* =========================================================
   9. ARTICLES OF FAITH
   ========================================================= */

.faith {
    padding:
        36px
        0;

    border-top:
        1px solid #c9d6dc;
}

.faith:first-child {
    border-top: 0;
}

.faith h3 {
    margin-top: 0;

    color: var(--navy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.65rem;
    font-weight: 700;
}


/* =========================================================
   10. SCRIPTURE REFERENCES / KJV PREVIEW CARDS

   The HTML itself contains ordinary Bible references.

   site.js will convert eligible references into elements using:

       .verse-ref
       .verse-card
       .verse-text
       .verse-study

   Keeping this generated markup out of index.html is intentional.
   ========================================================= */

.verse-ref {
    position: relative;

    display: inline-block;

    color: var(--navy);

    font-weight: 700;

    text-decoration:
        underline dotted;

    text-underline-offset: 3px;

    cursor: pointer;
}


/* ---------------------------------------------------------
   Scripture popup card
   --------------------------------------------------------- */

.verse-card {
    position: absolute;

    left: 0;
    bottom: calc(100% + 10px);

    z-index: 250;

    display: none;

    width: min(410px, 82vw);
    max-height: 320px;

    overflow-y: auto;

    padding: 16px;

    background:
        var(--scripture-background);

    color: var(--ink);

    border:
        1px solid #c7d4d9;

    border-top:
        4px solid var(--navy);

    box-shadow:
        0
        8px
        28px
        rgba(0, 0, 0, 0.20);

    font-weight: 400;
    line-height: 1.55;

    text-decoration: none;
}


/* Desktop hover */

.verse-ref:hover .verse-card {
    display: block;
}


/* Touch/click state */

.verse-ref.open .verse-card {
    display: block;
}


.verse-card strong {
    display: block;

    margin-bottom: 8px;

    color: var(--navy);
}


.verse-text {
    display: block;

    margin-bottom: 8px;
}


.verse-study {
    display: inline-block;

    margin-top: 8px;

    color: var(--navy);

    font-weight: 700;

    text-decoration: underline;
    text-underline-offset: 3px;
}


/* =========================================================
   11. ABOUT US - PASTOR
   ========================================================= */

.pastor-quote {
    padding-left: 18px;

    color: var(--navy);

    border-left:
        4px solid var(--navy);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.15rem;
    font-weight: 700;
}


/* =========================================================
   12. ABOUT US - CHURCH HISTORY
   ========================================================= */

.history-source {
    margin-top: 28px;

    color: #61717b;

    font-size: 0.85rem;
}


/* =========================================================
   13. ABOUT US - PRIVACY-SAFE CHOIR PHOTOGRAPH
   ========================================================= */

.about-photo {
    position: relative;

    width: 100%;
}

.about-photo img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 520px;

    object-fit: cover;
}


/* ---------------------------------------------------------
   Independent Baptist Bandit Choir Easter egg

   Invisible button in upper-right corner.

   No visual indication and no special mouse pointer.
   --------------------------------------------------------- */

.ibbc-hotspot {
    position: absolute;

    top: 0;
    right: 0;

    width: 54px;
    height: 54px;

    z-index: 5;

    padding: 0;

    border: 0;

    background: transparent;

    cursor: default;

    appearance: none;
    -webkit-appearance: none;
}

.ibbc-hotspot:focus {
    outline: none;
}


/* =========================================================
   14. VISIT US
   ========================================================= */

.contact-card {
    padding: 26px;

    background: var(--very-light-blue);

    border-left:
        5px solid var(--navy);
}

.contact-card h2 {
    margin-top: 0;
}


/* =========================================================
   15. EVENTS
   ========================================================= */

.event {
    padding:
        25px
        0;

    border-bottom:
        1px solid var(--light-border);
}

.event:last-child {
    border-bottom: 0;
}

.date {
    color: var(--navy);

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.08em;
}


/* =========================================================
   16. HOW CAN I KNOW?
   ========================================================= */

.smiley {
    display: block;

    width: min(210px, 50vw);

    margin:
        10px
        auto
        36px;
}


.tract-copy {
    max-width: 900px;

    margin:
        0
        auto;
}

.tract-copy > p:first-of-type {
    font-size: 1.08rem;
}


.tract-copy em {
    font-family:
        Georgia,
        "Times New Roman",
        serif;
}


/* ---------------------------------------------------------
   Numbered tract points
   --------------------------------------------------------- */

.gospel-step {
    display: grid;

    grid-template-columns:
        58px
        minmax(0, 1fr);

    gap: 20px;

    padding:
        26px
        0;

    border-top:
        1px solid #d5dfe3;
}


.step-no {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    background: var(--yellow);

    color: var(--navy);

    border-radius: 50%;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.25rem;
    font-weight: 700;
}


.gospel-step p {
    margin-top: 0;
}


/* ---------------------------------------------------------
   Tract prayer
   --------------------------------------------------------- */

.prayer {
    margin:
        34px
        0;

    padding: 28px;

    background: #fff7a8;

    border-left:
        5px solid #e7cf00;
}

.prayer h2 {
    font-size: 1.7rem;
}


/* ---------------------------------------------------------
   Tract contact information
   --------------------------------------------------------- */

.tract-contact {
    margin-top: 34px;

    padding-top: 24px;

    text-align: center;

    border-top:
        1px solid #d5dfe3;
}


/* =========================================================
   17. LIVESTREAM PLACEHOLDER
   ========================================================= */

.stream-placeholder {
    padding-top: 100px;
    padding-bottom: 120px;

    text-align: center;
}


.stream-happy {
    color: #e3c900;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 5rem;

    line-height: 1;
}


/* =========================================================
   18. MEMBER ACCESS DIALOG

   Intentionally contains no visible title, instructions,
   access-code label or Submit button.
   ========================================================= */

.access-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 20, 40, 0.38);
}


/* Opened by JavaScript */

.access-overlay.open {
    display: flex;
}


.access-dialog {
    width:
        min(230px, 72vw);

    padding: 24px;

    background: #ffffff;

    border:
        1px solid #d4dde2;

    border-radius: 5px;

    box-shadow:
        0
        14px
        42px
        rgba(0, 0, 0, 0.28);
}


.access-input {
    width: 100%;
    height: 48px;

    padding:
        8px
        10px;

    border:
        1px solid #8094a0;

    border-radius: 3px;

    outline: none;

    background: #ffffff;
    color: var(--navy);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 1.35rem;
    font-weight: 400;

    text-align: center;

    letter-spacing: 0.28em;
}


.access-input:focus {
    border-color: var(--navy);

    box-shadow:
        0
        0
        0
        2px
        rgba(6, 43, 85, 0.12);
}


/* =========================================================
   19. FOOTER
   ========================================================= */

footer {
    padding:
        55px
        5vw
        24px;

    background: var(--blue);
}


.footer-grid {
    display: grid;

    grid-template-columns:
        0.8fr
        1.6fr;

    gap: 55px;
}


.footer-title {
    margin-top: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 2rem;
    font-weight: 400;
}


/* =========================================================
   20. CONTACT FORM
   ========================================================= */

.form {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 18px;
}


.form label {
    font-size: 0.82rem;
    font-weight: 700;
}


.form input,
.form textarea {
    width: 100%;

    padding: 10px;

    border: 0;

    border-bottom:
        1px solid #446475;

    outline: none;

    background: transparent;

    color: var(--ink);
}


.form input:focus,
.form textarea:focus {
    border-bottom:
        2px solid var(--navy);
}


.form textarea {
    min-height: 100px;

    resize: vertical;
}


.form .wide,
.form textarea,
.form button,
.form .status {
    grid-column:
        1 / -1;
}


.form button {
    padding: 12px;

    border: 0;

    background: var(--navy);
    color: #ffffff;

    cursor: pointer;

    font-weight: 700;
}


.form button:hover,
.form button:focus-visible {
    background: #0a417b;
}


.status {
    min-height: 1.2em;

    color: #9a1c1c;

    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   Copyright
   --------------------------------------------------------- */

.copyright {
    display: flex;
    align-items: center;

    gap: 16px;

    margin-top: 32px;

    font-size: 0.8rem;
}


.copyright img {
    width: 48px;
    height: auto;
}


/* =========================================================
   21. KEYBOARD ACCESSIBILITY
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.verse-ref:focus-visible {
    outline:
        2px solid #2a6da8;

    outline-offset: 3px;
}


/* =========================================================
   22. MOBILE / RESPONSIVE LAYOUT
   ========================================================= */

@media (max-width: 760px) {


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

    .site-header {
        height: 82px;
    }


    .brand img {
        width: 62px;
        height: 62px;
    }


    .brand span {
        display: none;
    }


    .burger {
        display: block;
    }


    .nav {
        position: absolute;

        top: 100%;
        left: 0;
        right: 0;

        z-index: 200;

        display: none;

        flex-direction: column;
        align-items: flex-start;

        gap: 0;

        padding:
            12px
            6vw
            20px;

        background: #ffffff;

        border-bottom:
            1px solid var(--light-border);

        box-shadow:
            0
            6px
            12px
            rgba(0, 0, 0, 0.08);
    }


    .nav.open {
        display: flex;
    }


    .nav a {
        width: 100%;

        padding:
            12px
            0;
    }


    /* -----------------------------------------------------
       Hero
       ----------------------------------------------------- */

    .hero {
        min-height: 52vh;

        background-position: center;
    }


    /*
       MOBILE DOOR HOTSPOT

       These are deliberately separate from the proven desktop
       values.

       They are an initial mobile setting and can be fine-tuned
       after viewing the real Netlify page in Safari.
    */

    .door-hotspot {
        left: 29%;
        top: 45%;

        width: 13%;
        height: 19%;
    }


    /* -----------------------------------------------------
       Page headings
       ----------------------------------------------------- */

    .smallhero {
        padding:
            55px
            22px
            40px;
    }


    .smallhero h1 {
        font-size: 2.2rem;
    }


    /* -----------------------------------------------------
       General content
       ----------------------------------------------------- */

    .section {
        padding:
            52px
            22px;
    }


    .section h2 {
        font-size: 2rem;
    }


    /* -----------------------------------------------------
       Single-column mobile grids
       ----------------------------------------------------- */

    .split,
    .times,
    .footer-grid,
    .form {
        grid-template-columns:
            1fr;
    }


    /* -----------------------------------------------------
       Choir photograph
       ----------------------------------------------------- */

    .about-photo img {
        max-height: none;
    }


    /*
       Slightly larger Easter-egg tap target on touch devices.
    */

    .ibbc-hotspot {
        width: 64px;
        height: 64px;
    }


    /* -----------------------------------------------------
       Tract
       ----------------------------------------------------- */

    .gospel-step {
        grid-template-columns:
            48px
            minmax(0, 1fr);

        gap: 14px;
    }


    .step-no {
        width: 42px;
        height: 42px;

        font-size: 1.1rem;
    }


    /* -----------------------------------------------------
       Scripture card on phones

       A fixed card is more usable on touch devices than trying
       to position the popup directly above a small reference.
       ----------------------------------------------------- */

    .verse-card {
        position: fixed;

        left: 5vw;
        right: 5vw;
        bottom: 20px;

        width: 90vw;

        max-height: 55vh;
    }


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

    .copyright {
        align-items: flex-start;
    }

}


/* =========================================================
   23. VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .section {
        padding-left: 18px;
        padding-right: 18px;
    }


    .smallhero {
        padding-left: 18px;
        padding-right: 18px;
    }


    .smallhero h1 {
        font-size: 1.95rem;
    }


    .section h2 {
        font-size: 1.8rem;
    }


    .gospel-step {
        grid-template-columns:
            42px
            minmax(0, 1fr);

        gap: 10px;
    }


    .step-no {
        width: 38px;
        height: 38px;

        font-size: 1rem;
    }

}


/* =========================================================
   END OF STYLESHEET
   ========================================================= */