/* ===================================================
   BITE — Global Stylesheet
   =================================================== */

/* ---------------------------------------------------
   1. CSS CUSTOM PROPERTIES
   --------------------------------------------------- */

:root {
    /* Colors */
    --bg: #EBE4D6;
    --surface: #fffdf9;
    --surface-2: #efe7dc;
    --text: #191713;
    --muted: #6f675d;
    --line: rgba(25, 23, 19, 0.1);
    --accent: #1c1a17;
    --accent-2: #8f775f;
    --primary: #f73b20;
    --primary-dark: #d42e16;
    --primary-rgb: 247, 59, 32;
    --card: rgba(255, 253, 249, 0.9);
    --shadow: 0 20px 60px rgba(25, 23, 19, 0.08);

    /* Color primitives (for transparency layers) */
    --color-black-rgb: 25, 23, 19;
    --color-white-rgb: 255, 255, 255;
    --color-surface-rgb: 255, 253, 249;
    --color-pure-black: #000;
    --color-pure-white: #fff;

    /* Media placeholder gradient */
    --media-gradient-start: #c4b29f;
    --media-gradient-end: #8e755f;

    /* Border radius */
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --radius-pill: 999px;

    /* Layout */
    --container: 1400px;

    /* Typography — font families */
    --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    --font-serif: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;

    /* Typography — font sizes */
    --text-hero: clamp(3.2rem, 8vw, 7rem);
    --text-hero-sub: clamp(3rem, 6vw, 5.5rem);
    --text-xl: clamp(2.6rem, 5vw, 5rem);
    --text-lg: clamp(2rem, 3.4vw, 3.6rem);
    --text-lg-contact: clamp(2.4rem, 4vw, 4.4rem);
    --text-md: clamp(1.6rem, 2.1vw, 2.35rem);
    --text-md-contact: clamp(1.35rem, 2vw, 1.8rem);
    --text-md-block: clamp(1.5rem, 2vw, 2.1rem);
    --text-body-lg: 1.08rem;
    --text-body: 1rem;
    --text-label: 0.7rem;
    --text-nav: 0.95rem;
    --text-badge: 0.78rem;
    --text-legal: 0.84rem;

    /* Typography — font weights */
    --weight-regular: 400;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;

    /* Typography — letter spacing */
    --tracking-label: 0.2em;
    --tracking-badge: 0.08em;
    --tracking-hero: -0.05em;
    --tracking-xl: -0.04em;
    --tracking-lg: -0.035em;
    --tracking-md: -0.03em;

    /* Typography — line heights */
    --leading-hero: 0.9;
    --leading-hero-sub: 0.94;
    --leading-xl: 0.96;
    --leading-lg: 1.02;
    --leading-md: 1.08;
    --leading-body: 1.55;
}


/* ---------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(var(--color-white-rgb), 0.6), transparent 32%),
        var(--bg);
    line-height: var(--leading-body);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

h1,
h2,
h3,
h4,
p {
    margin: 0;
}


/* ---------------------------------------------------
   3. LAYOUT
   --------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: clamp(24px, 4vw, 80px);
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 28px;
}


/* ---------------------------------------------------
   4. HEADER & NAVIGATION
   --------------------------------------------------- */

.site-header {
    padding: 20px;
}

.site-header--sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 18px 0 0;
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 4px 48px;
    border: 1px solid rgba(var(--color-black-rgb), 0.08);
    border-radius: var(--radius-pill);
    background: rgba(var(--color-surface-rgb), 0.78);
    box-shadow: 2px 2px 12px rgba(var(--color-black-rgb), 0.03);
    backdrop-filter: blur(4px);
}

.nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    font-size: var(--text-nav);
    font-weight: var(--weight-semibold);
    color: var(--text);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav a:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    transform: translateY(-1px);
}


/* ---------------------------------------------------
   5. SECTIONS
   --------------------------------------------------- */

.section {
    padding: 48px 0;
}

.section-animate {
    opacity: 0;
    transform: translate3d(0, 32px, 0);
    filter: blur(10px);
    transition:
        opacity 0.9s ease,
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.9s ease;
    will-change: opacity, transform, filter;
}

