/* This file contains CSS rules that are identical across all pages of the website. */
/* These rules should be linked once in the <head> of each HTML file. */

/* Common CSS Variables for Dark/Light Mode */
:root {
    --color-primary: #ffffff;
    --color-secondary: #000000;
    --font-family-header: 'Gideon Roman', serif;
    --font-family-body: 'Roboto Serif', serif;
    --border-color: var(--color-primary);
}

[data-theme="light"] {
    --color-primary: #000000;
    --color-secondary: #ffffff;
    --border-color: var(--color-primary);
}

/* All images grayscale */
img {
    filter: grayscale(100%);
}

/* All hyperlinks */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: var(--color-primary);
}

a:visited {
    color: var(--color-primary);
    text-decoration: none;
}

/* Common Heading Base Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-header);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary);
}

/* Common H1 Specific Style */
h1 {
    font-size: 3em;
    text-align: center;
    margin-bottom: 40px;
}

/* Common H2 + H3 Styles */
h2 { font-size: 2em; margin-top: 60px; margin-bottom: 30px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; text-align: center; }
h3 { font-size: 1.5em; margin-top: 40px; margin-bottom: 20px; }

/* Common Header Layout and Styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

/* START NAV LINKS STYLES */
.logo {
    font-family: var(--font-family-header);
    font-size: 1.8em;
    letter-spacing: 3px;
    text-transform: none; /* Allows for mixed case, overriding default uppercase */
    font-style: italic; /* Makes the entire logo italic */
    color: var(--color-primary);
    text-decoration: none; /* Ensure logo link doesn't have underline */
    white-space: nowrap;
}

.header-nav {
    display: flex;
    gap: 30px; /* Space between links */
}

.header-nav a {
    font-family: var(--font-family-body); /* Uses updated body font */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    text-decoration: none;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--color-primary); /* Stays primary color */
}

.header-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.header-nav a:hover::after {
    width: 100%;
}
/* END NAV LINKS STYLES */

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--color-primary);
    padding: 10px 10px;
    cursor: pointer;
    font-family: var(--font-family-body); /* Uses updated body font */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

/* BURGER MENU STYLES */
.burger-menu {
    display: none; /* Hide by default */
    background: none;
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 10px;
    z-index: 100; /* Ensure it's on top of other elements */
}

.burger-menu .bar {
    width: 16px;
    height: 1px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Styles for when menu is open */
.burger-menu.active .bar:nth-child(1) {
    transform: translateY(13.75px) rotate(45deg);
    font-style: italic;
}
.burger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.burger-menu.active .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    font-style: italic;
}

/* Common Body Layout and Styling */
body {
    font-family: var(--font-family-body);
    background-color: var(--color-secondary);
    color: var(--color-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll due to potential overflows */
}

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

/* Common Quote Styling */
blockquote {
    font-family: var(--font-family-header);
    font-style: italic;
    margin: 40px auto;
    padding: 20px 40px;
    border-left: 2px solid var(--border-color);
    max-width: 800px;
    text-align: center;
    font-size: 1.2em;
}

.cta-section {
    text-align: center;
    margin-bottom: 40px;
}
.cta-button {
    /* START CTA BUTTON TEXT VISIBILITY FIX */
    background-color: var(--color-secondary); /* Background color changes with theme */
    color: var(--color-primary); /* Text color changes with theme */
    border: 1px solid var(--color-primary); /* Border color changes with theme */
    /* END CTA BUTTON TEXT VISIBILITY FIX */
    padding: 15px 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-family-header);
    font-size: 0.9em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    /* START CTA BUTTON RESPONSIVE FIX */
    white-space: nowrap; /* Prevent text from wrapping */
    /* END CTA BUTTON RESPONSIVE FIX */
}
.cta-button:hover {
    /* START CTA BUTTON TEXT VISIBILITY FIX - HOVER */
    background-color: var(--color-primary);
    color: var(--color-secondary);
    /* END CTA BUTTON TEXT VISIBILITY FIX - HOVER */
}

/* Email Submission Form Styling */

/* Blinking Cursor */
.blinking-cursor {
    font-weight: bold;
    animation: blink-caret 1s infinite;
}

@keyframes blink-caret {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

#email-input {
    background: transparent;
    background-color: #1a1a1a;    
    border: var(white);
    color: white;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    outline: none;
    padding-left: 5px; /* Adds space between prompt and input */
}

.submit-button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--color-primary);
    padding: 4px 7px;
    cursor: pointer;
    font-family: var(--font-family-body); /* Uses updated body font */
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.submit-button:hover {
    border: 1px dashed var(--border-color);
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of other content */
}

.modal-content {
    background-color: var(--color-secondary);
    color: var(--text-color);
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-message {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position */
    bottom: 30px; /* 30px from the bottom */
    right: 30px; /* 30px from the right */
    z-index: 99; /* Ensure it's above other content */
    border: 1px solid var(--border-color); /* Consistent border */
    background-color: var(--color-secondary); /* Background matches theme */
    color: var(--color-primary); /* Text color matches theme */
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 5px; /* Slightly rounded corners */
    font-size: 24px; /* Large arrow */
    line-height: 1;
    transition: background-color 0.3s, color 0.3s, opacity 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#scrollToTopBtn:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

/* Common Footer Layout and Styling */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-family-body); /* Uses updated body font */
}

/* Preview iframe box */
.box{
    display: none;
    width: 100%;
    transition: all 0.5s ease;
    border: 3px solid var(--accent-color);
    border-radius: 8px;
}

a:hover + .box,.box:hover{
    display: block;
    position: relative;
    z-index: 100;
    transition: 0.3s ease;
}

