:root {
    --color-primary: #b91c1c;
    --color-primary-hover: #991b1b;
    --color-background: #fdfdfc;
    --color-text-main: #1a1a1a;
    --color-text-muted: #8e8e8e;
    --color-border: rgba(0, 0, 0, 0.05);
    --color-bubble-ai: #ffffff;
    --color-bubble-user: var(--color-primary);
    --color-bubble-text-user: #ffffff;
    --color-input-bg: rgba(255, 255, 255, 0.92);
    --font-family-sans: 'Plus Jakarta Sans', sans-serif;
    --font-family-serif: 'Playfair Display', serif;
    --logo-subtitle-spacing: 0.28em;
    --transition-standard: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --z-index-background: -1;
    --z-index-header: 100;
    --z-index-input: 200;
    --z-index-menu: 1000;
    --page-scroll-padding-top: 90px;
    --page-scroll-padding-right: 20px;
    --page-scroll-padding-bottom: 80px;
    --page-scroll-padding-left: 20px;
    --page-shell-max-width: 900px;
    --page-shell-padding-top: 20px;
    --page-shell-padding-bottom: 60px;
    --page-hero-padding-top: 15px;
    --page-hero-padding-bottom: 40px;
    --page-hero-margin-bottom: 40px;
    --page-hero-title-size: clamp(3rem, 8vw, 5rem);
    --page-hero-title-line-height: 0.96;
    --page-hero-title-letter-spacing: -0.04em;
    --page-hero-title-weight: 600;
    --page-hero-desc-max-width: 620px;
    --page-hero-desc-size: 1.08rem;
    --page-hero-desc-line-height: 1.7;
}

html[lang="pl"] {
    --logo-subtitle-spacing: 0.55em;
}

html[lang="en"] {
    --logo-subtitle-spacing: 0.7em;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    height: var(--app-vh, 100dvh);
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: var(--font-family-sans);
    background-color: var(--color-background);
    color: var(--color-text-main);
}

button,
input,
textarea,
select {
    font: inherit;
}

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

a {
    color: inherit;
}

.sl-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: middle;
    overflow: visible;
    transform: translateZ(0);
}

    .sl-icon path,
    .sl-icon circle,
    .sl-icon rect {
        vector-effect: non-scaling-stroke;
        shape-rendering: geometricPrecision;
    }

.is-hidden {
    display: none !important;
}

.icon--rotated {
    display: inline-block;
    transform: rotate(-45deg);
}

.page-scroll-stage {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--page-scroll-padding-top) var(--page-scroll-padding-right) var(--page-scroll-padding-bottom) var(--page-scroll-padding-left);
    box-sizing: border-box;
    scrollbar-width: none;
}

    .page-scroll-stage::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

.page-shell {
    width: 100%;
    max-width: var(--page-shell-max-width);
    margin: 0 auto;
    position: relative;
    padding-top: var(--page-shell-padding-top);
    padding-bottom: var(--page-shell-padding-bottom);
}

.page-hero {
    text-align: center;
    padding-top: var(--page-hero-padding-top);
    padding-bottom: var(--page-hero-padding-bottom);
    margin-bottom: var(--page-hero-margin-bottom);
}

.page-hero__eyebrow {
    display: inline-block;
    margin-top: 44px;
    margin-bottom: 24px;
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    animation: pageFadeIn 1s ease forwards 0.2s;
}

.page-hero__title {
    margin: 0 0 24px 0;
    color: var(--color-text-main);
    font-family: var(--font-family-serif);
    font-size: var(--page-hero-title-size);
    line-height: var(--page-hero-title-line-height);
    letter-spacing: var(--page-hero-title-letter-spacing);
    font-weight: var(--page-hero-title-weight);
    opacity: 0;
    animation: pageFadeInUp 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.4s;
}

.page-hero__desc {
    max-width: var(--page-hero-desc-max-width);
    margin: 0 auto;
    color: #555;
    font-size: var(--page-hero-desc-size);
    line-height: var(--page-hero-desc-line-height);
    opacity: 0;
    animation: pageFadeInUp 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards 0.6s;
}

