:root {
    --navy: #0f1b3d;
    --navy-dark: #0a1128;
    --blue: #3b5bdb;
    --blue-light: #e8edff;
    --bg: #f3f5f9;
    --bg-card: #ffffff;
    --text: #1a1f3a;
    --text-mid: #5a5f7a;
    --text-light: #8a8fa5;
    --border: #e5e8f0;
    --shadow-sm: 0 1px 3px rgba(15,27,61,0.06);
    --shadow: 0 4px 20px rgba(15,27,61,0.07);
    --shadow-lg: 0 8px 40px rgba(15,27,61,0.1);
    --focus-ring: 0 0 0 3px rgba(59,91,219,0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body.menu-open { overflow: hidden; }

a, button, input, textarea {
    -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    box-shadow: var(--focus-ring);
}

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    transition: all 0.35s ease;
}

.nav.scrolled {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 12px rgba(0,0,0,0.06);
    padding: 0.65rem 2rem;
}

.nav-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
}

.nav-logo img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
}

.nav-logo-abbr {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--navy);
    transition: color 0.3s;
    letter-spacing: 0.08em;
    line-height: 1;
}

.nav-logo-full {
    font-weight: 400;
    font-size: 0.6rem;
    color: var(--navy);
    transition: color 0.3s;
    letter-spacing: 0.03em;
    line-height: 1.2;
    opacity: 0.75;
}

.nav:not(.scrolled) .nav-logo-abbr,
.nav:not(.scrolled) .nav-logo-full { color: #fff; }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.01em;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.nav:not(.scrolled) .nav-links a { color: rgba(255,255,255,0.85); }
.nav:not(.scrolled) .nav-links a:hover { color: #fff; }
.nav.scrolled .nav-links a:hover { color: var(--blue); }

.nav-links .nav-cta {
    background: var(--blue);
    color: #fff !important;
    padding: 0.5rem 1.3rem;
    border-radius: 6px;
    transition: background 0.3s, transform 0.2s;
}

.nav-links .nav-cta:hover {
    background: #2b4bc9;
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    border: none;
    background: transparent;
    position: relative;
    z-index: 210;
}

.hamburger span {
    width: 24px; height: 2px;
    background: var(--navy);
    border-radius: 999px;
    transform-origin: center;
    transition: transform 0.28s ease, opacity 0.2s ease, background 0.3s ease;
}

.nav:not(.scrolled) .hamburger span { background: #fff; }

.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); }

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1a2d5e 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 80px;
    background: var(--bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 8rem 2rem 6rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes underlineSlide {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.hero-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.2rem;
    animation: fadeUp 0.6s ease 0.05s both;
}

.hero h1 {
    font-family: 'Libre Baskerville', serif;
    font-size: 2.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    animation: fadeUp 0.6s ease 0.18s both;
}

.hero-underline {
    position: relative;
    white-space: nowrap;
}

.hero-underline::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--blue);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    animation: underlineSlide 0.45s ease 0.85s both;
}