/* Contact Us (from engage.css) */
.contact-us {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 15px;
    font-size: 1.2rem;
}

/* Principles Boxes - General */
.principle-boxes {
    border: 1px solid var(--border-color);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.principle-boxes h3 {
    margin-top: 0;
    border-bottom: none; /* No border for H3 inside box */
    padding-bottom: 0;
    font-size: 1.6em;
    margin-bottom: 15px;
}
.principle-boxes p {
    font-size: 0.95em;
    margin-bottom: 20px;
}
.principle-boxes blockquote {
    font-size: 1em;
    margin: 15px 0 0 0;
    padding: 10px 0;
    border-left: none; /* No border inside principle box */
}
.principle-boxes blockquote:before, .principle-box blockquote:after {
    content: '"'; /* Add quotation marks */
    font-size: 1.2em;
    line-height: 0;
    vertical-align: bottom;
}
.principle-boxes blockquote:after {
    margin-left: 2px;
}
.principle-boxes blockquote:before {
    margin-right: 2px;
}

/* 3D CUBE */
/* 3D Environment */
    .scene {
        width: 200px;
        height: 200px;
        margin: 30px auto;
        perspective: 800px;
    }
    
    /* 3D Object */
    .cube {
        position: relative;
        width: 100%;
        height: 100%;
        transform-style: preserve-3d;
        transform-origin: 50% 50%;
        animation: none;
    }

    /* Styling for faces */    
    .face {
        position: absolute;
        width: 200px;
        height: 200px;
        border: 2px solid var(--color-primary);
        border-radius: 8px;
        font-family: 'Gideon Roman', serif;
        font-size: 0.8rem;
        font-weight: 700;
        line-height: 200px;
        text-align: center;
        box-sizing: border-box;
    }

    .front {
        transform: translateZ(100px);
        background-color: var(--accent-secondary);
        text-shadow: 2px 2px var(--color-secondary);
    }

    .back {
        transform: translateZ(-100px) rotateY(180deg);
        background-color: var(--accent-secondary);
        text-shadow: 2px 2px var(--color-secondary);
    }

    .left {
        transform: translateX(-100px) rotateY(-90deg);
        background-color: var(--color-secondary);
        text-shadow: 2px 2px var(--accent-secondary);
        filter: invert(100%);
    }

    .right {
        transform: translateX(100px) rotateY(90deg);
        background-color: var(--color-secondary);
        text-shadow: 2px 2px var(--accent-secondary);
        filter: invert(100%);
    }

    .top {
        transform: translateY(-100px) rotateX(90deg);
        background-color: transparent;
        text-shadow: 2px 2px var(--accent-secondary);
    }

    .bottom {
        transform: translateY(100px) rotateX(90deg);
        background-color: transparent;
        text-shadow: 2px 2px var(--accent-secondary);
    }


/* === MEDIA QUERIES :: RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.3em; }
    blockquote { font-size: 1em; padding: 15px 20px; }

    .logo {
        font-size: 1.5em; /* Reduces font size for smaller screens */
    }
    
    header {
        flex-direction: row; /* Change to row */
        justify-content: space-between; /* Space out items */
        align-items: center; /* Vertically align */
        padding: 20px; /* Adjust padding as needed */
        gap: 10px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .theme-toggle { 
        font-size: 0.8em;
    }

    /* Adjust nav links for mobile */
    .header-nav {
        display: none; /* Keep hidden by default */
        position: fixed; /* Use fixed position */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%; /* Full height of the viewport */
        background-color: var(--color-secondary);
        flex-direction: column;
        justify-content: center; /* Vertically center links */
        align-items: center; /* Horizontally center links */
        gap: 40px; /* Increase gap between links for better touch targets */
        z-index: 95; /* Lower than burger menu but higher than other content */
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%); /* Start off-screen */
    }

    .header-nav.active {
        display: flex; /* Display when active */
        transform: translateX(0); /* Slide into view */
        background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent black */
        backdrop-filter: blur(15px); /* Blurs the content behind the menu */
    }

    .header-nav a {
        font-size: 1.5em; /* Make links larger for mobile */
        padding: 20px; /* Add padding for larger touch area */
    }
    
    .burger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        /* Standardize the button dimensions to match the burger menu */
        height: 40px;
        width: 40px;
        padding: 0;
    }

    /* Standardize the burger menu line dimensions */
    .burger-menu span {
        width: 28px;
        height: 2px;
        margin: 4px 0;
    }
        
    #scrollToTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 8px 12px;
        font-size: 20px;
    }
}

/* Landscape/Portrait adaptation (subtle changes) */
@media screen and (orientation: landscape) and (max-height: 500px) {
    /* Adjustments for very narrow landscape views (e.g., small phones held sideways) */
    .container { padding: 10px; }
    /* Adjust nav links for very narrow landscape */
    .header-nav {
        flex-direction: row; /* Keep horizontal in landscape */
        gap: 15px;
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* Small Logo for screens smaller than 500px */
/* CTA BUTTON RESPONSIVE STYLE */
@media (max-width: 407px) {
    .cta-button {
        padding: 12px 20px; /* Slightly reduce padding to help fit on very small screens */
        font-size: 0.8em; /* Slightly reduce font size if needed */
    }
}
/* CTA BUTTON RESPONSIVE STYLE */

@media (max-width: 360px) {
    h1 { font-size: 1.5em; }

    .logo {
        font-size: 1em; /* Reduced size to help fit on very small screens */
    }

    .cta-button {
    padding: 12px 20px; /* Slightly reduce padding to help fit on very small screens */
    font-size: 0.6em; /* Slightly reduce font size if needed */
    }
}