/* To jest arkusz styli który okresla wygląd strony (CSS)
   Po lewej stronie znajdziesz kod który okresla strukturę strony (HTML) */

@font-face {
    font-family: 'Jost';
    src: url('fonts/Jost.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

 /* --- GLOBAL & TYPOGRAPHY --- */
:root {
    --bg-color: #030303; 
    --text-main: #ffffff;
    --text-muted: #c7cdd6; 
    --accent: #4f46e5;
    --aurora-scale: 1;
    --aurora-scale-mobile: .5;
    --about-photo-size: min(35vw, 380px);
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

body, html {
    font-family: 'Jost', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    scroll-behavior: smooth;
}

#app-wrapper { 
    position: relative; 
    width: 100%; 
    overflow-x: clip; 
    z-index: 3;
}

#source-underlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.18), transparent 42%), #07090f;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(circle 95px at var(--torch-x, 50vw) var(--torch-y, 50vh), #000 0 95px, transparent 120px);
    mask-image: radial-gradient(circle 95px at var(--torch-x, 50vw) var(--torch-y, 50vh), #000 0 95px, transparent 120px);
}

.source-underlay-inner {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#source-underlay pre,
#source-underlay code {
    margin: 0 !important;
    height: 100%;
    font-size: var(--source-font-size, clamp(0.6rem, 0.75vw, 0.9rem));
    line-height: 1.6;
    tab-size: 4;
    -moz-tab-size: 4;
}

#source-underlay pre {
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding-top: clamp(1rem, 2.2vw, 2rem) !important;
    padding-right: clamp(1rem, 2.2vw, 2rem) !important;
    padding-left: 0 !important;
    padding-bottom: calc(clamp(1rem, 2.2vw, 2rem) + var(--source-extra-bottom, 0px)) !important;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.6) transparent;
}

/* Desktop torch split-view: HTML on the left, style.css on the right */
.source-pre-css {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    body.torch-mode.torch-source-split .source-underlay-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    body.torch-mode.torch-source-split #source-underlay pre {
        width: 100%;
        min-width: 0;
    }
    body.torch-mode.torch-source-split #source-underlay pre.source-pre-html {
        border-right: 1px solid rgba(148, 163, 184, 0.18);
    }
    body.torch-mode.torch-source-split #source-underlay pre.source-pre-css {
        display: block;
    }
}

@media (hover: none) and (pointer: coarse) {
    #source-underlay {
        position: absolute;
        inset: auto;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        -webkit-mask-image: none;
        mask-image: none;
        -webkit-clip-path: circle(95px at var(--torch-x-page, 50vw) var(--torch-y-page, 50vh));
        clip-path: circle(95px at var(--torch-x-page, 50vw) var(--torch-y-page, 50vh));
    }
    .source-underlay-inner {
        width: 100%;
        height: auto;
        overflow: visible;
    }
    #source-underlay pre {
        height: auto;
        overflow: visible;
    }
    #source-underlay code {
        display: block;
    }
}

#source-underlay pre::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#source-underlay pre::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

#source-underlay pre::-webkit-scrollbar-track {
    background: transparent;
}

/* --- CUSTOM CURSOR --- */
#cursor {
    position: fixed; top: 0; left: 0; width: 12px; height: 12px;
    background-color: var(--text-main); border-radius: 50%;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, opacity 0.2s ease;
    mix-blend-mode: difference;
    opacity: 0;
}

#cursor.cursor-ready {
    opacity: 1;
}

#cursor.torch-cursor {
    width: 190px;
    height: 190px;
    background: transparent;
    mix-blend-mode: normal;
}

#cursor.torch-cursor::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(190, 224, 255, 0.95);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.55), 0 0 10px rgba(190, 224, 255, 0.55);
}

#torch-hint {
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.68rem;
    font-weight: 500;
    color: #cbd5e1;
    background: rgba(8, 13, 28, 0.86);
    border: 1px solid rgba(190, 224, 255, 0.3);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    white-space: nowrap;
}

body.torch-mode #torch-hint.torch-hint-visible {
    opacity: 1;
}

#torch-hint-mobile {
    display: none;
    position: fixed;
    left: var(--torch-x, 50vw);
    top: var(--torch-y, 50vh);
    transform: translate(-50%, -50%);
    z-index: 7001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, left 0.1s ease, top 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.68rem;
    font-weight: 500;
    color: #cbd5e1;
    background: rgba(8, 13, 28, 0.86);
    border: 1px solid rgba(190, 224, 255, 0.3);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    white-space: nowrap;
}
body.torch-mode #torch-hint-mobile.torch-hint-mobile-visible {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}
@media (min-width: 1025px) {
    #torch-hint-mobile { display: none !important; }
}
@media (hover: none) and (pointer: coarse) {
    #torch-hint-mobile { display: block; }
}
@media (max-width: 768px) {
    * { cursor: auto; }
    #cursor, #torch-hint { display: none; }
}

/* --- HIGH-PERFORMANCE CANVAS AURORA --- */
#auroraCanvas {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0; pointer-events: none;
}
@media (max-width: 768px) {
    #auroraCanvas { 
        filter: blur(10px) saturate(120%);
        transform: scale(1.03);
    }
}

