/* ===== CSS VARIABLES ===== */
:root {
    --primary: #1a2a4f;
    --primary-light: #2c3e66;
    --primary-gradient: linear-gradient(135deg, #1a2a4f 0%, #2c3e66 100%);
    --accent: #0088B0;
    --accent-light: #5ee0fa;
    --bg: #f8faff;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;
    --text: #0a1e2c;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --border: #e2edf2;
    --shadow: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.1);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --yellow: #fbbf24;
    --orange: #f97316;
    --green: #22c55e;
    --red: #ef4444;
    --white: #ffffff;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1a2744;
    --bg-dark: #0a0f1a;
    --text: #e8e8f0;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border: #2a3a5a;
    --shadow: 0 8px 30px rgba(0,0,0,0.3);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.5);
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), box-shadow var(--transition);
}
[data-theme="dark"] .navbar {
    background: rgba(15,23,42,0.9);
}
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 24px;
    max-width: 1280px;
    margin: 0 auto;
}
.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.btn-login {
    padding: 0.3rem 1.2rem;
    border: 1.5px solid var(--accent);
    border-radius: 40px;
    color: var(--accent) !important;
    transition: all var(--transition);
}
.btn-login:hover { background: var(--accent); color: white !important; }
.btn-primary {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,42,79,0.25);
}
.theme-toggle {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background var(--transition);
}
.theme-toggle:hover { background: rgba(0,0,0,0.05); }
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

/* ===== HERO ===== */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--accent-light);
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}
.hero h1 {
    font-size: 3.8rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}
.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 1.2rem auto 2rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-outline {
    padding: 0.5rem 1.8rem;
    border: 1.5px solid var(--border);
    border-radius: 40px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary);
}
[data-theme="dark"] .stat-number { color: var(--accent-light); }
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== SCROLLING FRAMEWORKS ===== */
.scroll-frameworks {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    overflow: hidden;
}
.scroll-track { overflow: hidden; width: 100%; }
.scroll-content {
    display: flex;
    gap: 2.5rem;
    animation: scroll 30s linear infinite;
    width: max-content;
}
.scroll-content:hover { animation-play-state: paused; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.fw-tag {
    padding: 4px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all var(--transition);
}
.fw-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== SCORECARD ===== */
.scorecard { padding: 3rem 0; }
.scorecard-inner {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.scorecard-inner h3 { font-size: 1.2rem; margin-bottom: 1.2rem; color: var(--text); }
.score-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}
.vendor-score {
    flex: 1;
    min-width: 80px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.vendor-score span {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text);
}
.progress-bar {
    background: var(--border);
    border-radius: 20px;
    height: 6px;
    margin-top: 6px;
    overflow: hidden;
}
.progress-fill {
    height: 6px;
    border-radius: 20px;
    background: var(--primary-light);
    transition: width 1s ease;
}
.progress-fill.mygrcos { background: var(--primary-gradient); }
.score-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.2rem;
}

/* ===== USPs ===== */
.usps { padding: 4rem 0; }
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    color: var(--text);
    letter-spacing: -0.02em;
}
.section-title .highlight { color: var(--accent); }
.section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 0.5rem;
    margin-bottom: 2.5rem;
}
.usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.usp-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.6s forwards;
}
.usp-card:nth-child(1) { animation-delay: 0.05s; }
.usp-card:nth-child(2) { animation-delay: 0.10s; }
.usp-card:nth-child(3) { animation-delay: 0.15s; }
.usp-card:nth-child(4) { animation-delay: 0.20s; }
.usp-card:nth-child(5) { animation-delay: 0.25s; }
.usp-card:nth-child(6) { animation-delay: 0.30s; }
.usp-card:nth-child(7) { animation-delay: 0.35s; }
.usp-card:nth-child(8) { animation-delay: 0.40s; }
.usp-card:nth-child(9) { animation-delay: 0.45s; }
.usp-card:nth-child(10) { animation-delay: 0.50s; }
.usp-card:nth-child(11) { animation-delay: 0.55s; }
.usp-card:nth-child(12) { animation-delay: 0.60s; }
.usp-card:nth-child(13) { animation-delay: 0.65s; }
.usp-card:nth-child(14) { animation-delay: 0.70s; }
.usp-card:nth-child(15) { animation-delay: 0.75s; }
.usp-card:nth-child(16) { animation-delay: 0.80s; }
.usp-card:nth-child(17) { animation-delay: 0.85s; }
.usp-card:nth-child(18) { animation-delay: 0.90s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.usp-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}
.usp-icon { font-size: 2.2rem; display: block; margin-bottom: 0.5rem; }
.usp-card h4 { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 0.3rem; }
.usp-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.replication {
    font-size: 0.75rem;
    background: var(--bg);
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-weight: 600;
    color: var(--accent);
    display: inline-block;
}

