/* ==========================================================================
   ARTEM — Kominki · style strony
   ========================================================================== */

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #171717;
    --bg-header: #191919;
    --surface: #212121;
    --surface-2: #262626;
    --border: #3a3a3a;
    --border-strong: #4a4a4a;
    --text: #f7f5f3;
    --text-muted: #c9c9c9;
    --text-dim: #9d9d9d;
    --red: #e33228;
    --red-bright: #ed3b31;
    --red-dark: #be241c;
    --radius: 6px;
    --font: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.1; }
[hidden] { display: none !important; }
.icon { flex: none; }

.container { width: min(100% - 72px, 1400px); margin-inline: auto; }

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--red); color: #fff; padding: 10px 16px; border-radius: 4px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; }

/* --- Przyciski ----------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 46px; padding: 12px 22px;
    border: 1px solid transparent; border-radius: 4px;
    font: 700 14px/1.2 var(--font); letter-spacing: .02em;
    cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--red); color: #fff; background: transparent; }
.btn-outline:hover { background: var(--red); }

.eyebrow {
    display: block; color: var(--red-bright);
    font-size: 12px; font-weight: 700; letter-spacing: .2em;
}
.eyebrow::before {
    content: ""; display: inline-block; width: 2px; height: 15px;
    background: var(--red-bright); margin-right: 14px; vertical-align: -3px;
}

/* --- Nagłówek ------------------------------------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: rgba(25, 25, 25, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #2f2f2f;
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }

/* Logo jak na wizytówce: napis ARTEM nad czerwonym płomieniem, oba tej samej szerokości. */
.brand { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex: none; width: 66px; }
.brand img { width: 100%; height: auto; }

