/**
 * SC&MS Framework - Main Stylesheet
 * Shared styles for all pages
 */

/* Self-hosted Inter font (privacy-friendly, no Google tracking) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/Inter-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/Inter-ExtraBold.woff2') format('woff2');
}

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    /* Brand Colors */
    --primary: #8B7355;
    --primary-dark: #6B5640;
    --accent: #C4A57B;
    
    /* Backgrounds */
    --bg-main: #FEFDFB;
    --bg-elevated: #FFFFFF;
    
    /* Text */
    --text-primary: #1A1614;
    --text-secondary: #6B6762;
    --text-tertiary: #9D9891;
    
    /* Borders */
    --border: #E5DFD6;
    --border-light: #F0EBE3;

    /* Layout */
    --nav-height: 100px;
}

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

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

/* Fix anchor scroll offset for fixed header */
section[id] {
    scroll-margin-top: calc(var(--nav-height) + 24px);
}

/* ============================================
   Navigation
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--nav-height);
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    min-width: 0;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Regular text links in nav */
.nav-links > a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

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

/* Nav button override */
.nav-links > a.btn {
    color: white;
    background: var(--primary);
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
}

.nav-links > a.btn:hover {
    background: var(--primary-dark);
    color: white;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-large {
    background: var(--primary);
    color: white;
}

.btn-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1220px) {
    .nav-container {
        padding: 0 1.25rem;
    }

    .logo {
        font-size: 1.35rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .nav-links > a {
        font-size: 0.95rem;
    }

}

@media (max-width: 980px) {
    nav {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--bg-elevated);
    }

    .nav-container {
        padding: 0 1rem;
        gap: 0.75rem;
        align-items: center;
        position: relative;
        flex-wrap: nowrap;
        min-height: var(--nav-height);
    }

    .logo {
        font-size: 1.35rem;
        line-height: 1.1;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
        width: 40px;
        height: 40px;
        padding: 0.25rem;
        border-radius: 999px;
        border: none;
        background: transparent;
        color: var(--primary);
    }

    .nav-toggle:hover {
        background: rgba(139, 115, 85, 0.08);
    }

    .nav-links {
        display: none;
        width: 100%;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(26, 22, 20, 0.08);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 1rem 1rem;
        font-size: 0.9rem;
        z-index: 1200;
    }

    .nav-links > a {
        width: 100%;
        padding: 0.75rem 0.25rem;
        border-bottom: 1px solid var(--border-light);
        border-radius: 0;
    }

    .nav-links > a:last-child {
        border-bottom: none;
    }

    nav.nav-open .nav-links {
        display: flex;
    }

    body.nav-menu-open {
        overflow: hidden;
    }

    .nav-links > a.btn {
        width: auto;
        margin-top: 0.75rem;
        padding: 0.625rem 1rem;
        border-radius: 8px;
        border-bottom: none;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}
