/* Healthy Home / LIVIQ — strona firmowa
   Motyw: wersja ciemna jest domyślna, jasna włącza się przez <html data-theme="light">. */

:root {
    --bg: #0A1712;
    --bg-alt: #0F2119;
    --panel: #10231B;
    --text: #EEF2EC;
    --body: #B9C6BD;
    --muted: #A8B8AE;
    --nav: #C9D4CC;
    --gold: #DDBB73;
    --gold-hover: #F1D9A0;
    --mint: #8ED6AB;
    --btn-bg: #DDBB73;
    --btn-bg-hover: #F1D9A0;
    --btn-text: #0A1712;
    --line: rgba(238, 242, 236, 0.16);
    --line-strong: rgba(238, 242, 236, 0.35);
    --line-gold: rgba(221, 187, 115, 0.18);
    --line-gold-strong: rgba(221, 187, 115, 0.32);

    --font-heading: Sora, 'Segoe UI', system-ui, sans-serif;
    --font-body: Manrope, 'Segoe UI', system-ui, sans-serif;
    --container: 1240px;
    --gutter: 24px;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #F4F4F5;
    --bg-alt: #E9E9EB;
    --panel: #FFFFFF;
    --text: #17191B;
    --body: #474B4F;
    --muted: #5A5E63;
    --nav: #33373B;
    --gold: #75561B;
    --gold-hover: #4E390F;
    --mint: #1F7446;
    --btn-bg: #1D4D35;
    --btn-bg-hover: #143826;
    --btn-text: #FFFFFF;
    --line: rgba(23, 25, 27, 0.16);
    --line-strong: rgba(23, 25, 27, 0.4);
    --line-gold: rgba(117, 86, 27, 0.22);
    --line-gold-strong: rgba(117, 86, 27, 0.4);
    color-scheme: light;
}

/* Elementy widoczne tylko w jednym motywie (loga, etykieta przełącznika). */
:root[data-theme="light"] .only-dark,
:root:not([data-theme="light"]) .only-light {
    display: none !important;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
}

img {
    max-width: 100%;
}

a {
    color: var(--gold);
}

a:hover {
    color: var(--gold-hover);
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

p {
    margin: 0;
}

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

/* ---------- Układ ---------- */

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: 96px;
}

.section--lg {
    padding-block: 104px;
}

.band {
    background: var(--bg-alt);
    border-block: 1px solid var(--line-gold);
}

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
    gap: 56px;
    align-items: center;
}

.split--end {
    align-items: end;
    row-gap: 24px;
}

.stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.stack > * {
    max-width: 100%;
}

.stack--sm {
    gap: 20px;
}

.stack--lg {
    gap: 28px;
}

.stack--xl {
    align-items: stretch;
    gap: 48px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
}

/* ---------- Typografia ---------- */

/* Nadtytuł sekcji: wyśrodkowany nad całą sekcją, między dwiema liniami,
   które gasną ku krawędziom (przy pojawianiu się rozsuwają się od środka). */
.section-label {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
    grid-column: 1 / -1;
    width: 100%;
    font-family: var(--font-heading);
    font-size: clamp(19px, 2.1vw, 27px);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-align: center;
    text-wrap: balance;
    color: var(--gold);
}

.section-label::before,
.section-label::after {
    content: "";
    flex: 1;
    min-width: 20px;
    height: 1px;
    background: linear-gradient(to right, transparent, currentColor);
    opacity: 0.55;
}

.section-label::after {
    background: linear-gradient(to left, transparent, currentColor);
}

.section-label--mint {
    color: var(--mint);
}

.heading {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 500;
    text-wrap: balance;
}

