/* ============================================================
   ∇ Nabla GPA Calculator — Shared Site Stylesheet
   Used by every page. Contains the original app theme plus the
   new site header / sidebar / footer components.
   ============================================================ */

:root {
    --primary: #00695c;
    --primary-dark: #004d40;
    --primary-light: #4db6ac;
    --secondary: #ff8f00;
    --accent: #00b0ff;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4CAF50;
    --card-bg: rgba(255, 255, 255, 0.95);
    --header-gradient: linear-gradient(135deg, var(--primary-dark), var(--primary));
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --site-header-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    min-height: 100%;
}

body {
    background: #f0f2f5;
    background-image:
        radial-gradient(circle at top right, rgba(77, 182, 172, 0.1), transparent 25%),
        radial-gradient(circle at bottom left, rgba(255, 143, 0, 0.1), transparent 25%);
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    padding-top: calc(var(--site-header-height) + 20px);
    position: relative;
    overflow-x: hidden;
}

/* Locks the background from scrolling while the sidebar is open (JS toggles
   this via inline styles on <body>, see site.js) */
body.sidebar-locked {
    overflow: hidden;
}

/* Keeps any scroll target (auto-scroll after calculating, or a manual
   anchor jump) from landing behind the fixed site header. */
.form-section,
.static-section,
#resultContainer,
.student-info,
.footer-info,
.result-box {
    scroll-margin-top: calc(var(--site-header-height) + 16px);
}

.nabla-symbol {
    font-weight: 700;
    margin-right: 6px;
}

/* ================= Background decoration shapes ================= */
.decoration {
    position: fixed;
    z-index: -1;
    opacity: 0.1;
}
.decoration.circle-1 { width: 300px; height: 300px; border-radius: 50%; background: var(--primary); top: -150px; right: -150px; }
.decoration.circle-2 { width: 200px; height: 200px; border-radius: 50%; background: var(--secondary); bottom: -100px; left: -100px; }
.decoration.circle-3 { width: 150px; height: 150px; border-radius: 50%; background: var(--accent); bottom: 20%; right: 10%; }
.decoration.triangle {
    width: 0; height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid var(--primary-light);
    top: 30%; left: 5%;
    transform: rotate(45deg);
}

/* ============================================================
   SITE HEADER (top bar, present on every page)
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--site-header-height);
    background: var(--header-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    z-index: 2500;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.22); }
.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}
.sidebar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sidebar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-logo {
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}
.site-logo .nabla-symbol { font-size: 1.3rem; }

/* ============================================================
   SIDEBAR (off-canvas, works the same on mobile & desktop)
   ============================================================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2999;
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 300px;
    max-width: 82vw;
    height: 100%;
    background: #fff;
    box-shadow: 6px 0 25px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(.25,.8,.25,1);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    background: var(--header-gradient);
    color: #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
}
.sidebar-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-close:hover { background: rgba(255,255,255,0.3); }

.sidebar-links {
    list-style: none;
    padding: 10px 0;
    flex: 1;
}
.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: var(--transition);
}
.sidebar-links a i { width: 20px; text-align: center; color: var(--primary); }
.sidebar-links a:hover { background: #e8f5e9; }
.sidebar-links a.active {
    background: #e8f5e9;
    border-left-color: var(--secondary);
    color: var(--primary-dark);
    font-weight: 700;
}

.sidebar-footer-note {
    padding: 16px 22px;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #eee;
}

/* ============================================================
   PAGE CARD (the white rounded container used by every page)
   ============================================================ */
.container {
    max-width: 800px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    z-index: 10;
    margin: 20px auto;
    animation: fadeInUp 0.8s ease;
}

.container.wide { max-width: 1000px; }

.header {
    text-align: center;
    padding: 30px;
    background: var(--header-gradient);
    color: white;
    position: relative;
    overflow: hidden;
}
.header h1 { font-size: 2.5rem; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.header p { font-size: 1.1rem; opacity: 0.9; }

/* ================= Forms ================= */
.form-section { padding: 30px; display: none; }
.form-section.active { display: block; animation: fadeIn 0.5s ease; }
.static-section { padding: 30px; }

.form-title {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary-dark);
    font-size: 1.8rem;
    position: relative;
}
.form-title:after {
    content: "";
    position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.section-title {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin: 25px 0 12px;
}

.form-group { margin-bottom: 20px; animation: slideIn 0.4s ease; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }
.form-text { display: block; margin-top: 6px; color: #888; font-size: 0.82rem; }

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    transition: var(--transition);
    background: #fff;
}
.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.2);
    outline: none;
}
textarea.form-control { resize: vertical; min-height: 120px; }

.btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 105, 92, 0.25);
    transition: var(--transition);
    text-align: center;
    width: 100%;
    margin-top: 10px;
    text-decoration: none;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0, 77, 64, 0.35); }
.btn-secondary { background: var(--secondary); }
.btn-secondary:hover { background: #e65100; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: rgba(0, 105, 92, 0.1); }
.btn-group { display: flex; gap: 15px; margin-top: 20px; }
.btn-group .btn { flex: 1; }

/* ================= Info blocks / cards ================= */
.student-info { background: #e8f5e9; border-radius: 15px; padding: 20px; margin: 20px 0; text-align: left; }
.student-info h3 { color: var(--primary-dark); margin-bottom: 15px; text-align: center; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.info-item { margin-bottom: 10px; }
.info-item strong { display: inline-block; min-width: 120px; color: #555; }

.callout {
    background: #e3f2fd;
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 18px 0;
}
.callout strong { color: #1565c0; }
.callout a { color: var(--primary-dark); font-weight: 600; }

/* ================= Tables ================= */
.table-container { width: 100%; overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
th, td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
    word-break: normal;
    overflow-wrap: normal;
    white-space: nowrap;
    font-size: 14px;
}
th { background-color: var(--primary); color: white; font-weight: 500; }
tr:nth-child(even) { background-color: #f8f9fa; }
tr:hover { background-color: #e9f7f6; }

.grade-table-wrap { margin: 20px 0 34px; }
.grade-table-wrap h3 { color: var(--primary-dark); margin-bottom: 4px; }
.grade-table-wrap .table-note { color: #777; font-size: 0.86rem; margin-bottom: 10px; }

/* ================= Result / GPA display ================= */
.result-box {
    background: white; border-radius: 15px; padding: 25px; margin: 25px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08); text-align: center;
    animation: pulse 2s infinite; position: relative; overflow: visible;
}
@keyframes gpaGlowPulse {
    0% { box-shadow: 0 5px 20px rgba(0,0,0,0.08); }
    35% { box-shadow: 0 5px 20px rgba(0,0,0,0.08), 0 0 46px 12px rgba(77, 232, 209, 0.55); }
    100% { box-shadow: 0 5px 20px rgba(0,0,0,0.08); }
}
.result-box.gpa-glow-strong { animation: pulse 2s infinite, gpaGlowPulse 3s ease-out 2; }
.result-box.gpa-glow-soft { animation: pulse 2s infinite, gpaGlowPulse 3.2s ease-out 1; }

.gpa-confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5; }
.gpa-confetti-piece {
    position: absolute; top: 50%; left: 50%; font-weight: 700; opacity: 0;
    will-change: transform, opacity;
    animation: gpaConfettiBurst var(--dur, 3.2s) ease-out forwards;
    animation-delay: var(--delay, 0s);
}
@keyframes gpaConfettiBurst {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.4); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)) scale(1); opacity: 0; }
}

.gpa-value { font-size: 3.5rem; font-weight: 700; color: var(--primary); margin: 10px 0; }
.gpa-message { font-size: 1.2rem; color: #555; margin-top: 10px; }

.error-message { color: #e53935; background: #ffebee; padding: 12px; border-radius: 8px; margin: 15px 0; display: none; text-align: center; }
.success-message { color: var(--success); background: #e8f5e9; padding: 12px; border-radius: 8px; margin: 15px 0; display: none; text-align: center; }

.footer-info { background: #e3f2fd; padding: 20px; border-radius: 10px; margin: 20px 0; text-align: left; }
.footer-info h3 {
    color: #1e88e5;
    margin-bottom: 12px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-info h3 i { font-size: 0.95em; }
.footer-info p { margin: 5px 0; }
.footer-info ul { list-style-type: none; padding-left: 0; }
.footer-info li { margin: 8px 0; padding-left: 20px; position: relative; }
.footer-info li::before { content: "•"; color: #1e88e5; font-weight: bold; position: absolute; left: 0; }

/* Reusable plain (non-boxed) info list — used wherever we show a bullet
   list outside of the blue .footer-info box, e.g. "Currently enrolled in". */
.enrolled-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
}
.enrolled-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f5faf9;
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-align: left;
}
.enrolled-list li i { color: var(--primary); flex-shrink: 0; }

/* ================= Profile / contact card (About, Contact, result pages) ================= */
/* Deliberately ONE layout at every screen size — a centered column — so it
   never behaves differently (or overlaps) between narrow phones and wide /
   landscape screens. */
.contact-card {
    background: linear-gradient(135deg, #ffffff, #f2faf9);
    border: 1px solid #dcefec;
    border-radius: 18px;
    padding: 28px 24px;
    margin: 15px auto;
    max-width: 380px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 105, 92, 0.10);
}
.contact-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: var(--header-gradient);
}
.contact-image { text-align: center; }
.contact-image img {
    width: 104px; height: 104px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.contact-name {
    font-weight: 700;
    margin-top: 12px;
    color: var(--primary-dark);
    font-size: 1.08rem;
}
.contact-badge {
    display: inline-block;
    background: var(--secondary);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 5px;
    letter-spacing: 0.5px;
}
.contact-role { color: #888; font-size: 0.83rem; margin-top: 3px; }
.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.contact-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 50px;
    background: #fff;
    border: 2px solid var(--primary);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
    width: 100%;
    max-width: 300px;
}
.contact-link-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 105, 92, 0.28);
}
.contact-link-btn i { width: 16px; text-align: center; flex-shrink: 0; }
.contact-link-btn.whatsapp { border-color: #25D366; color: #1a9e4e; }
.contact-link-btn.whatsapp:hover { background: #25D366; color: #fff; box-shadow: 0 6px 14px rgba(37, 211, 102, 0.35); }

/* ============================================================
   SITE FOOTER (present on every page) — full-bleed dark footer
   ============================================================ */
.site-footer {
    width: calc(100% + 40px);
    margin: 40px -20px -20px -20px;
    background: linear-gradient(160deg, var(--primary-dark) 0%, #00251c 100%);
    color: rgba(255,255,255,0.85);
}
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 44px 24px 22px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
    gap: 30px;
}
.footer-col .footer-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.footer-col .footer-brand .nabla-symbol { font-size: 1.4rem; margin-right: 6px; }
.footer-col p {
    font-size: 0.86rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.62);
    max-width: 260px;
}
.footer-col h4 {
    color: #7dffe9;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    font-weight: 700;
}
/* Links are wrapped in a shrink-to-fit inner block so that, even when the
   column itself is centered on mobile, every icon still lines up on a
   common left edge instead of drifting left/right with label length. */
.footer-links-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}
.footer-col a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: var(--transition);
}
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-col a i { width: 16px; text-align: center; color: #7dffe9; font-size: 0.85rem; flex-shrink: 0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    padding: 18px 20px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
}
.footer-bottom p { margin: 3px 0; }
.footer-bottom strong { color: rgba(255,255,255,0.8); }

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-col p { max-width: none; }
}
@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-col { padding-bottom: 6px; }
    .footer-col:not(:last-child) {
        padding-bottom: 26px;
        border-bottom: 1px solid rgba(255,255,255,0.10);
    }
    .footer-col .footer-brand { justify-content: center; }
    /* Center the shrink-wrapped link block as a whole, while the links
       inside stay left-aligned to one another so the icons line up. */
    .footer-col { display: flex; flex-direction: column; align-items: center; }
    .footer-col p { margin: 0 auto; max-width: 320px; }
}

/* ================= Loader (used while calculating) ================= */
.loader {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #06322e 0%, #001b18 55%, #000807 100%);
    flex-direction: column; justify-content: center; align-items: center;
    z-index: 4000; animation: fadeIn 0.4s ease;
}
.loader-stage { display: flex; flex-direction: column; align-items: center; }
.loader svg { overflow: visible; width: clamp(90px, 15vw, 170px); height: clamp(90px, 15vw, 170px); }
#calcNablaPath { fill: none; stroke: url(#calcNablaGradient); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: url(#calcParticleGlow); }
#calcCenterPulse { fill: #00e5c7; filter: url(#calcParticleGlow); animation: centerPulse 1s ease-in-out infinite; }
.loader-text {
    margin-top: clamp(14px, 2vw, 24px); color: #bdf5ec; font-size: clamp(0.75rem, 1.6vw + 0.3rem, 1.05rem);
    letter-spacing: 2px; text-transform: uppercase; opacity: 0.85; animation: introTextFadeIn 1s ease forwards;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes introTextFadeIn { from { opacity: 0; } to { opacity: 0.85; } }

/* ================= Responsive breakpoints ================= */
@media (max-width: 768px) {
    .container { max-width: 95%; }
    .header h1 { font-size: 2rem; }
    .form-title { font-size: 1.5rem; }
    .btn-group { flex-direction: column; }
    th, td { padding: 10px 8px; font-size: 13px; }
    .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .header h1 { font-size: 1.6rem; }
    .header p { font-size: 1rem; }
    .form-section, .static-section { padding: 20px; }
    .gpa-value { font-size: 2.8rem; }
    th, td { padding: 8px 6px; font-size: 12px; }
    .site-logo { font-size: 0.92rem; }
}

@media (min-width: 992px) {
    /* On desktop the sidebar pushes content slightly instead of a huge overlay */
    .sidebar { width: 320px; }
}

/* ============================================================
   PRINT — only the result card itself (branding, student info,
   GPA/CGPA, and the support/contact card) should print. Everything
   chrome-like (header, sidebar, footer, decorations, buttons, and
   transient status banners) is hidden.
   ============================================================ */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    body {
        padding: 0 !important;
        background: #fff !important;
        display: block !important;
    }
    .site-header,
    .sidebar,
    .sidebar-overlay,
    .decoration,
    .site-footer,
    .loader,
    .intro-loader,
    .btn-group,
    .callout,
    #emailSuccess,
    #emailError,
    #studentDetailsPage,
    #calculatePage {
        display: none !important;
    }
    .container {
        box-shadow: none !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }
    #resultContainer {
        display: block !important;
        padding: 10px !important;
    }
    table { box-shadow: none !important; }
    .result-box { box-shadow: none !important; animation: none !important; }
    .gpa-confetti { display: none !important; }
}

