/* ==============================================
   AEROFIELD — AYURVEDA · TREE OF LIFE
   Full-viewport sacred tree with DNA-helix trunk,
   sacred geometry mandala, floating embers.
   Theme: Kaya-Vidya (Body & Vitality) — amber/earth
   ============================================== */

/* ── Reset & Viewport Lock ──────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
}

:root {
    --ayur-primary:     #c4923a;
    --ayur-primary-dim: #8a6420;
    --ayur-accent:      #2dd4a8;
    --ayur-bark:        #5a3e1e;
    --ayur-leaf:        #8fa840;
    --ayur-glow:        rgba(196, 146, 58, 0.25);
    --ayur-bg-tint:     rgba(196, 146, 58, 0.04);
    --ayur-border:      rgba(196, 146, 58, 0.15);
    --ayur-flame:       #e8a020;
}


/* ── Backgrounds ────────────────────────────────────── */
.ayur-bg-void {
    position: fixed; inset: 0; z-index: 0;
    background: #0a0704;
}

.ayur-bg-canvas {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none;
    filter: contrast(108%) sepia(15%);
}

.ayur-bg-vignette {
    position: fixed; inset: 0; z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse 65% 60% at 50% 45%, transparent 25%, rgba(0,0,0,0.88) 100%);
}


/* ── Corner Ornaments (matching image pentagrams) ──── */
.ayur-corner {
    position: fixed; z-index: 3;
    width: 60px; height: 60px;
    pointer-events: none;
    opacity: 0.2;
}
.ayur-corner::before {
    content: '✦';
    font-size: 22px;
    color: var(--ayur-primary-dim);
    text-shadow: 0 0 8px var(--ayur-glow);
}
.ayur-corner--tl { top: 16px; left: 18px; }
.ayur-corner--tr { top: 16px; right: 18px; }
.ayur-corner--bl { bottom: 16px; left: 18px; }
.ayur-corner--br { bottom: 16px; right: 18px; }


/* ── Navbar ──────────────────────────────────────────── */
.ayur-navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--navbar-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 48px);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(10, 7, 4, 0.78);
    border-bottom: 1px solid var(--ayur-border);
}

.ayur-nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none;
}

.ayur-logo-icon {
    width: 32px; height: 32px; border-radius: 7px;
    background: linear-gradient(135deg, var(--ayur-primary) 0%, var(--ayur-primary-dim) 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 12px var(--ayur-glow);
    padding: 6px;
}
.ayur-logo-icon svg { width: 20px; height: 20px; }

.ayur-logo-text {
    font-family: var(--font-display);
    font-weight: 700; font-size: 15px; letter-spacing: 2px;
    background: linear-gradient(135deg, var(--ayur-primary) 0%, var(--ayur-primary-dim) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ayur-nav-center {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
}

.ayur-nav-title {
    font-family: var(--font-display);
    font-size: 13px; font-weight: 600; letter-spacing: 3px;
    color: var(--ayur-primary);
}

.ayur-nav-status { display: flex; align-items: center; gap: 6px; }

.ayur-status-dot {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--ayur-accent);
    box-shadow: 0 0 6px var(--ayur-accent);
    animation: ayurDotPulse 2.5s ease-in-out infinite;
}

@keyframes ayurDotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--ayur-accent); }
    50%      { opacity: 0.4; box-shadow: 0 0 3px var(--ayur-accent); }
}

.ayur-nav-sub {
    font-family: var(--font-ui);
    font-size: 9px; font-weight: 400;
    letter-spacing: 2px; color: var(--text-muted);
}

.ayur-nav-controls { display: flex; align-items: center; gap: 8px; }

.ayur-btn {
    font-family: var(--font-ui); font-size: 10px; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase;
    text-decoration: none;
    padding: 5px 12px; border-radius: 6px;
    border: 1px solid var(--ayur-border);
    background: transparent;
    color: var(--ayur-primary-dim);
    cursor: pointer; transition: all 0.25s ease;
    display: flex; align-items: center; gap: 5px;
}

.ayur-btn:hover {
    color: var(--ayur-primary);
    border-color: var(--ayur-primary);
    background: var(--ayur-bg-tint);
}


