/* ===========================================
   FRACTAL FAITH MEDIA - Stylesheet
   Color Palette: Nature + Cosmos (C.S. Lewis inspired)
   =========================================== */

/* ---------- CSS Variables ---------- */
:root {
    /* Brand Colors */
    --sky-blue: #5BA3C4;
    --forest-green: #4A7C59;
    --soft-gold: #D4A056;
    --warm-cream: #F5F1E8;
    --cloud-white: #FEFEFE;

    /* Text Colors */
    --charcoal: #2C2C2C;
    --medium-gray: #6B6B6B;

    /* Border Color */
    --border-light: #E5DFD1;

    /* Spacing */
    --section-spacing: 80px;
    --card-padding: 30px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', 'EB Garamond', 'Georgia', serif;
    font-size: 18px;
    line-height: 1.8;
    color: var(--charcoal);
    background-color: var(--warm-cream);
    min-height: 100vh;
}

/* ---------- Typography ---------- */
h1 {
    font-size: 48px;
    font-weight: 400;
    color: var(--sky-blue);
    letter-spacing: 2px;
    line-height: 1.3;
}

h2 {
    font-size: 32px;
    font-weight: 400;
    color: var(--forest-green);
    line-height: 1.4;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--forest-green);
    line-height: 1.4;
}

p {
    margin-bottom: 1.5em;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--sky-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* ---------- Layout ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-container {
    max-width: 700px;
    margin: 0 auto;
}

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

/* ---------- Navigation ---------- */
.nav {
    position: sticky;
    top: 0;
    background: var(--cloud-white);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

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

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--forest-green);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-logo:hover {
    color: var(--sky-blue);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-size: 16px;
    color: var(--forest-green);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--sky-blue);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--sky-blue);
    border-bottom-color: var(--sky-blue);
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--forest-green);
    cursor: pointer;
}

/* ---------- Header (Hero) ---------- */
.header {
    text-align: center;
    padding: 80px 40px;
    background: var(--warm-cream);
}

.header h1 {
    margin-bottom: 20px;
}

.header .tagline {
    font-size: 20px;
    font-style: italic;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Page Header (for Essays and About pages) */
.page-header {
    text-align: center;
    padding: 60px 40px 40px;
    background: var(--warm-cream);
}

.page-header h1 {
    margin-bottom: 30px;
}

/* ---------- Divider ---------- */
.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--sky-blue), transparent);
    margin: 40px auto;
    max-width: 600px;
}

.divider-small {
    height: 1px;
    background: var(--sky-blue);
    margin: 30px 0;
    max-width: 100%;
}

/* ---------- Sections ---------- */
.section {
    padding: var(--section-spacing) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    margin-bottom: 20px;
}

/* ---------- Cards ---------- */
.card {
    background: var(--cloud-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--card-padding);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--sky-blue);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.card-title {
    margin-bottom: 10px;
}

.card-date {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 15px;
}

.card-description {
    margin-bottom: 20px;
    color: var(--charcoal);
}

.card-link {
    font-weight: 600;
    color: var(--sky-blue);
}

.card-link:hover {
    text-decoration: underline;
}

/* Essay Card (List Style) */
.essay-card {
    background: var(--cloud-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: var(--card-padding);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.essay-card:hover {
    border-left-color: var(--sky-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---------- About Preview (Home Page) ---------- */
.about-preview {
    background: var(--cloud-white);
    border: 2px solid var(--sky-blue);
    border-radius: 8px;
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-preview p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 25px;
}

.about-preview a {
    font-weight: 600;
}

/* ---------- About Page Content ---------- */
.about-content {
    background: var(--cloud-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 50px;
    max-width: 700px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 1.8em;
}

.about-content p:last-of-type {
    margin-bottom: 0;
}

.about-link {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--sky-blue);
    text-align: center;
    font-size: 16px;
}

/* ---------- Coming Soon Message ---------- */
.coming-soon {
    background: var(--warm-cream);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-top: 40px;
}

.coming-soon p {
    font-style: italic;
    color: var(--medium-gray);
    margin: 0;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--warm-cream);
    padding: 50px 40px;
    text-align: center;
    margin-top: var(--section-spacing);
    border-top: 1px solid var(--border-light);
}

.footer-copyright {
    color: var(--medium-gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-tagline {
    font-style: italic;
    color: var(--medium-gray);
    font-size: 14px;
}

/* ---------- Drop Caps (for essays) ---------- */
.essay-content p:first-of-type::first-letter {
    font-size: 72px;
    line-height: 60px;
    float: left;
    margin: 8px 12px 0 0;
    color: var(--sky-blue);
    font-weight: 400;
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
    /* Typography scaling */
    h1 {
        font-size: 36px;
        letter-spacing: 1px;
    }

    h2 {
        font-size: 26px;
    }

    h3 {
        font-size: 20px;
    }

    body {
        font-size: 16px;
    }

    /* Navigation */
    .nav-container {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .nav-logo {
        font-size: 16px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 14px;
    }

    /* Container */
    .container {
        padding: 0 20px;
    }

    /* Header */
    .header {
        padding: 50px 20px;
    }

    .header .tagline {
        font-size: 18px;
    }

    /* Page Header */
    .page-header {
        padding: 40px 20px 30px;
    }

    /* Sections */
    .section {
        padding: 50px 0;
    }

    :root {
        --section-spacing: 50px;
        --card-padding: 25px;
    }

    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
    }

    /* About Preview */
    .about-preview {
        padding: 30px;
    }

    /* About Content */
    .about-content {
        padding: 30px;
    }

    /* Footer */
    .footer {
        padding: 40px 20px;
    }

    /* Drop caps smaller on mobile */
    .essay-content p:first-of-type::first-letter {
        font-size: 56px;
        line-height: 48px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .header {
        padding: 40px 15px;
    }

    .card-grid {
        gap: 20px;
    }
}
