/* Theme variables bridged to the Tradik Design System
   (css/tradik-tokens.css, vendored from designstyles.tradik.com).
   Radius and shadow scales come straight from the token file. */
:root {
    --primary: var(--color-fg-accent);
    --primary-dark: var(--color-accent-bgHover);
    --accent: var(--color-palette-signal-info);
    --success: var(--color-palette-signal-success);
    --bg: var(--color-bg-canvas);
    --bg-secondary: var(--color-bg-subtle);
    --bg-tertiary: var(--color-bg-sunken);
    --text: var(--color-fg-primary);
    --text-secondary: var(--color-fg-secondary);
    --text-muted: var(--color-fg-muted);
    --border: var(--color-border-default);
    --code-bg: var(--color-bg-inverse);
    --code-text: var(--color-palette-ink-200);
    --radius: var(--radius-md);
    --transition: all var(--motion-duration-base) var(--motion-easing-standard);
    --navbar-h: 64px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
}

/* Accessibility */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: .75rem 1.25rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
}
.skip-to-main:focus { left: 1rem; top: 1rem; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Navbar — matches docs/styles.css exactly */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}
.logo { font-size: 2rem; }
.brand-name { font-size: 1.5rem; font-weight: 700; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text-secondary); font-weight: 500; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
}
.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: .7rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; }

/* Badge */
.badge {
    display: inline-block;
    padding: .3rem .75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    background: var(--bg-secondary);
}
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    font-size: .85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--primary); }
.footer-sep { color: var(--border); }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--navbar-h);
        left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: .75rem;
    }
    .nav-links.open { display: flex; }
    .mobile-menu-toggle { display: flex; }
}

/* Brand logo (SVG scales to any size) */
.nav-brand .logo { width: 32px; height: 32px; display: block; border-radius: var(--radius-sm); }
.footer-logo { width: 20px; height: 20px; vertical-align: middle; border-radius: var(--radius-sm); }
