/*
Theme Name: Metalmix Modern
Theme URI: https://www.metalmix.lv/
Author: Metalmix
Description: A modern standalone theme for the Metalmix portfolio site.
Version: 1.0.0
Text Domain: metalmix-modern
*/

:root {
    --mx-ink: #171717;
    --mx-muted: #6b7280;
    --mx-line: #e5e7eb;
    --mx-soft: #f6f5f2;
    --mx-panel: #ffffff;
    --mx-accent: #b78846;
    --mx-accent-dark: #7a5526;
    --mx-steel: #2f343b;
    --mx-max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--mx-soft);
    color: var(--mx-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

body.admin-bar .site-header {
    top: 32px;
}

a {
    color: inherit;
}

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

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    width: min(var(--mx-max), calc(100% - 40px));
    margin: 0 auto;
}

.top-bar {
    background: var(--mx-steel);
    color: #f8fafc;
    font-size: 14px;
}

.top-bar__inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.top-bar__contacts,
.top-bar__tools {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
}

.quick-select {
    height: 30px;
    min-width: 190px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 4px;
    background: #20242a;
    color: #fff;
    padding: 0 32px 0 10px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--mx-line);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--mx-ink);
    text-decoration: none;
}

.brand img {
    width: 218px;
    max-height: 62px;
    object-fit: contain;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--mx-line);
    border-radius: 4px;
    background: #fff;
    color: var(--mx-ink);
    cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
}

.primary-nav ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.primary-nav li {
    position: relative;
}

.primary-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    color: #2f343b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.primary-nav .current-menu-item > a,
.primary-nav a:hover {
    background: #f1ede5;
    color: var(--mx-accent-dark);
}

.hero {
    position: relative;
    min-height: clamp(520px, 72vh, 760px);
    color: #fff;
    overflow: hidden;
    background: #151719;
}

.hero__slides {
    position: absolute;
    inset: 0;
}

.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s ease;
}

.hero__slide.is-active {
    opacity: 1;
}

.hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 17, 20, .86) 0%, rgba(15, 17, 20, .55) 46%, rgba(15, 17, 20, .2) 100%),
        linear-gradient(180deg, rgba(15, 17, 20, .14), rgba(15, 17, 20, .55));
}

.hero__content {
    position: relative;
    z-index: 2;
    min-height: clamp(520px, 72vh, 760px);
    display: grid;
    align-content: center;
    padding: 56px 0 92px;
}

.hero__text {
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 16px;
    color: #f2cf92;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1;
    letter-spacing: 0;
}

.hero__lead {
    max-width: 560px;
    margin: 22px 0 0;
    color: #edf0f2;
    font-size: clamp(18px, 2vw, 22px);
}

.hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--mx-accent);
    color: #111;
    font-weight: 800;
    text-decoration: none;
}

.button:hover {
    background: #d0a35d;
}

.button--ghost {
    border-color: rgba(255, 255, 255, .46);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.button--ghost:hover {
    background: rgba(255, 255, 255, .18);
}

.hero__controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 30px;
    width: min(var(--mx-max), calc(100% - 40px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero__control {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 4px;
    background: rgba(0, 0, 0, .2);
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.hero__dots {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.hero__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .42);
    cursor: pointer;
}

.hero__dot.is-active {
    width: 28px;
    border-radius: 999px;
    background: var(--mx-accent);
}

.section {
    padding: 64px 0;
}

.section--white {
    background: #fff;
}

.section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section__head h2,
.page-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
}

.section__head p {
    max-width: 520px;
    margin: 0;
    color: var(--mx-muted);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    min-height: 330px;
    display: flex;
    align-items: end;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #222;
    color: #fff;
    text-decoration: none;
}

.service-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .72));
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card__body {
    position: relative;
    z-index: 1;
    padding: 22px;
}

.service-card h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
}

.service-card span {
    display: inline-block;
    margin-top: 10px;
    color: #f2cf92;
    font-weight: 800;
}

.page-shell {
    padding: 58px 0 72px;
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
}

.content {
    max-width: 850px;
    color: #333;
    font-size: 18px;
}

.content h1,
.content h2,
.content h3 {
    line-height: 1.18;
}

.content a {
    color: var(--mx-accent-dark);
    font-weight: 700;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.gallery-grid a {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 5px;
    background: #ddd;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.gallery-grid a:hover img {
    transform: scale(1.04);
}

.site-footer {
    background: #1e2227;
    color: #f8fafc;
}

.site-footer__main {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    line-height: 1.2;
}

.site-footer p,
.site-footer ul {
    margin: 0;
    color: #d7dde3;
}

.site-footer ul {
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    color: #f2cf92;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 16px 0;
    color: #aeb7c0;
    font-size: 14px;
}

@media (max-width: 980px) {
    .site-header__inner {
        min-height: 76px;
    }

    .nav-toggle {
        display: block;
    }

    .primary-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        display: none;
        border-top: 1px solid var(--mx-line);
        background: #fff;
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-nav ul {
        width: min(var(--mx-max), calc(100% - 40px));
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin: 14px auto;
    }

    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body.admin-bar .site-header {
        top: 46px;
    }

    .wrap {
        width: min(100% - 28px, var(--mx-max));
    }

    .top-bar__inner,
    .top-bar__contacts,
    .top-bar__tools {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .top-bar__inner {
        padding: 10px 0;
    }

    .quick-select {
        width: 100%;
    }

    .brand img {
        width: 180px;
    }

    .hero,
    .hero__content {
        min-height: 560px;
    }

    .hero__content {
        padding-top: 36px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }

    .section__head {
        display: block;
    }

    .section__head p {
        margin-top: 12px;
    }

    .service-grid,
    .gallery-grid,
    .site-footer__main,
    .primary-nav ul {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: 270px;
    }
}
