/* Base Theme & Layout Reset */
body {
    background-color: #121212; /* Slightly off-black */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography Hierarchy */
h1 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 22pt;
    color: #10B981; /* Emerald Mint */
    margin-bottom: 10px;
}

h2, h3 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    font-size: 16pt;
    color: #2DD4BF; /* Light Mint / Teal */
    margin-top: 0;
    margin-bottom: 15px;
}

p, label, li {
    font-family: 'Inter', sans-serif;
    font-size: 12pt;
    color: #FFFFFF;
    line-height: 1.6;
}

p {
    margin-bottom: 20px;
}

ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

/* Links & Inline Formatting */
a.email-link, a.external-link {
    color: #10B981;
    text-decoration: none;
    font-weight: bold;
}

a.email-link:hover, a.external-link:hover {
    text-decoration: underline;
}

/* Header & Shared Navigation Bar */
header {
    background-color: #0F172A; /* Deep Slate Blue */
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1E293B;
}

.logo {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 22pt;
    color: #10B981;
    margin: 0;
    text-decoration: none;
}

.desktop-nav {
    display: flex;
    gap: 15px;
}

/* Component Buttons (2022 Aesthetic Guidelines) */
.btn {
    background-color: #333333; /* Dark grey interior */
    border: 1.75px solid #10B981; /* Precise 1.75px borders */
    border-radius: 7px; /* Strict 7px corners */
    color: #10B981;
    padding: 10px 24px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 12pt;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background-color: #404040;
}

/* Full-Screen Mobile Navigation Overlay */
.menu-toggle-btn {
    display: none;
    background-color: #333333;
    border: 1.75px solid #10B981;
    border-radius: 7px;
    color: #10B981;
    padding: 8px 16px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 12pt;
    font-weight: 700;
    cursor: pointer;
}

.mobile-menu-overlay {
    display: none; /* Toggled via JavaScript script.js */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0F172A;
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #10B981;
    font-size: 36pt;
    font-family: 'Roboto Condensed', sans-serif;
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
    width: 80%;
}

.mobile-nav-links .btn {
    width: 100%;
    box-sizing: border-box;
    font-size: 16pt;
    padding: 15px 0;
}

/* Page Structures & Layout Grids */
main {
    flex: 1;
    padding: 60px 50px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.hero-section {
    margin-bottom: 60px;
}

.services-grid, .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.contact-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.service-card, .project-card, .resume-card, .price-card, .contact-card, .donation-box {
    background-color: #1A1A1A;
    padding: 40px;
    border: 1px solid #2A2A2A;
    border-radius: 7px;
    box-sizing: border-box;
}

.price-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.price {
    font-size: 24pt;
    font-weight: bold;
    color: #FFFFFF;
    margin: 15px 0;
    font-family: 'Roboto Condensed', sans-serif;
}

/* Input Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    background-color: #2A2A2A;
    border: 1px solid #404040;
    border-radius: 4px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 12pt;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #10B981;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Interactive Donation Component */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

/* Error Layout Formatting */
.error-code {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 72pt;
    font-weight: 700;
    color: #1E293B;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.center-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Footer Element */
footer {
    background-color: #0F172A;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #1E293B;
    margin-top: auto;
}

footer p {
    font-family: 'Lato', sans-serif;
    font-size: 8pt;
    color: #FFFFFF;
    margin: 0;
}

/* Viewport Adjustments for Responsive Display */
@media (max-width: 768px) {
    main {
        padding: 30px 20px;
    }
    header {
        padding: 20px;
    }
    .desktop-nav {
        display: none;
    }
    .menu-toggle-btn {
        display: block;
    }
    .portfolio-container, .contact-layout-grid, .tier-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Google Sign-In Button Component */
.btn-google {
    background-color: #FFFFFF;
    border: 1px solid #DADCE0;
    border-radius: 7px;
    color: #3C4043;
    padding: 10px 24px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 12pt;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 15px;
    transition: background-color 0.2s;
}

.btn-google:hover {
    background-color: #F8F9FA;
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Structural Divider Rule */
.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    color: #A0A0A0;
}

.auth-divider::before, .auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #404040;
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* Selected Active Tier Button Styling */
.tier-grid .tier-btn.active {
    background-color: #10B981 !important;
    color: #0B0F19 !important;
    border-color: #10B981 !important;
    font-weight: 700;
}

/* Custom Number Input Component Styling */
.tier-input {
    background-color: #0B0F19;
    border: 2px solid #2A2A2A;
    border-radius: 4px;
    color: #FFFFFF;
    padding: 10px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 11pt;
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.tier-input:focus, .tier-input.active {
    border-color: #10B981;
}

/* Clear standard spinner arrows from the number field */
.tier-input::-webkit-outer-spin-button,
.tier-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.tier-input[type=number] {
    -moz-appearance: textfield;
}

/* Error boundary indicator for invalid input values */
.tier-input.error-field {
    border-color: #EF4444 !important;
}

/* Core typography configuration - strict sans-serif enforcement */
body {
    font-family: 'Inter', 'Lato', 'Roboto Condensed', sans-serif !important;
    background-color: #0B0F19;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, .btn, .tier-input, select {
    font-family: 'Roboto Condensed', 'Inter', sans-serif !important;
}

/* Active Navigation State Highlight */
.desktop-nav .active-nav,
.mobile-nav-links .active-nav {
    background-color: #10B981 !important; /* Green background */
    color: #0B0F19 !important;            /* Black text */
    font-weight: 700;
}

/* Page Transition Mask System */
#page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 9999; /* Sits completely on top of all elements */
    opacity: 0;
    pointer-events: none; /* Allows clicking through when transparent */
    transition: opacity 0.05s ease-in-out;
}

/* State changes triggered via lifecycle scripts */
#page-overlay.active {
    opacity: 1;
    pointer-events: auto; /* Blocks accidental clicks during transit */
}

/* Page Transition Mask System */
#page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#page-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Donation Tier Layout Architecture */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.2fr; /* Four columns on desktop layout sizes */
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

/* Mobile Responsive Override rules */
@media (max-width: 600px) {
    .tier-grid {
        grid-template-columns: repeat(3, 1fr); /* Drop preset buttons into a 3-column row */
    }
    
    .tier-input {
        grid-column: span 3; /* Force the custom input field to stretch fully underneath */
        width: 100%;
        box-sizing: border-box;
    }
}

/* Footer hyperlink styling */
footer p {
    color: #6B7280; /* Subtle gray for the standard text */
    font-size: 10pt;
    font-family: 'Inter', sans-serif;
}

footer a {
    color: #9CA3AF; /* Muted silver for unvisited links */
    text-decoration: none;
    margin: 0 8px;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

/* Hover state matching the CWS interactive theme accents */
footer a:hover {
    color: #10B981; 
    border-bottom-color: #10B981;
}

/* Ensure active/visited links don't turn default browser purple */
footer a:visited {
    color: #9CA3AF;
}

footer a:focus {
    outline: none;
    color: #10B981;
}

@media (max-width: 768px) {
    footer p {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }
    
    footer a {
        margin: 4px 0;
        display: inline-block;
    }
}