:root {
    /* Bright Hawaiian Palette */
    --primary-blue: #05A7DF;
    /* Bright Ocean Blue */
    --earthy-taupe: #6B6054;
    /* Earthy Brown */
    --soft-sage: #C3DAC3;
    /* Soft Light Green */
    --charcoal: #121212;
    --off-white: #D5ECD4;
    /* Very Light Green */
    --white: #FFFFFF;
    --accent: #05A7DF;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background-color: var(--charcoal);
    /* Base background for gaps */
}

/* Typography Selection */
::selection {
    background-color: var(--accent);
    color: var(--white);
}

h1,
h2,
h3,
.modal-title,
.serif-title {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.15;
    color: #4ade80;
}

h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    color: var(--white);
}

h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    color: var(--off-white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Background Immersion Component (Long Scroll) */
.bg-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: var(--charcoal);
    overflow: hidden;
}

.bg-image {
    width: 100%;
    height: 100vh;
    /* Background height is set dynamically in script.js to match 2x parallax */
    object-fit: cover;
    object-position: top center;
    opacity: 0.8;
    will-change: transform;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Dark gradient for dramatic editorial feel */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

/* Base Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
}

.btn-outline-light {
    border-color: var(--off-white);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.btn-outline {
    border-color: var(--primary-blue);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-shadow-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--white);
}

.btn-shadow-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(5, 167, 223, 0.2), 0 0 20px rgba(5, 167, 223, 0.15);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(5, 167, 223, 0.4);
    color: var(--white);
}

.btn-link {
    padding: 0;
    text-transform: none;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--accent);
    color: var(--accent);
    padding-bottom: 4px;
}

.btn-link:hover {
    color: var(--charcoal);
    border-color: var(--charcoal);
}

/* Navigation */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    transition: all 0.4s ease;
    border-bottom: none;
}

.site-nav.scrolled {
    background: linear-gradient(to bottom, rgba(107, 96, 84, 0.7) 0%, rgba(107, 96, 84, 0.4) 50%, rgba(107, 96, 84, 0) 100%);
    border-bottom: none;
    padding: 1.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
}

.header-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}


.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-links a:hover {
    color: var(--white);
}



/* Layout Containers */
.content-wrapper {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 800px;
}

.hero-kicker {
    color: var(--off-white);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.hero-headline {
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.hero-subheadline {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 4rem;
    height: 100px;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.scroll-indicator .line {
    display: block;
    width: 100%;
    height: 50%;
    background: var(--white);
    animation: scrollDown 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(200%);
    }
}

/* Sections Base */
.light-section {
    background-color: transparent;
    padding: 8rem 0;
}

.dark-section {
    background-color: transparent;
    color: var(--white);
    padding: 8rem 0;
}

.dark-section h2,
.dark-section h3 {
    color: #4ade80;
}

.dark-section p {
    color: var(--off-white);
}

.section-header {
    margin-bottom: 5rem;
    max-width: 700px;
}

.section-header.editorial-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
}

.section-header.editorial-flex h2 {
    margin-bottom: 0;
    flex: 1;
}

.section-header.editorial-flex p {
    flex: 1;
    margin-bottom: 0;
    text-align: right;
}

.section-header.border-bottom {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 2rem;
    max-width: 100%;
}

.section-intro {
    font-size: 1.3rem;
    line-height: 1.8;
}

/* Editorial Grid (About) */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 3rem;
}

.editorial-block {
    position: relative;
    padding-right: 2rem;
}

.editorial-block.shadow-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editorial-block.shadow-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(5, 167, 223, 0.2), 0 0 20px rgba(5, 167, 223, 0.15);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(5, 167, 223, 0.4);
    /* Match blue highlighting color */
}

.read-more-loop {
    margin-top: auto;
    padding-top: 1.5rem;
    font-family: var(--font-heading);
    font-style: italic;
    color: #4ade80;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.editorial-block.shadow-box:hover .read-more-loop {
    opacity: 1;
    color: var(--primary-blue);
}