.hero-desc {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 2.2rem;
    max-width: 500px;
    animation: fadeUp 0.6s ease 0.32s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeUp 0.6s ease 0.48s both;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, border-color 0.28s ease, color 0.28s ease;
    border: none;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

.btn-primary:hover {
    background: #2b4bc9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,91,219,0.35);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    border-color: #fff;
    color: #fff;
}

.hero-visual {
    display: flex;
    justify-content: center;
    animation: fadeUp 0.7s ease 0.15s both;
}

.hero-img-wrap {
    width: 320px; height: 320px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: floatSoft 7s ease-in-out infinite;
}

.hero-img-rect {
    width: 420px;
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    box-shadow: 0 24px 70px rgba(0,0,0,0.35);
    animation: floatSoft 7s ease-in-out infinite;
}

.hero-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 5.5rem 2rem;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.section-subtitle {
    color: var(--text-mid);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto;
}

/* ===== USŁUGI - alternating layout ===== */
.services { background: var(--bg); }

.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.service-row:last-child { margin-bottom: 0; }

.service-row.reverse .service-img { order: 2; }
.service-row.reverse .service-text { order: 1; }

.service-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.service-img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.service-row:hover .service-img img { transform: scale(1.03); }

.service-num {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

.service-text h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.8rem;
}

.service-text p {
    color: var(--text-mid);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* ===== STANDARD WSPÓŁPRACY ===== */
.cooperation {
    background: var(--bg);
}

.coop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.coop-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.coop-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.coop-icon {
    width: 44px; height: 44px;
    background: var(--blue-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.coop-icon {
    transition: transform 0.3s ease;
}

.coop-card:hover .coop-icon {
    transform: translateY(-2px);
}

.coop-icon svg {
    width: 22px; height: 22px;
    color: var(--blue);
    stroke: var(--blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.coop-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.coop-card p {
    color: var(--text-mid);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ===== FAQ ===== */
.faq-section { background: #fff; }

.faq-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.faq-left h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 2rem;
    line-height: 1.25;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 1.1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    transition: color 0.3s ease;
    gap: 1rem;
}

.faq-q:hover { color: var(--blue); }

.faq-arrow {
    width: 20px; height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--text-light);
}

.faq-item.active .faq-arrow {
    transform: rotate(90deg);
    color: var(--blue);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-a {
    max-height: 250px;
    padding-bottom: 1.1rem;
}

.faq-a p {
    color: var(--text-mid);
    font-size: 0.9rem;
    line-height: 1.7;
}

.faq-img {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-img img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    display: block;
}

/* ===== KONTAKT ===== */
.contact {
    background: linear-gradient(160deg, #1a2548 0%, var(--navy-dark) 100%);
    position: relative;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-left h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 1.2rem;
}

.contact-left > p {
    color: rgba(255,255,255,0.55);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

.contact-photo {
    width: 100%;
    max-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
}

.contact-photo img {
    width: 100%;
    display: block;
}

.contact-form {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 2rem;
}

.form-row {
    margin-bottom: 0.85rem;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--text-light);
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,91,219,0.12);
}

.form-row textarea {
    height: 130px;
    resize: vertical;
}

.form-btn {
    background: var(--blue);
    color: #fff;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.3rem;
}

.form-btn:hover {
    background: #2b4bc9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59,91,219,0.3);
}

.form-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-msg {
    margin-top: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-size: 0.88rem;
    display: none;
    animation: fadeUp 0.35s ease both;
}

.form-msg.ok {
    display: block;
    background: rgba(76,175,80,0.12);
    color: #4caf50;
    border: 1px solid rgba(76,175,80,0.25);
}

.form-msg.err {
    display: block;
    background: rgba(244,67,54,0.12);
    color: #e53935;
    border: 1px solid rgba(244,67,54,0.25);
}

.form-row--rodo {
    margin-top: 0.4rem;
}

.rodo-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
}

.rodo-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 2px;
    accent-color: var(--blue);
    cursor: pointer;
}

.rodo-label span {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
}

.rodo-label span a {
    color: rgba(255,255,255,0.75);
    text-decoration: underline;
}

/* ===== O MNIE ===== */
.about {
    background: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: center;
}

.about-photo {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-photo img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 0.3rem;
}

.about-role {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 1.3rem;
}

.about-text p {
    color: var(--text-mid);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 0.8rem;
}

.about-contact {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.about-contact a {
    color: var(--navy);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.about-contact a:hover {
    color: var(--blue);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--navy-dark);
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p, .footer span {
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
}

.footer a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.footer a:hover { color: var(--blue); }

.footer-links { display: flex; gap: 1.5rem; }

.footer-note {
    width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.74rem;
    letter-spacing: 0.01em;
    margin-top: 0.35rem;
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(10,17,40,0.94);
    backdrop-filter: blur(12px);
    z-index: 200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: color 0.25s ease, opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.open a {
    opacity: 0.9;
    transform: none;
}

.mobile-menu.open a:nth-child(2) { transition-delay: 0.06s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.18s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.24s; }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.30s; }

.mobile-menu a:hover {
    color: var(--blue);
    opacity: 1;
    transform: translateY(-1px);
}

.mobile-close {
    position: absolute;
    top: 1.2rem; right: 1.5rem;
    background: none; border: none;
    color: #fff; font-size: 1.8rem;
    cursor: pointer;
}

.has-motion .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 7rem;
    }
    .hero-visual { order: -1; }
    .hero-img-wrap { width: 200px; height: 200px; }
    .hero-img-rect { width: 260px; height: 300px; border-radius: 14px; }
    .hero h1 { font-size: 2.1rem; }
    .hero-desc { margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }

    .service-row { grid-template-columns: 1fr; gap: 1.5rem; }
    .service-row.reverse .service-img { order: 0; }
    .service-row.reverse .service-text { order: 0; }
    .service-img img { height: 220px; }

    .coop-grid { grid-template-columns: 1fr 1fr; }

    .faq-layout { grid-template-columns: 1fr; }
    .faq-img { display: none; }

    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-text .section-title { text-align: center; }
    .about-photo { max-width: 260px; margin: 0 auto; }
    .about-contact { justify-content: center; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }

    .nav {
        padding: 0.9rem 1rem;
    }

    .nav.scrolled {
        padding: 0.65rem 1rem;
    }

    .hero h1 { font-size: 1.75rem; }
    .section { padding: 3.5rem 1.25rem; }
    .section-title { font-size: 1.7rem; }

    .coop-grid { grid-template-columns: 1fr; }

    .contact-form { padding: 1.5rem; }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--navy);
    color: #fff;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-inner p {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
    min-width: 250px;
}

.cookie-inner a {
    color: var(--blue-light);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cookie-btn:hover { opacity: 0.85; }

.cookie-btn--accept {
    background: var(--blue);
    color: #fff;
}

.cookie-btn--reject {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

@media (max-width: 600px) {
    .cookie-inner {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}
