/* ==============================================
   AEROFIELD ACADEMY — PANCHA MAHABHUTA
   CSS-driven physics for 5 elemental layers.
   Single viewport, no scroll.
   ============================================== */


/* ── 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);
}


/* ── Background Layers (Akasha void) ────────────────────────────────── */
.akad-bg-void {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 120% 80% at 50% 50%, rgba(10,10,15,1) 0%, rgba(6,6,10,1) 100%);
}

.akad-bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.025;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(212,160,74,0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,160,74,0.3) 1px, transparent 1px);
    background-size: 80px 80px;
}

.akad-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}


/* ── Navbar ──────────────────────────────────────────────────────────── */
.akad-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: var(--navbar-bg);
    border-bottom: 1px solid var(--border-subtle);
}

.akad-nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.akad-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--glow-amber) 0%, var(--glow-copper) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(212,160,74,0.3);
    padding: 7px;
}

.akad-logo-icon svg { width: 24px; height: 24px; }

.akad-logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--glow-amber) 0%, #e8c985 50%, var(--glow-copper) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.akad-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.akad-nav-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--text-primary);
}

.akad-nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.akad-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--glow-teal);
    box-shadow: 0 0 6px var(--glow-teal);
    animation: akadDotPulse 2s ease-in-out infinite;
}

.akad-nav-sub {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.akad-nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.akad-btn {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
}

.akad-btn:hover {
    color: var(--glow-amber);
    border-color: rgba(212,160,74,0.3);
    background: rgba(212,160,74,0.06);
}

.akad-btn--back {
    border-color: rgba(212,160,74,0.15);
    color: var(--glow-amber-dim);
}


/* ── Main Layout ─────────────────────────────────────────────────────── */
.akad-main {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--navbar-height) 0 38px; /* navbar top, footer bottom */
}

.akad-title-strip {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 16px;
    padding: clamp(8px, 1.5vh, 16px) 0;
    flex-shrink: 0;
}

.akad-title {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: clamp(16px, 2.5vw, 28px);
    font-weight: 500;
    background: linear-gradient(135deg, var(--glow-amber), var(--glow-copper));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
}

.akad-title-en {
    font-family: var(--font-ui);
    font-size: clamp(10px, 1.2vw, 14px);
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
}


/* ── Grid — 5 Element Cards ──────────────────────────────────────────── */
.akad-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(8px, 1vw, 16px);
    padding: 0 clamp(12px, 2vw, 32px);
    min-height: 0; /* allow flex shrink */
}


/* ── Card Base ───────────────────────────────────────────────────────── */
a.akad-card {
    text-decoration: none;
    color: inherit;
}

.akad-card {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
    background: rgba(16,16,24,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
    cursor: pointer;
}

.akad-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212,160,74,0.2);
}

.akad-card-inner {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}