/* --- LAYOUT & CONTAINERS --- */
.container {
    position: relative; z-index: 1; max-width: 1200px;
    margin: 0 auto; padding: 0 2rem;
    display: flex;
    flex-direction: column;
}
.footer-legal {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.footer-legal a {
    font-weight: 300;
}

/* --- MENU OVERLAY --- */
.menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 998; 
    opacity: 0;
    pointer-events: none;
    background: transparent; 
}

body.menu-open .menu-overlay {
    opacity: 1;
    pointer-events: all;
}

/* --- NAVIGATION --- */
.nav-links {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 2rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 2.5rem;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: right center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%; height: 1px;
    bottom: -4px; left: 0;
    background-color: #6fa6ed;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-link:hover { color: #6fa6ed; }
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.hamburger {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1002;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
    transition: background 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s cubic-bezier(0.86, 0, 0.07, 1);
    border-radius: 2px;
}

.hamburger:hover { background: rgba(255,255,255,0.1); }

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

body.scrolled:not(.menu-open) .nav-links {
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px) scale(0.95);
}

body.scrolled.menu-open .nav-links {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-4.5rem) scale(1);
}

body.scrolled .hamburger, body.menu-open .hamburger {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* --- MOBILE MENU --- */
@media (max-width: 1024px) {
    .nav-links {
        top: 6rem;
        right: 2rem;
        flex-direction: column;
        gap: 1.5rem;
        border-radius: 20px;
        padding: 2rem;
        align-items: center;
        transform-origin: top right;
    }
    body:not(.menu-open) .nav-links {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(-20px) scale(0.95) !important;
    }
    body.menu-open .nav-links {
        opacity: 1 !important;
        pointer-events: all !important;
        transform: translateY(0) scale(1) !important;
    }
    .hamburger {
        opacity: 1 !important;
        transform: scale(1) !important;
        pointer-events: all !important;
    }
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh; display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start;
    position: relative;
}

.hero-mobile-creation {
    display: none;
}

@keyframes hero-mobile-float {
    0% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(-1.2deg) scale(1);
        filter: drop-shadow(0 14px 28px rgba(2, 6, 23, 0.35));
    }
    25% {
        transform: translate3d(0, -7px, 0) rotateX(1.2deg) rotateY(1deg) scale(1.012);
        filter: drop-shadow(0 22px 38px rgba(2, 6, 23, 0.46));
    }
    50% {
        transform: translate3d(0, -11px, 0) rotateX(0.35deg) rotateY(-0.8deg) scale(1.02);
        filter: drop-shadow(0 24px 45px rgba(2, 6, 23, 0.52));
    }
    75% {
        transform: translate3d(0, -5px, 0) rotateX(-1deg) rotateY(1.25deg) scale(1.01);
        filter: drop-shadow(0 19px 34px rgba(2, 6, 23, 0.44));
    }
    100% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(-1.2deg) scale(1);
        filter: drop-shadow(0 14px 28px rgba(2, 6, 23, 0.35));
    }
}

@keyframes hero-mobile-sheen {
    0% { transform: translateX(-125%) skewX(-20deg); opacity: 0; }
    12% { opacity: 0.42; }
    30% { transform: translateX(145%) skewX(-20deg); opacity: 0; }
    100% { transform: translateX(145%) skewX(-20deg); opacity: 0; }
}

@keyframes hero-mobile-glow {
    0%, 100% { opacity: 0.35; box-shadow: inset 0 0 30px rgba(56, 189, 248, 0.07); }
    50% { opacity: 0.8; box-shadow: inset 0 0 40px rgba(56, 189, 248, 0.14); }
}

@keyframes hero-mobile-dot-breathe {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.22); opacity: 0.95; }
}

@keyframes hero-mobile-line-pulse {
    0%, 100% { opacity: 0.45; transform: scaleX(0.92); }
    50% { opacity: 0.95; transform: scaleX(1); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem); 
    font-weight: 400;
    line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 2rem; max-width: 800px;
}

.metallic-text {
    display: inline-block; 
    background-image: linear-gradient(
        110deg,
        #334155 0%,    
        #94a3b8 25%,   
        #ffffff 50%,   
        #94a3b8 75%,   
        #334155 100%   
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-position: var(--bg-pos, 0%) center;
    transition: background-position 0.1s ease-out; 
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.hero p {
    font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--text-muted);
    max-width: 550px; margin-bottom: 3.5rem; font-weight: 300;
    line-height: 1.9;
}

.hero-pen-underline {
    position: relative;
    display: inline-block;
    color: inherit;
    isolation: isolate;
    color: #ffffff;
    font-weight: 400;
}


.hero p.hero-curiosity {
    font-size: 0.9rem;
    color: #e2e8f0;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
    align-self: center;
    margin-top: -2rem;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
    text-align: center;
    margin-bottom: 0;
    backdrop-filter: blur(10px);

    
}

.hero-curiosity-br {
    display: none;
}

.hero .hero-curiosity-container {
    position: fixed;
    bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 1.5rem));
    display: flex;
    justify-content: center;
    width: 100%;
    z-index: 1000;
    left: 0;
    right: 0;
    padding-right: 1rem;
    padding-left: 1rem;
    transition: opacity 0.5s ease;
}