.page-hero__title em {
    font-family: var(--font-family-serif);
    font-style: italic;
    font-weight: 400;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.215, 0.61, 0.355, 1);
}

    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

.background-aurora {
    position: fixed;
    inset: 0;
    z-index: var(--z-index-background);
    pointer-events: none;
}

.background-aurora__blob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: floatBlob 10s infinite ease-in-out alternate;
    will-change: transform, opacity;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: var(--z-index-header);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    height: 88px;
    padding: 18px 28px;
    background: rgba(253, 253, 252, 0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.28);
}

.header__side {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header__side--left {
    justify-content: flex-start;
}

.header__side--right {
    justify-content: flex-end;
}

.header__utility-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 18px 32px -24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header__logo {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text-main);
    transform: translateY(-1px);
}

.header__logo-text {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    user-select: none;
}

.header__logo-line {
    display: flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

.header__logo-word {
    font-family: var(--font-family-sans);
    font-weight: 700;
    font-size: clamp(1.58rem, 1.82vw, 2rem);
    color: #050505;
    letter-spacing: -0.06em;
}

.header__logo-and {
    font-family: var(--font-family-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.92rem, 2.15vw, 2.42rem);
    color: var(--color-primary);
    margin: 0 0.26em;
    transform: translateY(-0.04em);
}

.header__logo-subtitle-wrap {
    width: 100%;
    margin-top: -5px;
    text-align: center;
}

.header__logo-subtitle {
    display: inline-block;
    font-family: var(--font-family-sans);
    font-size: 0.5rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: var(--logo-subtitle-spacing);
    text-transform: uppercase;
    text-align: center;
    color: var(--color-primary);
    white-space: nowrap;
    margin-right: calc(var(--logo-subtitle-spacing) * -1);
    opacity: 0.95;
}

.header__actions,
.header__actions-desktop {
    display: flex;
    align-items: center;
}

.header__actions {
    gap: 10px;
}

.header__actions-desktop {
    gap: 14px;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.language-switch__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    transition: var(--transition-standard);
}

    .language-switch__link:hover {
        color: var(--color-text-main);
        background: rgba(0, 0, 0, 0.03);
    }

    .language-switch__link.is-active {
        background: var(--color-text-main);
        color: #fff;
        box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.45);
    }

.language-switch--header {
    position: relative;
    padding-right: 4px;
}

.language-switch--menu {
    justify-content: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(0, 0, 0, 0.07);
    color: var(--color-text-main);
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: 0 18px 32px -24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: var(--transition-standard);
}

    .btn-icon:hover {
        color: var(--color-primary);
        border-color: rgba(185, 28, 28, 0.16);
        transform: translateY(-1px);
    }

.btn-login {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px 0 18px;
    border-radius: 999px;
    background: transparent;
    border: none;
    color: var(--color-text-main);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    transition: var(--transition-standard);
}

    .btn-login::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 22px;
        background: rgba(0, 0, 0, 0.08);
        transform: translateY(-50%);
    }

    .btn-login:hover {
        color: var(--color-primary);
        transform: translateY(-1px);
    }

.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-index-menu);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(255, 255, 255, 0.98);
}

    .menu-overlay.is-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.3s ease, visibility 0s linear 0s;
    }

.menu-overlay__close {
    position: absolute;
    top: 25px;
    right: 30px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-main);
    transition: transform 0.2s, color 0.2s;
}

    .btn-close:hover {
        transform: scale(1.1);
        color: var(--color-primary);
    }

.menu-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin-top: 20px;
    flex-shrink: 0;
}

.menu-item {
    text-decoration: none;
    font-weight: 800;
    font-size: 2.4rem;
    color: var(--color-text-main);
    line-height: 1;
    letter-spacing: -1px;
    transition: 0.3s;
    display: block;
}

    .menu-item:hover {
        color: var(--color-primary);
        transform: scale(1.05);
    }

.menu-item__sub {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0;
}

