/* ==========================================================================
   case-study.css — strona „Case Study" (szablon case-study.php)
   Ten sam język co ai.css / performance.css:
   biel + neutralne szarości, Poppins, lżejsze wagi (500–600),
   editorialne wiersze. Hero bez zdjęcia, bez siatki, bez animacji.
   ========================================================================== */

.cs-page {
    --cs-bg:        #ffffff;
    --cs-surface:   #f4f4f5;
    --cs-gray:      #e8e8ec;
    --cs-gray-deep: #d9d9de;
    --cs-text:      #1c1c1e;
    --cs-muted:     #6b6b73;
    --cs-faint:     #a0a0a8;
    --cs-line:      rgba(20, 20, 25, 0.10);

    --cs-container: 1180px;
    --cs-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    font-family: var(--cs-font);
    color: var(--cs-text);
    background: var(--cs-bg);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.cs-page h1,
.cs-page h2,
.cs-page h3 {
    text-transform: none;
}

.cs-page p {
    margin: 0;
}

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

.cs-container {
    width: min(100% - 3rem, var(--cs-container));
    margin-inline: auto;
}

/* Wspólne elementy */

.cs-eyebrow {
    display: inline-block;
    margin: 0 0 1.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cs-faint);
}

.cs-section-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--cs-text);
}

.cs-section-title span {
    color: var(--cs-muted);
    font-weight: 400;
}

/* ==========================================================================
   HERO — bez zdjęcia, bez siatki, bez animacji (jak .ai-hero)
   ========================================================================== */

.simple-page-hero {
    padding: 10rem 0 6rem;
    background: var(--cs-bg);
}

.simple-page-hero__content {
    width: min(100% - 3rem, var(--cs-container));
    margin-inline: auto;
}

.simple-page-hero__eyebrow {
    display: inline-block;
    margin: 0 0 1.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cs-muted);
}

.simple-page-hero h1 {
    position: relative;
    z-index: 0;
    margin: 0;
    max-width: 16ch;
    font-size: clamp(3rem, 8.5vw, 6rem);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--cs-text);
}

.simple-page-hero h1::before {
    --dot-size: 0.6em;
    --dot-top: -0.02em;
    --dot-left: -0.16em;

    content: "";
    position: absolute;
    z-index: -1;
    top: var(--dot-top);
    left: var(--dot-left);
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: #ffc3a194;
    filter: blur(0px);
    pointer-events: none;
}


.simple-page-hero h1 span {
    color: var(--cs-muted);
    font-weight: 400;
}

.simple-page-hero__lead {
    max-width: 52ch;
    margin: 3.25rem 0 0;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--cs-muted);
}

/* ==========================================================================
   PROJEKTY
   ========================================================================== */

.cs-project {
    position: relative;
    padding: 7rem 0;
  background: var(--cs-surface);
}

.cs-project:nth-of-type(even) {
	    background: var(--cs-bg);
}

.cs-project__header {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: clamp(3rem, 7vw, 6rem);
    align-items: start;
}

.cs-project__content {
    max-width: 640px;
}

.cs-project__number {
    display: block;
    margin-bottom: 1.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cs-faint);
}

.cs-project__title {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.25rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--cs-text);
}

.cs-project__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.75rem 0;
}

.cs-project__meta span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--cs-line);
    border-radius: 999px;
    color: var(--cs-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.cs-project__intro {
    margin: 0;
    color: var(--cs-muted);
    font-size: 1.15rem;
    line-height: 1.8;
}

.cs-project__image-wrap {
    position: sticky;
    top: 6.5rem;
    width: 100%;
    height: 545px;
    overflow: hidden;
    border-radius: 20px;
    background: var(--cs-surface);
}

.cs-project__image-wrap::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 20, 25, 0.1), transparent 45%);
    content: "";
    pointer-events: none;
}

.cs-project__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-project__image-wrap:hover img {
    transform: scale(1.04);
}