.hero-curiosity-container.hero-curiosity-scrolled {
    opacity: 0;
    pointer-events: none;
}

.hero p.hero-curiosity strong {
    color: #6fa6ed;
}

/* .spacer {
    flex: 1;
} */

/* .spacer::before {
    content: ' ';
} */

/* Ten sam breakpoint co mobile menu (≤1024): mockup w flow + hero od góry — unikamy 769–1024 z ukrytym mockupem i wyśrodkowanym hero */
@media (max-width: 1024px) {
    .hero {
        justify-content: center;
        align-content: flex-start;
        align-items: stretch;
        min-height: 100vh;
        height: auto;
        padding-top: calc(6.25rem + env(safe-area-inset-top, 0px));
        padding-bottom: 2rem;
        gap: 1.5rem;
    }

    .hero-mobile-creation {
        display: flex;
        justify-content: flex-start;
        align-self: center;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        flex-shrink: 0;
        flex-grow: 0;
        pointer-events: none;
    }

    .hero-mobile-creation-inner {
        position: relative;
        width: 100%;
        max-width: min(20.5rem, 100%);

        animation: hero-mobile-float 6.2s cubic-bezier(0.33, 1, 0.68, 1) infinite;
        transform-style: preserve-3d;
        will-change: transform, filter;
    }

    .hero-mobile-browser {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border-radius: 20px;
        border: 1px solid rgba(255,255,255,0.14);
        background: linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.45));
        box-shadow: 0 24px 45px rgba(2, 6, 23, 0.55);
        overflow: hidden;
        backdrop-filter: blur(10px);
        position: relative;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .hero-mobile-browser::before {
        content: '';
        position: absolute;
        inset: -18% -42%;
        background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.24) 50%, transparent 58%);
        mix-blend-mode: screen;
        opacity: 0;
        animation: hero-mobile-sheen 7s ease-in-out infinite;
        pointer-events: none;
    }

    .hero-mobile-browser::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        border: 1px solid rgba(56, 189, 248, 0.25);
        animation: hero-mobile-glow 3.6s ease-in-out infinite;
        pointer-events: none;
    }

    /* Stały chrome przeglądarki — nie przewija się */
    .hero-mobile-browser-top {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.55rem 0.75rem;
        background: rgba(255,255,255,0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }

    .hero-mobile-browser-top span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(255,255,255,0.45);
        animation: hero-mobile-dot-breathe 2.4s ease-in-out infinite;
    }
    .hero-mobile-browser-top span:nth-child(2) { animation-delay: 0.2s; }
    .hero-mobile-browser-top span:nth-child(3) { animation-delay: 0.4s; }

    .hero-mobile-browser-body {
        padding: 0;
        position: relative;
        height: 7.35rem;
        overflow: hidden;
    }

    /* Przewija się tylko „strona”: pasek nawigacji + hero + siatka */
    .hero-mobile-site-track {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        padding: 0.5rem 0.65rem 0.65rem;
        animation: hero-mobile-scroll 5.6s cubic-bezier(0.45, 0, 0.25, 1) infinite;
        will-change: transform;
    }

    @keyframes hero-mobile-scroll {
        0%, 14% { transform: translate3d(0, 0, 0); }
        22%, 72% { transform: translate3d(0, -3.35rem, 0); }
        82%, 100% { transform: translate3d(0, 0, 0); }
    }

    .hero-mobile-line {
        height: 8px;
        border-radius: 999px;
        margin-bottom: 0;
        background: linear-gradient(90deg, rgba(148, 163, 184, 0.3), rgba(103, 232, 249, 0.45));
        transform-origin: left center;
        animation: hero-mobile-line-pulse 2.6s ease-in-out infinite;
    }

    .hero-mobile-line-1 { width: 74%; }
    .hero-mobile-line-2 { width: 52%; animation-delay: 0.2s; }
    .hero-mobile-line-3 { width: 66%; margin-bottom: 0.8rem; animation-delay: 0.4s; }

    .hero-mobile-site-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.45rem;
        padding: 0.4rem 0.5rem;
        border-radius: 10px;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(148, 163, 184, 0.16);
        flex-shrink: 0;
    }

    .hero-mobile-site-logo {
        width: 22%;
        min-width: 44px;
        height: 8px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(34, 211, 238, 0.45), rgba(99, 102, 241, 0.5));
    }

    .hero-mobile-site-nav {
        display: flex;
        gap: 0.3rem;
        flex: 1;
        justify-content: flex-end;
    }

    .hero-mobile-site-nav span {
        width: 18%;
        max-width: 36px;
        min-width: 22px;
        height: 6px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.28);
    }

    .hero-mobile-site-hero {
        padding: 0.45rem 0.45rem;
        border-radius: 10px;
        border: 1px solid rgba(125, 211, 252, 0.18);
        background: linear-gradient(120deg, rgba(15, 23, 42, 0.68), rgba(30, 41, 59, 0.28));
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .hero-mobile-site-cta {
        display: inline-block;
        width: 40%;
        min-width: 70px;
        height: 17px;
        border-radius: 999px;
        margin-top: 0.08rem;
        background: linear-gradient(90deg, rgba(79, 70, 229, 0.42), rgba(56, 189, 248, 0.45));
        border: 1px solid rgba(129, 140, 248, 0.5);
    }

    .hero-mobile-site-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        flex-shrink: 0;
    }

    .hero-mobile-site-grid span {
        flex: 0 0 auto;
        width: calc(50% - 0.175rem);
        height: 28px;
        border-radius: 8px;
        background: linear-gradient(150deg, rgba(99, 102, 241, 0.1), rgba(56, 189, 248, 0.07));
        border: 1px solid rgba(148, 163, 184, 0.12);
    }

    /* Kursor w viewport — gest „przeciągnij w górę” zsynchronizowany z trackiem */
    .hero-mobile-cursor {
        position: absolute;
        left: 56%;
        bottom: 22%;
        width: 11px;
        height: 11px;
        margin-left: -5px;
        margin-bottom: -5px;
        border-radius: 50%;
        background: rgba(103, 232, 249, 0.95);
        box-shadow: 0 0 0 6px rgba(103, 232, 249, 0.12), 0 0 18px rgba(56, 189, 248, 0.55);
        animation: hero-mobile-cursor-scroll 5.6s cubic-bezier(0.45, 0, 0.25, 1) infinite;
        z-index: 6;
        pointer-events: none;
    }

    @keyframes hero-mobile-cursor-scroll {
        0%, 11% {
            transform: translate3d(0, 10px, 0);
            opacity: 0;
        }
        13% {
            transform: translate3d(0, 6px, 0);
            opacity: 0.95;
        }
        /* przeciągnięcie w górę = scroll w dół treści */
        14%, 21% {
            transform: translate3d(0, -6px, 0);
            opacity: 1;
        }
        22%, 72% {
            transform: translate3d(0, -36px, 0);
            opacity: 1;
        }
        78%, 82% {
            transform: translate3d(0, -12px, 0);
            opacity: 0.85;
        }
        88%, 100% {
            transform: translate3d(0, 10px, 0);
            opacity: 0;
        }
    }

    .hero h1 {
        margin-bottom: 0.95rem;
    }

    .hero p {
        margin-bottom: 1.65rem;
        line-height: 1.72;
    }

    .hero-curiosity-br {
        display: block;
    }

    .hero p.hero-curiosity {
        padding: 0.3rem 1.5rem;
        background: rgba(255,255,255,0.025);

    }

    .hero-curiosity-container {
        bottom: max(3rem, calc(env(safe-area-inset-bottom, 0px) + 3rem));
    }
}

