/* ============================================================
   OSHE — Occupational Safety, Health, Environment & Sustainability
   Design System & Core Styles
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');
@import 'bhashini.css';

/* ---------- Design Tokens ---------- */
:root {
    --primary-green: #10b981;
    --primary-teal: #14b8a6;
    --primary-amber: #f59e0b;
    --primary-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-lime: #84cc16;
    --accent-rose: #f43f5e;
    --neon-green: #39ff14;
    --neon-cyan: #00fff7;
    --neon-amber: #ffbf00;

    --bg-dark: #0a0f1a;
    --bg-surface: #111827;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.25);

    --text-white: #f1f5f9;
    --text-dim: #94a3b8;
    --text-muted: #64748b;

    --font-main: 'Outfit', system-ui, -apple-system, sans-serif;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;

    --shadow-glow-green: 0 0 30px rgba(16, 185, 129, 0.15);
    --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.5);

    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ---------- Body ---------- */
body {
    min-height: 100vh;
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(6, 182, 212, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
    font-family: var(--font-main);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---------- Animated Background ---------- */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    animation: auroraFloat 25s infinite alternate ease-in-out;
}

.aurora-orb--green {
    width: 700px;
    height: 700px;
    background: var(--primary-green);
    top: -250px;
    left: -150px;
}

.aurora-orb--cyan {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    bottom: -200px;
    right: -100px;
    animation-delay: -8s;
}

.aurora-orb--amber {
    width: 400px;
    height: 400px;
    background: var(--primary-amber);
    top: 40%;
    left: 60%;
    animation-delay: -15s;
    opacity: 0.12;
}

@keyframes auroraFloat {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(60px, -40px) scale(1.05) rotate(2deg); }
    66% { transform: translate(-30px, 50px) scale(0.97) rotate(-1deg); }
    100% { transform: translate(40px, 30px) scale(1.08) rotate(3deg); }
}

/* ---------- Particle Canvas ---------- */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ---------- Main Container ---------- */
.app-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    position: relative;
}

/* ---------- SafeSphere Bhashini Widget (Top Right) ---------- */
@import url('bhashini.css');

/* ---------- Header ---------- */
.site-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 1rem;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--primary-green);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.header-badge svg {
    width: 16px;
    height: 16px;
}

.site-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 40%, #f59e0b 80%, #f43f5e 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 6s ease-in-out infinite;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-shadow: none;
    position: relative;
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.site-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--text-dim);
    max-width: 750px;
    margin: 0 auto 1.5rem;
    font-weight: 400;
    line-height: 1.5;
}

.neon-highlight {
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.4), 0 0 20px rgba(57, 255, 20, 0.15);
    font-weight: 600;
}

.neon-highlight--cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 255, 247, 0.4), 0 0 20px rgba(0, 255, 247, 0.15);
    font-weight: 600;
}

.neon-highlight--amber {
    color: var(--neon-amber);
    text-shadow: 0 0 8px rgba(255, 191, 0, 0.4), 0 0 20px rgba(255, 191, 0, 0.15);
    font-weight: 600;
}

.desktop-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

.desktop-notice svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem auto 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---------- Section Headers ---------- */
.section-header {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--glass-border), transparent);
}

.section-header__title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-green);
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Modules Grid ---------- */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
    margin-bottom: 4rem;
}

/* ---------- Module Card ---------- */
.module-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 2.2rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow: hidden;
    cursor: pointer;
}

.module-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent 30%, rgba(16, 185, 129, 0.3) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.module-card:hover::before {
    opacity: 1;
}

.module-card:hover {
    transform: translateY(-8px) scale(1.01);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--shadow-card-hover), var(--shadow-glow-green);
}

.module-card__icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.module-card__icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    filter: blur(20px);
    opacity: 0.4;
    z-index: -1;
}

.module-card:hover .module-card__icon-wrap {
    transform: scale(1.1) rotate(-5deg);
}

.module-card__icon-wrap svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Icon color variants */
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--primary-green); }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--primary-amber); }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--primary-blue); }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.icon-lime { background: rgba(132, 204, 22, 0.15); color: var(--accent-lime); }

/* Module Title Override for SafeSphere */
.module-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.3;
}

.module-card__desc {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.module-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    width: fit-content;
    margin-top: auto;
}

.tag-active { background: rgba(16, 185, 129, 0.12); color: var(--primary-green); }
.tag-soon { background: rgba(245, 158, 11, 0.12); color: var(--primary-amber); }

.module-card__arrow {
    position: absolute;
    bottom: 1.8rem;
    right: 1.8rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition-smooth);
}

.module-card:hover .module-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

.module-card__arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--text-dim);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- "Coming Soon" Overlay ---------- */
.module-card--coming-soon {
    opacity: 0.65;
    cursor: default;
}

.module-card--coming-soon:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 4rem;
    padding: 3.5rem 2rem;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid var(--glass-border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    text-align: center;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.dev-label {
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.dev-name {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.dev-creds {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.disclaimer {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.contact-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.contact-link:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .app-container {
        padding: 2rem 1rem 1rem;
    }

    .site-header {
        margin-bottom: 2.5rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .module-card {
        padding: 1.5rem;
    }

    .stats-bar {
        gap: 1.2rem;
    }

    .bhashini-widget {
        width: 40px;
        height: 40px;
        top: 16px;
        right: 16px;
    }

    .site-footer {
        padding: 2.5rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 2.2rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .module-card__title {
        font-size: 1.15rem;
    }
}

/* ---------- Entrance animations ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.7s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.12s; }
.fade-up:nth-child(3) { animation-delay: 0.19s; }
.fade-up:nth-child(4) { animation-delay: 0.26s; }
.fade-up:nth-child(5) { animation-delay: 0.33s; }
.fade-up:nth-child(6) { animation-delay: 0.40s; }
.fade-up:nth-child(7) { animation-delay: 0.47s; }
.fade-up:nth-child(8) { animation-delay: 0.54s; }
