/* ============================================================
   TrustMemory — Shared Foundation Styles
   Common CSS used across all pages (landing, security, etc.)
   ============================================================ */

/* ── CSS Variables ── */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #141420;
    --bg-card-hover: #1a1a2e;
    --bg-code: #0d0d14;
    --border: #1e1e32;
    --border-hover: #2a2a45;

    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #606078;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-gradient: linear-gradient(135deg, #6366f1, #a78bfa);

    --success: #10b981;
    --warning: #f59e0b;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

/* ── Base Reset ── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navbar ── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon-svg {
    height: 36px;
    width: auto;
    flex-shrink: 0;
}

.logo-diamond {
    color: var(--accent);
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--accent-light);
}

.nav-link-muted {
    opacity: 0.7;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    padding: 16px 24px;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

/* ── Buttons ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ── Gradient Text Utility ── */

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Section Base ── */

.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Footer ── */

.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
}

.footer-social a:hover {
    color: var(--text-primary);
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================================
   Shared Responsive — Navbar, Footer, Container
   ============================================================ */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .btn-lg {
        padding: 12px 22px;
        font-size: 0.9rem;
    }

    .footer {
        padding: 40px 0 24px;
    }
}