.magnetic-btn {
    display: inline-flex; align-items: center; justify-content: center;
    margin: 1px;
    padding: 1.2rem 2.5rem; background: transparent; color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 100px;
    text-decoration: none; font-weight: 500; letter-spacing: 1.5px;
    text-transform: uppercase; font-size: 0.85rem;
    transition: background 0.3s, border-color 0.3s;
    position: relative; overflow: hidden;
}

.magnetic-btn::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--text-main); transform: scaleY(0); transform-origin: bottom;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1); z-index: -1;
}

.magnetic-btn:hover { color: var(--bg-color); border-color: var(--text-main); }
.magnetic-btn:hover::before { transform: scaleY(1); transform-origin: top; }
@media (max-width: 1024px) {
    .magnetic-btn:hover { color: var(--text-main); border-color: rgba(255, 255, 255, 0.2); }
    .magnetic-btn:hover::before { transform: scaleY(0); }
}
        .label-mobile { display: none; }

.torch-switch-wrap {
    position: absolute;
    right: max(3rem, 5vw);
    top: 50vh;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem 1rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(190, 224, 255, 0.25);
    background: linear-gradient(130deg, rgba(8, 13, 28, 0.9), rgba(15, 23, 42, 0.76));
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.4);
    backdrop-filter: blur(10px);
    z-index: 7500;
}

.torch-switch-label {
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-size: 0.72rem;
    font-weight: 500;
    color: #cbd5e1;
}

.torch-toggle {
    width: 92px;
    height: 50px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
    position: relative;
    padding: 5px;
    --torch-knob-on-x: 42px;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.torch-toggle-knob {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(150deg, #e2e8f0, #93c5fd);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45);
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.35s ease;
}

.torch-toggle.dragging .torch-toggle-knob {
    transition: none;
    transform: translateX(var(--torch-drag-x, 0px));
}

body.torch-mode .torch-toggle {
    background: rgba(30, 64, 175, 0.28);
    border-color: rgba(125, 211, 252, 0.55);
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.22);
}

body.torch-mode .torch-toggle-knob {
    transform: translateX(var(--torch-knob-on-x));
    background: linear-gradient(150deg, #dbeafe, #38bdf8);
}

body.torch-mode #source-underlay {
    opacity: 1;
}

/* Desktop torch: odsunięcie kodu od lewej krawędzi */
@media (hover: hover) and (pointer: fine) {
    body.torch-mode #source-underlay pre {
        padding-left: 2rem !important;
    }
}

