/* 
========================================================================
   ST. JOHN THE BAPTIST JACOBITE SYRIAN ORTHODOX CHURCH - STYLE SHEET
========================================================================
   Custom premium styles optimized for a 100vh single-viewport experience
   Features: Glassmorphism, subtle gold accents, responsive centered layout.
========================================================================
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Outfit:wght@200;300;400;500;600;700;800&display=swap');

/* --- Core Tokens (Design System) --- */
:root {
    /* Color Palette */
    --color-primary: #6B1A2B;        /* Primary Burgundy/Crimson */
    --color-primary-dark: #4E1020;   /* Deep Maroon */
    --color-primary-light: #8E2B3E;  /* Light Maroon */
    --color-accent: #c9923a;         /* Accent Gold */
    --color-accent-light: #e5b461;   /* Hover Gold */
    --color-accent-dark: #a67225;    /* Border/Muted Gold */
    --color-bg: #faf7f0;             /* Off-white / Cream */
    --color-text: #1E1208;           /* Charcoal Brown */
    --color-text-muted: #5E5244;     /* Muted Charcoal Brown */
    --color-white: #ffffff;
    --color-border: #E4CFA0;         /* Elegant Gold/Beige Border */
    --color-success: #2e7d32;        /* Liturgical Green */

    /* Typography */
    --font-header: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', system-ui, -apple-system, sans-serif;

    /* Shadows & Glows */
    --shadow-sm: 0 4px 6px -1px rgba(30, 18, 8, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(30, 18, 8, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(30, 18, 8, 0.12);
    --shadow-gold: 0 0 15px rgba(201, 146, 58, 0.35);
    --shadow-gold-heavy: 0 0 25px rgba(201, 146, 58, 0.55);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Rules & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Force absolutely no scrolling */
    background-color: #1e050a;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* --- Selection Styles --- */
::selection {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

/* --- Interactive Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: #1E1208 !important;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold-heavy);
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-white) !important;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(228, 207, 160, 0.4);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    backdrop-filter: blur(5px);
}

.btn-secondary-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent-light);
    color: var(--color-accent-light) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- Header --- */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 1.5rem 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-header);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-bg);
    letter-spacing: 0.02em;
}

.header .logo img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-accent);
}

.header-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Hero Center Stage --- */
.hero {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    /* Rich, deep liturgical maroon gradient, completely replacing the altar background photo */
    background: linear-gradient(135deg, #2D050D 0%, #120104 100%);
    position: relative;
    overflow: hidden;
}

/* Animated Divine Gold Aura overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(201, 146, 58, 0.18) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
    animation: divineGlow 8s infinite ease-in-out;
}

/* Subtle animated divine sweeps of golden light */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, transparent 40%, rgba(228, 207, 160, 0.04) 45%, rgba(228, 207, 160, 0.07) 50%, rgba(228, 207, 160, 0.04) 55%, transparent 60%);
    background-size: 200% 200%;
    pointer-events: none;
    z-index: 1;
    animation: lightSweeps 12s infinite linear;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    padding: 0 2rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-top: 4.5rem; /* give space for fixed header */
    margin-bottom: 4rem; /* give space for flat footer */
}

.hero-crest {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-accent);
    box-shadow: var(--shadow-gold-heavy), 0 5px 20px rgba(0,0,0,0.5);
    animation: crestFloat 5s infinite ease-in-out;
}

.badge {
    background: rgba(201, 146, 58, 0.15);
    border: 1px solid var(--color-accent);
    color: var(--color-accent-light);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    backdrop-filter: blur(5px);
}

.badge-gold {
    background: rgba(201, 146, 58, 0.2);
    border-color: var(--color-accent-light);
    color: var(--color-accent-light);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    margin-bottom: 0;
}

.hero h1 {
    font-size: 2.6rem;
    color: var(--color-bg);
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.01em;
    font-weight: 400;
    line-height: 1.2;
}

.hero h1 span {
    display: block;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-accent);
    margin-top: 0.3rem;
    font-family: var(--font-header);
    letter-spacing: 0.03em;
}

.hero .description {
    font-size: 1.05rem;
    font-weight: 300;
    color: rgba(250, 247, 240, 0.85);
    margin-bottom: 1.6rem;
    max-width: 600px;
    line-height: 1.5;
}

/* Countdown Grid */
.countdown-container {
    width: 100%;
    max-width: 500px;
    margin-bottom: 1.6rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.countdown-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(228, 207, 160, 0.15);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition-normal);
}

.countdown-card:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 146, 58, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.countdown-number {
    font-family: var(--font-header);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-accent-light);
    line-height: 1.1;
    margin-bottom: 0.15rem;
    text-shadow: 0 0 10px rgba(229, 180, 97, 0.35);
}

.countdown-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(250, 247, 240, 0.65);
}

/* Compact Subscription Panel */
.subscribe-panel {
    background: rgba(78, 16, 32, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(228, 207, 160, 0.25);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 5px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.4rem;
}

.subscribe-form {
    display: flex;
    gap: 0.4rem;
    width: 100%;
}

.subscribe-panel input[type="email"] {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(228, 207, 160, 0.3);
    border-radius: var(--radius-sm);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: var(--transition-fast);
}

.subscribe-panel input[type="email"]::placeholder {
    color: rgba(250, 247, 240, 0.35);
}

.subscribe-panel input[type="email"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent-light);
    box-shadow: 0 0 10px rgba(201, 146, 58, 0.25);
}

