/* --- Core Resets & Variables --- */
:root {
    --bg-color: #faf9f6;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent-color: #c48b52; /* Wood tone from the placard */
    --card-bg: #ffffff;
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

body, html {
    overflow-x: hidden;
    width: 100%;
}

body {
    position: relative;
    background-color: var(--bg-color);
    background-image: url('../assets/subtle_white_wood_grain.png');
    background-repeat: repeat;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Entrance Animation --- */
.entrance-void {
    position: fixed;
    inset: 0;
    background-color: #ffffff;
    z-index: 10000;
    opacity: 1;
    pointer-events: none; /* Let clicks pass through once invisible */
    transition: opacity 1s ease-in-out;
}

.entrance-void.fade-out {
    opacity: 0;
}

/* --- Global Navigation --- */
.global-nav {
    position: sticky;
    top: 0;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.2rem;
    gap: 0.5rem;
}

.nav-brand img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Active State */
.nav-link.active {
    color: var(--accent-color);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Mobile Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }
    .nav-links.open {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    .nav-link {
        width: 100%;
        padding: 1.5rem 5%;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-link.active::after {
        display: none; /* remove underline on mobile */
    }
    .nav-link.active {
        background-color: rgba(196, 139, 82, 0.05);
    }
}

/* --- Artistic Background Tools --- */
.bg-tool {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
    mix-blend-mode: multiply;
}

.hand-plane {
    top: 15%;
    right: calc(50% - 800px);
    width: 600px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.hand-drill {
    top: 5%;
    left: calc(50% - 800px);
    width: 500px;
    opacity: 0.2;
    transform: rotate(30deg);
}

.vintage-clamps {
    bottom: 2%;
    right: calc(50% - 800px);
    width: 650px;
    opacity: 0.15;
    transform: rotate(-10deg);
}

@media (max-width: 1400px) {
    .hand-plane { right: -5%; }
    .hand-drill { left: -5%; }
    .vintage-clamps { right: -5%; }
}

/* --- Layout Wrappers --- */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 2rem 0 6rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    width: 90%;
    max-width: 420px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0.9; /* Makes it look slightly blended into the wood */
}

.hero .subtitle {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero .title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.2;
    font-weight: 700;
}

/* --- Vision Statement --- */
.vision-statement {
    text-align: center;
    padding: 4rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    margin-bottom: 6rem;
}

.vision-statement blockquote {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.vision-statement .reference {
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* --- Pillars Grid --- */
.pillars-section {
    margin-bottom: 6rem;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force one row of 4 on desktop */
    gap: 2rem;
}

.pillar-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 1);
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
    background: rgba(255, 255, 255, 0.85);
}

.pillar-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(196, 139, 82, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.pillar-card h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.pillar-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- 10/10/3 Metrics --- */
.vision-metrics {
    margin-bottom: 4rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.metric {
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.metric .number {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.metric .label {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 grid on tablets */
    }
}

@media (max-width: 768px) {
    .bg-tool {
        opacity: 0.05; /* Fade them out more on mobile */
    }
    
    .hand-plane {
        width: 300px;
        top: 5%;
        right: -20%;
    }

    .hand-drill {
        width: 300px;
        top: 5%;
        left: -20%;
    }

    .vintage-clamps {
        width: 350px;
        bottom: 1%;
        right: -20%;
    }

    .page-hero {
        padding: 4rem 1rem 2rem 1rem;
    }
    .page-hero .title {
        font-size: 2.5rem;
    }

    .page-content {
        padding: 2rem 5%;
    }
    
    .vision-statement {
        padding: 3rem 1.5rem;
    }

    .pillars-grid {
        grid-template-columns: 1fr; /* Single stack on mobile */
    }
}

/* --- Word Hub Page --- */
.stark-white-bg {
    background-color: #ffffff;
    background-image: none; /* Override wood grain */
}

.word-page-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 5%;
}

.word-hero {
    text-align: center;
    padding: 4rem 0 6rem 0;
}

.word-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-main);
}

.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    justify-content: center;
}

.word-block {
    aspect-ratio: 16 / 9;
    background-color: #121315; /* Sleek charcoal fallback */
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.word-block:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.block-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 19, 21, 0.9), rgba(18, 19, 21, 0.4));
    transition: background 0.3s ease;
}

.word-block:hover .block-overlay {
    background: linear-gradient(to top, rgba(18, 19, 21, 0.95), rgba(18, 19, 21, 0.6));
}

.block-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.word-block .block-subtitle {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --- Reflect Digital Reader App --- */
.reader-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 80px); /* Fill screen below nav */
}

/* Sidebar */
.day-selector {
    width: 320px;
    background: #f4f4f4;
    border-right: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.day-selector h3 {
    padding: 1.5rem;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    border-bottom: 1px solid #eaeaea;
    background: #ffffff;
}

.day-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.day-list-btn {
    padding: 1rem 1.5rem;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #eaeaea;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-main);
    transition: background 0.2s;
}

.day-list-btn:hover {
    background: #ebebeb;
}

.day-list-btn.active {
    background: var(--accent-color);
    color: #ffffff;
    font-weight: 600;
}

/* Reading Pane */
.reading-pane {
    flex-grow: 1;
    padding: 3rem 5%;
    overflow-y: auto;
    background: #ffffff;
}

.reading-header {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.devotional-cover-small {
    width: 120px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.reading-day {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.reading-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.reading-ot {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Content Sections */
.devotional-section {
    margin-bottom: 2.5rem;
}

.devotional-section h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* --- DNA Accordion --- */
.dna-grid {
    max-width: 800px; 
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dna-item {
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-left: 4px solid var(--accent-color);
    overflow: hidden;
    transition: background-color 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}

.dna-btn {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    transition: color 0.3s;
}

.dna-item.active {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(196, 139, 82, 0.2);
}

.dna-item.active .dna-btn {
    color: white;
}

.dna-icon {
    font-size: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: monospace;
}

.dna-item.active .dna-icon {
    transform: rotate(45deg);
}

.dna-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dna-item.active .dna-content-wrapper {
    grid-template-rows: 1fr;
}

.dna-content {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.95);
    padding: 0 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.dna-item.active .dna-content {
    padding-bottom: 1.5rem;
}

.devotional-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    background-color: var(--accent-color);
}

.devotional-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333333;
}

/* Journaling / Questions */
.questions-section {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 12px;
}

.questions-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.questions-section textarea {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
    resize: vertical;
}

/* Memory Verse */
.memory-verse-section blockquote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--accent-color);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

/* Nav Buttons */
.reading-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 30px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- Auth Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form input {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
}

.btn-primary {
    background: var(--text-main);
    color: #ffffff;
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .reader-container {
        flex-direction: column;
    }
    
    .day-selector {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 1px solid #eaeaea;
    }
}
