/* ============================================================
   Dorabianie Kluczy Sidorska — design system
   Tokeny, baza, nagłówek, stopka, przyciski, sekcje
   ============================================================ */

:root {
    /* Paleta — chłodna ciemna, akcent z logo (#0090c0) */
    --bg: #0e1116;
    --bg-raised: #141922;
    --surface: #1a2029;
    --surface-hover: #202836;
    --border: rgba(148, 170, 197, 0.14);
    --border-strong: rgba(148, 170, 197, 0.28);
    --text: #e9eef4;
    --text-muted: #97a4b4;
    --text-faint: #7d8a9b;
    --accent: #3fb1e5;
    --accent-strong: #7accf1;
    --accent-deep: #005080;
    --accent-ink: #06202f;

    /* Typografia */
    --font-display: "Sora", "Segoe UI", sans-serif;
    --font-body: "Manrope", "Segoe UI", sans-serif;

    /* Rytm */
    --container: 1180px;
    --section-y: clamp(4rem, 9vw, 7rem);
    --gap: clamp(1rem, 2.5vw, 1.75rem);

    /* Kształty i cienie */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-soft: 0 12px 32px -12px rgba(2, 8, 16, 0.55);
    --shadow-accent: 0 10px 30px -10px rgba(0, 144, 192, 0.45);

    /* Ruch */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 0.18s var(--ease-out);
    --t-base: 0.3s var(--ease-out);

    --nav-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--text);
}

p {
    text-wrap: pretty;
}

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

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--t-fast);
}

a:hover {
    color: var(--accent-strong);
}

ul {
    list-style: none;
}

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

::selection {
    background: var(--accent-deep);
    color: #fff;
}

/* ── Układ ── */
.container {
    width: min(var(--container), 100% - 2.5rem);
    margin-inline: auto;
}

.section {
    padding-block: var(--section-y);
}

.section--raised {
    background: var(--bg-raised);
    border-block: 1px solid var(--border);
}