.section-animate.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
}


/* ---------------------------------------------------
   6. TYPOGRAPHY
   --------------------------------------------------- */

.headline-hero {
    font-family: var(--font-serif);
    font-size: var(--text-hero);
    line-height: var(--leading-hero);
    letter-spacing: var(--tracking-hero);
    color: var(--primary);
}

.headline-hero--sub {
    font-size: var(--text-hero-sub);
    line-height: var(--leading-hero-sub);
}

.headline-lg {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    line-height: var(--leading-lg);
    letter-spacing: var(--tracking-lg);
    color: var(--primary);
}

.headline-lg--contact {
    font-size: var(--text-lg-contact);
    line-height: 0.98;
    letter-spacing: var(--tracking-xl);
}

.headline-md {
    font-family: var(--font-serif);
    font-size: var(--text-md);
    line-height: var(--leading-md);
    letter-spacing: var(--tracking-md);
    color: var(--primary);
}

.headline-md--contact {
    font-size: var(--text-md-contact);
}

.body-lg {
    font-size: var(--text-body-lg);
    color: var(--muted);
    max-width: 58ch;
}

.body {
    color: var(--muted);
    font-size: var(--text-body);
}


/* ---------------------------------------------------
   7. BUTTONS
   --------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-weight: var(--weight-semibold);
    transition: 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--color-pure-white);
}

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

.btn-secondary {
    border-color: var(--line);
    background: rgba(var(--color-white-rgb), 0.5);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--color-pure-white);
    transform: translateY(-1px);
}


/* ---------------------------------------------------
   8. MEDIA / IMAGE CONTAINERS
   --------------------------------------------------- */

.media {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--media-gradient-start), var(--media-gradient-end));
    box-shadow: var(--shadow);
    min-height: 280px;
}

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


/* ---------------------------------------------------
   9. HOME PAGE — HERO
   --------------------------------------------------- */

.hero-top {
    padding-top: 120px;
}