/* ================= Intro Loader (shown once, on app start only) ================= */
.intro-loader {
    position: fixed; inset: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #06322e 0%, #001b18 55%, #000807 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 9999; overflow: hidden; transition: opacity 0.7s ease;
}
.intro-loader.fade-out { opacity: 0; pointer-events: none; }
.intro-stars { position: absolute; inset: 0; z-index: 0; }
.intro-star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #bdf5ec; opacity: 0.15; animation: starTwinkle 3.4s ease-in-out infinite; }
@keyframes starTwinkle { 0%, 100% { opacity: 0.08; transform: scale(1); } 50% { opacity: 0.75; transform: scale(1.6); } }
.intro-loader-stage { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; animation: stageIntro 1s cubic-bezier(.2,.8,.25,1); }
@keyframes stageIntro { 0% { opacity: 0; transform: scale(0.82) translateY(10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.intro-loader svg { overflow: visible; width: clamp(110px, 20vw, 240px); height: clamp(110px, 20vw, 240px); }
.orbit-ring { fill: none; stroke: #4de8d1; stroke-width: 1; stroke-dasharray: 3 9; opacity: 0.35; transform-origin: 100px 95px; animation: orbitSpin 9s linear infinite; }
.orbit-ring.reverse { stroke-dasharray: 1 14; opacity: 0.2; animation: orbitSpinReverse 14s linear infinite; }
@keyframes orbitSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes orbitSpinReverse { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
#nablaPath { fill: none; stroke: url(#nablaGradient); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: url(#nablaGlow); }
.nabla-particle-head { fill: #ffffff; filter: url(#particleGlow); }
.nabla-particle-trail { fill: #4de8d1; }
#centerPulse { fill: #00e5c7; filter: url(#particleGlow); animation: centerPulse 1s ease-in-out infinite; }
#shockwave { fill: none; stroke: #7dffe9; stroke-width: 2; opacity: 0; }
@keyframes centerPulse { 0%, 100% { r: 5; opacity: 0.55; } 50% { r: 10; opacity: 1; } }
@keyframes centerBurst { 0% { r: 8; opacity: 1; } 100% { r: 34; opacity: 0; } }
@keyframes shockwaveExpand { 0% { r: 6; stroke-width: 3; opacity: 0.9; } 100% { r: 75; stroke-width: 0.5; opacity: 0; } }
.intro-loader-text {
    margin-top: clamp(16px, 2.5vw, 30px); display: flex; flex-wrap: wrap; justify-content: center; max-width: 90vw;
    font-size: clamp(0.68rem, 1.9vw + 0.3rem, 1.4rem); letter-spacing: clamp(1px, 0.3vw, 4px); text-transform: uppercase;
}
.intro-loader-text .letter {
    opacity: 0; transform: translateY(10px); display: inline-block;
    background: linear-gradient(90deg, #7dffe9, #ffffff, #4de8d1); background-size: 220% auto;
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: letterIn 0.5s ease forwards, shimmer 2.4s linear infinite;
    animation-delay: var(--d, 0s), 1.2s;
}
.intro-loader-text .letter.space { width: 0.4em; }
@keyframes letterIn { to { opacity: 0.95; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: 0% 0; } 100% { background-position: -220% 0; } }