.heading--display {
    /* maks. 64px: przy 72px "środowiska życia" nie mieści się w kolumnie hero (568px) i tytuł łamie się na 4 linie */
    font-size: clamp(40px, 5.2vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.02em;
}

.heading--section {
    font-size: clamp(36px, 4.6vw, 62px);
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.heading--sub {
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.015em;
}

.heading--item {
    font-size: clamp(27px, 2.8vw, 36px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.lead {
    font-size: 19px;
    color: var(--body);
    text-wrap: pretty;
}

.lead--narrow {
    max-width: 520px;
}

.text {
    color: var(--body);
    text-wrap: pretty;
}

.footnote {
    font-size: 15px;
    color: var(--muted);
}

/* ---------- Przyciski ---------- */

.btn {
    display: inline-block;
    padding: 16px 30px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--small {
    padding: 11px 22px;
    font-size: 15px;
}

.btn--primary,
.btn--primary:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
}

.btn--primary:hover {
    background: var(--btn-bg-hover);
}

.btn--ghost,
.btn--ghost:hover {
    border-color: var(--line-strong);
    color: var(--text);
    font-weight: 600;
}

.btn--ghost:hover {
    border-color: var(--text);
}

.btn--outline {
    padding: 14px 26px;
    border-color: var(--line-gold-strong);
    font-weight: 600;
}

.btn--outline:hover {
    border-color: var(--gold);
}

/* ---------- Obrazy ---------- */

.media {
    display: block;
    width: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.media--lg {
    border-radius: 28px;
}

.media--4x3 {
    aspect-ratio: 4 / 3;
}

.media--7x5 {
    aspect-ratio: 7 / 5;
}

.media--16x10 {
    aspect-ratio: 16 / 10;
}

.media--16x9 {
    aspect-ratio: 16 / 9;
}

.media--2x1 {
    aspect-ratio: 2 / 1;
}

.logo-liviq {
    display: block;
    width: auto;
    height: 40px;
}

.logo-liviq--hero {
    height: 64px;
}

/* ---------- Nagłówek ---------- */

.site-header {
    border-bottom: 1px solid var(--line-gold);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding-block: 18px;
}

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

.site-header__logo img {
    display: block;
    width: auto;
    height: 56px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 28px;
    font-size: 15px;
    font-weight: 500;
}

.site-nav__link {
    padding: 12px 0;
    color: var(--nav);
    text-decoration: none;
}

.site-nav__link:hover {
    color: var(--text);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--text);
}

/* ---------- Menu mobilne ----------
   Poniżej 960px nawigacja chowa się pod przycisk (hamburger) i rozwija pod nagłówkiem,
   który przykleja się do góry ekranu. Stan: klasa is-menu-open (menu_controller.js). */

.menu-toggle,
.menu-backdrop {
    display: none;
}

@media (max-width: 960px) {
    html {
        scroll-padding-top: 84px;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
        background: var(--bg);
    }

    .site-header__inner {
        flex-wrap: nowrap;
        padding-block: 12px;
    }

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

    .menu-toggle {
        position: relative;
        display: block;
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 1px solid var(--line-strong);
        border-radius: 50%;
        background: transparent;
        color: var(--text);
        cursor: pointer;
    }

    .menu-toggle__bar {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 50%;
        height: 2px;
        margin-top: -1px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.3s ease, opacity 0.2s ease;
    }

    .menu-toggle__bar:nth-child(1) {
        transform: translateY(-6px);
    }

    .menu-toggle__bar:nth-child(3) {
        transform: translateY(6px);
    }

    /* hamburger -> krzyżyk */
    .is-menu-open .menu-toggle__bar:nth-child(1) {
        transform: rotate(45deg);
    }

    .is-menu-open .menu-toggle__bar:nth-child(2) {
        opacity: 0;
    }

    .is-menu-open .menu-toggle__bar:nth-child(3) {
        transform: rotate(-45deg);
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
        padding: 4px var(--gutter) 28px;
        border-block: 1px solid var(--line-gold);
        background: var(--bg);
        box-shadow: 0 28px 48px rgba(0, 0, 0, 0.28);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-14px);
        transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.35s;
    }

    .is-menu-open .site-nav {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition-delay: 0s;
    }

    /* pozycje wsuwają się po kolei */
    .site-nav > * {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.15s ease, background-color 0.15s ease;
    }

    .is-menu-open .site-nav > * {
        opacity: 1;
        transform: none;
    }

    .is-menu-open .site-nav > :nth-child(1) { transition-delay: 0.06s; }
    .is-menu-open .site-nav > :nth-child(2) { transition-delay: 0.1s; }
    .is-menu-open .site-nav > :nth-child(3) { transition-delay: 0.14s; }
    .is-menu-open .site-nav > :nth-child(4) { transition-delay: 0.18s; }
    .is-menu-open .site-nav > :nth-child(5) { transition-delay: 0.22s; }
    .is-menu-open .site-nav > :nth-child(n + 6) { transition-delay: 0.26s; }

    .site-nav__link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 0;
        border-bottom: 1px solid var(--line);
        font-family: var(--font-heading);
        font-size: 22px;
        color: var(--text);
    }

    .site-nav__link::after {
        content: "→";
        color: var(--gold);
    }

    .site-nav .btn {
        margin-top: 24px;
        padding: 16px 30px;
        font-size: 17px;
        text-align: center;
    }

    .site-nav .theme-toggle {
        justify-content: center;
        min-height: 52px;
        margin-top: 12px;
    }

    /* przyciemnienie strony pod rozwiniętym menu; kliknięcie zamyka */
    .menu-backdrop {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: block;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    }

    .is-menu-open .menu-backdrop {
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }
}

@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
    .menu-toggle__bar,
    .site-nav,
    .site-nav > *,
    .menu-backdrop {
        transition: none;
    }
}

/* ---------- Hero ---------- */

.hero {
    padding-block: 40px 88px;
}

/* ---------- Niewidzialny problem ---------- */

.problem-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 14px;
    width: 100%;
}

.problem {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.problem__icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--mint);
}

