/* ================================
   Avirodh - Website Styles
   Inner Wellbeing & Emotional Healing
   ================================ */

/* ===== CSS Variables ===== */
:root {
    /* Colors - Serene & Calming Palette */
    --primary-color: #2d3e50;
    --secondary-color: #8b7355;
    --accent-color: #a68968;
    --text-dark: #2c2c2c;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #f8f6f3;
    --bg-white: #ffffff;
    --bg-cream: #faf9f7;
    --border-color: #e8e4df;
    --overlay-dark: rgba(45, 62, 80, 0.85);
    
    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-max-width: 1200px;
    
    /* Transitions */
    --transition-smooth: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    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-color: var(--bg-white);
    overflow-x: hidden;
}

/* ===== Responsive Video Background ===== */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #000;
    overflow: hidden;
}

.video-foreground {
    position: absolute;
    top: 50%;
    left: 50%;
    /* 16:9 aspect ratio: use min() to ensure coverage in both dimensions */
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    /* Scale to guarantee coverage even after centering */
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Use aspect-ratio-aware sizing for the iframe */
.video-foreground iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/*
 * The key trick: size .video-foreground based on viewport aspect ratio.
 * If the viewport is wider than 16:9, width drives the size.
 * If taller, height drives the size. This ensures full coverage.
 */
@media (min-aspect-ratio: 16/9) {
    .video-foreground {
        width: 110vw;
        height: calc(110vw * 9 / 16);
    }
}

@media (max-aspect-ratio: 16/9) {
    .video-foreground {
        height: 110vh;
        width: calc(110vh * 16 / 9);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.navbar {
    z-index: 1000;
}

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

h1 {
    font-size: 4rem;
    font-weight: 300;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-light);
}

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

strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ===== Container ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--bg-white);
    letter-spacing: 1px;
}

.navbar.scrolled .nav-brand a {
    color: var(--primary-color);
}

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

.nav-link {
    color: var(--bg-white);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    position: relative;
}

.navbar.scrolled .nav-link {
    color: var(--text-dark);
}

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

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

/* Mobile Menu Toggle - handled by shade menu styles above */

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #000;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 6rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    opacity: 0.85;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-family: var(--font-serif);
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.85);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.55;
    color: rgba(255, 255, 255, 0.8);
}

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

.scroll-indicator i {
    font-size: 2rem;
    color: var(--bg-white);
    opacity: 0.4;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.7);
}

/* ===== Section Styles ===== */
.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 400;
}

.title-underline {
    width: 80px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 0 auto 1.5rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== About Section ===== */
.about {
    background-color: var(--bg-white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

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

.about-text .lead {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-family: var(--font-serif);
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

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

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

.stat-number {
    font-size: 3.5rem;
    font-family: var(--font-serif);
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Philosophy Section ===== */
.philosophy {
    background-color: var(--bg-cream);
}

.philosophy-content {
    max-width: 900px;
    margin: 0 auto;
}

.philosophy-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.philosophy-intro .emphasis {
    font-size: 1.4rem;
    font-family: var(--font-serif);
    color: var(--primary-color);
    line-height: 1.8;
}

.philosophy-text p {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: 2rem;
}

.philosophy-text .indented {
    padding-left: 2rem;
    font-style: italic;
    color: var(--text-light);
    border-left: 3px solid var(--accent-color);
    margin: 2rem 0;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 8px;
}

.benefit-item {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-family: var(--font-serif);
    text-align: center;
    padding: 1rem;
}

.philosophy-closing {
    text-align: center;
    margin-top: 3rem;
    padding: 2.5rem;
    background-color: var(--bg-white);
    border-radius: 8px;
}

.philosophy-closing .emphasis {
    font-size: 1.3rem;
    font-family: var(--font-serif);
    color: var(--primary-color);
    line-height: 2;
}

/* ===== Services Section ===== */
.services {
    background-color: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 5rem;
}

.service-card {
    background-color: var(--bg-cream);
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

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

.service-card h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-features {
    list-style: none;
    text-align: left;
    margin-top: 1.5rem;
}

.service-features li {
    padding: 0.7rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.focus-areas {
    text-align: center;
    padding: 3rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.focus-areas h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tag {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.tag:hover {
    background-color: var(--accent-color);
    color: var(--bg-white);
    border-color: var(--accent-color);
}

/* ===== Contact Section ===== */
.contact {
    background-color: var(--bg-cream);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-methods {
    margin: 3rem 0;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-white);
    border-radius: 8px;
}

.contact-method i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-top: 0.3rem;
}

.contact-method h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-method a {
    color: var(--text-light);
    font-size: 1.05rem;
}

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

.contact-note {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-white);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
}

.contact-note em {
    color: var(--text-light);
    font-size: 1rem;
}

/* ===== Contact Form ===== */
.contact-form-container {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition-smooth);
    background-color: var(--bg-cream);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--bg-white);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    align-self: flex-start;
}

.contact-form .btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--bg-white);
}

.form-message {
    padding: 1rem;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 4rem 0 2rem;
}

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

.footer-brand h3 {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.3rem;
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
}

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

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

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

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

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

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

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* ===== Shade Menu (Full-Screen Overlay) ===== */
.shade-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1),
                opacity 0.4s ease,
                visibility 0s linear 0.6s;
}

.shade-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1),
                opacity 0.4s ease,
                visibility 0s linear 0s;
}

.shade-menu-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.shade-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shade-menu-links li {
    overflow: hidden;
}

.shade-link {
    display: block;
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.6rem 0;
    letter-spacing: 2px;
    transition: color 0.3s ease, transform 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
}

.shade-menu.active .shade-link {
    transform: translateY(0);
    opacity: 1;
}

/* Stagger the link animations */
.shade-menu.active .shade-menu-links li:nth-child(1) .shade-link { transition-delay: 0.15s; }
.shade-menu.active .shade-menu-links li:nth-child(2) .shade-link { transition-delay: 0.22s; }
.shade-menu.active .shade-menu-links li:nth-child(3) .shade-link { transition-delay: 0.29s; }
.shade-menu.active .shade-menu-links li:nth-child(4) .shade-link { transition-delay: 0.36s; }
.shade-menu.active .shade-menu-links li:nth-child(5) .shade-link { transition-delay: 0.43s; }

.shade-link:hover {
    color: var(--accent-color);
    transform: translateX(8px);
}

.shade-menu-footer {
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
}

.shade-menu.active .shade-menu-footer {
    opacity: 1;
}

.shade-menu-footer p {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    font-style: italic;
}

/* Hamburger to X animation */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Ensure toggle is always visible and above shade */
.nav-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    z-index: 1001;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--bg-white);
    transition: transform 0.4s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled .nav-toggle span {
    background-color: var(--primary-color);
}

/* When shade is open, keep toggle white */
.nav-toggle.active span {
    background-color: var(--bg-white);
}

/* ===== Animations ===== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

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

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

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s backwards;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-in 0.9s backwards;
}

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

/* ===== Responsive Design ===== */

/* Desktop: show inline nav, hide hamburger toggle */
@media (min-width: 769px) {
    .nav-toggle {
        display: none;
    }

    .shade-menu {
        /* On desktop, still available but triggered by toggle if wanted */
    }
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .benefits-list {
        grid-template-columns: 1fr;
    }

    /* Hide desktop nav menu, use shade menu instead */
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .shade-link {
        font-size: 2.4rem;
    }

    .contact-form-container {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .focus-tags {
        flex-direction: column;
        align-items: center;
    }
}