.read-more-loop .arrow {
    display: inline-block;
    animation: bounceLoop 1.5s ease-in-out infinite;
}

@keyframes bounceLoop {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(6px);
    }
}

.block-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #4ade80;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.block-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

/* Feature Cards (Ministries) */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(5, 167, 223, 0.2), 0 0 20px rgba(5, 167, 223, 0.15);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(5, 167, 223, 0.4);
}

.feature-card .card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-image {
    width: 100%;
    height: 250px;
    background-color: #222;
    background-size: cover;
    background-position: center;
    margin-bottom: 0;
    filter: grayscale(20%);
    transition: filter 0.5s ease;
}

.feature-card:hover .card-image {
    filter: grayscale(0%);
}

.bg-ocean {
    background-image: url('https://images.unsplash.com/photo-1618477461853-cf6ed80fbfc9?q=80&w=800');
}

.bg-community {
    background-image: url('https://images.unsplash.com/photo-1593113565214-80afcb4dd505?q=80&w=800');
}

.highlight-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem 2rem;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.highlight-card h3 {
    color: #4ade80;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.highlight-card p {
    color: var(--off-white);
    margin-bottom: 2.5rem;
}

/* Ensure read more links look good in cards too */
.feature-card .btn-link {
    margin-top: auto;
    align-self: flex-start;
}

/* Leadership Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.team-member {
    display: flex;
    flex-direction: column;
}

.member-photo {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: var(--earthy-taupe);
    background-size: cover;
    background-position: center;
    margin-bottom: 1.5rem;
    filter: grayscale(100%) contrast(1.1);
    transition: all 0.5s ease;
}

.team-member:hover .member-photo {
    filter: grayscale(0%) contrast(1);
}

.portrait-1 {
    background-image: url('assets/pastor-loscalzo.jpg');
}

.portrait-2 {
    background-image: url('https://images.unsplash.com/photo-1511632765486-a01980e01a18?w=800&q=80');
}

.portrait-3 {
    background-image: url('https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=800&q=80');
}

.member-info h3 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-blue);
}

.member-role {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--earthy-taupe);
    font-size: 1.1rem;
}

/* Footer / Visit Section */
.footer-section {
    background-color: transparent;
    color: var(--white);
    padding: 6rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6rem;
    margin-bottom: 2rem;
}

.footer-title {
    color: #4ade80;
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

.service-times {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.time-block strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.time-block span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-map {
    width: 100%;
    min-height: 400px;
    background: #222;
    filter: grayscale(80%) invert(90%) hue-rotate(180deg);
}

.site-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Editorial Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 18, 18, 0.95);
    /* Deep charcoal overlay */
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    background: var(--charcoal);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    color: var(--white);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%);
}

.modal-close {
    position: sticky;
    top: 20px;
    left: 100%;
    /* Push to right */
    transform: translateX(-20px);
    width: 40px;
    height: 40px;
    background: var(--charcoal);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--accent);
}

.modal-content {
    padding: 0 4rem 4rem 4rem;
    margin-top: -20px;
    /* offset sticky close */
}

.modal-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--earthy-taupe);
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.modal-banner {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 3rem;
    filter: grayscale(20%);
}

.modal-text {
    max-width: 600px;
    margin: 0 auto;
}

.lead-text p {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--primary-blue);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.editorial-list {
    max-width: 600px;
    margin: 0 auto 2rem;
    list-style: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 2rem;
}

.editorial-list li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}


/* Elegant Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

.delay-3 {
    transition-delay: 0.45s;
}

/* Responsive adjustments */
@media (max-width: 900px) {

    .editorial-grid,
    .feature-cards,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .section-header.editorial-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header.editorial-flex p {
        text-align: left;
    }

    h1 {
        font-size: 12vw;
    }

    .hero-section {
        padding: 0 2rem;
    }

    .nav-links {
        display: none;
    }
}