.cs-project__scope {
    display: grid;
    grid-template-columns: minmax(200px, 0.5fr) minmax(0, 1.5fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    margin-top: 5.5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--cs-line);
}

.cs-project__scope-label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cs-faint);
}

.cs-task-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cs-task-list li {
    position: relative;
    padding: 0 0 1.4rem 1.75rem;
    color: var(--cs-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.cs-task-list li::before {
    position: absolute;
    top: 0.72em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cs-muted);
    content: "";
}

.cs-task-list strong {
    color: var(--cs-text);
    font-weight: 500;
}

.cs-project__summary {
    grid-column: 2;
    margin: 0.75rem 0 0;
    padding: 1.6rem 1.75rem;
    border: 1px solid var(--cs-line);
    border-left: 3px solid var(--cs-gray-deep);
    background: var(--cs-surface);
    color: var(--cs-muted);
    font-size: 1rem;
    line-height: 1.75;
}

/* Na sekcjach parzystych (tło surface) box wyróżniamy bielą */
.cs-project:nth-of-type(even) .cs-project__summary {
    background: var(--cs-bg);
}

/* ==========================================================================
   GALERIE
   ========================================================================== */

.cs-project__gallery-section {
    margin-top: 5.5rem;
}

.cs-gallery-title {
    margin: 0 0 1.75rem;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--cs-text);
}

.cs-gallery {
    display: grid;
    gap: 1rem;
}

.cs-gallery--wide {
    grid-template-columns: 1fr 1fr 1fr;
}

.cs-gallery--two {
    grid-template-columns: repeat(2, 1fr);
}

.cs-gallery--three {
    grid-template-columns: repeat(4, 1fr);
}

.cs-gallery--four {
    grid-template-columns: repeat(4, 1fr);
}

.cs-gallery__item {
    min-height: 340px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--cs-surface);
}

.cs-gallery--wide .cs-gallery__item,
.cs-gallery--two .cs-gallery__item {
    min-height: 430px;
}

.cs-gallery__item--portrait {
    min-height: 430px;
}

.cs-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.cs-gallery__item:hover img {
    transform: scale(1.045);
}

/* ==========================================================================
   Delikatne wejście na scroll (hero bez animacji)
   ========================================================================== */

.cs-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.cs-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Responsywność
   ========================================================================== */

