/* ─────────────────────────────────────────────────────────────
   SHUBH MANTRIKA — Core stylesheet
   Luxury Black & Gold design system (Phase 1 foundation).
   Hand-authored; Tailwind utility layer is integrated in a later phase.
   ───────────────────────────────────────────────────────────── */

:root {
    /* Surfaces */
    --bg: #0B0B0F;
    --surface: #14141B;
    --surface-2: #1D1D26;

    /* Gold spectrum */
    --gold: #D4AF37;
    --gold-bright: #F5D77E;
    --gold-deep: #A67C00;
    --saffron: #FF9933;

    /* Text */
    --text: #F5F3EC;
    --text-muted: #A7A395;

    /* Lines & states */
    --line: rgba(212, 175, 55, 0.15);
    --line-strong: rgba(212, 175, 55, 0.35);
    --success: #3FB27F;
    --warn: #E0A400;
    --error: #E5484D;

    --radius: 16px;
    --radius-sm: 10px;
    --container: 1240px;
    --gold-foil: linear-gradient(135deg, #F5D77E 0%, #D4AF37 45%, #A67C00 100%);

    --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-bright); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold); }
h1, h2, h3 { font-family: "Cinzel", "Marcellus", Georgia, serif; font-weight: 600; line-height: 1.2; letter-spacing: .02em; }

/* Subtle mandala texture on the page background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(1100px 600px at 50% -10%, rgba(212, 175, 55, 0.10), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(255, 153, 51, 0.06), transparent 55%);
    pointer-events: none;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--gold); color: #000; padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ── Header ── */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 11, 15, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand-logo { height: 52px; width: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 18px rgba(212,175,55,.25); }
.brand-mark {
    font-size: 1.9rem; line-height: 1;
    background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, .35));
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: "Cinzel", serif; font-weight: 700; letter-spacing: .08em; color: var(--text); font-size: 1.05rem; }
.brand-tagline { font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.main-nav { display: flex; gap: clamp(1rem, 3vw, 2rem); align-items: center; }
.main-nav a { color: var(--text-muted); font-weight: 500; letter-spacing: .02em; position: relative; }
.main-nav a:hover { color: var(--text); }
.main-nav a::after {
    content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
    background: var(--gold-foil); transition: width .25s var(--ease);
}
.main-nav a:hover::after { width: 100%; }

/* Nav dropdowns */
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--gold-bright); font-size: 1.3rem; border-radius: 8px; padding: .2rem .55rem; cursor: pointer; }
.nav-drop { position: relative; }
.nav-drop-btn { background: none; border: none; color: var(--text-muted); font: inherit; font-weight: 500; cursor: pointer; padding: 0; letter-spacing: .02em; }
.nav-drop-btn:hover { color: var(--text); }
.nav-menu {
    position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(6px);
    min-width: 210px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); padding: .4rem; display: grid; gap: .1rem; z-index: 60;
    opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.nav-drop:hover .nav-menu, .nav-drop.open .nav-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-menu a { color: var(--text-muted); padding: .55rem .8rem; border-radius: 8px; font-size: .92rem; }
.nav-menu a::after { display: none; }
.nav-menu a:hover { background: rgba(212,175,55,.1); color: var(--gold-bright); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1.6rem; border-radius: 999px; font-weight: 600; letter-spacing: .02em;
    border: 1px solid transparent; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
    background: var(--gold-foil); color: #1a1204;
    box-shadow: 0 8px 24px -8px rgba(212, 175, 55, .6);
}
.btn-gold:hover { color: #1a1204; box-shadow: 0 12px 32px -8px rgba(212, 175, 55, .75); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ── Glass cards ── */
.glass-card {
    background: linear-gradient(180deg, rgba(29, 29, 38, .65), rgba(20, 20, 27, .55));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3vw, 2.2rem);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.glass-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }

/* ── Hero ── */
.hero { position: relative; padding: clamp(4rem, 12vh, 9rem) 0 clamp(3rem, 8vh, 6rem); text-align: center; overflow: hidden; }
.hero-glow {
    position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(600px 320px at 50% 20%, rgba(245, 215, 126, .18), transparent 70%);
}
.hero-mandala {
    position: absolute; top: -160px; left: 50%; transform: translateX(-50%);
    width: 620px; height: 620px; max-width: 120vw; z-index: -1; opacity: .16;
    background:
        repeating-conic-gradient(from 0deg, var(--gold) 0deg 2deg, transparent 2deg 14deg),
        radial-gradient(circle, transparent 30%, rgba(212,175,55,.4) 31%, transparent 33%, transparent 44%, rgba(212,175,55,.3) 45%, transparent 47%);
    border-radius: 50%;
    -webkit-mask: radial-gradient(circle, #000 0%, #000 55%, transparent 72%);
    mask: radial-gradient(circle, #000 0%, #000 55%, transparent 72%);
    animation: spin 120s linear infinite;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }
.hero-eyebrow { color: var(--gold); letter-spacing: .28em; text-transform: uppercase; font-size: .8rem; margin: 0 0 1rem; }
.hero-title {
    font-size: clamp(2.6rem, 8vw, 5rem); margin: 0; line-height: 1.02;
    background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 30px rgba(212, 175, 55, .3));
}
.hero-tagline { font-size: clamp(1rem, 3vw, 1.4rem); letter-spacing: .3em; text-transform: uppercase; color: var(--gold-bright); margin: 1rem 0 1.4rem; }
.hero-lead { max-width: 640px; margin: 0 auto 2rem; color: var(--text-muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Feature grid ── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; margin: clamp(2rem, 6vh, 4rem) auto; }
.pillar { text-align: center; }
.pillar-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; margin-bottom: 1rem; border-radius: 50%;
    font-size: 1.8rem; color: var(--gold-bright);
    background: radial-gradient(circle at 30% 30%, rgba(212,175,55,.25), rgba(212,175,55,.05));
    border: 1px solid var(--line-strong);
}
.pillar-title { margin: .3rem 0 .6rem; color: var(--text); font-size: 1.4rem; }
.pillar-desc { color: var(--text-muted); margin: 0; }

/* ── Simple / status / error pages ── */
.status-note, .simple-page, .error-page { margin: clamp(2rem, 6vh, 4rem) auto; }
.simple-page .page-heading { color: var(--gold-bright); margin-top: 0; }
.error-page { text-align: center; }
.error-code { font-family: "Cinzel", serif; font-size: clamp(4rem, 18vw, 9rem); margin: 0; background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Flash messages ── */
.flash { margin: 1rem auto 0; padding: .9rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid; }
.flash-error { background: rgba(229, 72, 77, .12); border-color: rgba(229, 72, 77, .4); color: #ffb4b6; }
.flash-success { background: rgba(63, 178, 127, .12); border-color: rgba(63, 178, 127, .4); color: #a7e8cb; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 3rem 0 1.5rem; background: rgba(20, 20, 27, .5); }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-col h4 { color: var(--gold-bright); font-family: "Cinzel", serif; font-size: .95rem; margin: 0 0 .9rem; }
.footer-col a { display: block; color: var(--text-muted); font-size: .9rem; padding: .25rem 0; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.footer-brand strong { display: block; font-family: "Cinzel", serif; }
.footer-brand p { margin: 0; color: var(--gold); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; }
.footer-desc { color: var(--text-muted); font-size: .88rem; margin: 0 0 1.1rem; }
.footer-copy { color: var(--text-muted); margin: 2rem 0 0; font-size: .85rem; text-align: center; border-top: 1px solid var(--line); padding-top: 1.4rem; }

/* ── Motion & accessibility ── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Responsive nav: hamburger + drawer below lg */
@media (max-width: 1024px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(11,11,15,.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-strong);
        padding: 1rem clamp(1rem,4vw,2rem) 1.5rem; max-height: calc(100vh - 72px); overflow-y: auto;
        transform: translateY(-120%); transition: transform .3s var(--ease); box-shadow: var(--shadow);
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav > a, .nav-drop-btn { padding: .8rem 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
    .nav-menu {
        position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none;
        background: transparent; min-width: 0; padding: .2rem 0 .6rem 1rem; display: none;
    }
    .nav-drop.open .nav-menu { display: grid; }
    .site-search { margin-top: 1rem; width: 100%; }
    .site-search input { width: 100%; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .brand-tagline { display: none; }
    .footer-cols { grid-template-columns: 1fr; }
    .footer-about { text-align: left; }
}