.subscribe-panel button {
    padding: 0 1.4rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: #1E1208;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition-fast);
}

.subscribe-panel button:hover {
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
    box-shadow: var(--shadow-gold);
}

.subscribe-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-light);
    padding: 0.4rem 0;
    animation: fadeIn 0.5s forwards ease;
}

.subscribe-success svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    margin-bottom: 0.4rem;
}

.subscribe-success h4 {
    color: var(--color-bg);
    margin-bottom: 0.1rem;
    font-size: 1.1rem;
}

.subscribe-success p {
    color: rgba(250, 247, 240, 0.75);
    font-size: 0.85rem;
}

/* Action Buttons Row */
.action-buttons-row {
    display: flex;
    gap: 0.8rem;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.flat-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem 3%;
    border-top: 1px solid rgba(228, 207, 160, 0.12);
    background: rgba(20, 2, 5, 0.7);
    backdrop-filter: blur(5px);
    color: rgba(250, 247, 240, 0.5);
    font-size: 0.85rem;
    z-index: 10;
}



/* --- Detailed Modal Overlays --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 5, 8, 0.75);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
    padding: 1.5rem;
}

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

.modal-card {
    background-color: var(--color-bg);
    color: var(--color-text);
    border: 1.5px solid var(--color-accent);
    border-radius: var(--radius-md);
    max-width: 600px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transform: scale(0.92);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    padding: 1.2rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-accent);
}

.modal-header h3 {
    color: var(--color-bg);
    font-size: 1.35rem;
    font-family: var(--font-header);
    font-weight: 500;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--color-accent-light);
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--color-white);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.8rem 1.8rem;
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
}

.modal-body h4 {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
    color: var(--color-primary-dark);
    font-weight: 600;
}

.modal-body p {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.2rem;
    color: var(--color-text-muted);
    font-weight: 300;
}

/* Elegant Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.form-group-full {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(107, 26, 43, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-success-message {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 0;
    animation: fadeIn 0.5s ease forwards;
}

.form-success-icon {
    width: 50px;
    height: 50px;
    background: rgba(46, 125, 50, 0.1);
    color: var(--color-success);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.form-success-message h4 {
    font-size: 1.4rem;
    color: var(--color-primary-dark);
    margin-bottom: 0.4rem;
}

.form-success-message p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* --- Custom Animations --- */
@keyframes crestFloat {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 20px rgba(201, 146, 58, 0.4), 0 5px 20px rgba(0,0,0,0.5);
    }
    50% {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 0 0 35px rgba(229, 180, 97, 0.75), 0 15px 30px rgba(0,0,0,0.35);
        border-color: var(--color-accent-light);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 20px rgba(201, 146, 58, 0.4), 0 5px 20px rgba(0,0,0,0.5);
    }
}

@keyframes divineGlow {
    0% {
        background: radial-gradient(circle at 50% 30%, rgba(201, 146, 58, 0.18) 0%, transparent 60%);
    }
    50% {
        background: radial-gradient(circle at 50% 32%, rgba(201, 146, 58, 0.32) 0%, transparent 65%);
    }
    100% {
        background: radial-gradient(circle at 50% 30%, rgba(201, 146, 58, 0.18) 0%, transparent 60%);
    }
}

@keyframes lightSweeps {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 200%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Media Queries --- */
@media (max-width: 768px) {
    .header {
        padding: 1.2rem 1.5rem;
    }
    .header .logo span {
        display: none; /* keep it compact on mobile headers */
    }
    .hero-content {
        padding: 0 1.2rem;
        margin-top: 5rem;
        margin-bottom: 4.5rem;
    }
    .hero-crest {
        width: 90px;
        height: 90px;
    }
    .hero h1 {
        font-size: 1.95rem;
    }
    .hero h1 span {
        font-size: 1.2rem;
    }
    .hero .description {
        font-size: 0.95rem;
        margin-bottom: 1.2rem;
    }
    .countdown-grid {
        gap: 0.5rem;
    }
    .countdown-number {
        font-size: 1.85rem;
    }
    .countdown-label {
        font-size: 0.6rem;
    }
    .subscribe-panel {
        padding: 0.8rem;
    }
    .subscribe-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    .subscribe-panel button {
        padding: 0.75rem;
        width: 100%;
    }
    .action-buttons-row {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }
    .action-buttons-row button {
        width: 100%;
    }
    .flat-footer {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 1.5rem;
        text-align: center;
    }
    .flat-footer .charity-tag {
        font-size: 0.7rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .form-group-full {
        grid-column: span 1;
    }
    .modal-card {
        max-width: 95%;
    }
}

/* Height-based media queries for landscape mobile / short viewports */
@media (max-height: 680px) {
    .hero-content {
        margin-top: 3.5rem;
        margin-bottom: 3.5rem;
    }
    .hero-crest {
        width: 70px;
        height: 70px;
        margin-bottom: 0.5rem;
    }
    .badge {
        margin-bottom: 0.4rem;
        padding: 0.2rem 0.8rem;
        font-size: 0.7rem;
    }
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    .hero h1 span {
        font-size: 1.15rem;
    }
    .hero .description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    .countdown-container {
        margin-bottom: 1rem;
        max-width: 420px;
    }
    .countdown-card {
        padding: 0.5rem 0.3rem;
    }
    .countdown-number {
        font-size: 1.6rem;
    }
    .subscribe-panel {
        margin-bottom: 1rem;
        max-width: 420px;
    }
}