@media (max-width: 960px) {
    .cs-project__header,
    .cs-project__scope {
        grid-template-columns: 1fr;
    }

    .cs-project {
        padding: 5rem 0;
    }

    .cs-project__image-wrap {
        position: relative;
        top: auto;
        max-width: 540px;
        height: 460px;
        margin-top: 0.5rem;
    }

    .cs-project__scope {
        margin-top: 3.5rem;
    }

    .cs-project__summary {
        grid-column: auto;
    }

    .cs-gallery--four,
    .cs-gallery--three {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .simple-page-hero {
        padding: 7rem 0 3.5rem;
    }

    .simple-page-hero h1 {
        font-size: clamp(2.8rem, 15vw, 4.5rem);
    }

    .cs-project {
        padding: 4rem 0;
    }

    .cs-project__image-wrap {
        height: 400px;
    }

    .cs-project__scope,
    .cs-project__gallery-section {
        margin-top: 3rem;
    }

    .cs-gallery--wide,
    .cs-gallery--two,
    .cs-gallery--three,
    .cs-gallery--four {
        grid-template-columns: 1fr;
    }

    .cs-gallery__item,
    .cs-gallery--wide .cs-gallery__item,
    .cs-gallery--two .cs-gallery__item {
        min-height: 320px;
    }
}

/* ==========================================================================
   Dostępność
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .cs-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .cs-project__image-wrap img,
    .cs-gallery__item img {
        transition: none;
    }
}

/* ==========================================================================
   portfolio.css — strona „Portfolio / Grafiki Social Media"
   Spójne z ai.css / performance.css / case-study.css:
   biel + neutralne szarości, Poppins, lżejsze wagi (500–600).
   Hero bez zdjęcia + brzoskwiniowa kropka za pierwszą literą.
   ========================================================================== */

.pf-page {
    --pf-bg:        #ffffff;
    --pf-surface:   #f4f4f5;
    --pf-gray:      #e8e8ec;
    --pf-gray-deep: #d9d9de;
    --pf-text:      #1c1c1e;
    --pf-muted:     #6b6b73;
    --pf-faint:     #a0a0a8;
    --pf-line:      rgba(20, 20, 25, 0.10);

    --pf-container: 1180px;
    --pf-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    font-family: var(--pf-font);
    color: var(--pf-text);
    background: var(--pf-bg);
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.pf-page h1 {
    text-transform: none;
}

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

.pf-container {
    width: min(100% - 3rem, var(--pf-container));
    margin-inline: auto;
}

/* ==========================================================================
   HERO — bez zdjęcia, spójny z pozostałymi stronami
   ========================================================================== */

.portfolio-hero {
    padding: 10rem 0 4rem;
    background: var(--pf-bg);

}

.portfolio-hero__content {
    width: min(100% - 3rem, var(--pf-container));
    margin-inline: auto;
}

.portfolio-hero__eyebrow {
    display: inline-block;
    margin: 0 0 1.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--pf-muted);
}

.portfolio-title {
    position: relative;
    z-index: 0;
    margin: 0;
    max-width: 18ch;
    font-size: clamp(3rem, 8.5vw, 6rem);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: var(--pf-text);
    text-shadow: none;
}

.portfolio-title span {
    color: var(--pf-muted);
    font-weight: 400;
}

/* Brzoskwiniowa kropka za pierwszą literą (jak na pozostałych stronach) */
.portfolio-title::before {
    --dot-size: 0.6em;
    --dot-top: -0.02em;
    --dot-left: -0.16em;

    content: "";
    position: absolute;
    z-index: -1;
    top: var(--dot-top);
    left: var(--dot-left);
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: #ffc3a194;
    filter: blur(0px);
    pointer-events: none;
}

.portfolio-hero__lead {
    max-width: 52ch;
    margin: 3.25rem 0 0;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--pf-muted);
}

/* ==========================================================================
   GALERIA — siatka
   ========================================================================== */

.portfolio-section {
    padding: 3rem 0 7rem;
    background: var(--pf-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--pf-line);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   REELSY — pionowe wideo z kontrolkami
   ========================================================================== */

.reel-item {
    aspect-ratio: 9 / 16 !important;
    grid-column: span 1;
    background: #111;
    border: 1px solid var(--pf-line);
}

.reel-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reel-container:hover .reel-controls {
    opacity: 1;
}

.play-pause-btn {
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.play-pause-btn:hover {
    transform: scale(1.1);
}

.play-pause-btn svg {
    width: 100%;
    height: 100%;
}

.hidden {
    display: none;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 4px;
    margin: 10px 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.progress-filled {
    width: 0%;
    height: 100%;
    border-radius: 2px;
    background: #ffc3a1;
    transition: width 0.1s linear;
}

.reel-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.reel-duration {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ==========================================================================
   KARUZELA (opcjonalna — obsługiwana przez portfolio.js)
   ========================================================================== */

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: var(--pf-bg);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

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

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(20, 20, 25, 0.12);
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.carousel-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(20, 20, 25, 0.18);
}

.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

.carousel-arrow svg {
    width: 24px;
    height: 24px;
    stroke: var(--pf-text);
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* ==========================================================================
   Responsywność
   ========================================================================== */

@media (max-width: 600px) {
    .portfolio-hero {
        padding: 7rem 0 3rem;
    }

    .portfolio-title {
        font-size: clamp(2.8rem, 15vw, 4.5rem);
    }

    .portfolio-section {
        padding: 1.5rem 0 4.5rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ==========================================================================
   Dostępność
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .portfolio-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .portfolio-item img,
    .filter-btn,
    .carousel-track {
        transition: none;
    }
}