.akad-card-info {
    padding: clamp(8px, 1.5vh, 16px) clamp(10px, 1vw, 16px);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.akad-card-sanskrit {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: clamp(18px, 2.5vw, 32px);
    font-weight: 500;
    letter-spacing: 2px;
    line-height: 1.2;
}

.akad-card-name {
    font-family: var(--font-display);
    font-size: clamp(11px, 1vw, 15px);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.akad-card-layer {
    font-family: var(--font-ui);
    font-size: clamp(9px, 0.8vw, 12px);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.akad-card-desc {
    font-family: var(--font-body);
    font-size: clamp(9px, 0.8vw, 12px);
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.akad-card-sense {
    font-family: 'Noto Sans Devanagari', var(--font-ui);
    font-size: clamp(9px, 0.7vw, 11px);
    font-weight: 400;
    letter-spacing: 1.5px;
    opacity: 0.5;
}


/* ══════════════════════════════════════════════════════════════════════
   1. PRITHVI (Earth) — Weight, rigidity, hard shadows
   ══════════════════════════════════════════════════════════════════════ */
.akad-card--prithvi {
    border-color: rgba(139, 90, 43, 0.2);
}

.akad-card--prithvi:hover {
    border-color: rgba(139, 90, 43, 0.4);
    box-shadow: 8px 8px 0px rgba(26,20,10,0.8), 0 0 30px rgba(139,90,43,0.1);
}

.akad-card--prithvi .akad-card-sanskrit { color: #a0724a; }
.akad-card--prithvi .akad-card-layer    { color: #8b5a2b; }

/* Earth blocks — heavy, rigid, stacked */
.prithvi-block {
    width: 50%;
    height: 26%;
    background: linear-gradient(135deg, #1a1208 0%, #2a1f10 100%);
    border: 2px solid rgba(139,90,43,0.3);
    box-shadow: 6px 6px 0px #0d0a05, inset 0 1px 0 rgba(139,90,43,0.15);
    position: absolute;
    bottom: 30%;
    left: 25%;
}

.prithvi-block--2 {
    width: 40%;
    height: 22%;
    bottom: 52%;
    left: 30%;
    box-shadow: 5px 5px 0px #0d0a05, inset 0 1px 0 rgba(139,90,43,0.1);
    animation: prithviSettle 4s ease-in-out infinite;
}

.prithvi-block--3 {
    width: 30%;
    height: 18%;
    bottom: 70%;
    left: 35%;
    box-shadow: 4px 4px 0px #0d0a05;
    animation: prithviSettle 4s ease-in-out infinite 0.5s;
}

@keyframes prithviSettle {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(2px); }
}


/* ══════════════════════════════════════════════════════════════════════
   2. APAS (Water) — Glassmorphism, blur, morphing blobs
   ══════════════════════════════════════════════════════════════════════ */
.akad-card--apas {
    border-color: rgba(45,212,168,0.12);
}

.akad-card--apas:hover {
    border-color: rgba(45,212,168,0.3);
    box-shadow: 0 4px 40px rgba(45,212,168,0.08);
}

.akad-card--apas .akad-card-inner {
    backdrop-filter: blur(8px);
}

.akad-card--apas .akad-card-sanskrit { color: #2dd4a8; }
.akad-card--apas .akad-card-layer    { color: #26b08a; }

/* Water blobs */
.apas-blob {
    width: 60%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%,
        rgba(45,212,168,0.15) 0%,
        rgba(45,212,168,0.05) 50%,
        transparent 70%);
    border: 1px solid rgba(45,212,168,0.15);
    backdrop-filter: blur(15px);
    animation: apasBlob 8s ease-in-out infinite;
    position: absolute;
}

.apas-blob--2 {
    width: 40%;
    top: 15%;
    right: 10%;
    animation-delay: -3s;
    animation-duration: 6s;
    border-color: rgba(45,212,168,0.08);
}

.apas-ripple {
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(45,212,168,0.1);
    position: absolute;
    animation: apasRipple 4s ease-out infinite;
}

@keyframes apasBlob {
    0%, 100% { border-radius: 50% 40% 60% 50%; transform: scale(1) rotate(0deg); }
    25%      { border-radius: 40% 60% 50% 45%; transform: scale(1.05) rotate(5deg); }
    50%      { border-radius: 55% 45% 40% 60%; transform: scale(0.95) rotate(-3deg); }
    75%      { border-radius: 45% 55% 55% 40%; transform: scale(1.02) rotate(2deg); }
}

@keyframes apasRipple {
    0%   { transform: scale(0.3); opacity: 0.6; }
    100% { transform: scale(1.2); opacity: 0; }
}


/* ══════════════════════════════════════════════════════════════════════
   3. AGNI (Fire) — Procedural glow, pulsing gradients
   ══════════════════════════════════════════════════════════════════════ */
.akad-card--agni {
    border-color: rgba(255,69,0,0.15);
}

.akad-card--agni:hover {
    border-color: rgba(255,69,0,0.35);
    box-shadow: 0 0 40px rgba(255,69,0,0.12), 0 0 80px rgba(255,140,0,0.06);
}

.akad-card--agni .akad-card-sanskrit { color: #ff6b35; }
.akad-card--agni .akad-card-layer    { color: #e05520; }

/* Fire core */
.agni-core {
    width: 30%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,140,0,0.6) 0%, rgba(255,69,0,0.3) 40%, transparent 70%);
    filter: drop-shadow(0 0 20px rgba(255,69,0,0.5)) drop-shadow(0 0 40px rgba(255,140,0,0.2));
    animation: agniPulse 2s ease-in-out infinite;
    position: absolute;
}

/* Flame tongues */
.agni-flame {
    width: 20%;
    height: 35%;
    background: linear-gradient(0deg, rgba(255,69,0,0.3) 0%, rgba(255,200,0,0.1) 60%, transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    bottom: 45%;
    filter: blur(2px);
    animation: agniFlicker 1.5s ease-in-out infinite;
    transform-origin: bottom center;
}

.agni-flame--2 {
    width: 15%;
    height: 28%;
    left: 55%;
    animation-delay: -0.7s;
    animation-duration: 1.8s;
}

/* Sparks */
.agni-spark {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffaa00;
    position: absolute;
    filter: drop-shadow(0 0 4px #ff6b35);
    animation: agniSpark 2.5s ease-out infinite;
}

.agni-spark--2 { left: 60%; animation-delay: -0.8s; }
.agni-spark--3 { left: 35%; animation-delay: -1.6s; animation-duration: 3s; }

@keyframes agniPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(255,69,0,0.5)) drop-shadow(0 0 40px rgba(255,140,0,0.2)); }
    50%      { transform: scale(1.15); filter: drop-shadow(0 0 30px rgba(255,69,0,0.7)) drop-shadow(0 0 60px rgba(255,140,0,0.3)); }
}

@keyframes agniFlicker {
    0%, 100% { transform: scaleY(1) scaleX(1) rotate(-2deg); opacity: 0.7; }
    30%      { transform: scaleY(1.2) scaleX(0.9) rotate(1deg); opacity: 1; }
    60%      { transform: scaleY(0.9) scaleX(1.1) rotate(-1deg); opacity: 0.6; }
}

@keyframes agniSpark {
    0%   { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(15px, -50px) scale(0); opacity: 0; }
}


/* ══════════════════════════════════════════════════════════════════════
   4. VAYU (Air) — Thin traced SVG lines, dash animation
   ══════════════════════════════════════════════════════════════════════ */
.akad-card--vayu {
    border-color: rgba(56,189,248,0.1);
}

.akad-card--vayu:hover {
    border-color: rgba(56,189,248,0.25);
    box-shadow: 0 2px 30px rgba(56,189,248,0.06);
}

.akad-card--vayu .akad-card-sanskrit { color: #38bdf8; }
.akad-card--vayu .akad-card-layer    { color: #2da0d4; }

.vayu-svg {
    width: 90%;
    height: 60%;
    position: absolute;
}

.vayu-path {
    stroke-dasharray: 8 6;
    stroke-dashoffset: 0;
    animation: vayuTrace 6s linear infinite;
}

.vayu-path--2 {
    stroke-dasharray: 5 8;
    animation-duration: 8s;
    animation-direction: reverse;
}

.vayu-path--3 {
    stroke-dasharray: 12 4;
    animation-duration: 10s;
}

.vayu-dot {
    animation: vayuDotMove 6s ease-in-out infinite;
}

.vayu-dot--2 {
    animation-duration: 8s;
    animation-direction: reverse;
}

@keyframes vayuTrace {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -100; }
}

@keyframes vayuDotMove {
    0%   { cx: 0; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { cx: 200; opacity: 0; }
}


/* ══════════════════════════════════════════════════════════════════════
   5. AKASHA (Ether) — Deep void, expanding rings, OM vibration
   ══════════════════════════════════════════════════════════════════════ */
.akad-card--akasha {
    border-color: rgba(139,92,246,0.1);
    background: rgba(6,6,12,0.8);
}

.akad-card--akasha:hover {
    border-color: rgba(139,92,246,0.25);
    box-shadow: 0 0 50px rgba(139,92,246,0.06);
}

.akad-card--akasha .akad-card-sanskrit { color: #a78bfa; }
.akad-card--akasha .akad-card-layer    { color: #8b5cf6; }

/* Central void */
.akasha-void {
    width: 20%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,6,12,1) 0%, rgba(139,92,246,0.05) 100%);
    box-shadow: 0 0 40px rgba(139,92,246,0.1);
    position: absolute;
}

/* Expanding vibration rings */
.akasha-ring {
    width: 40%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(139,92,246,0.12);
    position: absolute;
    animation: akashaExpand 6s ease-out infinite;
}

.akasha-ring--2 {
    animation-delay: -2s;
}

.akasha-ring--3 {
    animation-delay: -4s;
}

/* OM symbol */
.akasha-om {
    font-family: 'Noto Sans Devanagari', serif;
    font-size: clamp(20px, 3vw, 36px);
    color: rgba(139,92,246,0.25);
    position: absolute;
    animation: akashaOmPulse 8s ease-in-out infinite;
    user-select: none;
}

@keyframes akashaExpand {
    0%   { transform: scale(0.3); opacity: 0.7; }
    100% { transform: scale(2.5); opacity: 0; }
}

@keyframes akashaOmPulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(1.1); }
}


/* ── Footer (reuse from main site) ───────────────────────────────────── */
.footer-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    border-top: 1px solid rgba(212, 160, 74, 0.15);
    background: linear-gradient(180deg,
        rgba(10, 10, 14, 0.92) 0%,
        rgba(10, 10, 14, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    height: 38px;
}

.footer-strip-inner {
    padding: 6px 0;
}

.sanskrit-marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.sanskrit-marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: sanskrit-scroll 80s linear infinite;
    will-change: transform;
}

.sanskrit-quote {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: rgba(212, 160, 74, 0.55);
    padding: 0 12px;
    transition: color 0.4s ease;
}

.sanskrit-sep {
    color: rgba(139, 92, 246, 0.25);
    font-size: 8px;
    padding: 0 6px;
    vertical-align: middle;
}

.footer-strip:hover .sanskrit-quote {
    color: rgba(212, 160, 74, 0.75);
}

@keyframes sanskrit-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}


/* ── Utility Animations ──────────────────────────────────────────────── */
@keyframes akadDotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--glow-teal); }
    50%      { opacity: 0.4; box-shadow: 0 0 2px var(--glow-teal); }
}


/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .akad-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    .akad-card-desc { display: none; }
}

@media (max-width: 768px) {
    .akad-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        gap: 6px;
    }
    .akad-nav-controls { display: none; }
}
