/* ==========================================================================
   Layout — container, sections, header, navigation, footer, page hero
   ========================================================================== */

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Sections ---------------------------------------------------------------- */
.section { padding-block: var(--section-y); }
.section--surface { background: var(--color-surface); }

.section-head {
    max-width: 680px;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4) var(--space-6);
    max-width: none;
}

.section-head--row > div { max-width: 680px; }

.section-title { font-size: var(--fs-h2); }

.section-lead {
    margin-top: var(--space-4);
    font-size: var(--fs-lg);
    color: var(--color-text-muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-3);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-accent);
}

.split {
    display: grid;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

@media (min-width: 900px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split--reverse > :first-child { order: 2; }
}

/* Header ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
}

@supports (animation-timeline: scroll()) {
    .site-header {
        animation: header-raise linear both;
        animation-timeline: scroll();
        animation-range: 0 96px;
    }
}

@keyframes header-raise {
    to {
        border-bottom-color: transparent;
        box-shadow: 0 8px 24px -16px rgb(18 53 43 / 0.35);
    }
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-height: var(--header-h);
}

.site-logo {
    display: block;
    flex-shrink: 0;
    margin-right: auto;
    border-radius: 4px;
}

.site-logo img {
    width: auto;
    height: 32px;
}

.header-phone {
    display: none;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--color-heading);
    text-decoration: none;
    white-space: nowrap;
}

.header-phone .icon { color: var(--color-primary); }
.header-phone:hover { color: var(--color-primary); }

.site-header .header-cta { display: none; }

.nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-heading);
    cursor: pointer;
}

.nav-toggle .icon { width: 26px; height: 26px; }
.nav-toggle .icon--close,
.nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

.site-nav__list a {
    display: block;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] { color: var(--color-primary); }

/* Mobile & tablet: full-height panel under the header */
@media (max-width: 1023.98px) {
    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 0;
        z-index: 40;
        display: flex;
        flex-direction: column;
        gap: var(--space-6);
        padding: var(--space-4) var(--gutter) var(--space-6);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--color-background);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
    }

    .nav-open { overflow: hidden; }

    .nav-open .site-nav {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    }

    .site-nav__list a {
        padding: 14px 0;
        border-bottom: 1px solid var(--color-border);
        font-size: 1.25rem;
    }

    .site-nav__extra {
        display: grid;
        gap: var(--space-4);
    }

    .site-nav__contact {
        display: inline-flex;
        align-items: center;
        gap: var(--space-3);
        font-weight: 600;
        color: var(--color-heading);
        text-decoration: none;
    }

    .site-nav__contact .icon { color: var(--color-primary); }
}

@media (min-width: 640px) {
    .site-header .header-cta { display: inline-flex; }
}

@media (min-width: 1024px) {
    .site-logo img { height: 36px; }
    .nav-toggle,
    .site-nav__extra { display: none; }

    .site-nav__list {
        display: flex;
        align-items: center;
        gap: clamp(4px, 1.2vw, 16px);
    }

    .site-nav__list a {
        position: relative;
        padding: 10px 8px;
    }

    .site-nav__list a::after {
        content: "";
        position: absolute;
        right: 8px;
        bottom: 2px;
        left: 8px;
        height: 2px;
        border-radius: 2px;
        background: var(--color-accent);
        transform: scaleX(0);
        transition: transform var(--dur) var(--ease);
    }

    .site-nav__list a:hover::after,
    .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

    .header-cta { margin-left: var(--space-2); }
}

@media (min-width: 1200px) {
    .header-phone { display: inline-flex; margin-left: var(--space-4); }
}

/* Page hero (inner pages) ------------------------------------------------- */
.page-hero {
    padding-block: clamp(32px, 5vw, 56px) clamp(44px, 6vw, 80px);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: var(--space-2);
    color: var(--color-border-strong);
}

.breadcrumbs a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.breadcrumbs a:hover { color: var(--color-primary); text-decoration: underline; }

.page-hero__title {
    margin-top: var(--space-5);
    font-size: var(--fs-h1);
}

.page-hero__lead {
    max-width: 680px;
    margin-top: var(--space-4);
    font-size: var(--fs-lg);
    color: var(--color-text-muted);
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
    padding-top: clamp(48px, 7vw, 80px);
    background: var(--color-secondary);
    color: rgb(255 255 255 / 0.75);
    font-size: var(--fs-sm);
}

.site-footer a {
    color: var(--color-text-inverse);
    text-decoration: none;
}

.site-footer a:hover { color: var(--color-accent); }

.footer-grid {
    display: grid;
    gap: 40px;
}

@media (min-width: 640px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr; }
    .footer-brand { grid-column: auto; }
}

.footer-logo img {
    width: auto;
    height: 34px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    max-width: 380px;
    margin-top: var(--space-5);
}

.footer-title {
    margin-bottom: var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.55);
}

.footer-links {
    display: grid;
    gap: var(--space-2);
}

.footer-links a,
.footer-contacts a { display: inline-block; padding-block: 4px; }

.footer-contacts {
    display: grid;
    gap: var(--space-3);
    font-style: normal;
}

.footer-contacts li {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

.footer-contacts .icon {
    margin-top: 6px;
    width: 18px;
    height: 18px;
    color: var(--color-accent);
}

.footer-bottom {
    margin-top: clamp(40px, 6vw, 64px);
    padding-block: var(--space-5);
    border-top: 1px solid rgb(255 255 255 / 0.12);
    font-size: 0.875rem;
    color: rgb(255 255 255 / 0.6);
}