/* ── Main Canvas Container ──────────────────────────── */
.ayur-main {
    position: relative; z-index: 1;
    width: 100vw; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.ayur-tree-canvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
}


/* ── Principle Labels ───────────────────────────────── */
.ayur-labels {
    position: absolute;
    inset: 0; z-index: 10;
    pointer-events: none;
}

.ayur-label {
    position: absolute;
    display: flex; align-items: center; gap: 0;
    opacity: 0;
    animation: ayurLabelFade 0.5s ease-out forwards;
}

.ayur-label-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--ayur-primary);
    box-shadow: 0 0 8px var(--ayur-glow);
    flex-shrink: 0;
    animation: ayurDotPulse 2.5s ease-in-out infinite;
}

.ayur-label-line {
    width: 40px; height: 1px;
    background: linear-gradient(90deg, var(--ayur-primary) 0%, rgba(196,146,58,0.1) 100%);
    flex-shrink: 0;
}

.ayur-label-tag {
    font-family: var(--font-ui);
    font-size: 9px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--ayur-primary);
    padding: 3px 10px;
    border: 1px solid var(--ayur-border);
    border-radius: 4px;
    background: rgba(10, 7, 4, 0.82);
    backdrop-filter: blur(8px);
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ayur-label-tag:hover {
    background: var(--ayur-bg-tint);
    border-color: var(--ayur-primary);
    box-shadow: 0 0 12px var(--ayur-glow);
}

/* Label positions */
.ayur-label--vata   { top: 18%; left: 56%; animation-delay: 0.3s; }
.ayur-label--pitta  { top: 38%; left: 57%; animation-delay: 0.5s; }
.ayur-label--kapha  { top: 58%; left: 56%; animation-delay: 0.7s; }
.ayur-label--ojas   { top: 22%; right: 5%; left: auto; flex-direction: row-reverse; animation-delay: 0.9s; }
.ayur-label--ojas .ayur-label-line { background: linear-gradient(270deg, var(--ayur-primary) 0%, rgba(196,146,58,0.1) 100%); }
.ayur-label--agni   { top: 45%; right: 5%; left: auto; flex-direction: row-reverse; animation-delay: 1.1s; }
.ayur-label--agni .ayur-label-line { background: linear-gradient(270deg, var(--ayur-primary) 0%, rgba(196,146,58,0.1) 100%); }
.ayur-label--prana  { top: 30%; left: 57%; animation-delay: 1.3s; }

@keyframes ayurLabelFade {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}


/* ── Composition Data Section ────────────────────────  */
.ayur-composition {
    position: absolute;
    bottom: 48px; left: 50%; transform: translateX(-50%);
    z-index: 20;
    display: flex; flex-direction: column; align-items: center; gap: 0;
    animation: ayurInfoSlide 0.8s ease-out 1.5s both;
}

.ayur-comp-tabs {
    display: flex; gap: 2px;
}

.ayur-comp-tab {
    font-family: var(--font-ui);
    font-size: 8px; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(10, 7, 4, 0.45);
    border: 1px solid rgba(196, 146, 58, 0.06);
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    padding: 4px 14px 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
    outline: none;
}

.ayur-comp-tab:hover {
    color: var(--ayur-primary-dim);
    background: rgba(10, 7, 4, 0.6);
    border-color: var(--ayur-border);
}

.ayur-comp-tab--active {
    color: var(--ayur-primary);
    background: rgba(10, 7, 4, 0.78);
    border-color: var(--ayur-border);
    text-shadow: 0 0 8px var(--ayur-glow);
}

.ayur-comp-panels {
    position: relative;
}

.ayur-comp-panel {
    display: none;
    align-items: center; gap: 18px;
    padding: 10px 26px;
    background: rgba(10, 7, 4, 0.78);
    backdrop-filter: blur(16px);
    border: 1px solid var(--ayur-border);
    border-radius: 10px;
}

.ayur-comp-panel--active {
    display: flex;
}

@keyframes ayurInfoSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ayur-info-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}

.ayur-info-value {
    font-family: var(--font-display);
    font-size: 15px; font-weight: 700; letter-spacing: 1px;
    color: var(--ayur-primary);
    text-shadow: 0 0 10px var(--ayur-glow);
}

