/* ===================================
   AtmaSangham - CSS Styles
   From Darkness to Light
   =================================== */

/* CSS Variables */
:root {
    /* Colors - Dawn Palette */
    --sage: #8B9D83;
    --sage-light: #A8B89E;
    --sage-dark: #6B7A64;
    --gold: #D4A574;
    --gold-light: #E8C9A0;
    --indigo: #3D5A80;
    --indigo-dark: #293241;
    --cream: #F8F6F1;
    --white: #FFFFFF;
    --text-dark: #2A2A2A;
    --text-mid: #5A5A5A;
    --text-light: #8A8A8A;
    
    /* Typography */
    --font-serif: 'Crimson Pro', serif;
    --font-sans: 'Lexend', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    margin-bottom: 1rem;
    font-weight: 300;
}

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

a:hover {
    color: var(--sage-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--indigo);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--indigo-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--indigo);
    border: 2px solid var(--indigo);
}

.btn-secondary:hover {
    background: var(--indigo);
    color: var(--white);
}

.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

.btn-nav {
    padding: 0.5rem 1.5rem;
    background: var(--gold);
    color: var(--white);
    border-radius: 6px;
    font-size: 0.95rem;
}

.btn-nav:hover {
    background: var(--gold-light);
    color: var(--indigo-dark);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 246, 241, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 157, 131, 0.2);
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--indigo-dark);
}

.logo-symbol {
    font-size: 1.8rem;
    color: var(--sage);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
}

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

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--indigo-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(139, 157, 131, 0.1) 0%,
        rgba(212, 165, 116, 0.15) 50%,
        rgba(61, 90, 128, 0.1) 100%);
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease;
}

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

.hero-title {
    margin-bottom: var(--space-md);
}

.title-line {
    display: block;
}

.title-line.accent {
    color: var(--sage-dark);
    font-style: italic;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-mid);
    margin-bottom: var(--space-lg);
    font-weight: 300;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--sage), transparent);
}

/* Section Spacing */
section {
    padding: var(--space-xl) 0;
}

.section-title {
    text-align: left;
    margin-bottom: var(--space-lg);
    color: var(--indigo-dark);
}

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

/* Who Section */
.who-section {
    background: var(--white);
}

.loss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.loss-card {
    padding: var(--space-md);
    background: var(--cream);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.loss-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--sage-light);
}

.loss-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    opacity: 0.9;
}

.loss-card h3 {
    font-size: 1.25rem;
    color: var(--indigo-dark);
    margin-bottom: 0.5rem;
}

.loss-card p {
    color: var(--text-mid);
    font-size: 0.95rem;
    margin: 0;
}

.who-message {
    text-align: center;
    font-size: 1.25rem;
    color: var(--sage-dark);
    font-style: italic;
    margin-top: var(--space-lg);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-lg);
    align-items: center;
}

.interfaith-symbols {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    padding: var(--space-lg);
}

.symbol {
    font-size: 3.5rem;
    opacity: 0.7;
    transition: var(--transition);
    animation: float 3s ease-in-out infinite;
}

.symbol:nth-child(1) { animation-delay: 0s; }
.symbol:nth-child(2) { animation-delay: 0.5s; }
.symbol:nth-child(3) { animation-delay: 1s; }
.symbol:nth-child(4) { animation-delay: 1.5s; }
.symbol:nth-child(5) { animation-delay: 2s; }
.symbol:nth-child(6) { animation-delay: 2.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.symbol:hover {
    opacity: 1;
    transform: scale(1.2);
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Pillars Section */
.pillars-section {
    background: linear-gradient(135deg, 
        rgba(139, 157, 131, 0.05) 0%,
        rgba(212, 165, 116, 0.05) 100%);
}

.pillars-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-mid);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

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

.pillar {
    padding: var(--space-lg);
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pillar:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.pillar-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--gold);
    opacity: 0.3;
    margin-bottom: var(--space-sm);
}

.pillar h3 {
    color: var(--indigo-dark);
    margin-bottom: var(--space-md);
}

.pillar ul {
    list-style: none;
}

.pillar li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-mid);
}

.pillar li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--sage);
}

/* Stories Section */
.stories-section {
    background: var(--white);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.story-card {
    background: var(--cream);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.story-image {
    height: 200px;
    position: relative;
}

.story-content {
    padding: var(--space-md);
}

.story-content h3 {
    color: var(--indigo-dark);
    margin-bottom: var(--space-sm);
}

.story-content p {
    color: var(--text-mid);
    line-height: 1.7;
}

.story-link {
    color: var(--sage-dark);
    font-weight: 500;
    display: inline-block;
    margin-top: var(--space-sm);
    border-bottom: 2px solid var(--sage-light);
}

.story-link:hover {
    color: var(--indigo);
    border-color: var(--indigo);
}

/* Features Section */
.features-section {
    background: var(--cream);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.feature-card {
    text-align: center;
    padding: var(--space-md);
    background: var(--white);
    border-radius: 12px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.feature-card h3 {
    font-size: 1.125rem;
    color: var(--indigo-dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-mid);
    font-size: 0.9rem;
    margin: 0;
}

.cta-center {
    text-align: center;
    margin-top: var(--space-lg);
}

/* Browse Section */
.browse-section {
    background: var(--white);
}

.browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.browse-card {
    padding: var(--space-lg) var(--space-md);
    background: var(--cream);
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.browse-card:hover {
    border-color: var(--sage);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.browse-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.browse-card h3 {
    color: var(--indigo-dark);
    font-size: 1.125rem;
    margin: 0;
}

/* Coming Soon Section */
.coming-soon-section {
    background: linear-gradient(135deg, 
        rgba(61, 90, 128, 0.05) 0%,
        rgba(139, 157, 131, 0.05) 100%);
}

.coming-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-mid);
    max-width: 700px;
    margin: 0 auto var(--space-lg);
}

.coming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.coming-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.coming-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.coming-image {
    height: 180px;
}

.coming-card h3 {
    padding: var(--space-md) var(--space-md) 0;
    color: var(--indigo-dark);
}

.coming-card p {
    padding: 0 var(--space-md);
    color: var(--text-mid);
}

.coming-tag {
    display: inline-block;
    margin: var(--space-sm) var(--space-md) var(--space-md);
    padding: 0.5rem 1rem;
    background: var(--gold-light);
    color: var(--indigo-dark);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--indigo-dark) 0%, var(--indigo) 100%);
    color: var(--white);
    text-align: center;
}

.newsletter-content h2 {
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.newsletter-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 600px;
    margin: 0 auto var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
}

.newsletter-form button {
    white-space: nowrap;
}

.privacy-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: var(--space-sm);
}

.privacy-note a {
    color: var(--gold-light);
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--indigo-dark);
    color: var(--white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.footer-col h4 {
    color: var(--gold-light);
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

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

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

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.language-selector select {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: var(--font-sans);
    cursor: pointer;
}

/* Emergency Banner */
.emergency-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #e74c3c;
    color: white;
    padding: var(--space-md);
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
}

.emergency-banner ul {
    list-style: none;
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin: var(--space-sm) 0;
}

.emergency-banner a {
    color: white;
    text-decoration: underline;
}

.emergency-banner button {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 0.5rem 1rem;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    margin-top: var(--space-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease;
}

/* Smooth Scrolling with Offset for Fixed Nav */
section {
    scroll-margin-top: 80px;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .newsletter-section,
    .emergency-banner,
    .scroll-indicator {
        display: none;
    }
}
