/**
 * assets/css/style.css
 *
 * Base, site-wide styles -- design tokens, reset, typography, and the
 * header/nav/footer that every page shares. Page-specific styles
 * (blog.css, article.css) build on top of these variables rather than
 * redefining their own.
 */

:root {
    --primary: #000;
    --secondary: #222;
    --text: #1a1a1a;
    --muted: #666;
    --background: #fff;
    --surface: #f7f7f7;
    --border: #e5e5e5;
    --radius: 12px;
    --transition: 0.25s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

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

a { color: inherit; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Focus visibility -- accessibility requirement, not just aesthetic */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 20px;
}
.navbar-logo img { height: 32px; width: auto; }

.navbar-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.navbar-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 15px;
    transition: color var(--transition);
    position: relative;
}
.navbar-links a:hover,
.navbar-links a.active { color: var(--primary); }
.navbar-links a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: var(--primary);
}

.navbar-actions { display: flex; align-items: center; gap: 16px; }

.navbar-search-toggle,
.navbar-menu-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.navbar-menu-toggle { display: none; }

.navbar-search-panel {
    display: none;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}
.navbar-search-panel.show { display: block; }
.navbar-search-panel form { display: flex; max-width: 480px; margin: 0 auto; }
.navbar-search-panel input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 50px 0 0 50px;
    font-size: 15px;
    outline: none;
}
.navbar-search-panel button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 50px 50px 0;
    padding: 0 22px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px 20px 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    }
    .navbar-links.show { display: flex; }
    .navbar-links a { padding: 10px 0; width: 100%; }
    .navbar { position: relative; }
    .navbar-menu-toggle { display: flex; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #0d0d0d;
    color: #ccc;
    padding: 64px 0 0;
    margin-top: 80px;
}

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

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px;
}

.footer-about p { color: #999; font-size: 14.5px; line-height: 1.7; margin: 0 0 20px; }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 14.5px;
    transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }

.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: background var(--transition);
}
.footer-social a:hover { background: rgba(255,255,255,0.18); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 22px 0;
    text-align: center;
    font-size: 13.5px;
    color: #777;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Generic buttons -- reused by index.php and anywhere else that
   needs a CTA without pulling in a whole page-specific stylesheet.
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: 0.85; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); }
