/* style.css - Sacred Bliss */

:root {
    --bg-color: #f5f5f7;
    --bg-surface: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #5c5c63;      /* darkened from #86868b for WCAG AA on light backgrounds */
    --accent-color: #4a5c50;        /* Serene sage green */
    --accent-dark: #35443a;
    --accent-light: #e0e5e1;
    --warm: #d99a52;                /* timeline accent, AA-safe against dark text */
    --warm-soft: rgba(217, 154, 82, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
    --nav-h: 64px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; }

/* Focus visibility — keyboard users must always see where they are */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--accent-color); color: #fff;
    padding: 0.75rem 1.25rem; border-radius: 0 0 8px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Container & Typography */
.container { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -1px; margin-bottom: 1rem; }
.section-title.center { text-align: center; }
.section-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 3rem; font-weight: 300; }
.section-subtitle.center { text-align: center; }

/* ---------- Sticky Navigation ---------- */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--nav-h);
    background: transparent;
    transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.site-nav.scrolled {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.nav-inner {
    max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.nav-brand {
    font-weight: 600; font-size: 1.1rem; letter-spacing: -0.4px;
    text-decoration: none; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: color 0.35s ease, text-shadow 0.35s ease;
}
.site-nav.scrolled .nav-brand { color: var(--text-primary); text-shadow: none; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
    text-decoration: none; font-size: 0.95rem; font-weight: 500;
    color: rgba(255,255,255,0.92); text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: color 0.35s ease, opacity 0.2s ease, text-shadow 0.35s ease;
}
.nav-links a:hover { opacity: 0.7; }
.site-nav.scrolled .nav-links a { color: var(--text-secondary); text-shadow: none; }
.site-nav.scrolled .nav-links a:hover { color: var(--text-primary); opacity: 1; }
.nav-links a.active { color: #fff; }
.site-nav.scrolled .nav-links a.active { color: var(--accent-color); font-weight: 600; }

.nav-links a.nav-cta {
    padding: 0.5rem 1.1rem; border-radius: 30px;
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.45);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.site-nav.scrolled .nav-links a.nav-cta {
    background: var(--accent-color); color: #fff; border-color: var(--accent-color);
}
.site-nav.scrolled .nav-links a.nav-cta:hover { background: var(--accent-dark); color: #fff; opacity: 1; }

.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span {
    display: block; height: 2px; width: 24px; margin: 0 auto;
    background: #fff; border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, background-color 0.35s ease;
}
.site-nav.scrolled .nav-toggle span, .site-nav.nav-open .nav-toggle span { background: var(--text-primary); }
.site-nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Parallax Hero ---------- */
.hero-parallax {
    position: relative;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #d1d5d2;
}

.parallax-bg {
    position: absolute;
    top: -10%; left: -10%; width: 120%; height: 120%;
    background-image: url('assets/hero-alps.jpg');
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: 1;
}
/* Scrim so white hero text always clears contrast over the photo */
.hero-parallax::after {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
}

.hero-content { position: relative; z-index: 2; padding: 0 1.5rem; }
.hero-text { text-align: center; color: white; max-width: 800px; margin: 0 auto; }

.breathing-orb-container { position: relative; width: 200px; height: 200px; margin: 0 auto 2rem auto; }

.breathing-orb {
    position: absolute; inset: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.5);
    will-change: transform;
}

.hero-text h1 { font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 600; letter-spacing: -2px; margin-bottom: 0.5rem; text-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.hero-text p { font-size: clamp(1rem, 2.5vw, 1.25rem); font-weight: 400; opacity: 0.95; letter-spacing: 0.5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.5rem; }
.btn-hero-primary, .btn-hero-secondary { width: auto; padding: 0.9rem 1.9rem; text-decoration: none; }
.btn-hero-primary { background: #fff; color: var(--text-primary); }
.btn-hero-primary:hover { background: #e8e8ed; transform: translateY(-2px); }
.btn-hero-secondary { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-hero-secondary:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }

.scroll-hint {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 3; width: 26px; height: 42px;
    border: 2px solid rgba(255,255,255,0.6); border-radius: 14px;
    display: flex; justify-content: center; padding-top: 8px;
}
.scroll-hint span { display: block; width: 4px; height: 8px; border-radius: 2px; background: rgba(255,255,255,0.9); animation: scrollDot 1.8s infinite ease-in-out; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Credibility Ribbon ---------- */
.credibility-ribbon { background-color: var(--bg-surface); border-bottom: 1px solid rgba(0,0,0,0.05); }
.credibility-ribbon .container { padding: 4rem 2rem; text-align: center; }
.ribbon-text { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-bottom: 2rem; }
.logos-wrapper { display: flex; justify-content: center; align-items: center; gap: 4rem; color: #8e8e93; flex-wrap: wrap; }
.partner-logo { height: 35px; width: auto; transition: color 0.3s ease; }
.partner-logo:hover { color: var(--text-primary); }

/* ---------- Glass Cards ---------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}

/* ---------- Offerings ---------- */
.offerings-section { background: var(--bg-color); }
.offerings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.75rem; }
.offering-card { padding: 2rem; transition: transform 0.4s cubic-bezier(0.165,0.84,0.44,1), box-shadow 0.4s ease; }
.offering-card:hover { transform: translateY(-6px); box-shadow: 0 20px 45px rgba(0,0,0,0.08); }
.offering-icon { font-size: 2rem; line-height: 1; margin-bottom: 1rem; }
.offering-card h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.offering-card p { color: var(--text-secondary); font-size: 0.95rem; }
.offering-meta { list-style: none; margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.offering-meta li {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
    background: var(--accent-light); color: var(--accent-dark);
    padding: 0.3rem 0.7rem; border-radius: 20px; font-weight: 500;
}

/* ---------- Meditation Studio App ---------- */
.meditation-studio { background-color: var(--bg-surface); }
.app-interface {
    max-width: 800px; margin: 0 auto;
    background: #fdfdfd;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 24px;
    padding: 4rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.03);
    text-align: center;
}

.visualizer-container { margin-bottom: 3rem; display: flex; flex-direction: column; align-items: center; }
.visualizer-orb {
    width: 150px; height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent-light), var(--accent-color));
    box-shadow: 0 10px 30px rgba(74, 92, 80, 0.2);
    transition: transform 1s ease-in-out, opacity 0.5s ease;
    margin-bottom: 2rem;
}
.instruction-text { font-size: 1.5rem; font-weight: 300; color: var(--text-primary); min-height: 40px; }

.controls-container { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.meditation-btn {
    padding: 1rem 1.5rem;
    border-radius: 30px;
    background: var(--bg-color);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--text-primary);
    font-size: 1rem; font-family: var(--font-main);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}
.meditation-btn:hover { background: #e6e6e8; }
.meditation-btn.active { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
.meditation-btn.dimmed { opacity: 0.45; pointer-events: none; }

.action-controls { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.action-btn {
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-size: 0.9rem; font-weight: 500; font-family: var(--font-main);
    cursor: pointer; border: none;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}
.action-btn.stop { background: #fee2e2; color: #b91c1c; }
.action-btn.stop:hover:not([disabled]) { background: #fecaca; }
.action-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.music-toggle { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-secondary); cursor: pointer; }
.music-toggle input { width: 16px; height: 16px; accent-color: var(--accent-color); cursor: pointer; }

/* ---------- CV Grid & Timeline ---------- */
.cv-section { background-color: var(--bg-color); }
.cv-grid { display: grid; grid-template-columns: 350px 1fr; gap: 4rem; align-items: start; }

.profile-card { text-align: center; margin-bottom: 2rem; padding: 2rem; }
.profile-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; border: 4px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transition: transform 0.5s ease, box-shadow 0.5s ease; }
.profile-card:hover .profile-img { transform: scale(1.04); box-shadow: 0 14px 28px rgba(0,0,0,0.12); }
.profile-card h3 { margin-bottom: 1rem; font-size: 1.2rem; }
.profile-card p { font-size: 0.95rem; color: var(--text-secondary); text-align: left; }

.education-card h3 { font-size: 1.2rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 0.5rem; }
.credentials-list { list-style: none; }
.credentials-list li { margin-bottom: 1.5rem; }
.credentials-list li:last-child { margin-bottom: 0; }
.credentials-list strong { font-size: 1rem; color: var(--text-primary); font-weight: 500; }
.credentials-list span { font-size: 0.85rem; color: var(--text-secondary); display: block; margin-top: 0.2rem; }

.cv-timeline { position: relative; padding-left: 2rem; }
.cv-timeline::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(to bottom, var(--warm), rgba(217, 154, 82, 0.05));
    border-radius: 3px;
}
.timeline-item { position: relative; margin-bottom: 3.5rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute; left: -2.4rem; top: 2rem;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--warm); border: 4px solid var(--bg-color);
    box-shadow: 0 0 15px rgba(217, 154, 82, 0.6);
}
.timeline-content {
    padding: 2.5rem;
    position: relative;
    background: linear-gradient(145deg, var(--warm-soft), rgba(255, 255, 255, 0.6));
    border-radius: 20px;
    border: 1px solid rgba(217, 154, 82, 0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.timeline-item:hover .timeline-content {
    transform: translateY(-8px);
    border-color: rgba(217, 154, 82, 0.6);
    box-shadow: 0 18px 40px rgba(0,0,0,0.09);
}
.timeline-content h3 { font-size: 1.4rem; margin-bottom: 0.75rem; font-weight: 600; color: var(--text-primary); }
.timeline-org {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: var(--warm);
    border-radius: 30px;
    font-size: 0.8rem; font-weight: 600; color: #2b1c08;
    margin-bottom: 1.5rem;
    text-transform: uppercase; letter-spacing: 1.5px;
    box-shadow: 0 4px 10px rgba(217, 154, 82, 0.25);
}
.timeline-content p { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.6; }

/* ---------- Footer ---------- */
.footer-cta { background-color: #1d1d1f; color: #f5f5f7; padding-top: 2rem; }
.split-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.cta-card { padding: 3rem; background-color: rgba(255,255,255,0.03); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.cta-card h2 { font-size: 1.75rem; margin-bottom: 1rem; font-weight: 600; }
.cta-card p, .contact-details { color: #c7c7cc; margin-bottom: 2rem; min-height: 50px; font-style: normal; }
.contact-details a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
.contact-details a:hover { border-bottom-color: #fff; }

.btn { display: inline-block; padding: 1rem 2rem; border-radius: 30px; font-size: 1rem; font-weight: 500; font-family: var(--font-main); text-decoration: none; border: none; cursor: pointer; transition: background-color 0.3s ease, transform 0.3s ease; width: 100%; text-align: center; }
.btn-primary { background-color: #ffffff; color: #1d1d1f; }
.btn-primary:hover { background-color: #e8e8ed; }
.btn-secondary { background-color: transparent; color: #ffffff; border: 1px solid rgba(255,255,255,0.35); }
.btn-secondary:hover { background-color: rgba(255,255,255,0.1); }
.footer-bottom { text-align: center; padding: 2rem; border-top: 1px solid rgba(255,255,255,0.1); color: #9a9aa0; font-size: 0.875rem; }
.footer-refs { font-size: 0.75rem; margin-top: 0.5rem; opacity: 0.6; }

/* ---------- Animations ---------- */
.fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInUp 1s forwards ease-out; }
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* Scroll-reveal — JS adds .is-visible via IntersectionObserver */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.165,0.84,0.44,1); }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes slowPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}
.visualizer-orb.pulse-animation { animation: slowPulse 8s infinite ease-in-out; }

/* 4 in / 4 hold / 6 out / 2 hold as a proportion of the cycle. The duration
   below is a fallback — script.js sets it from UJJAYI_TICK_MS at runtime. */
@keyframes ujjayiBreathe {
    0%    { transform: scale(1); }
    25%   { transform: scale(1.5); }
    50%   { transform: scale(1.5); }
    87.5% { transform: scale(1); }
    100%  { transform: scale(1); }
}
.visualizer-orb.ujjayi-animation { animation: ujjayiBreathe 24s infinite ease-in-out; }

/* ---------- Sacred Sutra ---------- */
.sutra-section { background: var(--bg-color); text-align: center; }
.sutra-quote { max-width: 800px; margin: 0 auto; font-weight: 300; }
.sutra-quote .sanskrit {
    display: block; font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--accent-color); margin-bottom: 1.5rem;
    font-family: 'Noto Sans Devanagari', serif; opacity: 0.9; line-height: 1.4;
}
.sutra-quote p { font-size: clamp(1.3rem, 3.5vw, 2rem); font-style: italic; color: var(--text-primary); margin-bottom: 0.5rem; }
.sutra-quote cite { display: block; font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 2rem; font-style: normal; }
.sutra-quote .sutra-translation { font-size: 1.15rem; color: var(--text-secondary); font-weight: 400; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .parallax-bg {
        background-image: url('assets/hero-alps-narrow.jpg');
        background-position: 65% center;
    }

    .cv-grid { grid-template-columns: 1fr; }
    .split-cta { grid-template-columns: 1fr; }
    .breathing-orb-container { width: 150px; height: 150px; }
    

    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed; top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.08);
        padding: 0.5rem 1.5rem 1.5rem;
        transform: translateY(-120%); opacity: 0; pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.165,0.84,0.44,1), opacity 0.25s ease;
    }
    .site-nav.nav-open .nav-links { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-links a { color: var(--text-primary); text-shadow: none; padding: 1rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
    .nav-links a.nav-cta { margin-top: 1rem; text-align: center; background: var(--accent-color); color: #fff; border: none; border-radius: 30px; }
}

@media (max-width: 600px) {
    .container { padding: 4rem 1.25rem; }
    .nav-inner { padding: 0 1.25rem; }
    .glass-card, .timeline-content, .cta-card { padding: 1.75rem; }
    .app-interface { padding: 2.5rem 1.25rem; border-radius: 18px; }
    .visualizer-orb { width: 120px; height: 120px; }
    .cv-timeline { padding-left: 1.5rem; }
    .timeline-dot { left: -1.9rem; top: 1.75rem; }
    .logos-wrapper { gap: 2rem; }
    .meditation-btn { flex: 1 1 45%; padding: 0.9rem 1rem; font-size: 0.9rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; }
    .scroll-hint { display: none; }
}

/* ---------- Motion & contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal, .fade-in-up { opacity: 1 !important; transform: none !important; }
    .parallax-bg { transform: none !important; }
    .breathing-orb { transform: none !important; opacity: 1 !important; }
}

@media print {
    .site-nav, .scroll-hint, .meditation-studio, .hero-actions, .skip-link { display: none !important; }
    .hero-parallax { height: auto; padding: 3rem 0; }
    body { background: #fff; }
    .reveal { opacity: 1; transform: none; }
}