.menu-mobile-actions {
    display: none;
    margin-top: 30px;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

    .menu-mobile-actions .btn-login {
        min-height: 46px;
        padding: 0 22px;
        border-color: rgba(0, 0, 0, 0.08);
        color: var(--color-text-main);
        font-size: 0.82rem;
        letter-spacing: 0.08em;
    }

.menu-footer {
    margin-top: 56px;
    width: min(100%, 1080px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.menu-footer__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 0.8;
}

.menu-footer__legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.menu-legal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.88);
    color: var(--color-text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 16px 30px -24px rgba(0, 0, 0, 0.18);
    transition: var(--transition-standard);
}

    .menu-legal-link:hover {
        color: #fff;
        background: var(--color-text-main);
        border-color: var(--color-text-main);
        transform: translateY(-2px);
    }

.menu-projects {
    width: 100%;
    margin-top: 18px;
}

.menu-projects__links {
    width: 100%;
    max-width: 500px;
    margin: 12px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    column-gap: 20px;
    row-gap: 10px;
}

.menu-projects__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 20px;
    row-gap: 10px;
}

.menu-project-link {
    color: var(--color-text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.2s;
    white-space: nowrap;
    word-break: keep-all;
}

    .menu-project-link:hover {
        color: var(--color-primary);
    }

.menu-footer__social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
}

.social-icons {
    font-size: 1.6rem;
    margin: 0;
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    color: var(--color-text-main);
    transition: color 0.2s;
}

    .social-link:hover {
        color: var(--color-primary);
    }


@keyframes floatBlob {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-45%, -55%) scale(1.2);
        opacity: 1;
    }
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pageFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    html[lang="pl"] {
        --logo-subtitle-spacing: 0.26em;
    }

    html[lang="en"] {
        --logo-subtitle-spacing: 0.43em;
    }

    .header {
        grid-template-columns: 1fr auto 1fr;
        padding: 14px 16px;
        height: 76px;
    }

    .header__utility-bar {
        display: none;
    }

    .header__side--left {
        display: flex;
    }

    .header__logo {
        justify-self: center;
        transform: translateY(-1px);
    }

    .header__logo-text {
        align-items: center;
        gap: 0px;
    }

    .header__logo-word {
        font-size: 1.6rem;
    }

    .header__logo-and {
        font-size: 1.9rem;
        margin: 0 0.18em;
    }

    .header__logo-subtitle-wrap {
        text-align: center;
        margin-top: -3px;
    }

    .header__logo-subtitle {
        font-size: 0.48rem;
        text-align: center;
    }

    .header__actions-desktop {
        display: none;
    }

    .menu-mobile-actions {
        display: flex;
    }

    .menu-item {
        font-size: 1.8rem;
    }

    .menu-content {
        gap: 20px;
        margin-top: 0;
    }

    .menu-overlay__close {
        top: 20px;
        right: 20px;
    }

    .menu-overlay {
        justify-content: flex-start;
        padding: calc(80px + env(safe-area-inset-top, 0px)) 20px calc(32px + env(safe-area-inset-bottom, 0px));
    }

    .menu-footer__social {
        margin-top: 18px;
    }

    .menu-projects__links {
        max-width: 100%;
        column-gap: 14px;
        row-gap: 8px;
    }

    .page-hero {
        padding-top: 10px;
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .page-hero__title {
        margin-bottom: 16px;
    }
}

@media (max-height: 900px) {
    .menu-overlay {
        justify-content: flex-start;
        padding-top: calc(80px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    }

    .menu-overlay__close {
        top: 20px;
        right: 20px;
    }

    .menu-content {
        gap: 20px;
        margin-top: 0;
    }

    .menu-item {
        font-size: clamp(1.8rem, 4vw, 2.4rem);
    }

    .menu-footer {
        margin-top: 44px;
        gap: 22px;
    }

    .menu-footer__legal {
        width: 100%;
    }

    .menu-legal-link {
        width: 100%;
    }
}

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

.grecaptcha-badge {
    visibility: hidden;
}