@media (max-width: 1024px) {
    .torch-switch-wrap {
        position: fixed;
        top: 2rem;
        right: calc(2rem + 55px + 0.8rem);
        transform: translateY(0);
        padding: 0.6rem 0.85rem 0.6rem 1rem;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.1);
        background: rgba(255,255,255,0.05);
        box-shadow: none;
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        gap: 0.7rem;
    }
    .torch-switch-wrap .torch-switch-label {
        display: inline;
        font-size: 0.62rem;
        letter-spacing: 1.4px;
        color: #e2e8f0;
    }
    .torch-switch-wrap .torch-toggle {
        width: 72px;
        height: 40px;
        border-radius: 999px;
        padding: 4px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        backdrop-filter: blur(10px);
    }
    .torch-switch-wrap .torch-toggle-knob {
        width: 30px;
        height: 30px;
        background: linear-gradient(150deg, #93c5fd, #67e8f9);
    }
    body.torch-mode .torch-switch-wrap .torch-toggle {
        background: rgba(255,255,255,0.1);
        border-color: rgba(125, 211, 252, 0.55);
        box-shadow: 0 0 18px rgba(56, 189, 248, 0.2);
    }
    body.torch-mode .torch-switch-wrap .torch-toggle-knob {
        background: linear-gradient(150deg, #dbeafe, #38bdf8);
    }
    #source-underlay pre,
    #source-underlay code {
        tab-size: 2;
        -moz-tab-size: 2;
    }
    #source-underlay pre {
        padding-top: max(clamp(1rem, 2.2vw, 2rem), calc(2rem + 55px + 0.9rem)) !important;
    }
}

@media (max-width: 600px) {
    .label-desktop { display: none; }
    .label-mobile { display: inline; }
    .hero-cta { 
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.6rem;
    }
    .hero-cta > div { 
        flex: 0 0 auto; 
    }
    .hero-cta .magnetic-btn {
        padding: 0.85rem 1.4rem;
        font-size: 0.7rem;
        letter-spacing: 0.8px;
        white-space: nowrap;
    }
    .cta-footer {
        padding: 0.85rem 1.4rem;
        font-size: 0.7rem;
        letter-spacing: 0.8px;
    }
}

@media (max-width: 768px) {
    .hero {
        /* Balanced spacing: clear top chrome, but tighter hero rhythm. */
        padding-top: calc(7.5rem + env(safe-area-inset-top, 0px));
        gap: 0.95rem;
        padding-bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) + 7rem));
    }

    /* Slightly smaller mockup on phones. */
    .hero-mobile-creation-inner {
        max-width: min(16.5rem, 85%);
    }

    .hero-mobile-creation {
        margin-bottom: 0.05rem;
    }

    /* Tighter hero copy rhythm on mobile. */
    .hero h1 {
        margin-bottom: 0.42rem;
    }

    .hero p {
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }
}
/* --- PAGE CONSTRUCTION ANIMATIONS --- */
.reveal-left, .reveal-right, .reveal-bottom, .reveal-scale, .reveal-center {
    opacity: 0;
    will-change: transform, opacity; 
}

.reveal-left, .reveal-right, .reveal-bottom, .reveal-scale {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease-out;
}

.reveal-center { 
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease-out;
    transform: translateY(40px) scale(0.95); 
} 

.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-bottom { transform: translateY(40px); }
.reveal-scale { transform: scale(0.95); }

.visible { opacity: 1 !important; transform: translate(0, 0) scale(1) !important; }

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }


/* --- ABOUT ME SECTION --- */
.about { padding: 6rem 0;}

.section-title {
    font-size: clamp(1.8rem, 4vw, 3.2rem); 
    margin-bottom: 4rem;
    font-weight: 400; letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; gap: 4rem; align-items: center;} }

.about-left-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 25vh; 
    z-index: 10;
    align-self: start; 
}
@media (max-width: 1024px) {
    .about-left-sticky {
        position: static;
        top: auto;
        align-self: stretch;
    }
    .about-text .about-cta {
        align-self: center !important;
    }
}

.about-text {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem; 
}

.about-text p { 
    color: var(--text-muted); 
    font-size: 1.05rem; 
    line-height: 1.7; 
    font-weight: 300;
    margin: 0;
    position: relative;
    z-index: 1; 
    
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 2rem 2.5rem; 
    backdrop-filter: blur(10px);
}

.about-text .p-heading {
    display: block;
    text-align: center;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 2.5px;
    color: #ffffffaa;
    margin-bottom: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    margin-top: -3rem;
}

.about-text a:not(.magnetic-btn) {
    color: #6fa6ed; 
    font-weight: 300;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-text a::after {
    content: '';
    position: absolute;
    width: 100%; height: 1px;
    bottom: 0; left: 0;
    background-color: #6fa6ed;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.about-text a:hover:not(.magnetic-btn) { color: #6fa6ed; }
.about-text a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.about-photo { 
    width: var(--about-photo-size);
    height: var(--about-photo-size);
    margin: 0 auto; aspect-ratio: 1 / 1; 
    background: rgba(255,255,255,0.03); 
    position: relative; border: 1px solid rgba(255,255,255,0.05); 
    backdrop-filter: blur(10px); display: flex; align-items: center; 
    justify-content: center; border-radius: 50%; padding: 1rem; 
} 
@media (max-width: 768px) {
    .about-photo {
        --about-photo-size: min(78vw, 320px);
    }
}

.about-photo::before {
    content: '';
    position: absolute;
    top: -15%; left: -15%; width: 130%; height: 130%;
    background: conic-gradient(
        from 0deg at 50% 50%, 
        rgba(79, 70, 229, 0.5),   
        rgba(6, 182, 212, 0.5),   
        rgba(16, 185, 129, 0.5),  
        rgba(139, 92, 246, 0.5),  
        rgba(79, 70, 229, 0.5)    
    );
    border-radius: 50%;
    filter: blur(40px); 
    z-index: -1;        
    animation: aurora-spin 10s linear infinite;
    opacity: 0.8;
}

@keyframes aurora-spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); } 
    100% { transform: rotate(360deg) scale(1); }
}