.problem__title {
    font-weight: 700;
}

.problem__text {
    font-size: 15px;
    color: var(--muted);
}

/* ---------- Technologie ---------- */

.technologies {
    display: flex;
    flex-direction: column;
    gap: 88px;
    padding-block: 104px 40px;
}

.section-intro {
    max-width: 760px;
}

/* odstęp między technologiami (88px) byłby za duży między nadtytułem a wstępem */
.technologies > .section-label {
    margin-bottom: -40px;
}

.tech-number {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--gold);
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist li {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.checklist li::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
}

.zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: 12px;
    width: 100%;
}

.zone {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: 14px;
    background: var(--panel);
}

.zone__name {
    font-weight: 700;
}

.zone__level {
    font-size: 15px;
    color: var(--muted);
}

.stat {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 20px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--line-gold-strong);
}

.stat__value {
    font-family: var(--font-heading);
    font-size: 72px;
    font-weight: 500;
    line-height: 1;
    color: var(--gold);
}

.stat__label {
    font-weight: 600;
}

/* ---------- LIVIQ ---------- */

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
    gap: 14px;
}

.metric {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--line-gold-strong);
    border-radius: 16px;
}

.metric__name {
    font-family: var(--font-heading);
    font-size: 22px;
}

.metric__note {
    font-size: 15px;
    color: var(--muted);
}

/* ---------- Współpraca ---------- */

.offers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 20px;
}

.offer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 32px;
    border-radius: 20px;
    background: var(--panel);
}

.offer__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 500;
}

.offer__text {
    color: var(--body);
}

/* ---------- Kontakt ---------- */

.contact-wrap {
    padding-bottom: 104px;
}

.contact-wrap > .section-label {
    margin-bottom: 48px;
}

.contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
    overflow: hidden;
    border: 1px solid var(--line-gold-strong);
    border-radius: 32px;
    background: var(--panel);
}

.contact__body {
    padding: clamp(32px, 5vw, 64px);
}

.contact__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.contact-list {
    width: 100%;
    border-bottom: 1px solid var(--line);
    font-size: 19px;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 24px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.contact-row__label {
    font-size: 15px;
    color: var(--muted);
}

.contact-row__value {
    font-weight: 600;
}

/* ---------- Stopka ---------- */

.site-footer {
    border-top: 1px solid var(--line-gold);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 32px;
    padding-block: 32px;
    font-size: 15px;
    color: var(--muted);
}

.site-footer__logos {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-footer__logos img {
    display: block;
    width: auto;
}

/* ---------- Animacje ----------
   Wejście hero przy ładowaniu (sam CSS), pojawianie się treści przy przewijaniu
   (reveal_controller.js nadaje data-reveal i klasę is-visible) i paralaksa zdjęć
   (parallax_controller.js nadaje data-parallax i transform).
   Wszystko tylko wtedy, gdy system nie prosi o ograniczenie ruchu. */

@media (prefers-reduced-motion: no-preference) {
    @keyframes hh-rise {
        from {
            opacity: 0;
            translate: 0 26px;
        }
    }

    @keyframes hh-zoom {
        from {
            opacity: 0;
            translate: 0 34px;
            scale: 1.05;
        }
    }

    .hero .stack > * {
        animation: hh-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .hero .stack > :nth-child(2),
    .hero .stack > :nth-child(3) {
        animation-delay: 0.1s;
    }

    .hero .stack > :nth-child(4) {
        animation-delay: 0.2s;
    }

    .hero .stack > :nth-child(5) {
        animation-delay: 0.3s;
    }

    .hero .stack > :nth-child(n + 6) {
        animation-delay: 0.4s;
    }

    .hero > .section-label {
        animation: hh-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    }

    .hero > .media {
        animation: hh-zoom 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
    }

    [data-reveal] {
        opacity: 0;
        translate: 0 30px;
        transition:
            opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms),
            translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms),
            scale 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms);
    }

    /* linie nadtytułu rozsuwają się od środka */
    .section-label[data-reveal]::before,
    .section-label[data-reveal]::after {
        scale: 0 1;
        transform-origin: right center;
        transition: scale 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
    }

    .section-label[data-reveal]::after {
        transform-origin: left center;
    }

    .section-label[data-reveal].is-visible::before,
    .section-label[data-reveal].is-visible::after {
        scale: 1 1;
    }

    [data-reveal="zoom"] {
        translate: 0 44px;
        scale: 0.95;
    }

    [data-reveal].is-visible {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }

    [data-parallax] {
        will-change: transform;
    }

    /* zdjęcie kontaktu przesuwa się wewnątrz ramki (.contact przycina nadmiar) */
    .contact__image[data-parallax="inside"] {
        scale: 1.14;
    }
}

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

@media print {
    [data-reveal] {
        opacity: 1;
        translate: none;
        scale: none;
    }
}
