/* ============================================
   Soteria — Shared Styles
   Unified nav, footer, variables, mobile menu
   ============================================ */

:root {
    --slate-950: #0a0f1a;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --alpine-900: #0c1929;
    --alpine-800: #122640;
    --alpine-700: #1a3a5c;
    --alpine-600: #234e78;
    --alpine-500: #2d6494;
    --alpine-400: #4a8ec4;
    --signal-orange: #e86a33;
    --signal-orange-light: #ff8f5a;
    --forest-700: #1a3a2c;
    --forest-600: #234e3a;
    --forest-500: #2d6450;
    --maritime-700: #1a2f3a;
    --maritime-600: #234050;
    --maritime-500: #2d5468;
    --ice-white: #f0f7ff;
    --snow-white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--slate-950);
    color: var(--slate-200);
    line-height: 1.6;
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1;
    max-width: 100%;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   Navigation
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(10, 15, 26, 0.95), rgba(10, 15, 26, 0));
    backdrop-filter: blur(8px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--snow-white);
}

.logo-mark {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--snow-white);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--slate-400);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--snow-white);
}

.nav-links a.active {
    color: var(--snow-white);
}

.nav-cta {
    background: var(--alpine-700);
    color: var(--snow-white) !important;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    transition: background 0.2s ease !important;
}

.nav-cta:hover {
    background: var(--alpine-600) !important;
}

/* Mobile menu — hidden on desktop */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--slate-300);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

/* ============================================
   Common Buttons
   ============================================ */
.btn-primary {
    background: var(--signal-orange);
    color: var(--snow-white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--signal-orange-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--slate-300);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid var(--slate-700);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--slate-500);
    color: var(--snow-white);
}

/* ============================================
   Common Section Styles
   ============================================ */
.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--alpine-400);
    margin-bottom: 1rem;
}

/* Section divider — gradient line */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--alpine-600), transparent);
}

/* Common animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Footer
   ============================================ */
footer {
    padding: 4rem 2rem;
    background: var(--slate-950);
    border-top: 1px solid var(--slate-800);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--slate-400);
}

.footer-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.7);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--slate-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--slate-200);
}

.footer-copy {
    color: var(--slate-500);
    font-size: 0.85rem;
}

/* ============================================
   Responsive — Tablet (1024px)
   ============================================ */
@media (max-width: 1024px) {
    nav {
        padding: 1.25rem 1.5rem;
    }
}

/* ============================================
   Responsive — Mobile (768px)
   ============================================ */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .logo-text {
        display: none;
    }

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

    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--slate-900);
        border-left: 1px solid var(--slate-800);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 150;
    }

    .mobile-menu.active {
        right: 0;
    }

    .mobile-menu a {
        display: block;
        color: var(--slate-300);
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 500;
        padding: 1rem 0;
        border-bottom: 1px solid var(--slate-800);
        transition: color 0.2s ease;
    }

    .mobile-menu a:hover,
    .mobile-menu a.active {
        color: var(--snow-white);
    }

    .mobile-menu a:last-child {
        margin-top: 1rem;
        background: var(--alpine-700);
        padding: 1rem;
        border-radius: 8px;
        text-align: center;
        border-bottom: none;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 140;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ============================================
   Responsive — Small Mobile (480px)
   ============================================ */
@media (max-width: 480px) {
    .footer-links {
        gap: 0.5rem;
    }
}

/* ============================================
   Accessibility — 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;
    }
}