.about-photo img { 
    width: 100%; height: 100%; object-fit: cover; opacity: 1; 
    transition: opacity 0.3s ease; border-radius: 50%; 
    position: relative; z-index: 1; 
    aspect-ratio: 1 / 1;
}


/* --- PORTFOLIO SECTION --- */
.portfolio {
    /* Desktop: stały odstęp od góry po skoku #work */
    padding-top: 4rem;
    padding-bottom: 12rem;
}

/* Mobile: przełącznik jest fixed pod górą — 2× wysokość całego wiersza (padding + toggle 40px) */
@media (max-width: 1024px) {
    .portfolio {
        padding-top: calc((40px + 1.2rem) * 2);
    }
}

.portfolio .section-title {
    margin-bottom: 0.5rem;
}

.portfolio-section-subtitle {
    margin: 0 auto 4rem;
    padding: 0 1rem;
    max-width: 38rem;
    text-align: center;
    font-size: clamp(1.05rem, 2.1vw, 1.45rem);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.02em;
}

.project-list { display: flex; flex-direction: column; gap: 12rem; }

/* Desktop: 2 kolumny — media w jednej komórce (flex: duży + miniatury, mały odstęp); tekst w stack — bez 2×2 grid, który rozciągał wiersz pod wysokość tekstu */
.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas: "proj-media proj-stack";
    gap: 6rem;
    align-items: start;
}

.project-item:nth-child(even) {
    direction: rtl;
}

.project-item:nth-child(even) > * {
    direction: ltr;
}

.project-col-media {
    grid-area: proj-media;
    display: flex;
    flex-direction: column;
    gap: clamp(0.45rem, 1vw, 0.75rem);
    min-width: 0;
}

.project-main-img {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: block;
}

.project-screenshots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0;
    min-width: 0;
}

.project-info-stack {
    grid-area: proj-stack;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-self: start;
    min-width: 0;
}

@media (max-width: 768px) {
    .project-item,
    .project-item:nth-child(even) {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "proj-main"
            "proj-head"
            "proj-shots"
            "proj-foot";
        gap: clamp(1.35rem, 4vw, 2rem);
        direction: ltr;
    }

    .project-col-media {
        display: contents;
    }

    .project-main-img {
        grid-area: proj-main;
    }

    .project-screenshots {
        grid-area: proj-shots;
    }

    .project-info-stack {
        display: contents;
    }

    .project-info-head {
        grid-area: proj-head;
    }

    .project-info-foot {
        grid-area: proj-foot;
    }
}

.screenshot-wrapper {
    background-color: #03141e;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3/2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

/* languagegames.fun: naturalny aspect ratio obrazka (bez pasków z object-fit w sztywnej ramce) */
.project-screenshots--rect-thumbs .screenshot-wrapper {
    aspect-ratio: auto;
    height: auto;
    align-items: flex-start;
    justify-content: center;
}

.project-screenshots--rect-thumbs .screenshot-wrapper img {
    width: 100%;
    height: auto;
    object-fit: unset;
}

.screenshot-wrapper:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.3);
}

.screenshot-wrapper img,
.screenshot-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border: none;
}

@media (max-width: 768px) {
    .project-screenshots {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
}

.project-info-head h3 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.project-info-head p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0;
    line-height: 1.9;
}

.project-features {
    list-style: none;
    margin: 0 0 2.5rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.project-features li {
    position: relative;
    padding-left: 1.8rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 300;
}

.project-features li strong {
    color: #ffffff;
    font-weight: 500;
}

.project-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8l3 3 5-5' stroke='%23818cf8' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.project-features li {
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .project-features li {
        font-size: 0.9rem;
    }
}

.tech-stack { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2rem; }
.tech-stack span {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #818cf8;
    background: rgba(129, 140, 248, 0.08); padding: 0.4rem 1rem;
    border-radius: 20px; border: 1px solid rgba(129, 140, 248, 0.15);
    font-weight: 500;
}
@media (max-width: 600px) {
    .tech-stack { gap: 0.5rem; }
    .tech-stack span {
        font-size: 0.65rem;
        letter-spacing: 0.6px;
        padding: 0.3rem 0.7rem;
    }
}

/* --- PROCESS (JAK TO DZIAŁA) SECTION --- */
.process { padding: 8rem 0; }

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.process-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    position: relative;
    backdrop-filter: blur(10px);
    transition: transform 0.4s ease, background 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.process-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.04);
}