/* ===== FRAMEWORKS ===== */
.frameworks { padding: 4rem 0; background: var(--bg-card); }
.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.fw-item {
    background: var(--bg);
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition);
}
.fw-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}
.fw-item span { font-size: 2rem; display: block; margin-bottom: 0.3rem; }
.fw-item h4 { font-weight: 700; color: var(--text); font-size: 1rem; }
.fw-item p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== SOLUTIONS / TABS ===== */
.solutions { padding: 4rem 0; }
.tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.tab-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 40px;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}
.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-content {
    display: none;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    animation: fadeIn 0.4s ease;
}
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tab-content h3 { font-size: 1.3rem; color: var(--text); margin-bottom: 0.5rem; }
.tab-content p { color: var(--text-muted); margin-bottom: 0.8rem; }
.tab-content ul { padding-left: 1.2rem; }
.tab-content ul li { color: var(--text-muted); padding: 0.2rem 0; }

/* ===== SANDBOX ===== */
.sandbox { padding: 4rem 0; background: var(--bg-card); }
.sandbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.controls-panel, .log-panel {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.controls-panel h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
}
.control-item strong { color: var(--text); }
.control-item span { font-size: 0.75rem; color: var(--text-muted); }
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 30px;
    transition: var(--transition);
}
.slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider:before { transform: translateX(22px); }
.status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
}
.status.pass { background: #dcfce7; color: #15803d; }
.status.fail { background: #fee2e2; color: #b91c1c; }
.score-display {
    margin-top: 1.2rem;
    text-align: center;
}
.score-display span:first-child { font-weight: 600; color: var(--text); }
.score-display #complianceScore {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    display: block;
}
.score-bar {
    background: var(--border);
    border-radius: 20px;
    height: 6px;
    margin-top: 4px;
    overflow: hidden;
}
.score-bar #scoreFill {
    height: 6px;
    border-radius: 20px;
    background: var(--primary-gradient);
    transition: width 0.6s ease;
}
.log-panel #logWindow {
    height: 180px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
}
.log-panel #logWindow div { padding: 4px 0; border-bottom: 1px solid var(--border); }
.clear-btn {
    float: right;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0.2rem 0.8rem;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: all var(--transition);
}
.clear-btn:hover { border-color: var(--red); color: var(--red); }
.agent-loop {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.agent-loop h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.loop-steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.loop-steps span { padding: 0.3rem 1rem; border-radius: 30px; background: var(--bg-card); font-weight: 600; font-size: 0.85rem; }
.loop-steps .arrow { background: transparent; padding: 0; color: var(--text-muted); }
.agent-loop select, .agent-loop button {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
}
.agent-loop button {
    background: var(--primary);
    color: white;
    border: none;
    transition: all var(--transition);
}
.agent-loop button:hover { background: var(--primary-light); }
#driftLog {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    height: 80px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--accent-light);
}

/* ===== WHAT-IF ===== */
.whatif { padding: 4rem 0; }
.whatif-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.whatif-btn {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 40px;
    background: var(--bg-card);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.whatif-btn:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,136,176,0.2);
}