.hero-center {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.hero-description {
    max-width: 640px;
    margin: 22px auto 0;
}

.hero-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero-main-image {
    margin-top: 44px;
    width: 100%;
    height: clamp(360px, 52vw, 760px);
    border-radius: var(--radius-lg);
}


/* ---------------------------------------------------
   10. HOME PAGE — PHILOSOPHY GAP (spacer)
   --------------------------------------------------- */

.philosophy-gap {
    grid-column: span 1;
}


/* ---------------------------------------------------
   11. HOME PAGE — INTEGRATION SECTION
   --------------------------------------------------- */

.integration-left {
    grid-column: 1 / span 5;
    align-self: start;
}

.integration-right {
    grid-column: 7 / span 6;
    align-self: start;
}

.integration-photo {
    margin-top: 48px;
    width: 100%;
    height: clamp(360px, 50vw, 640px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

/* ---------------------------------------------------
   12. HOME PAGE — VISIT SECTION
   --------------------------------------------------- */

.visit-intro {
    max-width: 820px;
    margin: 0 auto 44px;
    text-align: center;
}

.cta-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

/* ---------------------------------------------------
   13. SUBPAGE — HERO / INTRO
   --------------------------------------------------- */

.subpage-hero-copy {
    margin-bottom: 44px;
}

.cta-row--left {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

/* ---------------------------------------------------
   14. CONTACT PAGE
   --------------------------------------------------- */

.contact-left {
    grid-column: span 5;
    padding-right: 24px;
}

.contact-right {
    grid-column: span 7;
}

.contact-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.benefit-item {
    display: block;
    gap: 18px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.benefit-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Form */

.form-card {
    background: var(--surface);
    border: 1px solid rgba(var(--color-black-rgb), 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 0.9rem;
    font-weight: var(--weight-semibold);
    color: var(--text);
}

.input,
.textarea,
.select {
    width: 100%;
    border: 1px solid rgba(var(--color-black-rgb), 0.12);
    background: var(--color-pure-white);
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.select {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236f675d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.input,
.select {
    min-height: 54px;
}

.textarea {
    min-height: 150px;
    resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.legal-copy {
    margin-top: 18px;
    font-size: var(--text-legal);
    color: var(--muted);
}


/* ---------------------------------------------------
   15. STACK SCROLL — zdjęcia stackowane + tekst
   --------------------------------------------------- */

.stk-outer {
    padding-top: 80px;
    padding-bottom: 0;
}

/* Scroll-container: 3 sloty × 100vh = przestrzeń do przewijania */
.stk-scroll-container {
    position: relative;
    height: calc(3 * 100vh);
}

.stk-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: visible;
}

/* 5 | 2 | 5 kolumn */
.stk-layout {
    display: grid;
    grid-template-columns: 7fr 1fr 4fr;
    gap: 0;
    align-items: center;
    width: 100%;
}

.stk-gap { grid-column: 2; }

/* ---- LEWA: stos zdjęć ---- */
.stk-images {
    position: relative;
    /* Wysokość = aspect ratio 4:3 odzwierciedlone */
    aspect-ratio: 4 / 3;
    grid-column: 1;
}

.stk-img {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    /* transform-origin: top — zdjęcia cofają się w górę gdy są za aktywnym */
    transform-origin: top center;
    transform: translateY(var(--stk-y, 0px)) scale(var(--stk-scale, 1));
    opacity: var(--stk-op, 1);
    z-index: var(--stk-z, 1);
    transition:
        transform 0.05s linear,
        z-index 0s;
    will-change: transform;
}

.stk-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Czarna apla — opacity sterowane przez JS */
.stk-img__overlay {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: var(--stk-ov-op, 0);
    transition: opacity 0.05s linear;
    pointer-events: none;
}

/* ---- PRAWA: wrapper na nagłówek + listę ---- */
.stk-right-col {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stk-heading-wrap {
    padding-bottom: 32px;
}

/* ---- PRAWA: lista tekstów ---- */
.stk-items {
    grid-column: unset; /* teraz dziedziczy kolumnę z .stk-right-col */
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stk-item {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.stk-item:last-child {
    border-bottom: 1px solid var(--line);
}

.stk-item__title {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0;
    /* Sterowane przez JS: --stk-title-color */
    color: var(--stk-title-color, var(--muted));
    transition: color 0.45s ease;
    cursor: default;
}

.stk-item__desc {
    font-size: var(--text-body-lg);
    color: var(--muted);
    line-height: var(--leading-body);
    margin: 0;
    /* Sterowane przez JS: --stk-desc-h, --stk-desc-op */
    max-height: var(--stk-desc-h, 0px);
    opacity: var(--stk-desc-op, 0);
    overflow: hidden;
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity    0.4s ease;
}

/* Aktywny item — marginTop na desc żeby nie skakało */
.stk-item.is-stk-active .stk-item__desc {
    margin-top: 14px;
}

/* Mobile-only elementy — schowane na desktopie */
.stk-item__mob-bg,
.stk-item__mob-overlay {
    display: none;
}

/* ---- MOBILE (≤768px): sticky scroll z kartami stackowanymi ---- */
@media (max-width: 768px) {
    /* Nagłówek przed scroll-containerem na mobile */
    .stk-outer {
        display: flex;
        flex-direction: column;
    }

    .stk-heading-wrap {
        order: -1;
        padding: 80px 24px 0;
        text-align: center;
    }

    .stk-right-col {
        display: contents; /* rozpuść wrapper, dzieci wracają do flow */
    }

    /* Scroll container: 3 sloty × 90vh */
    .stk-scroll-container {
        height: calc(3 * 90vh);
    }

    .stk-sticky {
        position: sticky;
        top: 0;
        height: 100svh;
        display: block;
        overflow: visible;
        padding: 0;
    }

    /* Ukryj desktop layout */
    .stk-layout {
        display: block;
        padding: 0;
    }

    .stk-gap { display: none; }
    .stk-images { display: none; }

    /* Kontener i layout — usuń padding żeby karty były edge-to-edge */
    .stk-sticky .container {
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Lista — absolute do sticky viewportu, nie do flow */
    .stk-items {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100svh;
        display: block;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    /* Karta: absolute, wycentrowana, 72svh */
    .stk-item {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 72svh !important;
        border-top: none !important;
        border-bottom: none !important;
        padding: 0 !important;
        border-radius: var(--radius-lg);
        overflow: hidden;
        transform-origin: center center;
        transform: translateY(var(--stk-mob-y, 0px)) scale(var(--stk-mob-scale, 1));
        z-index: var(--stk-mob-z, 1);
        pointer-events: var(--stk-mob-pe, auto);
        transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    }

    /* Zdjęcie tła — beżowe tło karty + zdjęcie przez ::after z paddingiem */
    .stk-item__mob-bg {
        display: block;
        position: absolute;
        inset: 0;
        background: var(--bg);
    }

    /* Zdjęcie */
    .stk-item__mob-bg::after {
        content: '';
        position: absolute;
        inset: 12px;
        background-image: var(--stk-mob-img);
        background-size: cover;
        background-position: center;
        border-radius: calc(var(--radius-lg) - 8px);
    }

    /* Ciemny overlay — jak na desktopie */
    .stk-item__mob-bg::before {
        content: '';
        position: absolute;
        inset: 12px;
        background: #000;
        opacity: var(--stk-mob-ov, 0);
        border-radius: calc(var(--radius-lg) - 8px);
        z-index: 1;
        pointer-events: none;
    }

    /* Desktop title/desc — ukryte */
    .stk-item__title,
    .stk-item__desc {
        display: none !important;
    }

    /* Biała apla z tekstem */
    .stk-item__mob-overlay {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        left: 24px;
        right: 24px;
        bottom: 24px;
        background: rgba(255, 253, 249, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-radius: var(--radius-md);
        padding: 20px 20px 18px;
        opacity: var(--stk-mob-desc-op, 0);
        transition: opacity 0.35s ease;
        z-index: 2;
    }

    .stk-item__mob-title {
        font-family: var(--font-serif);
        font-size: clamp(1rem, 4vw, 1.2rem);
        line-height: 1.2;
        letter-spacing: -0.02em;
        color: var(--text);
        margin: 0;
    }

    .stk-item__mob-desc {
        font-size: 0.9rem;
        color: var(--muted);
        line-height: 1.5;
        margin: 0;
    }

    /* Zwinięta karta — tylko rąbek, overlay schowany */
    .stk-item.is-stk-mob-collapsed .stk-item__mob-overlay {
        opacity: 0 !important;
    }
}

/* ---------------------------------------------------
   16. REVEAL SECTION — scroll reveal z zdjęciem
   --------------------------------------------------- */

.reveal-section {
    position: relative;
}

.reveal-scroll-tunnel {
    /* Wysokość ustawiana przez JS: 3 × 100vh */
}

.reveal-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.reveal-stage {
    position: relative;
    width: 100%;
    max-width: var(--container);
    padding-inline: clamp(24px, 4vw, 80px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Zdjęcie — pod tekstem */
.reveal-img-wrap {
    position: absolute;
    /* 12 kolumn = pełna szerokość kontenera */
    left: clamp(24px, 4vw, 80px);
    right: clamp(24px, 4vw, 80px);
    top: 50%;
    transform: translateY(-50%);
    height: clamp(400px, 60vh, 680px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    z-index: 3;
    /* Odkrywanie od prawej do lewej: clip-path inset sterowany przez JS */
    clip-path: inset(0 100% 0 0 round var(--radius-lg));
    will-change: clip-path;
}

.reveal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) brightness(0.8);
}

/* Tekst — nad zdjęciem */
.reveal-text {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.reveal-heading {
    color: var(--primary) !important;
    text-shadow: none;
}

/* reveal-heading dziedziczy anim-heading */
.reveal-heading.anim-heading .reveal-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
}

/* ---- Animacja nagłówków — word-by-word slide up ---- */
/* Wspólna dla reveal-section i każdego h2 na podstronach */
.anim-heading .reveal-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    /* Dodatkowa przestrzeń żeby descenders nie były ucinane */
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
}

.anim-heading .reveal-word > span {
    display: inline-block;
    transform: translateY(110%);
}

@keyframes wordSlideUp {
    from { transform: translateY(110%); }
    to   { transform: translateY(0); }
}

.anim-heading.is-visible .reveal-word > span {
    animation: wordSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--word-i, 0) * 0.07s);
}

@media (prefers-reduced-motion: reduce) {
    .anim-heading .reveal-word > span { transform: none; }
    .anim-heading.is-visible .reveal-word > span { animation: none; }
}

.reveal-para {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(8px);
    color: var(--text) !important;
    max-width: 58ch;
    margin-top: 16px;
    transition:
        opacity   0.7s ease,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        filter    0.7s ease;
}

.reveal-para.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

@media (max-width: 640px) {
    .reveal-img-wrap {
        height: clamp(320px, 55vh, 480px);
    }

    .reveal-heading {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }
}


/* ---------------------------------------------------
   17c. WHEEL SECTION — koło procesu
   --------------------------------------------------- */

.wheel-section {
    position: relative;
}

/* Tunel scrollowania — wysokość ustawiana przez JS */
.wheel-scroll-tunnel {
    height: calc(6 * 100vh);
}

/* Sticky kontener zajmujący 100vh */
.wheel-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

/* Scena — centruje zawartość */
.wheel-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Koło — wrapper z SVG i tekstem w środku */
.wheel-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(var(--wheel-rotate, 0deg));
    opacity: var(--wheel-circle-op, 1);
    width: 95vmin;
    height: 95vmin;
    transition: none;
    will-change: transform, opacity;
}

.wheel-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg); /* Start u góry */
}

/* Delikatny obwód toru */
.wheel-track {
    fill: none;
    stroke: rgba(25, 23, 19, 0.08);
    stroke-width: 1.5;
}

/* Wypełniający się łuk */
.wheel-arc {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 1069; /* fallback — JS nadpisze inline */
    stroke-dashoffset: 1069;
    transition: stroke-dashoffset 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: stroke-dashoffset;
}

/* Tekst w środku koła */
.wheel-inner {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    /* okrąg r=170 w viewBox 400 → bezpieczna szer. = r√2/200 ≈ 60% elementu → padding 20% po bokach */
    padding: 22% 20%;
    overflow: hidden;
}

/* H2 — widoczny tylko bez stepu, znika gdy step aktywny */
.wheel-title {
    transition: opacity 0.4s ease;
    font-size: clamp(1.4rem, 5vmin, 2.4rem);
    line-height: 1.1;
}

.wheel-inner.has-step .wheel-title {
    opacity: 0;
    pointer-events: none;
}

/* H3 i p wewnątrz koła */
.wheel-inner .headline-md {
    font-size: clamp(1.1rem, 4vmin, 1.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.wheel-inner .body {
    font-size: clamp(0.9rem, 3vmin, 1.15rem);
    line-height: 1.5;
}

/* H2 i slot nakładają się na tę samą komórkę gridu */
.wheel-title,
.wheel-step-content {
    grid-area: 1 / 1;
    width: 100%;
}

.wheel-step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4vmin;
    transition: opacity 0.4s ease;
}

.wheel-inner:not(.has-step) .wheel-step-content {
    opacity: 0;
    pointer-events: none;
}

.wheel-step-slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    width: 100%;
}

/* Animacje fade in/out */
.wheel-step-slot.fade-out {
    animation: wheelFadeOut 0.35s ease forwards;
}

.wheel-step-slot.fade-in {
    animation: wheelFadeIn 0.35s ease forwards;
}

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

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

/* Zdjęcie — dokładnie ten sam wymiar i pozycja co koło */
.wheel-photo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(var(--wheel-rotate, 0deg));
    width: 95vmin;
    height: 95vmin;
    border-radius: 50%;
    overflow: hidden;
    opacity: var(--wheel-photo-op, 0);
    will-change: opacity;
    transition: none;
}

.wheel-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wheel-arc {
        transition: none;
    }
    .wheel-step-slot.fade-out,
    .wheel-step-slot.fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}



/* ---------------------------------------------------
   18. ACCESSIBILITY — REDUCED MOTION
   --------------------------------------------------- */

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

    .section-animate {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    .btn,
    .nav a,
    .input,
    .textarea,
    .select {
        transition: none;
    }
}


/* ---------------------------------------------------
   17. RESPONSIVE — TABLET (≤980px)
   --------------------------------------------------- */

@media (max-width: 980px) {
    .section {
        padding: 76px 0;
    }

    .grid-12 {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .philosophy-gap {
        display: none;
    }

    .contact-left,
    .contact-right {
        grid-column: auto;
        padding-right: 0;
    }

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


/* ---------------------------------------------------
   18. RESPONSIVE — MOBILE (≤640px)
   --------------------------------------------------- */

/* ---------------------------------------------------
   19. HAMBURGER MENU
   --------------------------------------------------- */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px 10px;
    border: 1px solid rgba(var(--color-black-rgb), 0.08);
    border-radius: var(--radius-pill);
    background: rgba(var(--color-surface-rgb), 0.78);
    box-shadow: 0 10px 30px rgba(var(--color-black-rgb), 0.06);
    backdrop-filter: blur(4px);
    cursor: pointer;
    position: relative;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(var(--color-black-rgb), 0.4);
    backdrop-filter: blur(4px);
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 70px;
    padding-right: 12px;
}

.mobile-nav.is-open {
    display: flex;
}

.mobile-nav-inner {
    background: var(--surface);
    border: 1px solid rgba(var(--color-black-rgb), 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.mobile-nav-inner a {
    display: block;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: var(--weight-semibold);
    color: var(--text);
    transition: background 0.2s ease;
}

.mobile-nav-inner a:hover,
.mobile-nav-inner a:focus {
    background: rgba(var(--color-black-rgb), 0.06);
}


@media (max-width: 640px) {
    .container {
        width: min(calc(100% - 24px), var(--container));
    }

    .site-header {
        padding-top: 12px;
    }

    .nav-shell {
        justify-content: flex-end;
    }

    .nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .section {
        padding: 60px 0;
    }

    .hero-main-image {
        margin-top: 36px;
    }

    .btn {
        width: 100%;
    }

    .cta-row,
    .hero-cta,
    .cta-row--left {
        flex-direction: column;
    }

    .subpage-hero-copy {
        margin-bottom: 32px;
    }

    .form-card {
        padding: 22px;
    }

    .form-actions {
        justify-content: stretch;
    }
}

/* ===================================================
   FLYING IMAGES SCROLL SECTION
   =================================================== */

.fly-section {
    position: relative;
    /* wysokość tworzy przestrzeń do scrollowania — sticky działa przez cały czas */
    height: 350vh;
}

.fly-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.fly-heading {
    position: absolute;
    /* wycentruj przez transform zamiast flex — tekst zachowuje normalny flow */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 48px);
    max-width: 700px;
    text-align: center;
    color: var(--primary);
    z-index: 20;
    pointer-events: none;
    margin: 0;
}

.fly-images {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.fly-img {
    position: absolute;
    /* domyślnie niewidoczne, JS ustawi pozycję i opacity */
    opacity: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    /* zmienna kontrolowana przez JS */
    width: var(--fly-w, 260px);
    height: var(--fly-w, 260px);
    transform: translate(var(--fly-x, 0px), var(--fly-y, 0px)) rotate(var(--fly-r, 0deg));
    will-change: transform, opacity;
}

.fly-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .integration-left,
    .integration-right {
        grid-column: 1 / -1;
    }

    .integration-right {
        margin-top: 24px;
    }
}

/* ============================================
   EVENT TYPES GRID
   ============================================ */
.event-types-grid {
    margin-bottom: 80px;
}

.event-type-box {
    grid-column: span 3;
    border-radius: var(--radius-md, 12px);
    padding: 32px 24px;
    font-size: var(--text-body-lg, 1.125rem);
    min-height: 240px;
    font-weight: 500;
    line-height: 1.4;
    display: flex;
    align-items: flex-end;
    background-color: var(--color-pure-white);
}

.event-type-box--highlight {
    background-color: #E8520A;
    color: var(--color-pure-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.event-type-box--highlight h2,
.event-type-box--highlight p {
    color: var(--color-pure-white);
}

@media (max-width: 900px) {
    .event-type-box {
        grid-column: span 6;
    }
}

@media (max-width: 540px) {
    .event-type-box {
        grid-column: span 12;
    }
}
