/* ==========================================================================
   CSS Variables & Globals
   ========================================================================== */
:root {
    /* Colors */
    --color-primary: #0B1F3A;       /* Deep Navy Blue */
    --color-secondary: #1A1A1A;     /* Charcoal Grey */
    --color-accent: #C9A646;        /* Royal Gold */
    --color-neutral: #F8F6F1;       /* Ivory / Off-white */
    --color-text-dark: #2C3539;
    --color-text-light: #B0B5B9;
    --color-border: rgba(201, 166, 70, 0.2);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Layout */
    --container-width: 1200px;
    --border-radius: 4px;
    
    /* Transition */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-neutral);
    background-color: var(--color-secondary);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-accent);
    font-weight: 600;
}

a {
    color: var(--color-neutral);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-padding {
    padding: var(--space-xl) 0;
}

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

.mt-2 { margin-top: 2rem; }

.dark-bg {
    background-color: var(--color-primary);
}

/* Base Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.btn-primary:hover {
    background-color: #D5BA6B;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(201, 166, 70, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-3px);
}

/* ==========================================================================
   Gate Page Styles
   ========================================================================== */
.gate-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, var(--color-primary), var(--color-secondary));
    position: relative;
    overflow: hidden;
}

.gate-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../gate_images/gate_bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 1;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.05;
    z-index: 2;
    pointer-events: none;
    animation: noiseShift 8s infinite step-end;
}

@keyframes noiseShift {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
}

.spotlight {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(201,166,70,0.1) 0%, transparent 60%);
    z-index: 3;
    pointer-events: none;
}

.gate-container {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding: 3rem;
    background: rgba(11, 31, 58, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 166, 70, 0.2);
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 2s ease-out;
}

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

.gate-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.gate-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-weight: 300;
}

.gate-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.input-wrapper { position: relative; width: 100%; }

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-neutral);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    transition: var(--transition-fast);
}

.input-wrapper input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(201, 166, 70, 0.2);
}

.pulse-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 0 0 0 rgba(201, 166, 70, 0.4);
    animation: pulse 2s infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.95); box-shadow: 0 0 0 0 rgba(201, 166, 70, 0.4); }
    70% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 10px rgba(201, 166, 70, 0); }
    100% { transform: translate(-50%, -50%) scale(0.95); box-shadow: 0 0 0 0 rgba(201, 166, 70, 0); }
}

.gate-btn {
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-fast);
}

.gate-btn:hover {
    background: #D5BA6B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 166, 70, 0.3);
}

.error-text {
    color: #ff4d4d;
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition-fast);
    height: 0;
}
.error-text.visible { opacity: 1; height: auto; }

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-slow);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(11, 31, 58, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(201, 166, 70, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    width: 95%;
    max-width: 1600px; /* Provides full-width horizontal space from left to right */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 1px;
}

.logo-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-light);
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Aligns menu items to the right */
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.25rem; /* Evenly distributed spacing */
}

.main-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--color-accent);
    transition: var(--transition-fast);
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.mobile-menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-neutral);
    transition: var(--transition-fast);
}

.mobile-menu-toggle span:nth-child(1) { top: 0; }
.mobile-menu-toggle span:nth-child(2) { top: 9px; }
.mobile-menu-toggle span:nth-child(3) { top: 18px; }

/* ==========================================================================
   Hero Sections
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-color: var(--color-secondary);
    overflow: hidden;
}

.hero-section.inner-hero {
    height: 60vh;
    min-height: 400px;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(26,26,26,0.9) 0%, rgba(11,31,58,0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding-top: 5rem; /* account for header */
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-neutral);
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    color: var(--color-accent);
}

.hero-subtitle span {
    font-size: 1rem;
    color: var(--color-text-light);
    display: block;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Content Sections (Home)
   ========================================================================== */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 1px;
    background: var(--color-accent);
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.highlight-list {
    list-style: none;
    margin-top: 2rem;
}

.highlight-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.highlight-list li::before {
    content: '♦';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 1.2rem;
}

.highlight-list strong {
    color: var(--color-accent);
    font-weight: 600;
}

.intro-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.intro-image img {
    transition: transform var(--transition-slow);
}

.intro-image:hover img {
    transform: scale(1.05);
}

.image-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60%; height: 60%;
    background: var(--color-accent);
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
}

/* Philosophy Section */
.philosophy-section {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.philosophy-bg-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
}

.philosophy-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.card {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid var(--color-border);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
    transition: var(--transition-fast);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--color-accent);
}

.card-icon {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--color-neutral);
}

/* Two-column layout patterns */
.content-left-image-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.image-side img {
    border-radius: var(--border-radius);
    box-shadow: 10px 10px 0 var(--color-primary), 20px 20px 0 rgba(201,166,70,0.3);
}

/* CTA Buttons layout */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: #030A14; /* Extremely dark navy */
    border-top: 1px solid var(--color-border);
    padding-top: 4rem;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    color: var(--color-accent);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-neutral);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-col.contact-col p {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(245,245,245,0.5);
}

.credit a {
    color: var(--color-accent);
}

.back-to-top {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #D5BA6B;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    .intro-grid, .content-left-image-right {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-title {
        font-size: 3rem;
    }
    .image-side img {
        margin-top: 2rem;
        box-shadow: 5px 5px 0 var(--color-primary), 10px 10px 0 rgba(201,166,70,0.3);
    }
}

@media (max-width: 1024px) {
    .main-nav ul {
        gap: 1.25rem;
    }
    .main-nav a {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* simple hidden for now, assume JS toggles a class for mobile menu */
    }
    .mobile-menu-toggle {
        display: block;
    }
    .philosophy-cards {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}