/* ===== ABOUT ===== */
.about {
    padding: 4rem 0;
    text-align: center;
    background: var(--bg-card);
}
.about h2 { font-size: 2.2rem; font-weight: 800; color: var(--text); }
.about p {
    max-width: 700px;
    margin: 1rem auto 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ===== CTA ===== */
.cta {
    padding: 4rem 0;
    text-align: center;
    background: var(--primary-gradient);
    color: white;
}
.cta h2 { font-size: 2.5rem; font-weight: 800; }
.cta h2 .highlight { color: var(--accent-light); }
.cta p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin: 0.5rem 0 1.5rem; }
.cta .btn-primary { background: white; color: var(--primary); }
.cta .btn-primary:hover { background: var(--accent-light); }
.cta .btn-outline { border-color: white; color: white; }
.cta .btn-outline:hover { background: white; color: var(--primary); border-color: white; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}
footer .copy { margin-top: 0.3rem; font-size: 0.75rem; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    max-width: 900px;
    width: 92%;
    max-height: 85vh;
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
    position: sticky;
    top: 0;
    float: right;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.terminal-modal { background: #0a0a15; color: var(--accent-light); }
.terminal-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1a2a3a;
    font-weight: 600;
}
.badge-critical { background: var(--red); padding: 0.1rem 0.8rem; border-radius: 30px; font-size: 0.7rem; }
.terminal-window {
    padding: 1.5rem 0;
    min-height: 300px;
    max-height: 55vh;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.85rem;
}
.terminal-window .line { padding: 3px 0; }
.terminal-window .warn { color: var(--yellow); }
.terminal-window .error { color: var(--red); }
.terminal-window .success { color: var(--green); }
.terminal-window .mitre { color: #c084fc; }
.terminal-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid #1a2a3a;
    font-size: 0.7rem;
    color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.4rem; }
    .hero-stats { gap: 2rem; }
    .stat-number { font-size: 2rem; }
    .sandbox-grid { grid-template-columns: 1fr; }
    .score-row { flex-direction: column; align-items: center; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
        gap: 1rem;
    }
    .nav-links.open { display: flex; }
    .mobile-toggle { display: block; }
    .usp-grid { grid-template-columns: 1fr; }
    .framework-grid { grid-template-columns: 1fr 1fr; }
    .section-title { font-size: 1.8rem; }
}
@media (max-width: 480px) {
    .framework-grid { grid-template-columns: 1fr; }
}

/*modified frameworks section*/

/* ===== FRAMEWORKS ===== */
.frameworks { padding: 4rem 0; background: var(--bg-card); }
.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.fw-item {
    background: var(--bg);
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition);
}
.fw-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}
.fw-item span { font-size: 2rem; display: block; margin-bottom: 0.3rem; }
.fw-item h4 { font-weight: 700; color: var(--text); font-size: 1rem; }
.fw-item p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== SCROLLING TEXT BANNER ===== */
.frameworks-scroll-text {
    background: var(--primary-gradient);
    padding: 14px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 1.5rem;
}
.scroll-text-track { overflow: hidden; width: 100%; }
.scroll-text-content {
    display: flex;
    gap: 2rem;
    align-items: center;
    animation: scrollText 25s linear infinite;
    width: max-content;
}
.scroll-text-content:hover { animation-play-state: paused; }
.scroll-text-content span {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.scroll-text-content span:not(:first-child):not(:last-child) {
    opacity: 0.6;
}
@keyframes scrollText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .framework-grid { grid-template-columns: 1fr 1fr; }
    .scroll-text-content span { font-size: 0.75rem; }
    .scroll-text-content { gap: 1rem; animation-duration: 18s; }
}
@media (max-width: 480px) {
    .framework-grid { grid-template-columns: 1fr; }
    .scroll-text-content span { font-size: 0.7rem; }
}