/* ===== CyberAeon – Custom Stylesheet ===== */

/* --- CSS Variables --- */
:root {
    --indigo: #4f46e5;
    --purple: #7c3aed;
    --sky: #0284c7;
    --cyan: #06b6d4;
    --pink: #db2777;
    --slate: #0f172a;
    --whatsapp: #25D366;
    --body-bg: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.55);
    --card-border: rgba(255, 255, 255, 0.6);
    --text-primary: #2d3748;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: #e5e7eb;
}
html.dark {
    --body-bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.75);
    --card-border: rgba(51, 65, 85, 0.6);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --input-bg: rgba(30, 41, 59, 0.9);
    --input-border: #334155;
}

/* --- Base --- */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(1200px 800px at 10% 10%, rgba(79,70,229,0.12), transparent 60%),
        radial-gradient(1000px 700px at 90% 20%, rgba(124,58,237,0.10), transparent 60%),
        radial-gradient(1100px 700px at 20% 90%, rgba(6,182,212,0.10), transparent 60%);
    pointer-events: none;
}
html.dark body::before { opacity: 0.4; }

.font-orbitron { font-family: 'Orbitron', sans-serif; }

/* --- Loading Screen --- */
#loader {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--body-bg);
    transition: opacity 0.5s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-bar {
    width: 12rem;
    height: 4px;
    background: var(--input-border);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 1rem;
}
.loader-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--indigo), var(--purple));
    animation: loading 1.2s ease-in-out infinite;
}
@keyframes loading {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* --- Soft gradient glow backdrop --- */
.bg-decor {
    position: fixed;
    inset: -40vh -10vw auto -10vw;
    height: 70vh;
    z-index: 0;
    filter: blur(60px);
    opacity: 0.45;
    pointer-events: none;
    background:
        radial-gradient(40% 60% at 20% 30%, var(--indigo), transparent 60%),
        radial-gradient(35% 55% at 80% 20%, var(--purple), transparent 60%),
        radial-gradient(45% 60% at 70% 80%, var(--cyan), transparent 60%);
    animation: pulse-glow 8s ease-in-out infinite;
}
html.dark .bg-decor { opacity: 0.25; }
@keyframes pulse-glow {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

/* --- Canvas --- */
#backgroundCanvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

/* --- SPA Sections --- */
.page-section {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.active-section {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

main, header, footer { position: relative; z-index: 1; }

/* --- Nav --- */
.nav-link.active { color: var(--indigo) !important; font-weight: 700; }
html.dark .nav-link.active { color: #818cf8 !important; }

/* --- Glass Cards --- */
.glass-box {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(79,70,229,0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}
.glass-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 50px rgba(79,70,229,0.18);
}
html.dark .glass-box {
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* --- Accent bars --- */
.accent-bar { position: absolute; top: 0; left: 0; right: 0; height: 6px; }
.vapt-box .accent-bar { background: linear-gradient(90deg, var(--indigo), var(--purple)); }
.forensics-box .accent-bar { background: linear-gradient(90deg, #9333ea, #e11d48); }
.coaching-box .accent-bar { background: linear-gradient(90deg, var(--sky), var(--cyan)); }
.contact-box .accent-bar { background: linear-gradient(90deg, var(--indigo), var(--cyan)); }

/* --- Corner markers --- */
.corner { position: absolute; width: 25px; height: 25px; border-style: solid; opacity: 0; transition: opacity 0.3s ease; }
.glass-box:hover .corner { opacity: 1; }
.corner-tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-top-left-radius: 1.5rem; border-color: rgba(79,70,229,0.65); }
.corner-tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-top-right-radius: 1.5rem; border-color: rgba(124,58,237,0.65); }
.corner-bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-bottom-left-radius: 1.5rem; border-color: rgba(2,132,199,0.65); }
.corner-br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-bottom-right-radius: 1.5rem; border-color: rgba(6,182,212,0.65); }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}
.btn:hover { transform: translateY(-1px) scale(1.02); }
.btn-primary {
    background-image: linear-gradient(90deg, var(--indigo), var(--purple));
    color: white;
    box-shadow: 0 10px 20px rgba(79,70,229,0.25);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 16px 30px rgba(79,70,229,0.35); }
.btn-white {
    background: white;
    color: #111827;
    box-shadow: 0 8px 18px rgba(17,24,39,0.08);
}
html.dark .btn-white { background: #1e293b; color: #e2e8f0; }
.btn-white:hover { filter: brightness(0.98); box-shadow: 0 12px 22px rgba(17,24,39,0.12); }

/* --- Inputs --- */
.input-field {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    outline: none;
    box-sizing: border-box;
    transition: box-shadow 0.25s, border-color 0.25s;
}
.input-field:focus { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(79,70,229,0.20); }
.input-field::placeholder { color: var(--text-muted); }

/* --- Headings gradient --- */
.heading {
    background-image: linear-gradient(90deg, #0f172a, #475569);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
html.dark .heading {
    background-image: linear-gradient(90deg, #e2e8f0, #94a3b8);
}

/* --- FAQ Cards --- */
.faq-card { border-left: 4px solid transparent; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.faq-card:hover { transform: translateX(4px); }
.faq-card.vapt { border-left-color: var(--indigo); }
.faq-card.ir { border-left-color: #9333ea; }
.faq-card.training { border-left-color: var(--sky); }

/* --- Methodology Stepper --- */
.methodology { position: relative; max-width: 1000px; margin: 0 auto; }
.methodology::before {
    content: "";
    position: absolute;
    top: 40px; left: 60px; right: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--indigo), var(--purple), var(--sky), var(--cyan));
    opacity: 0.3;
    border-radius: 9999px;
}
.methodology-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
@media (max-width: 768px) {
    .methodology::before { display: none; }
    .methodology-grid { grid-template-columns: 1fr; }
}
.step {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(15,23,42,0.07);
    padding: 18px 16px 16px 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15,23,42,0.12); }
.badge {
    position: absolute; top: -16px; left: 16px;
    height: 40px; width: 40px;
    border-radius: 9999px;
    display: grid; place-items: center;
    color: white;
    box-shadow: 0 8px 18px rgba(15,23,42,0.15);
    border: 3px solid white;
    font-weight: 800;
    transition: transform 0.3s ease;
}
html.dark .badge { border-color: #1e293b; }
.step:hover .badge { transform: scale(1.1) rotate(5deg); }
.badge.indigo { background: linear-gradient(135deg, var(--indigo), #6366f1); }
.badge.purple { background: linear-gradient(135deg, var(--purple), #a78bfa); }
.badge.sky { background: linear-gradient(135deg, var(--sky), #38bdf8); }
.badge.cyan { background: linear-gradient(135deg, var(--cyan), #22d3ee); }

/* --- WhatsApp FAB --- */
.whatsapp-fab {
    position: fixed; right: 18px; bottom: 18px;
    height: 56px; width: 56px;
    border-radius: 9999px;
    background: var(--whatsapp);
    color: white;
    display: grid; place-items: center;
    box-shadow: 0 10px 24px rgba(37,211,102,0.45);
    z-index: 60;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    animation: float 3s ease-in-out infinite;
    text-decoration: none;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.whatsapp-fab:hover { transform: translateY(-2px) scale(1.1); filter: brightness(1.05); box-shadow: 0 16px 30px rgba(37,211,102,0.55); animation: none; }
.whatsapp-fab svg { width: 28px; height: 28px; }

/* --- Scroll-to-Top --- */
#scroll-top {
    position: fixed; bottom: 82px; right: 20px;
    height: 44px; width: 44px;
    border-radius: 9999px;
    background: white;
    color: var(--indigo);
    border: 1px solid var(--input-border);
    display: none;
    align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(15,23,42,0.12);
    z-index: 55;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}
#scroll-top.show { display: flex; }
#scroll-top:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.18); }
html.dark #scroll-top { background: #1e293b; color: #818cf8; border-color: #334155; }

/* --- Why Choose / Feature Cards --- */
.why-wrapper { position: relative; max-width: 1100px; margin: 0 auto; }
.why-aura {
    position: absolute;
    inset: -40px -60px -20px -60px;
    background:
        radial-gradient(40% 50% at 15% 30%, rgba(79,70,229,.20), transparent 60%),
        radial-gradient(35% 45% at 85% 25%, rgba(124,58,237,.18), transparent 60%),
        radial-gradient(45% 55% at 70% 85%, rgba(6,182,212,.16), transparent 60%);
    filter: blur(40px); opacity: .55;
    pointer-events: none; z-index: 0;
    animation: aura-pulse 6s ease-in-out infinite;
}
@keyframes aura-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}
.feature-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
@media (max-width: 992px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
    position: relative; border-radius: 16px; padding: 1px;
    background: linear-gradient(white,white) padding-box, linear-gradient(135deg, var(--indigo), var(--purple), var(--cyan)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 14px 40px rgba(15,23,42,.10);
    transition: transform .25s ease, box-shadow .25s ease;
}
html.dark .feature-card {
    background: linear-gradient(#1e293b,#1e293b) padding-box, linear-gradient(135deg, var(--indigo), var(--purple), var(--cyan)) border-box;
}
.feature-card:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 50px rgba(15,23,42,.16); }
.feature-inner { background: rgba(255,255,255,.92); border-radius: 15px; padding: 20px; }
html.dark .feature-inner { background: rgba(30,41,59,.92); }
.feature-icon {
    height: 52px; width: 52px; border-radius: 14px;
    display: grid; place-items: center; color: white;
    box-shadow: 0 10px 22px rgba(15,23,42,.15);
    transition: transform 0.3s ease;
}
.feature-card:hover .feature-icon { transform: rotate(5deg) scale(1.1); }
.feature-icon.indigo { background: linear-gradient(135deg, var(--indigo), #6366f1); }
.feature-icon.purple { background: linear-gradient(135deg, var(--purple), #a78bfa); }
.feature-icon.cyan { background: linear-gradient(135deg, var(--cyan), #22d3ee); }
.feature-title { font-weight: 800; letter-spacing: .2px; }
.feature-sub { color: var(--text-secondary); }
.feature-list { margin-top: 10px; display: grid; gap: 8px; }
.feature-point { display: flex; align-items: flex-start; gap: 10px; color: var(--text-primary); font-size: .95rem; }
.feature-dot {
    margin-top: 6px; height: 8px; width: 8px; border-radius: 9999px;
    background: linear-gradient(90deg, var(--indigo), var(--purple));
    flex-shrink: 0;
}

/* --- About Section --- */
.about-values-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 768px) { .about-values-grid { grid-template-columns: 1fr; } }
.value-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    border-radius: 1.25rem;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(15,23,42,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.value-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(15,23,42,0.14); }
.value-icon {
    height: 56px; width: 56px; border-radius: 16px;
    display: inline-grid; place-items: center; color: white;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.15);
}
.cert-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cert-badge {
    padding: 10px 20px;
    border-radius: 9999px;
    font-weight: 700; font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: 2px solid;
    transition: transform 0.2s ease;
}
.cert-badge:hover { transform: scale(1.05); }
.industry-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width: 768px) { .industry-grid { grid-template-columns: repeat(2,1fr); } }
.industry-chip {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.industry-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,23,42,0.10); }

/* --- Dark mode toggle --- */
.dark-toggle {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    background: var(--card-bg);
    cursor: pointer;
    display: grid; place-items: center;
    transition: transform 0.2s ease, background 0.2s ease;
}
.dark-toggle:hover { transform: scale(1.1); }
.dark-toggle svg { width: 20px; height: 20px; }

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.slide-in-left {
    opacity: 0; transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-in-left.visible { opacity: 1; transform: translateX(0); }
.slide-in-right {
    opacity: 0; transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-in-right.visible { opacity: 1; transform: translateX(0); }
.scale-in {
    opacity: 0; transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.scale-in.visible { opacity: 1; transform: scale(1); }
.stagger-item {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-item.visible { opacity: 1; transform: translateY(0); }

/* --- Hero animations --- */
.hero-badge { animation: fadeInDown 0.8s ease-out; }
.hero-title { animation: fadeInUp 1s ease-out 0.2s both; }
.hero-subtitle { animation: fadeInUp 1s ease-out 0.4s both; }
.hero-buttons { animation: fadeInUp 1s ease-out 0.6s both; }
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Stat cards --- */
.stat-number { transition: transform 0.3s ease; }
.stat-card:hover .stat-number { transform: scale(1.1); }

/* --- Header --- */
header { animation: slideDown 0.5s ease-out; }
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .bg-decor, .why-aura { animation: none; }
    .whatsapp-fab { animation: none; }
}
