/* ==========================================================
   Base
   ========================================================== */

:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --border: #e1e5eb;
    --border-strong: #cdd3dc;

    --text: #111827;
    --text-soft: #374151;
    --muted: #6b7280;

    --accent: #1d4ed8;
    --accent-hover: #1e40af;
    --accent-ink: #ffffff;

    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);

    --radius: 8px;
    --header-h: 64px;
    --gutter: clamp(20px, 4vw, 64px);

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text-soft);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p {
    margin: 0 0 1em;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--gutter);
}

/* ==========================================================
   Header
   ========================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    position: relative;
    padding: 4px 0;
    font-size: 0.92rem;
    color: var(--muted);
    transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--accent);
}

.nav-links .nav-contact {
    padding: 6px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text);
}

.nav-links .nav-contact:hover,
.nav-links .nav-contact.active {
    border-color: var(--accent);
}

.nav-links .nav-contact.active::after {
    display: none;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
}

.menu-toggle span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.2s ease, top 0.2s ease;
}

.menu-toggle span:first-child {
    top: 16px;
}

.menu-toggle span:last-child {
    top: 23px;
}

.menu-toggle[aria-expanded="true"] span:first-child {
    top: 19.5px;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
    top: 19.5px;
    transform: rotate(-45deg);
}

/* ==========================================================
   Buttons
   ========================================================== */

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button-primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.button-primary:hover {
    background: var(--accent-hover);
}

.button-secondary {
    border-color: var(--border-strong);
    color: var(--text);
}

.button-secondary:hover {
    border-color: var(--text-soft);
}

/* ==========================================================
   Main / footer
   ========================================================== */

.page-content {
    flex: 1;
}

.page-loader {
    padding: 120px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 24px 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-content p {
    margin: 0;
}

.footer-content a:hover {
    color: var(--text);
}

/* ==========================================================
   Reveal on scroll
   ========================================================== */

.js .reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.js .reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {

    .js .reveal,
    .js .reveal.visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 720px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        display: none;
    }

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

    .nav-links a {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a.active::after {
        display: none;
    }

    .nav-links .nav-contact {
        margin-top: 12px;
        padding: 11px 14px;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}