/* --- CSS DESIGN TOKENS --- */
:root {
    --color-bg-main: #fafafa;
    --color-bg-card: #ffffff;
    --color-text-dark: #2d3142;
    --color-text-muted: #4f5d75;
    --color-accent: #0070f3;
    --color-border: #e2e8f0;
    --color-footer-bg: #2d3142;
    --color-footer-text: #ffffff;

    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-md: 8px;
    --transition-smooth: all 0.2s ease-in-out;
    --max-width: 1100px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-main: #1b1d27;
        --color-bg-card: #242733;
        --color-text-dark: #f2f3f5;
        --color-text-muted: #b6bccb;
        --color-accent: #4d9dff;
        --color-border: #383c4a;
        --color-footer-bg: #14151c;
        --color-footer-text: #f2f3f5;
    }
}

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

html { color-scheme: light dark; height: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-stack);
    background-color: var(--color-bg-main);
    color: var(--color-text-dark);
    line-height: 1.6;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

a { color: inherit; }

img { max-width: 100%; display: block; }

/* --- HEADER --- */
.site-header {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nav-logo-icon {
    height: 36px;
    width: auto;
}
.nav-logo-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .nav-logo-icon-light { display: none; }
    .nav-logo-icon-dark { display: block; }
}
.nav-logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text-dark);
    letter-spacing: 0.02em;
}
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 30px;
}
.nav-links a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: var(--transition-smooth);
}
.nav-links a:hover { color: var(--color-accent); }

/* --- BUTTONS --- */
.btn-primary {
    background-color: var(--color-text-dark);
    color: var(--color-bg-main) !important;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-text-dark);
    cursor: pointer;
    font: inherit;
}
.btn-primary:hover {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent);
    color: #ffffff !important;
}

/* --- HERO --- */
.hero-section {
    max-width: none;
    margin: 0 0 80px 0;
    padding: 120px 20px;
    text-align: center;
    background-image: url('/public/images/banner_light.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
@media (prefers-color-scheme: dark) {
    .hero-section {
        background-image: url('/public/images/banner_dark.svg');
    }
}
.hero-section h1 {
    max-width: 800px;
    margin: 0 auto;
    font-size: 2.5rem;
    text-shadow: 0 1px 12px var(--color-bg-main);
}
.hero-section p { color: var(--color-text-muted); font-size: 1.2rem; }

/* --- SERVICES GRID --- */
.services-container {
    max-width: var(--max-width);
    margin: 0 auto 80px auto;
    padding: 0 20px;
    scroll-margin-top: 80px;
}
.services-container h2 { text-align: center; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.service-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.service-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    color: var(--color-accent);
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 { margin-bottom: 10px; color: var(--color-text-dark); }
.service-card p { color: var(--color-text-muted); }

/* --- CONTACT --- */
.contact-section {
    max-width: 600px;
    margin: 0 auto 100px auto;
    padding: 0 20px;
    text-align: center;
    scroll-margin-top: 80px;
}
.contact-section p { color: var(--color-text-muted); margin-bottom: 20px; }
.contact-cta {
    display: inline-block;
    text-decoration: none;
}

/* --- LEGAL / CONTENT PAGES --- */
.content-page {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}
.content-page h1 { margin-bottom: 20px; }
.content-page h2 { margin: 30px 0 10px; }
.content-page p { margin-bottom: 14px; color: var(--color-text-muted); }

/* --- 404 --- */
.not-found {
    text-align: center;
    margin: 100px auto;
    padding: 0 20px;
}
.not-found h1 { font-size: 4rem; }

/* --- FOOTER --- */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 40px 20px 20px 20px;
    margin-top: auto;
}
.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "business center legal";
    align-items: start;
    gap: 20px;
    font-size: 0.9rem;
}
.footer-container a { text-decoration: none; opacity: 0.85; }
.footer-container a:hover { opacity: 1; }
.footer-business { grid-area: business; text-align: left; font-size: 0.8rem; }
.footer-center {
    grid-area: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.footer-copyright { text-align: center; white-space: nowrap; }
.footer-logo .nav-logo-text { color: var(--color-footer-text); }
.footer-legal-links {
    grid-area: legal;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    font-size: 0.8rem;
}
.footer-meta { font-size: 0.8rem; opacity: 0.75; margin-top: 5px; }
.footer-meta:first-child { margin-top: 0; }

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .nav-links {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding: 0;
    }
    .nav-links li,
    .nav-links a.btn-primary {
        width: 100%;
        display: block;
        text-align: center;
    }
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section { padding: 60px 20px; margin-bottom: 40px; }
    .footer-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "center"
            "business"
            "legal";
        justify-items: center;
        text-align: center;
    }
    .footer-business { text-align: center; }
    .footer-legal-links { align-items: center; text-align: center; }
}