.main-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.main-nav > a, .nav-dropdown-toggle {
    font: 400 14px var(--font); color: var(--text); white-space: nowrap;
    padding: 31px 0 29px; border-bottom: 2px solid transparent;
}
.main-nav > a:hover, .main-nav > a.is-active, .nav-dropdown-toggle:hover, .nav-dropdown.is-open .nav-dropdown-toggle { border-color: var(--red); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border-top: 0; border-inline: 0; cursor: pointer;
}
.nav-dropdown-toggle .icon { transition: transform .2s; }
.nav-dropdown.is-open .nav-dropdown-toggle .icon { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute; top: calc(100% + 1px); left: -18px; min-width: 250px;
    display: none; flex-direction: column; padding: 8px;
    background: #1f1f1f; border: 1px solid var(--border); border-top: 2px solid var(--red);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.nav-dropdown.is-open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { padding: 10px 12px; border-radius: 4px; font-size: 14px; }
.nav-dropdown-menu a:hover { background: var(--surface-2); color: var(--red-bright); }
.nav-mobile-cta { display: none; }
.header-cta { flex: none; }

.menu-toggle .icon-close, .menu-open .menu-toggle .icon-open { display: none; }
.menu-open .menu-toggle .icon-close { display: block; }
.menu-toggle {
    display: none; margin-left: auto; padding: 8px;
    background: none; border: 0; color: var(--text); cursor: pointer;
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    min-height: 590px;
    background: url('../img/hero.jpg') center / cover no-repeat;
}
.hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15,15,15,.95) 0%, rgba(15,15,15,.83) 28%, rgba(15,15,15,.25) 63%, rgba(15,15,15,.1) 100%);
}
.hero-content { position: relative; padding-block: 76px 60px; }
.hero h1 {
    font-size: clamp(3.2rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.02em;
    margin: 18px 0 18px; max-width: 780px;
}
.hero h1 em { font-style: normal; color: #e53c32; }
.hero p { font-size: 19px; color: #e5e1df; margin: 0 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.service-strip { display: flex; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; }
.service-strip li { display: flex; align-items: center; gap: 10px; padding-right: 22px; border-right: 1px solid #666; font-size: 14px; }
.service-strip li:last-child { border: 0; }

/* --- Wyróżnione kategorie ----------------------------------------------- */
.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-block: 24px; }
.featured-card {
    overflow: hidden; background: var(--surface);
    border: 1px solid #444; border-radius: var(--radius);
    transition: transform .2s, border-color .2s;
}
.featured-card:hover { transform: translateY(-4px); border-color: var(--red); }
.featured-image { height: 230px; overflow: hidden; }
.featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.featured-card:hover .featured-image img { transform: scale(1.04); }
.featured-bottom { min-height: 108px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.featured-bottom h2 { font-size: 23px; margin: 0 0 6px; }
.featured-bottom p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.4; }
.round-arrow { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--red); }

/* --- Katalog ------------------------------------------------------------- */
.catalog { padding-block: 52px 60px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 36px; }
.section-heading h2 { font-size: clamp(2.2rem, 3.4vw, 3.3rem); margin: 12px 0 0; letter-spacing: -.01em; }
.section-heading p { color: var(--text-muted); max-width: 460px; margin: 0; }

.catalog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 22px; }
.catalog-filters a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border: 1px solid #555; border-radius: 4px;
    background: #252525; color: #ddd; font-size: 14px;
    transition: background-color .2s, border-color .2s;
}
.catalog-filters a span {
    min-width: 22px; padding: 1px 6px; border-radius: 10px;
    background: rgba(255,255,255,.08); color: var(--text-dim); font-size: 12px; text-align: center;
}
.catalog-filters a:hover { border-color: var(--red); }
.catalog-filters a.is-selected { background: var(--red); border-color: var(--red); color: #fff; }
.catalog-filters a.is-selected span { background: rgba(0,0,0,.2); color: #fff; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: #222; border: 1px solid #414141; border-radius: 5px;
    transition: border-color .2s;
}
.product-card:hover { border-color: #5a5a5a; }
.product-image { display: block; padding: 0; border: 0; background: #1b1b1b; cursor: zoom-in; overflow: hidden; }
.product-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; transition: transform .5s; }
.product-card:hover .product-image img { transform: scale(1.03); }
.product-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.product-category { font-size: 12px; color: #e74338; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.product-body h3 { font-size: 19px; margin: 8px 0; }
.product-body p { color: #ccc; font-size: 15px; margin: 0 0 16px; }
.product-ask { margin-top: auto; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; }
.product-ask:hover { color: #e74338; }

.catalog-intro { max-width: 880px; margin: -6px 0 24px; color: var(--text-muted); font-size: 15px; }
.catalog-more { display: flex; justify-content: center; margin-top: 28px; }
.catalog-more span { color: var(--text-dim); font-weight: 400; }
.catalog-empty {
    display: flex; align-items: center; gap: 22px;
    padding: 28px; border: 1px dashed #555; border-radius: var(--radius); background: #1d1d1d;
}
.catalog-empty > .icon { color: var(--red); }
.catalog-empty h3 { font-size: 20px; margin: 0 0 6px; }
.catalog-empty p { margin: 0; color: var(--text-muted); }
.catalog-empty .btn { margin-left: auto; white-space: nowrap; }

/* --- Realizacje ---------------------------------------------------------- */
.realizations { border-block: 1px solid #333; padding: 48px 0; }
.realizations-inner { display: grid; grid-template-columns: 36% 1fr; gap: 28px; align-items: center; }
.realizations-copy h2 { font-size: clamp(2rem, 3vw, 3.1rem); margin: 16px 0; letter-spacing: -.01em; }
.realizations-copy p { color: #d3d3d3; max-width: 450px; }
.realizations-copy .btn { margin-top: 14px; }
.realizations-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 310px; }
.realizations-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }

/* --- Dlaczego ARTEM ------------------------------------------------------ */
.why { padding-block: 48px; }
.why h2 { font-size: clamp(2.2rem, 3vw, 3.1rem); margin: 12px 0 30px; }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); }
.benefits > div {
    display: grid; grid-template-columns: 32px 1fr; column-gap: 16px;
    padding: 0 26px; border-right: 1px solid #444;
}
.benefits > div:first-child { padding-left: 0; }
.benefits > div:last-child { border: 0; }
.benefits .icon { color: var(--red); grid-row: span 2; }
.benefits h3 { font-size: 18px; margin: 0 0 8px; }
.benefits p { grid-column: 2; margin: 0; color: var(--text-muted); font-size: 14px; }

/* --- Kontakt + mapa ------------------------------------------------------ */
.contact { background: #1d1d1d; border-top: 1px solid #333; padding: 56px 0; }
.contact-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: stretch; }
.contact-info h2 { font-size: clamp(2rem, 3vw, 2.8rem); margin: 12px 0 12px; }
.contact-info > p { color: var(--text-muted); margin: 0 0 26px; max-width: 440px; }
.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 16px; }
.contact-icon {
    width: 48px; height: 48px; flex: none; display: grid; place-items: center;
    border: 1px solid var(--border-strong); border-radius: 50%; color: var(--red-bright);
}
.contact-list small { display: block; font-size: 12px; color: var(--text-dim); letter-spacing: .1em; text-transform: uppercase; }
.contact-list a { font-size: 17px; font-weight: 700; line-height: 1.35; }
.contact-list a:hover { color: var(--red-bright); }
.contact-phones { display: flex; flex-wrap: wrap; column-gap: 18px; }
.contact-map {
    min-height: 420px; overflow: hidden;
    border: 1px solid var(--border-strong); border-radius: var(--radius); background: #2a2a2a;
}
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }

/* --- Stopka -------------------------------------------------------------- */
.site-footer { border-top: 1px solid #2c2c2c; }
.footer-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-small { width: 56px; gap: 4px; }
.footer-inner > span { color: #a8a8a8; font-size: 13px; }
.footer-credit a { color: var(--text); font-weight: 700; }
.footer-credit a:hover { color: var(--red-bright); }
.footer-link { color: #a8a8a8; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.footer-link:hover { color: var(--text); }

/* --- Polityka prywatności ------------------------------------------------ */
.policy-back { margin-left: auto; color: var(--text-muted); font-size: 14px; }
.policy-back:hover { color: var(--red-bright); }
.policy { max-width: 820px; padding-block: 48px 64px; }
.policy h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin: 12px 0 6px; }
.policy-updated { color: var(--text-dim); font-size: 14px; margin: 0 0 32px; }
.policy h2 { font-size: 21px; margin: 32px 0 10px; }
.policy p, .policy li { color: var(--text-muted); }
.policy ul { padding-left: 20px; display: grid; gap: 10px; }
.policy a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.policy a:hover { color: var(--red-bright); }

/* --- Okno podglądu produktu --------------------------------------------- */
.product-dialog {
    width: min(920px, calc(100% - 32px)); max-height: calc(100% - 32px);
    padding: 0; border: 1px solid var(--border-strong); border-radius: 8px;
    background: #1f1f1f; color: var(--text); overflow: auto;
}
.product-dialog::backdrop { background: rgba(0, 0, 0, .75); }
.product-dialog[open] { display: grid; grid-template-columns: 1.2fr 1fr; }
.product-dialog > img { width: 100%; height: 100%; max-height: 80vh; object-fit: contain; background: #fff; }
.product-dialog-body { padding: 36px 30px 30px; display: flex; flex-direction: column; }
.product-dialog-body h3 { font-size: 28px; margin: 10px 0 12px; }
.product-dialog-body p { color: var(--text-muted); margin: 0 0 24px; white-space: pre-line; }
.product-dialog-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.dialog-close {
    position: absolute; top: 10px; right: 10px; z-index: 1;
    width: 40px; height: 40px; display: grid; place-items: center;
    border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer;
}
.dialog-close:hover { background: var(--red); }

/* ==========================================================================
   Responsywność
   ========================================================================== */
@media (max-width: 1240px) {
    .main-nav { gap: 16px; }
    .main-nav > a, .nav-dropdown-toggle { font-size: 13px; }
    .header-cta { padding: 10px 14px; font-size: 13px; }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1080px) {
    :root { --header-h: 70px; }
    .container { width: min(100% - 48px, 1400px); }
    .header-cta { display: none; }
    .menu-toggle { display: block; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0;
        max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
        display: none; flex-direction: column; align-items: stretch; gap: 0;
        padding: 12px 24px 24px; background: #1b1b1b; border-bottom: 1px solid var(--border);
        box-shadow: 0 20px 40px rgba(0,0,0,.5);
    }
    .menu-open .main-nav { display: flex; }
    .main-nav > a, .nav-dropdown-toggle {
        width: 100%; padding: 14px 4px; font-size: 16px; text-align: left;
        border-bottom: 1px solid #2d2d2d;
    }
    .main-nav > a.is-active { border-color: #2d2d2d; color: var(--red-bright); }
    .nav-dropdown-toggle { justify-content: space-between; }
    .nav-dropdown-menu {
        position: static; min-width: 0; padding: 4px 0 8px 12px;
        border: 0; box-shadow: none; background: none;
    }
    .nav-mobile-cta { display: inline-flex; margin-top: 18px; }
    .featured-image { height: 190px; }
    .featured-bottom h2 { font-size: 20px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .realizations-inner { grid-template-columns: 1fr; }
    .benefits { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
    .benefits > div:nth-child(2) { border: 0; }
    .benefits > div:nth-child(3) { padding-left: 0; }
    .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
    .container { width: min(100% - 32px, 640px); }
    .brand { width: 50px; gap: 3px; }
    .hero { min-height: 0; background: #131313 url('../img/hero.jpg') 74% 0 / auto 340px no-repeat; }
    .hero-shade { background: linear-gradient(180deg, rgba(19,19,19,.15) 0, rgba(19,19,19,.35) 150px, #131313 340px); }
    .hero-content { padding-block: 210px 44px; }
    .hero p { font-size: 17px; max-width: 440px; }
    .service-strip { margin-top: 40px; gap: 12px; }
    .service-strip li { padding-right: 12px; font-size: 13px; }
    .featured { grid-template-columns: 1fr; }
    .featured-image { height: 220px; }
    .catalog { padding-block: 36px 44px; }
    .section-heading { display: block; }
    .section-heading p { margin-top: 14px; }
    .catalog-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 6px; scrollbar-width: none; }
    .catalog-filters::-webkit-scrollbar { display: none; }
    .catalog-filters a { flex: none; }
    .product-grid { grid-template-columns: 1fr; }
    .catalog-empty { flex-direction: column; align-items: flex-start; }
    .catalog-empty .btn { margin-left: 0; }
    .realizations-photos { height: 260px; }
    .contact { padding: 44px 0; }
    .contact-map, .contact-map iframe { min-height: 340px; }
    .footer-inner { flex-direction: column; align-items: flex-start; padding-block: 24px; gap: 12px; }
    .product-dialog[open] { grid-template-columns: 1fr; }
    .product-dialog > img { max-height: 50vh; }
    .product-dialog-body { padding: 24px 20px 22px; }
}

@media (max-width: 490px) {
    .hero h1 { font-size: clamp(2.6rem, 11vw, 3.4rem); }
    .hero-actions .btn { width: 100%; }
    .service-strip { gap: 8px; }
    .service-strip li { gap: 6px; padding-right: 8px; }
    .service-strip .icon { width: 20px; height: 20px; }
    .realizations-photos { grid-template-columns: repeat(2, 1fr); height: 200px; }
    .realizations-photos img:last-child { display: none; }
    .benefits { grid-template-columns: 1fr; }
    .benefits > div, .benefits > div:nth-child(3) { padding: 0; border: 0; }
    .contact-list a { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
