/* 
 * Bhakti Bhusana Swami Unique Digital Experience
 * Random Generative Design (RNG) Variables and Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;800&family=Outfit:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Primary Colors: Saffron & Krishna Blue */
    --c-saffron: #f47f20;
    --c-saffron-light: #f99f57;
    --c-krishna-blue: #0b2239;
    --c-krishna-blue-light: #163c63;
    
    /* Secondary & Accents */
    --c-gold: #d4af37;
    --c-gold-soft: #ebd68a;
    --c-temple-cream: #fbf7f1;
    --c-leaf-green: #4f7942;
    --c-lotus-pink: #fbaed2;

    /* Base Layout Colors */
    --bg-primary: var(--c-temple-cream);
    --bg-dark: var(--c-krishna-blue);
    --text-primary: #2d2d2d;
    --text-light: #fbf7f1;
    --text-muted: #6b6b6b;
    
    /* RNG Typography Sets */
    --font-heading-system: 'Cinzel', serif;    /* System A */
    --font-heading-elegant: 'Playfair Display', serif; /* System B */
    --font-heading-modern: 'Outfit', sans-serif; /* System C */
    
    --font-body: 'Outfit', sans-serif;
    
    /* Dynamic Grid Variables set by RNG */
    --rng-cols: 12;
    --rng-gap: 2rem;
    --rng-section-pad-y: 6rem;
    --rng-radius: 0px;
}

/* =========================================
   Global Reset & Base
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    /* Subtle background texture overlay (mandala/watermark via CSS noise or blending, generated below) */
    position: relative;
    opacity: 0; /* JS Fade in after load */
    transition: opacity 1.2s ease-in-out;
}

body.loaded {
    opacity: 1;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* =========================================
   RNG Section Base Patterns
========================================= */
.section {
    padding: var(--rng-section-pad-y) 5%;
    position: relative;
    overflow: hidden;
}

/* Typography Variations Applied Randomly */
.typo-a h1, .typo-a h2, .typo-a h3 { font-family: var(--font-heading-system); }
.typo-b h1, .typo-b h2, .typo-b h3 { font-family: var(--font-heading-elegant); }
.typo-c h1, .typo-b h2, .typo-c h3 { font-family: var(--font-heading-modern); }

/* Shape/Border Variations Applied Randomly */
.shape-organic img, .shape-organic .card { border-radius: 40px 10px 40px 10px; }
.shape-sharp img, .shape-sharp .card { border-radius: 0; }
.shape-flow img, .shape-flow .card { border-radius: 50vw; }

/* Grid Layout Variations */
.layout-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--rng-gap);
    align-items: center;
}

.layout-hero-full {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--rng-gap);
}

.layout-masonry {
    column-count: 3;
    column-gap: 2rem;
}

.layout-masonry > * {
    break-inside: avoid;
    margin-bottom: 2rem;
}

/* Color Motifs Applied Randomly */
.theme-dark {
    background-color: var(--c-krishna-blue);
    color: var(--text-light);
}

.theme-dark h1, .theme-dark h2, .theme-dark h3 {
    color: var(--c-gold-soft);
}

.theme-saffron {
    background: linear-gradient(135deg, var(--c-saffron) 0%, var(--c-saffron-light) 100%);
    color: #fff;
}

.theme-cream {
    background-color: var(--c-temple-cream);
    color: var(--text-primary);
}

/* Texture Overlays */
.texture-mandala::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background-image: radial-gradient(circle, transparent 20%, var(--c-gold) 21%, transparent 22%);
    background-size: 15rem 15rem;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
    transform: rotate(45deg);
}

/* =========================================
   Code Gate Entry Styles
========================================= */
#gate-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--c-krishna-blue);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--c-gold-soft);
    font-family: var(--font-heading-system);
    /* Subtle background animation */
    background: radial-gradient(circle at center, var(--c-krishna-blue-light) 0%, var(--c-krishna-blue) 100%);
}

#gate-overlay::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    background-image: repeating-conic-gradient(
        transparent 0%,
        transparent 5%,
        rgba(212, 175, 55, 0.02) 5%,
        rgba(212, 175, 55, 0.02) 10%
    );
    z-index: 0;
    animation: spinSlow 120s linear infinite;
}

.gate-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.gate-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.gate-content p {
    font-family: var(--font-body);
    color: var(--text-light);
    margin-bottom: 2rem;
    opacity: 0.8;
}

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

.gate-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4);
    color: var(--text-light);
    text-align: center;
    font-size: 1.5rem;
    font-family: var(--font-body);
    padding: 0.5rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.gate-input:focus {
    border-color: var(--c-gold);
}

.gate-btn {
    background: var(--c-gold);
    color: var(--c-krishna-blue);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.gate-btn:hover {
    background: var(--c-gold-soft);
    transform: translateY(-2px);
}

.gate-error {
    color: var(--c-saffron);
    font-family: var(--font-body);
    font-size: 0.9rem;
    height: 20px;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* =========================================
   Navigation & Header
========================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.4s ease, padding 0.4s ease;
}

.site-header.scrolled {
    background: rgba(11, 34, 57, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.site-logo {
    font-family: var(--font-heading-system);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-gold);
    letter-spacing: 1px;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.site-nav a {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-light); /* Default dark header assumption, JS modifies if needed */
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 1px;
    background: var(--c-gold);
    transition: width 0.3s ease;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--c-gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   Footer
========================================= */
.site-footer {
    background: var(--c-krishna-blue-light);
    color: var(--text-light);
    padding: 4rem 5% 2rem;
    border-top: 2px solid var(--c-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-family: var(--font-heading-system);
    color: var(--c-gold);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

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

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

.footer-nav a {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 50%;
    color: var(--c-gold);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--c-gold);
    color: var(--c-krishna-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--c-gold);
}

/* =========================================
   Animations
========================================= */
@keyframes spinSlow {
    100% { transform: rotate(360deg); }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive
========================================= */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    
    .site-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 80%; height: 100vh;
        background: var(--c-krishna-blue);
        padding: 5rem 2rem;
        transition: right 0.4s ease;
    }
    
    .site-nav.open { right: 0; }
    
    .site-nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .layout-split {
        grid-template-columns: 1fr;
    }
    
    .layout-masonry {
        column-count: 1;
    }

    body {
        font-size: 1rem;
    }
    
    :root {
        --rng-section-pad-y: 4rem;
    }
}