.section__head {
    max-width: 640px;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section__head--center {
    margin-inline: auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.9rem;
}

.section__title {
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    margin-bottom: 0.75rem;
}

.section__lead {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ── Przyciski ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.75rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--t-fast), border-color var(--t-fast),
                color var(--t-fast), transform var(--t-fast), box-shadow var(--t-base);
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
    background: var(--accent-strong);
    color: var(--accent-ink);
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn--ghost:hover {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(63, 177, 229, 0.08);
}

.btn--phone {
    background: rgba(63, 177, 229, 0.1);
    border-color: rgba(63, 177, 229, 0.35);
    color: var(--accent-strong);
    font-variant-numeric: tabular-nums;
}

.btn--phone:hover {
    background: rgba(63, 177, 229, 0.18);
    color: #fff;
}

.btn--block {
    width: 100%;
}

.btn--lg {
    min-height: 56px;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
}

/* ── Skip link ── */
.skip-link {
    position: absolute;
    top: -60px;
    left: 1rem;
    z-index: 300;
    padding: 0.7rem 1.2rem;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    text-decoration: none;
    transition: top var(--t-fast);
}

.skip-link:focus {
    top: 0;
    color: var(--accent-ink);
}

/* ── Nagłówek ── */
.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 200;
    background: rgba(14, 17, 22, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    width: min(1280px, 100% - 2rem);
    margin-inline: auto;
    min-height: var(--nav-height);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-header__logo img {
    height: 44px;
    width: auto;
}

.site-nav {
    margin-left: auto;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.site-nav__link {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.97rem;
    text-decoration: none;
    transition: color var(--t-fast), background var(--t-fast);
}

.site-nav__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.site-nav__link[aria-current="page"] {
    color: var(--text);
    position: relative;
}

.site-nav__link[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.25rem;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.site-header__phone {
    min-height: 42px;
    padding: 0.5rem 1.1rem;
    font-size: 0.95rem;
}

/* Hamburger */
.site-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    padding: 12px;
    margin-right: -8px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.site-header__toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform var(--t-base), opacity var(--t-fast);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
    opacity: 0;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu mobilne */
.mobile-menu {
    border-top: 1px solid var(--border);
    background: rgba(14, 17, 22, 0.97);
    padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 0.4rem 0.5rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.mobile-menu__link:hover {
    color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.04);
}

.mobile-menu__link[aria-current="page"] {
    color: var(--accent);
}

.mobile-menu__contact {
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.mobile-menu__hours {
    margin-top: 0.85rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Główna treść pod fixed headerem ── */
main {
    padding-top: var(--nav-height);
}

/* ── Stopka ── */
.site-footer {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

.site-footer__inner {
    width: min(var(--container), 100% - 2.5rem);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
    padding-block: clamp(2.5rem, 6vw, 4rem);
}

.site-footer__brand img {
    height: 48px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.92;
}

.site-footer__brand p {
    color: var(--text-muted);
    max-width: 34ch;
}

.site-footer h2 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.site-footer li {
    margin-bottom: 0.55rem;
    color: var(--text-muted);
}

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

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

.site-footer__address {
    font-style: normal;
}

.site-footer__bottom {
    border-top: 1px solid var(--border);
    padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    width: min(var(--container), 100%);
    margin-inline: auto;
    color: var(--text-faint);
    font-size: 0.85rem;
}

.site-footer__bottom a {
    color: var(--text-faint);
}

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

/* ── Nagłówek podstrony ── */
.page-head {
    padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.page-head h1 {
    font-size: clamp(2rem, 4.4vw, 3rem);
    margin-bottom: 0.75rem;
}

.page-head p {
    color: var(--text-muted);
    max-width: 60ch;
    font-size: 1.05rem;
}

/* ── Tekst ciągły (polityka prywatności itp.) ── */
.prose {
    max-width: 72ch;
}

.prose h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    margin-bottom: 0.5rem;
}

.prose h2 {
    font-size: 1.3rem;
    margin: 2.25rem 0 0.75rem;
}

.prose p,
.prose li {
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.prose ul {
    list-style: disc;
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose strong {
    color: var(--text);
}

.prose .prose__meta {
    color: var(--text-faint);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ── Popup komunikatu (np. zakład nieczynny) ── */
.notice {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.notice__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 12, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: notice-fade 0.25s var(--ease-out);
}

.notice__card {
    position: relative;
    width: min(440px, 100%);
    padding: clamp(1.75rem, 5vw, 2.5rem);
    text-align: center;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
    animation: notice-pop 0.32s var(--ease-out);
}

.notice__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}

.notice__close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.notice__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 1.1rem;
    border-radius: 50%;
    background: rgba(63, 177, 229, 0.12);
    border: 1px solid rgba(63, 177, 229, 0.25);
    color: var(--accent);
}

.notice__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.notice__title {
    font-size: clamp(1.4rem, 3.5vw, 1.75rem);
    margin-bottom: 0.75rem;
}

.notice__text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.6rem;
}

.notice__ok {
    min-width: 160px;
}

@keyframes notice-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes notice-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .notice__backdrop,
    .notice__card {
        animation: none;
    }
}

/* ── Stała belka „Zadzwoń" (tylko telefon) ── */
.call-bar {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .call-bar {
        position: fixed;
        left: 0.85rem;
        right: 0.85rem;
        bottom: calc(0.85rem + env(safe-area-inset-bottom));
        z-index: 150;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        min-height: 52px;
        padding: 0.75rem 1rem;
        background: var(--accent);
        color: var(--accent-ink);
        font-weight: 700;
        font-size: 1rem;
        text-decoration: none;
        border-radius: var(--radius-md);
        box-shadow: 0 10px 28px -6px rgba(2, 8, 16, 0.6), var(--shadow-accent);
    }

    .call-bar:hover,
    .call-bar:active {
        color: var(--accent-ink);
    }
}

/* ── Scroll reveal (aktywny tylko przy działającym JS — klasa .js na <html>) ── */
.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
}

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

/* ── Responsywność ── */
@media (max-width: 960px) {
    .site-nav {
        display: none;
    }

    .site-header__toggle {
        display: flex;
        margin-left: auto;
    }

    .site-header__phone {
        margin-left: auto;
    }

    .site-header__toggle {
        margin-left: 0;
    }

    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 0.95rem;
    }

    :root {
        --nav-height: 60px;
        --section-y: 2.75rem;
        --gap: 0.85rem;
    }

    .section__head {
        margin-bottom: 1.5rem;
    }

    .section__title {
        font-size: 1.35rem;
    }

    .section__lead {
        font-size: 0.95rem;
    }

    .eyebrow {
        font-size: 0.72rem;
        margin-bottom: 0.6rem;
    }

    .btn {
        min-height: 44px;
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }

    .btn--lg {
        min-height: 48px;
        padding: 0.75rem 1.4rem;
        font-size: 0.98rem;
    }

    .container {
        width: min(var(--container), 100% - 2rem);
    }

    .page-head h1 {
        font-size: 1.55rem;
    }

    .page-head p {
        font-size: 0.95rem;
    }

    .site-header__logo img {
        height: 34px;
    }

    .site-header__phone span {
        display: none;
    }

    .site-header__phone {
        width: 42px;
        padding: 0.5rem;
        border-radius: 50%;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 1.4rem;
        padding-block: 1.75rem;
    }

    .site-footer {
        font-size: 0.88rem;
    }

    .site-footer__brand img {
        height: 40px;
        margin-bottom: 0.6rem;
    }

    .site-footer h2 {
        margin-bottom: 0.5rem;
    }

    .site-footer li {
        margin-bottom: 0.35rem;
    }

    .site-footer__bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
        padding-block: 1rem;
        font-size: 0.8rem;
    }
}

/* ── Bardzo małe telefony ── */
@media (max-width: 390px) {
    .container {
        width: min(var(--container), 100% - 1.6rem);
    }

    .section__title {
        font-size: 1.25rem;
    }

    .page-head h1 {
        font-size: 1.4rem;
    }

    .btn--lg {
        font-size: 0.93rem;
        padding-inline: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

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