.ayur-info-label {
    font-family: var(--font-ui);
    font-size: 8px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--text-muted);
}

.ayur-info-sep {
    width: 1px; height: 28px;
    background: linear-gradient(180deg, transparent, var(--ayur-border), transparent);
}


/* ── Sanskrit Quote ─────────────────────────────────── */
.ayur-quote {
    position: absolute;
    bottom: 10px; left: 50%; transform: translateX(-50%);
    z-index: 20;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    animation: ayurInfoSlide 0.6s ease-out 2s both;
}

.ayur-quote-sanskrit {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: 11px; font-weight: 500;
    color: rgba(196, 146, 58, 0.4);
    letter-spacing: 2px;
}

.ayur-quote-english {
    font-family: var(--font-ui);
    font-size: 7px; font-weight: 500;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: var(--text-muted);
    max-width: 460px;
    text-align: center;
}


/* ── Active Label States ────────────────────────────── */
.ayur-labels--has-active .ayur-label {
    transition: opacity 0.4s ease;
}

.ayur-labels--has-active .ayur-label:not(.ayur-label--active) {
    opacity: 0.2 !important;
}

.ayur-labels--has-active .ayur-label--active {
    opacity: 1 !important;
}

.ayur-label--active .ayur-label-tag {
    background: rgba(196, 146, 58, 0.12);
    border-color: var(--ayur-primary);
    box-shadow: 0 0 16px var(--ayur-glow), inset 0 0 6px rgba(196, 146, 58, 0.08);
    color: #fff;
}

.ayur-label--active .ayur-label-dot {
    width: 8px; height: 8px;
    box-shadow: 0 0 14px var(--ayur-glow);
}

.ayur-label--active .ayur-label-line {
    height: 2px;
}


/* ── Detail Panel ───────────────────────────────────── */
.ayur-detail-panel {
    position: absolute;
    bottom: 120px; right: clamp(20px, 3vw, 50px);
    z-index: 30;
    width: clamp(220px, 20vw, 300px);
    background: rgba(10, 7, 4, 0.90);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border: 1px solid var(--ayur-border);
    border-radius: 10px;
    padding: 16px 18px;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.25,.46,.45,.94),
                transform 0.35s cubic-bezier(.25,.46,.45,.94);
}

.ayur-detail-panel--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.ayur-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ayur-detail-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ayur-primary);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.ayur-detail-title {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ayur-primary);
    flex: 1;
    transition: color 0.3s ease;
}

.ayur-detail-close {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ayur-detail-close:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
}

.ayur-detail-desc {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.ayur-detail-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(196, 146, 58, 0.1);
    padding-top: 10px;
}

.ayur-detail-stat {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; gap: 2px;
}

.ayur-detail-stat + .ayur-detail-stat {
    border-left: 1px solid rgba(196, 146, 58, 0.08);
}

.ayur-detail-stat-val {
    font-family: var(--font-display);
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--ayur-primary);
    transition: color 0.3s ease;
}

.ayur-detail-stat-lbl {
    font-family: var(--font-ui);
    font-size: 7px; font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}


/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .ayur-labels { display: none; }
    .ayur-corner { display: none; }

    .ayur-comp-tabs { gap: 1px; }
    .ayur-comp-tab { font-size: 7px; padding: 3px 8px 2px; letter-spacing: 1px; }
    .ayur-comp-panel { gap: 10px; padding: 8px 14px; }
    .ayur-info-value { font-size: 12px; }
    .ayur-info-label { font-size: 7px; }
    .ayur-info-sep   { height: 20px; }

    .ayur-nav-center { display: none; }
    .ayur-detail-panel { bottom: 90px; right: 12px; width: 200px; }
    .ayur-detail-stat-val { font-size: 12px; }
}

@media (max-width: 480px) {
    .ayur-comp-tab { font-size: 6px; padding: 3px 5px 2px; letter-spacing: 0.5px; }
    .ayur-comp-panel { gap: 6px; padding: 6px 10px; }
    .ayur-info-value { font-size: 10px; }
    .ayur-detail-panel { width: 170px; padding: 12px; }
}