.process-number {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03); 
    z-index: 0;
    line-height: 1;
    pointer-events: none;
}

.process-card h3 {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #818cf8;
    margin-bottom: 1rem;
    font-weight: 500;
}

.process-card p {
    position: relative;
    z-index: 1;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 300;
    margin: 0;
}

/* --- PRICING SECTION --- */
.pricing { padding: 8rem 0; }

.pricing-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.pricing-disclaimer {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 3rem;
    font-weight: 300;
    line-height: 1.6;
    opacity: .6;
}

.pricing-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 4rem;
    backdrop-filter: blur(10px);
    max-width: 800px;
    margin: 0 auto;
}

/* --- MEDIA LIGHTBOX --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 3, 3, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9995;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay[aria-hidden="false"] {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
    z-index: 9996;
    line-height: 0;
    padding-bottom: 4px;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Enable pointer cursor for media that can be clicked */
.project-main-img,
.project-screenshots img,
.project-screenshots video {
    cursor: pointer;
}
.slider-container { 
    margin-bottom: 4rem; 
}

.slider-track-wrap {
    position: relative;
    width: 100%;
    height: 30px; 
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.custom-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
    pointer-events: none;
}

.slider-ticks {
    position: absolute;
    top: 50%;
    left: 13px; 
    right: 13px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 2;
    pointer-events: none;
}

.tick {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent; 
    position: relative;
    z-index: 3;
    outline: none;
    margin: 0;
    cursor: pointer;
}

.slider::-webkit-slider-runnable-track { background: transparent; border: none; }
.slider::-moz-range-track { background: transparent; border: none; }

/* Dynamicznie nadpisywany kolor kropli i cienia z poziomu JS */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--thumb-color, #818cf8);
    cursor: pointer;
    box-shadow: 0 0 15px var(--thumb-shadow, rgba(129, 140, 248, 0.5));
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); 
}

.slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--thumb-color, #818cf8);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 15px var(--thumb-shadow, rgba(129, 140, 248, 0.5));
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider::-moz-range-thumb:hover { transform: scale(1.2); }

/* Etykiety suwaka (3 elementy z flex i text-align dla wyrównania) */
.slider-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    opacity: 0.7;
}

.slider-labels span {
    flex: 1;
}

.slider-labels span:nth-child(1) { text-align: left; }
.slider-labels span:nth-child(2) { text-align: center; }
.slider-labels span:nth-child(3) { text-align: right; }

.pricing-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-height: 200px;
    opacity: 1;
    transition: opacity 0.22s ease;
    will-change: opacity;
}
.pricing-result.pricing-fade-out { opacity: 0; }
.pricing-result.pricing-fade-in { opacity: 1; }

.pricing-result h3 {
    font-size: 1.8rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.pricing-result p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    font-weight: 300;
    max-width: 600px;
}

.price-tag {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 200;
    color: #818cf8;
    margin-top: 1rem;
    background: -webkit-linear-gradient(110deg, #818cf8, #bee0ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 600px) {
    .pricing-card {
        padding: 3rem 1rem;
    }
    .pricing-result {
        align-items: stretch;
    }
    #pricing-desc {
        max-width: none;
        width: 100%;
    }
}

/* --- MOBILE TORCH LENS --- */
#torch-lens {
    display: none;
    position: fixed;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1.5px solid rgba(190, 224, 255, 0.5);
    box-shadow: 0 0 22px rgba(190, 224, 255, 0.18), inset 0 0 30px rgba(190, 224, 255, 0.05);
    pointer-events: auto;
    z-index: 7000;
    transform: translate(-50%, -50%);
    touch-action: none;
    transition: opacity 0.25s ease;
}

#torch-lens::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(190, 224, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.5), 0 0 10px rgba(190, 224, 255, 0.5);
}

@media (hover: none) and (pointer: coarse) {
    body.torch-mode #torch-lens {
        display: block;
        left: var(--torch-x, 50vw);
        top: var(--torch-y, 50vh);
        transition: opacity 0.12s ease-out;
    }
    body.torch-mode #torch-lens.lens-scrolling {
        opacity: 0;
        transition: opacity 0.08s ease-in;
    }
}

/* --- FOOTER --- */
.footer { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: calc(100vh - 7rem); text-align: center; padding: 4rem 0; }
.footer h2 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 2rem; font-weight: 400; letter-spacing: -0.02em; }

.cta-contact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
}
.cta-contact a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}
.cta-contact a:hover {
    color: var(--text-main);
}
@media (max-width: 1024px) {
    .cta-contact {
        flex-direction: column;
        gap: 0.5rem;
    }
    .footer {
        min-height: calc(100vh - 7rem);
        justify-content: center;
        padding: 3rem 0 1rem;
    }
    .footer-legal {
        margin-top: 0.75rem;
        padding: 1.25rem 2rem 1.5rem;
    }
}

a { color: hsl(219, 100%, 67%); text-decoration: none; }

/* --- CONTACT FORM OVERLAY (STRONY) --- */
/* ~2s fade in → ~2s fade out → ~6s przerwa (cykl 10s) */
@keyframes strony-contact-alive {
    0%,
    40%,
    100% {
        border-color: rgba(255, 255, 255, 0.07);
        box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.05);
    }
    20% {
        border-color: rgba(167, 139, 250, 0.4);
        box-shadow:
            0 0 0 1px rgba(167, 139, 250, 0.14),
            0 0 28px rgba(56, 189, 248, 0.44),
            0 0 52px rgba(167, 139, 250, 0.24),
            0 0 72px rgba(56, 189, 248, 0.1);
    }
}

#strony-contact-button {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 7600;
    padding: 0.88rem 2rem;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    color: var(--text-main);
    font-family: 'Jost', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.85px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: none;
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.35s ease;
}
#strony-contact-button.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#strony-contact-button:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}

#strony-form-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 7700;
    background: rgba(3, 3, 3, 0.78);
    padding: 1rem;
}
#strony-form-overlay.open { display: flex; }

#strony-form-card {
    width: min(960px, 96vw);
    height: min(12cm, 92vh);
    border-radius: 24px;
    border: 1px solid rgba(190, 224, 255, 0.2);
    /* background: linear-gradient(140deg, rgba(7, 14, 30, 0.97), rgba(6, 11, 23, 0.96)); */
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.48);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 1:1 columns for photo & form */
    backdrop-filter: blur(5px);
}

#strony-form-photo-col {
    border-right: 1px solid rgba(190, 224, 255, 0.12);
    position: relative;
    overflow: hidden;
}
#strony-form-photo-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
#strony-form-photo-col::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(3, 8, 18, 0.05), rgba(3, 8, 18, 0.36));
    pointer-events: none;
}

#strony-form-content-col {
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.2rem 1.2rem;
    min-width: 0;
}

#strony-form-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
#strony-form-title {
    font-size: clamp(1.06rem, 2vw, 1.28rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: #e8eefb;
}
#strony-form-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    color: #e8eefb;
    font-size: 1.4rem;
    line-height: 1;
    transition: border-color 0.2s ease, background 0.2s ease;
}
#strony-form-close:hover {
    border-color: rgba(190, 224, 255, 0.45);
    background: rgba(255, 255, 255, 0.11);
}

#strony-form-selection,
.strony-form-panel {
    display: none;
    flex-direction: column;
    gap: 0.78rem;
    margin-top: 0.4rem;
}
#strony-form-selection.active,
.strony-form-panel.active { display: flex; }

#strony-form-selection p,
#strony-form-direct p,
#strony-form-sent p {
    color: #d4ddeb;
    line-height: 1.6;
    font-weight: 300;
    font-size: 0.97rem;
}

.strony-form-option,
.strony-form-back,
#strony-fSendButton {
    border-radius: 12px;
    border: 1px solid rgba(190, 224, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: #edf3ff;
    padding: 0.8rem 0.95rem;
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.strony-form-option:hover,
.strony-form-back:hover,
#strony-fSendButton:hover {
    border-color: rgba(190, 224, 255, 0.45);
    background: rgba(255, 255, 255, 0.11);
}
#strony-fSendButton {
    text-align: center;
    font-weight: 500;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.36), rgba(56, 189, 248, 0.26));
}
.strony-form-back { text-align: center; font-size: 0.86rem; }

.strony-form-buttons {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.2rem;
}
.strony-form-buttons #strony-fSendButton,
.strony-form-buttons .strony-form-back {
    flex: 1 1 0;
    text-align: center;
}

#strony-form-form label {
    font-size: 0.9rem;
    color: #d9dfec;
}
#strony-form-form input,
#strony-form-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(190, 224, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.72rem 0.82rem;
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
}
#strony-form-form input:focus,
#strony-form-form textarea:focus {
    outline: none;
    border-color: rgba(190, 224, 255, 0.55);
    background: rgba(255, 255, 255, 0.13);
}
#strony-form-form textarea {
    min-height: 110px;
    resize: vertical;
}

.strony-consent-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #dbe4f2;
    margin-top: 0.1rem;
}
.strony-consent-row input { width: auto !important; }

.strony-sent-ok {
    color: #4ade80;
    font-size: 1.15rem;
    margin-top: 0.4rem;
}

@media (max-width: 900px) {
    #strony-form-card {
        width: min(660px, 96vw);
        min-height: auto;
        display: block;
    }
    #strony-form-photo-col {
        display: none;
    }
    #strony-form-content-col {
        padding: 1rem;
    }
    #strony-contact-button {
        right: 1rem;
        bottom: 1rem;
        font-size: 0.72rem;
        padding: 0.82rem 1.15rem;
    }

    #strony-contact-button.visible {
        animation: strony-contact-alive 10s ease-in-out infinite;
    }

    #strony-contact-button:hover {
        animation-play-state: paused;
        background: rgba(255,255,255,0.06);
        border-color: rgba(186, 230, 253, 0.45);
        box-shadow:
            0 0 0 1px rgba(56, 189, 248, 0.2),
            0 0 32px rgba(56, 189, 248, 0.48),
            0 0 56px rgba(167, 139, 250, 0.28);
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    #strony-contact-button.visible {
        animation: none;
        border-color: rgba(125, 211, 252, 0.28);
        box-shadow:
            0 0 20px rgba(56, 189, 248, 0.28),
            0 0 40px rgba(99, 102, 241, 0.14);
    }
}
