/* ============================================
   SKETCHY LINE — Portfolio Website
   Black & White Theme
   ============================================ */

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

:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --grey-light: #f4f4f4;
    --photo-ground: #f2f2f2; /* podklad za fotkami Marka (O mně, Workshop, Kontakt) */
    --grey-mid: #e0e0e0;
    --grey-dark: #555555;
    --font-heading: 'new-hero', sans-serif;
    --font-body: 'new-hero', sans-serif;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --section-gap: 75px; /* polovina mezery mezi sekcemi homepage (2 × 75 = 150px) */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--black);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---- Typography ---- */
h1, h2, h3 {
    font-family: "novecento-sans-condensed", sans-serif;
    font-weight: 800;
    font-style: normal;
    line-height: 1.15;
    text-transform: uppercase;
}

h1 { font-size: clamp(3rem, 8vw, 6.5rem); }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }

p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--grey-dark);
    line-height: 1.8;
}

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

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

/* ---- Utility ---- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    margin-bottom: 1.5rem;
}

.section-label-white {
    color: var(--white);
    border-color: var(--white);
}

.btn {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.btn:hover {
    background: var(--white);
    color: var(--black);
}

.btn-white {
    border-color: var(--white);
    color: var(--white);
}

.btn-white:hover {
    background: var(--white);
    color: var(--black);
}

.btn-black {
    border-color: var(--black);
    color: var(--black);
    background: transparent;
}

.btn-black:hover {
    background: var(--black);
    color: var(--white);
}

/* Plné černé tlačítko (na bílých sekcích) */
.btn-solid {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
}

.btn-solid:hover {
    background: transparent;
    color: var(--black);
}

/* Jednotné tlačítko celého webu (podle Figmy): 280 × 51, New Hero Bold 14px, obrys 1px, pilulka.
   Platí pro .btn-round (homepage, case studies, projekty), tlačítka hera a Instagramu — velikost nepřepisovat v sekcích. */
.btn-round,
.hero-actions .btn,
.ig-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 280px;
    max-width: 100%;
    min-height: 51px;
    padding: 0 20px;
    border-width: 1px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background var(--transition), box-shadow var(--transition);
    padding: 1.2rem 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 var(--grey-mid);
    padding: 0.8rem 0;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.logo img {
    height: 67px;
    width: auto;
    transition: opacity var(--transition);
}

.logo img:hover {
    opacity: 0.75;
}

.nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s 0.45s;
}

.nav.open {
    pointer-events: all;
    visibility: visible;
    transition: visibility 0s 0s;
}

.nav-panel {
    --nav-fs: clamp(2.5rem, 3.5vw, 4rem);
    --nav-w: min(517px, calc(100vw - 36px));
    position: absolute;
    left: 18px;
    top: 16px;
    bottom: 16px;
    width: var(--nav-w);
    background: var(--black);
    border-radius: 39px;
    overflow: hidden;
    padding: 44px 51px;
    display: flex;
    flex-direction: column;
    transform: translateX(calc(-100% - 40px));
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.open .nav-panel {
    transform: translateX(0);
}

.nav-close {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 0;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    padding: 0;
    text-align: left;
    flex-shrink: 0;
    margin-bottom: 2rem;
    transition: opacity 0.2s ease;
}

.nav-close:hover {
    opacity: 0.65;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.nav-link {
    font-family: "novecento-sans-condensed", sans-serif;
    font-weight: 800;
    font-size: var(--nav-fs);
    color: var(--white);
    text-transform: uppercase;
    line-height: 1.234; /* 79px při 64px, podle Figmy */
    display: block;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 0.65;
}

.nav-instagram {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 0;
    color: var(--white);
    text-transform: uppercase;
    margin-top: 35px;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.nav-instagram:hover {
    opacity: 0.65;
}

/* Další sociální odkaz (Facebook) těsně pod Instagramem */
.nav-instagram + .nav-instagram {
    margin-top: 8px;
}

.nav-close,
.nav-list,
.nav-instagram {
    position: relative;
    z-index: 1;
}

/* Ilustrace v pravém dolním rohu, horní okraj tužky na úrovni posledního řádku menu
   (98px = odsazení seznamu, 5 řádků nad Kontaktem). Na úzkém panelu ji omezí šířka. */
.nav-brain {
    position: absolute;
    right: 34px;
    bottom: 20px;
    height: min(calc(100% - 98px - 5 * 1.234 * var(--nav-fs) - 20px), calc(var(--nav-w) * 0.8 * 416 / 314));
    width: auto;
    aspect-ratio: 314 / 416;
    max-width: none;
    pointer-events: none;
    transform-origin: 55% 60%;
    translate: 45% 45%;
    rotate: 22deg;
    opacity: 0;
    transition: translate 0.2s ease-in, rotate 0.2s ease-in, opacity 0.2s ease-in;
}

/* Při otevření menu vyskočí z rohu s lehkým překmitem */
.nav.open .nav-brain {
    translate: 0 0;
    rotate: 0deg;
    opacity: 1;
    transition: translate 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s,
                rotate 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s,
                opacity 0.25s ease-out 0.2s;
}

/* Telefon: úzký panel — ilustrace by zasahovala do odkazů Instagram/Facebook.
   Výška = místo pod nimi (44 padding + 22 Zavřít + 32 mezera + 6 řádků menu + 35 + 52 sociální odkazy + 24 rezerva),
   vydělené 0,78, protože horních ~22 % obrázku je jen hrot tužky vpravo (vlevo nic nepřekrývá). */
@media (max-width: 768px) {
    .nav-brain {
        height: min(calc((100% - 6 * 1.234 * var(--nav-fs) - 209px) / 0.78), calc(var(--nav-w) * 0.8 * 416 / 314));
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-brain,
    .nav.open .nav-brain {
        translate: 0 0;
        rotate: 0deg;
        opacity: 1;
        transition: none;
    }
}

/* Header social icons */
.header-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-social-link {
    display: flex;
    align-items: center;
    color: var(--white);
    transition: opacity var(--transition);
}

.header-social-link:hover {
    opacity: 0.6;
}

.header.scrolled .header-social-link {
    color: var(--black);
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition);
}

.header.scrolled .hamburger span {
    background: var(--black);
}

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

.hamburger.active span {
    background: var(--white);
}

/* ============================================
   HERO
   ============================================ */
/* Header nad bílým pozadím (homepage, brand-check, zásady): tmavé ikony a hamburger už od začátku */
.header--light .header-social-link {
    color: var(--black);
}

.header--light .hamburger span {
    background: var(--black);
}

.header--light .hamburger.active span {
    background: var(--white);
}

/* Kompozice podle Figmy (rámec 1920 × 1080, obsah široký 1385).
   --u = jeden pixel návrhu; celá scéna se škáluje podle šířky i výšky okna. */
.hero {
    --u: min(calc(100vw / 1570), max(calc(100vh / 1080), 0.72px), 1px);
    position: relative;
    height: calc(1080 * var(--u));
    background: var(--white);
    overflow: hidden;
}

.hero-stage {
    position: relative;
    isolation: isolate;
    width: calc(1385 * var(--u));
    height: 100%;
    margin: 0 auto;
}

.hero-text {
    padding-top: calc(279 * var(--u));
}

/* Bez z-indexu na .hero-text: mozek leží nad nadpisem, ale pod tlačítky */
.hero-label,
.hero-title,
.hero-tag,
.hero-subtitle {
    position: relative;
    z-index: 2;
}

.hero-label {
    display: block;
    font-weight: 800;
    margin: 0 0 0 calc(5 * var(--u));
    font-size: max(12px, calc(16 * var(--u)));
    line-height: calc(22 * var(--u));
    letter-spacing: 0;
}

.hero-title {
    font-size: calc(151.504 * var(--u));
    line-height: 0.85;
    color: var(--black);
    margin: calc(20 * var(--u)) 0 calc(20 * var(--u));
}

/* Maska pro vyjetí řádku zdola */
.hero-line {
    display: block;
    overflow: hidden;
    padding-top: 0.04em;
}

.hero-line > span {
    display: block;
    animation: heroRise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-line:nth-child(2) > span {
    animation-delay: 0.12s;
}

@keyframes heroRise {
    from { transform: translateY(105%); }
    to   { transform: translateY(0); }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(317 * var(--u));
    height: calc(71 * var(--u));
    border: 1px solid var(--black);
    border-radius: 999px;
    font-family: "novecento-sans-condensed", sans-serif;
    font-weight: 800;
    font-size: calc(40 * var(--u));
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--black);
}

.hero-subtitle {
    margin: calc(34 * var(--u)) 0 calc(30 * var(--u));
    font-size: max(15px, calc(20 * var(--u)));
    font-weight: 700;
    line-height: 1.4;
    color: var(--black);
}

.hero-actions {
    position: relative;
    z-index: 4;
    display: flex;
    gap: calc(17 * var(--u));
}

.hero-btn-primary {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
}

.hero-btn-primary:hover {
    background: transparent;
    color: var(--black);
}

/* Bez z-indexu: vrstvy uvnitř se řadí společně s textem ve .hero-stage */
.hero-visual {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-photo {
    position: absolute;
    z-index: 1;
    left: calc(594 * var(--u));
    top: calc(-42 * var(--u));
    width: calc(857 * var(--u));
    height: calc(1286 * var(--u));
    max-width: none;
}

/* Ilustrace u fotky: obal se vznáší, obrázek se "přilepí" s pootočením */
.hero-sticker {
    position: absolute;
    animation: heroFloat 5s ease-in-out 1.3s infinite;
}

.hero-sticker img {
    width: 100%;
    transform: rotate(var(--sticker-rot));
    animation: stickOn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) var(--sticker-delay) both;
}

/* Velký rozostřený mozek přes nadpis a fotku */
.hero-sticker--brain {
    --sticker-rot: 0deg;
    --sticker-delay: 0.55s;
    z-index: 3;
    left: calc(279 * var(--u));
    top: calc(309 * var(--u));
    width: calc(565 * var(--u));
    filter: blur(calc(10.05 * var(--u)));
}

/* Malý rozostřený mozek za hlavou */
.hero-sticker--brain-small {
    --sticker-rot: 0deg;
    --sticker-delay: 0.65s;
    z-index: 0;
    left: calc(1096 * var(--u));
    top: calc(181 * var(--u));
    width: calc(139 * var(--u));
    filter: blur(calc(10.05 * var(--u)));
    animation-duration: 7s;
}

/* Velká tužka za fotkou, vpravo dole */
.hero-sticker--pencil {
    --sticker-rot: 13.79deg;
    --sticker-delay: 0.75s;
    z-index: 0;
    left: calc(1162.2 * var(--u));
    top: calc(611.2 * var(--u));
    width: calc(403 * var(--u));
    animation-duration: 6s;
    animation-delay: 1.6s;
}

/* Malá tužka za fotkou, vlevo u hlavy */
.hero-sticker--pencil-small {
    --sticker-rot: -49.61deg;
    --sticker-delay: 0.85s;
    z-index: 0;
    left: calc(730 * var(--u));
    top: calc(311.5 * var(--u));
    width: calc(189.783 * var(--u));
    filter: blur(calc(1.55 * var(--u)));
    animation-duration: 5.5s;
    animation-delay: 1.9s;
}

@keyframes stickOn {
    from {
        opacity: 0;
        transform: scale(1.35) rotate(calc(var(--sticker-rot) - 18deg));
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(var(--sticker-rot));
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .hero-line > span,
    .hero-sticker,
    .hero-sticker img {
        animation: none;
    }
}

/* Reference a O mně přejedou přes hero: hero doscrolluje na svůj spodní okraj
   a zůstane přilepený. Obal .hero-about omezuje přilepení na tyto dvě sekce. */
@media (min-width: 1101px) and (prefers-reduced-motion: no-preference) {
    .hero {
        position: sticky;
        top: min(0px, calc(100vh - 1080 * var(--u)));
    }

    .about {
        position: relative;
        z-index: 1;
    }
}

/* Totéž pod 1100px — hero má výšku auto, proto ji main.js měří do --hero-h */
@media (max-width: 1100px) and (prefers-reduced-motion: no-preference) {
    .hero {
        position: sticky;
        top: min(0px, calc(100vh - var(--hero-h, 100vh)));
        top: min(0px, calc(100svh - var(--hero-h, 100svh)));
    }

    .about {
        position: relative;
        z-index: 1;
    }
}

/* Šedé podklady za fotkami (Workshop, Kontakt) — fotka dole končí na hraně
   podkladu, hlava a ruce z něj vystupují. Jen od 1101px (rozvržení z Figmy).
   O mně má podklad přímo na .about-box. Brand check podklad nemá (Marek ho tam nechce). */
@media (min-width: 1101px) {
    .wsh-visual::before,
    .contact-grid::before {
        content: "";
        position: absolute;
        z-index: -1;
        bottom: 0;
        background: var(--photo-ground);
        border-radius: calc(39 * var(--u));
    }

    .wsh-visual {
        isolation: isolate;
    }

    .wsh-visual::before {
        left: calc(40 * var(--u));
        right: calc(40 * var(--u));
        top: calc(95 * var(--u)); /* jako O mně: hlava vystupuje nad podklad */
    }

    .contact-grid {
        isolation: isolate;
    }

    .contact-grid::before {
        left: 0;
        width: calc(552 * var(--u));
        top: calc(115 * var(--u));
    }
}

/* Užší okna — text nahoře, fotka s ilustracemi pod ním (návrh pro mobil ve Figmě není) */
@media (max-width: 1100px) {
    .hero {
        --u: 0.6px;
        height: auto;
    }

    .hero-stage {
        width: auto;
        height: auto;
        padding: 6.5rem 2rem 0;
    }

    .hero-text {
        padding-top: 0;
    }

    .hero-label {
        margin: 0 0 1rem;
        line-height: 1.4;
    }

    .hero-title {
        font-size: clamp(3.5rem, 15vw, 8rem);
        margin: 0 0 1.25rem;
    }

    .hero-tag {
        width: auto;
        height: auto;
        padding: 0.55rem 1.4rem;
        font-size: clamp(1.4rem, 3.5vw, 2rem);
    }

    .hero-subtitle {
        margin: 1.5rem 0;
    }

    .hero-subtitle br {
        display: none;
    }

    .hero-actions {
        gap: 0.75rem;
    }

    .hero-visual {
        position: relative;
        inset: auto;
        width: min(78vw, 460px);
        margin: -2.5rem auto 0; /* horní část fotky je prázdná */
    }

    .hero-photo {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: auto;
    }

    .hero-sticker--brain {
        left: -20%;
        top: 27%;
        width: 60%;
    }

    .hero-sticker--brain-small {
        left: 58.6%;
        top: 17%;
        width: 16%;
    }

    .hero-sticker--pencil {
        left: 60%;
        top: 51%;
        width: 47%;
    }

    .hero-sticker--pencil-small {
        left: 16%;
        top: 27%;
        width: 22%;
    }
}

/* ============================================
   ABOUT
   ============================================ */
/* Podle Figmy (rámec 1920 široký): loga nahoře, pod nimi fotka v boxu + text.
   --u = jeden pixel návrhu. */
.about {
    --u: min(calc(100vw / 1570), 1px);
    padding: 62px 0 var(--section-gap);
    background: var(--white);
}

.about .section-label {
    font-size: 1rem;
    font-weight: 800;
    line-height: 22px;
    letter-spacing: 0;
    margin-bottom: 18px;
}

.about-stage {
    display: grid;
    grid-template-columns: calc(702 * var(--u)) calc(688 * var(--u));
    width: calc(1390 * var(--u));
    margin: calc(86.4 * var(--u)) auto 0;
}

.about-visual {
    position: relative;
    height: calc(730 * var(--u));
}

.about-box {
    position: absolute;
    left: 0;
    top: calc(63 * var(--u));
    width: calc(547 * var(--u));
    height: calc(667 * var(--u));
    box-sizing: border-box;
    background: var(--photo-ground); /* šedý podklad, ze kterého fotka vystupuje (bez obrysu) */
    border-radius: calc(39 * var(--u));
}

.about-photo {
    position: absolute;
    left: calc(-24 * var(--u));
    top: 0;
    width: calc(683 * var(--u));
    height: calc(730 * var(--u));
    max-width: none;
}

/* Při scrollu se fotka zaostří z rozmazaného stavu (js-anim přidává main.js) */
@media (prefers-reduced-motion: no-preference) {
    .about-photo.js-anim {
        filter: blur(28px);
        opacity: 0;
        transition: filter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease-out;
    }

    .about-photo.js-anim.is-visible {
        filter: blur(0);
        opacity: 1;
    }
}

/* Text je vystředěný vůči černému boxu, ne vůči fotce */
.about-text {
    align-self: center;
    padding-top: calc(63 * var(--u));
}

.about-text .section-label {
    display: block;
}

.about-heading {
    font-size: calc(96 * var(--u));
    line-height: 1.04;
    white-space: nowrap;
    margin: 0 0 calc(47 * var(--u));
}

.about-desc {
    font-size: max(16px, calc(18 * var(--u)));
    color: var(--black);
    margin-bottom: 0;
    line-height: 1.4;
}

.about-desc + .about-desc {
    margin-top: 1.4em;
}

.signature {
    margin-top: 2rem;
    width: 180px;
    filter: grayscale(100%);
}

/* ============================================
   SERVICES
   ============================================ */
.services {
    position: relative;
    background: var(--white);
    color: var(--black);
    padding: var(--section-gap) 0;
    overflow: hidden;
}

.services-sticker {
    position: absolute;
    top: calc(var(--section-gap) - 100px); /* celý nad mřížkou bloků, kapky se nesmí dotknout karet */
    right: calc((100% - 1200px) / 2 + 9.5rem);
    width: 273px;
    z-index: 10;
    transform: translateY(calc(-100% - 100px)) rotate(12deg); /* před spadnutím celý nad sekcí, jinak vykukuje */
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.services-sticker.is-visible {
    transform: translateY(0) rotate(12deg);
}

.services-title {
    color: var(--black);
    margin-bottom: 3.5rem;
}

/* Nepravidelná mřížka bloků (4 sloupce × 7 řádků, bez děr) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(110px, auto);
    gap: 16px;
}

.service-card:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 4; --tilt: -7deg; }
.service-card:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 3; --tilt: 9deg; }
.service-card:nth-child(3) { grid-column: 4 / 5; grid-row: 1 / 4; --tilt: -4deg; }
.service-card:nth-child(4) { grid-column: 3 / 4; grid-row: 3 / 6; --tilt: 6deg; }
.service-card:nth-child(5) { grid-column: 1 / 3; grid-row: 4 / 6; --tilt: 5deg; }
.service-card:nth-child(6) { grid-column: 4 / 5; grid-row: 4 / 6; --tilt: -8deg; }
.service-card:nth-child(7) { grid-column: 1 / 2; grid-row: 6 / 8; --tilt: 8deg; }
.service-card:nth-child(8) { grid-column: 2 / 5; grid-row: 6 / 8; --tilt: -3deg; }

.service-card {
    --i: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem;
    background: var(--white);
    border: 2px solid var(--black);
    border-radius: 32px;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Napadání při prvním scrollu na sekci (třídy nastavuje main.js) */
.services-grid.js-drop .service-card {
    opacity: 0;
}

.services-grid.js-drop.is-dropped .service-card {
    opacity: 1;
    animation: serviceDrop 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 90ms) backwards;
}

@keyframes serviceDrop {
    0%   { opacity: 0; transform: translateY(-260px) rotate(var(--tilt)); }
    15%  { opacity: 1; }
    65%  { transform: translateY(10px) rotate(calc(var(--tilt) * -0.15)); }
    82%  { transform: translateY(-4px) rotate(0deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
    .services-grid.js-drop .service-card { opacity: 1; }
    .services-grid.js-drop.is-dropped .service-card { animation: none; }
    .service-card:hover { transform: none; }
}

.service-num {
    display: block;
    font-family: "novecento-sans-condensed", sans-serif;
    font-weight: 800;
    font-size: 2.6rem;
    color: var(--black);
    line-height: 1;
}

.service-card h3 {
    color: var(--black);
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

.service-card p {
    color: rgba(10, 10, 10, 0.65);
    font-size: 0.875rem;
    line-height: 1.55;
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio {
    padding: var(--section-gap) 0;
    background: var(--white);
}

.portfolio h2 {
    margin-bottom: 3rem;
}

.portfolio-carousel-wrap {
    position: relative;
}

.portfolio-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 255px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
    cursor: grab;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0.5rem;
}

.portfolio-carousel .portfolio-card:first-child {
    margin-left: 255px;
}

.portfolio-carousel .portfolio-card:last-child {
    margin-right: 255px;
}


.portfolio-carousel::-webkit-scrollbar {
    display: none;
}

.portfolio-carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.portfolio-card {
    flex-shrink: 0;
    width: clamp(260px, 30vw, 460px);
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--black);
    display: block;
}

.portfolio-card-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 39px;
    border: 2px solid var(--black); /* ať světlé náhledy (Zvědomit) nesplývají s bílým pozadím */
    overflow: hidden;
}

.portfolio-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-card:hover .portfolio-card-img img {
    transform: scale(1.04);
}

.portfolio-card-info {
    padding: 1rem 0.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.portfolio-card-name {
    font-family: "novecento-sans-condensed", sans-serif;
    font-weight: 800;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    text-transform: uppercase;
    line-height: 1;
    margin: 0;
    color: var(--black);
}

.portfolio-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.portfolio-tag {
    background: var(--black);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.portfolio-more {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.portfolio-arrow-btn {
    position: absolute;
    top: calc(clamp(260px, 30vw, 460px) * (5/4) / 2);
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--white);
    border: 1.5px solid rgba(10, 10, 10, 0.15);
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.portfolio-arrow-btn--right {
    right: max(2rem, calc((100vw - 1200px) / 2 + 2rem));
}

.portfolio-arrow-btn--left {
    left: max(2rem, calc((100vw - 1200px) / 2 + 2rem));
}

.portfolio-arrow-btn:hover {
    transform: translateY(-50%) scale(1.08);
}

.portfolio-arrow-btn.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   BRAND CHECK CTA (bílá, mezi Mé práce a Proces)
   ============================================ */
/* Podle Figmy (rámec 1920 × 802, text začíná na x = 265). --u = jeden pixel návrhu. */
.bcta {
    --u: min(calc(100vw / 1650), 1px);
    position: relative;
    height: calc(717 * var(--u)); /* rámec Figmy 802, obsah posunutý o 85 nahoru, aby mezery seděly s ostatními sekcemi */
    margin-bottom: var(--section-gap); /* fotka končí na hraně sekce */
    background: var(--white);
    overflow: hidden;
}

.bcta-stage {
    position: relative;
    isolation: isolate;
    width: calc(1385 * var(--u));
    height: 100%;
    margin: 0 auto;
}

.bcta-text {
    position: relative;
    z-index: 1;
    padding-top: calc(80 * var(--u));
}

.bcta-text .section-label {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 22px;
    letter-spacing: 0;
    margin-bottom: calc(28 * var(--u));
}

.bcta-text h2 {
    font-size: calc(96 * var(--u));
    line-height: 1.04;
    margin-bottom: calc(4 * var(--u));
}

/* Bez z-indexu: vrstvy se řadí společně s textem; ruka s fotkou leží přes nadpis */
.bcta-visual {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bcta-ghost {
    position: absolute;
    z-index: 0;
    left: calc(840 * var(--u));
    top: calc(-146 * var(--u)); /* horní okraj kresby (18 % obrázku) 20 jednotek pod hranou sekce, aby nebyla useknutá */
    width: calc(922 * var(--u));
    max-width: none;
    opacity: 0.13;
}

.bcta-photo {
    position: absolute;
    z-index: 2;
    left: calc(306 * var(--u));
    top: calc(10 * var(--u));
    width: calc(1253 * var(--u));
    height: calc(704 * var(--u));
    max-width: none;
}

/* Fotka s tužkou přijede zprava (js-anim přidává main.js).
   Vlastnost translate, protože transform tužky obsadila animace vznášení. */
@media (prefers-reduced-motion: no-preference) {
    .bcta-visual.js-anim .bcta-photo,
    .bcta-visual.js-anim .bcta-sticker {
        translate: 100vw 0;
        transition: translate 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .bcta-visual.js-anim .bcta-sticker {
        transition-delay: 0.12s;
    }

    .bcta-visual.js-anim.is-visible .bcta-photo,
    .bcta-visual.js-anim.is-visible .bcta-sticker {
        translate: 0 0;
    }
}

/* Tužka se vznáší nad dlaní */
.bcta-sticker {
    position: absolute;
    z-index: 3;
    left: calc(1321.7 * var(--u));
    top: calc(370.7 * var(--u));
    width: calc(214.336 * var(--u));
    max-width: none;
    transform: rotate(var(--sticker-rot));
    animation: stickerFloat 5s ease-in-out infinite;
    --sticker-rot: 12.54deg;
}

@keyframes stickerFloat {
    0%, 100% { transform: rotate(var(--sticker-rot)) translateY(0); }
    50%      { transform: rotate(var(--sticker-rot)) translateY(-14px); }
}

.bcta-sub {
    max-width: max(280px, calc(434 * var(--u)));
    margin: 0 0 calc(28 * var(--u));
    font-size: max(16px, calc(18 * var(--u)));
    line-height: 1.5;
    color: var(--black);
}

/* Užší okna — text nahoře, fotka přes celou šířku pod ním (návrh pro mobil ve Figmě není) */
@media (max-width: 1100px) {
    .bcta {
        --u: calc(100vw / 1253);
        height: auto;
        padding-top: var(--section-gap);
    }

    .bcta-stage {
        width: auto;
        height: auto;
    }

    .bcta-text {
        padding: 0 2rem;
    }

    .bcta-text .section-label {
        margin-bottom: 1rem;
    }

    .bcta-text h2 {
        font-size: clamp(3rem, 8vw, 5.5rem);
        margin-bottom: 1.25rem;
    }

    .bcta-sub {
        max-width: 520px;
        margin-bottom: 1.5rem;
    }

    .bcta-visual {
        position: relative;
        inset: auto;
        height: calc(704 * var(--u));
        margin-top: 1.5rem;
    }

    .bcta-ghost {
        left: calc(534 * var(--u));
        top: calc(-215 * var(--u));
    }

    .bcta-photo {
        left: 0;
        top: 0;
    }

    .bcta-sticker {
        left: calc(1015.7 * var(--u));
        top: calc(360.7 * var(--u));
    }
}

/* ============================================
   PROCESS
   ============================================ */
.process {
    padding: var(--section-gap) 0;
    background: var(--white);
}

.process-inner {
    display: grid;
    grid-template-columns: auto 1fr; /* video vlevo, text vpravo (na mobilu text nahoře) */
    gap: 6rem;
    align-items: center;
}

.process-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Text vystředěný mezi videem a okrajem okna: záporné marginy protáhnou sloupec přes mezeru mřížky i okraj .container */
@media (min-width: 1101px) {
    .process-left {
        justify-self: center;
        margin-left: -6rem;
        margin-right: calc(-1 * max(2rem, (100vw - var(--max-width)) / 2 + 2rem));
    }
}

.process-left h2 {
    margin-bottom: 0;
}

.process-desc {
    font-size: clamp(1rem, 1.3vw, 1.125rem);
    line-height: 1.65;
    max-width: 500px;
    color: rgba(10, 10, 10, 0.7);
}

.process-right {
    order: -1;
    width: clamp(260px, 22vw, 410px);
    aspect-ratio: 9 / 16;
    border-radius: 39px;
    border: 2px solid var(--black); /* černý obrys jako karty prací a case studies */
    overflow: hidden;
    background: var(--black);
    flex-shrink: 0;
}

.process-right video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.process-right iframe,
.process-right blockquote {
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 39px;
    overflow: hidden;
}


.process-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================================
   WORKSHOP (bílá, mezi Proces a Kontakt)
   ============================================ */
/* Podle Figmy (node 109:462, rámec 1920 × 802): text vlevo, vyřezaná fotka vpravo končí na spodní hraně,
   rozostřený mozek mezi nadpisem a fotkou. Scéna 1150 jednotek od levé hrany textu po pravou hranu fotky. */
.wsh {
    --u: min(calc(100vw / 1300), 1px);
    position: relative;
    height: calc(741 * var(--u)); /* rámec Figmy 802, obsah posunutý o 61 nahoru (fotka začíná na horní hraně) */
    margin-bottom: var(--section-gap); /* fotka končí na hraně, Kontakt pod ní začíná fotkou — bez mezery by na sebe narážely */
    background: var(--white);
    overflow: hidden;
}

.wsh-stage {
    position: relative;
    width: calc(1150 * var(--u));
    height: 100%;
    margin: 0 auto;
}

.wsh-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: calc(80 * var(--u));
}

.wsh .section-label {
    font-size: 1rem;
    font-weight: 800;
    line-height: 22px;
    letter-spacing: 0;
    margin-bottom: calc(28 * var(--u));
}

/* Fotka je průhledné WebP, takže nezakrývá čárku nadpisu; mozek leží nad nadpisem */
.wsh-visual {
    position: absolute;
    left: calc(468 * var(--u));
    top: 0;
    width: calc(681 * var(--u));
    pointer-events: none;
}

.wsh-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1362 / 1482;
}

.wsh-brain {
    position: absolute;
    left: calc(-75 * var(--u));
    top: calc(134 * var(--u));
    width: calc(340 * var(--u));
    max-width: none;
    filter: blur(calc(5.7 * var(--u)));
}

/* Malý rozmazaný mozek přes pravý horní roh šedého podkladu (podklad je jen od 1101px) */
.wsh-brain-small {
    display: none;
}

@media (min-width: 1101px) {
    .wsh-brain-small {
        display: block;
        position: absolute;
        left: calc(575 * var(--u));
        top: calc(40 * var(--u));
        width: calc(139 * var(--u));
        max-width: none;
        filter: blur(calc(10 * var(--u)));
    }
}

/* Mozky se vznášejí jako ilustrace v heru (malý v jiném rytmu) */
@media (prefers-reduced-motion: no-preference) {
    .wsh-brain {
        animation: heroFloat 6s ease-in-out infinite;
    }

    .wsh-brain-small {
        animation: heroFloat 7s ease-in-out -2.5s infinite;
    }
}

.wsh h2 {
    font-size: calc(96 * var(--u));
    line-height: 0.87;
    white-space: nowrap;
}

.wsh-sub {
    width: max(300px, calc(434 * var(--u)));
    margin: calc(39 * var(--u)) 0 calc(42 * var(--u));
    font-size: max(15px, calc(18 * var(--u)));
    font-weight: 700;
    line-height: 1.25;
    color: var(--black);
}

.wsh-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    width: max(300px, calc(345 * var(--u)));
    margin-bottom: calc(36 * var(--u));
}

.wsh-meta li {
    display: flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border: 1px solid var(--black);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

/* early bird — zvýrazněný štítek (černá výplň) */
.wsh-meta li.wsh-meta-eb {
    background: var(--black);
    color: var(--white, #fff);
    animation: ebWiggle 3.2s ease-in-out infinite;
}

/* lehké zavrtění každé ~3 s, zbytek času stojí */
@keyframes ebWiggle {
    0%, 76%, 100% { transform: rotate(0); }
    80% { transform: rotate(-3deg); }
    84% { transform: rotate(2.5deg); }
    88% { transform: rotate(-1.5deg); }
    92% { transform: rotate(1deg); }
    96% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
    .wsh-meta li.wsh-meta-eb { animation: none; }
}

.wsh-check {
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: var(--grey-dark);
}

.wsh-check a {
    color: var(--black);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .bcta-sticker {
        animation: none;
    }
}

/* ============================================
   CONTACT
   ============================================ */
/* Podle Figmy (rámec 1920 × 802, obsah 1110 široký). --u = jeden pixel návrhu. */
.contact {
    --u: min(calc(100vw / 1250), 1px);
    background: var(--white);
    overflow: hidden;
}

.contact-grid {
    position: relative;
    width: calc(1110 * var(--u));
    min-height: calc(802 * var(--u));
    margin: 0 auto;
}

.contact-left {
    position: relative;
    width: calc(540 * var(--u));
    margin-left: calc(592 * var(--u));
    padding-top: calc(80 * var(--u)); /* Figma 55, +25 kvůli jednotné mezeře nad štítkem sekce */
}

.contact-left .section-label {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 22px;
    letter-spacing: 0;
    margin-bottom: calc(32 * var(--u));
}

.contact-left h2 {
    font-size: calc(96 * var(--u));
    line-height: 1.04;
    white-space: nowrap;
    padding-top: calc(6 * var(--u));
    margin-bottom: calc(5 * var(--u));
}

.contact-lead {
    font-size: max(16px, calc(18 * var(--u)));
    line-height: 1.35;
    color: var(--black);
}

/* Blok „30 min — konzultace zdarma“ */
.contact-consult {
    display: flex;
    align-items: flex-start;
    gap: calc(21 * var(--u));
    box-sizing: border-box;
    width: fit-content;
    min-width: calc(419 * var(--u));
    max-width: 100%;
    padding: calc(13 * var(--u)) calc(20 * var(--u)) calc(12 * var(--u)) calc(22 * var(--u));
    border: 1px solid var(--black);
    border-radius: calc(19 * var(--u));
    margin: calc(39 * var(--u)) 0 calc(11 * var(--u)) calc(-2 * var(--u));
}

.contact-consult-num {
    flex: none;
    width: calc(52 * var(--u));
    font-family: "novecento-sans-condensed", sans-serif;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    color: var(--black);
}

.contact-consult-num span {
    position: relative;
    top: calc(-3 * var(--u));
    display: block;
    font-size: calc(36 * var(--u));
    line-height: 0.88;
}

.contact-consult-num span:first-child {
    top: calc(-6 * var(--u));
    font-size: calc(64 * var(--u));
    line-height: 0.72;
}

.contact-consult-title {
    font-size: max(18px, calc(24 * var(--u)));
    font-weight: 700;
    line-height: 1.3;
    color: var(--black);
    margin-bottom: calc(4 * var(--u));
}

.contact-consult-desc {
    font-size: max(13px, calc(14 * var(--u)));
    line-height: 1.43;
    color: var(--black);
}

/* Kontaktní údaje pod tlačítkem: tři vedle sebe, adresa pod nimi (na telefonu po dvou) */
.contact-details {
    display: grid;
    grid-template-columns: calc(166 * var(--u)) calc(196 * var(--u)) auto;
    row-gap: calc(29 * var(--u));
    margin-top: calc(35 * var(--u));
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(7 * var(--u));
}

.contact-item strong {
    font-size: max(13px, calc(14 * var(--u)));
    font-weight: 800;
    line-height: 20px;
    text-transform: uppercase;
    color: var(--black);
}

.contact-item span,
.contact-item a {
    color: var(--black);
    font-size: max(13px, calc(14 * var(--u)));
    line-height: 1.43;
    transition: opacity var(--transition);
}

.contact-item a {
    text-decoration: underline;
}

.contact-item a:hover {
    opacity: 0.6;
}

.contact-decor {
    width: 80px;
    opacity: 0.12;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--grey-mid);
    border-radius: 0;
    padding: 1rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--black);
    background: var(--grey-light);
    outline: none;
    transition: border-color var(--transition), background var(--transition);
    appearance: none;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--black);
    background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

.contact-form .btn-black {
    align-self: flex-start;
    margin-top: 0.5rem;
}

/* Fotka vlevo přesahuje spodní hranu sekce (ořízne ji overflow na .contact) */
.contact-right {
    position: absolute;
    left: 0;
    top: calc(13 * var(--u));
    width: calc(552 * var(--u));
    height: calc(883 * var(--u));
}

.contact-skeleton {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 50% 100%;
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s ease;
}

/* Při scrollu fotka vyjede zdola; skryto jen když běží JS (třída js-anim) */
.contact-right.js-anim .contact-skeleton {
    opacity: 0;
    transform: translateY(90px) scale(1.06);
}

.contact-right.js-anim.is-visible .contact-skeleton {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .contact-right.js-anim .contact-skeleton {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Užší okna — text nahoře, fotka pod ním (návrh pro mobil ve Figmě není) */
@media (max-width: 1100px) {
    .contact {
        --u: 0.8px;
        padding-top: var(--section-gap);
    }

    .contact-grid {
        display: flex;
        flex-direction: column;
        width: auto;
        min-height: 0;
        padding: 0 2rem;
    }

    .contact-left {
        order: -1;
        width: auto;
        margin-left: 0;
        padding: 0;
    }

    .contact-left h2 {
        font-size: clamp(3rem, 13vw, 5.5rem);
        white-space: normal;
    }

    .contact-consult-desc br {
        display: none;
    }

    /* Větší a oříznutá nad džínami — černé triko plynule navazuje na černou patičku */
    .contact-right {
        position: relative;
        top: auto;
        left: auto;
        width: min(96vw, 560px);
        height: auto;
        aspect-ratio: 1104 / 1530;
        overflow: hidden;
        margin: 2.5rem auto 0;
    }

    .contact-skeleton {
        height: auto;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--black);
    color: var(--white);
    padding: var(--section-gap) 0 3rem;
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 2rem;
}

.footer-logo-wrap {
    display: block;
    flex-shrink: 0;
}

.footer-logo-main {
    display: block;
    width: 208px;
    height: auto;
    margin: 0;
    filter: invert(1); /* černé logo → bílé (bílá verze kruhového loga není) */
}

.footer-nav {
    display: flex;
    gap: 4rem;
}

.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav-heading {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.25rem;
}

.footer-nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-nav-link:hover {
    color: var(--white);
    opacity: 0.6;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
}

/* Odkaz na zásady ochrany osobních údajů — vpravo dole, malý a nenápadný */
.footer-legal {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.footer-legal:hover {
    color: var(--white);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
}


/* ============================================
   RESPONSIVE
   ============================================ */


@media (max-width: 768px) {
    .portfolio-arrow-btn {
        width: 60px;
        height: 60px;
        right: 1.5rem;
    }

    .process-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .process-right {
        order: 0;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .contact-grid {
        padding: 0 1.5rem;
    }

    .contact-details {
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-nav {
        gap: 2.5rem;
    }
}


/* ============================================
   INSTAGRAM FEED
   ============================================ */
.instagram-feed {
    padding: var(--section-gap) 0;
    background: var(--white);
    text-align: center;
}

.instagram-feed h2 {
    margin-bottom: 3rem;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
}

.instagram-grid {
    display: flex;
    gap: 6px;
    margin-bottom: 2.5rem;
}

.ig-item {
    flex: 1;
    max-width: none;
    aspect-ratio: 4 / 5;
    display: block;
    overflow: hidden;
    position: relative;
    background: var(--grey-light);
}

.ig-img-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.ig-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.ig-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ig-item:hover .ig-overlay {
    opacity: 1;
}

.ig-btn {
    margin-top: 0.5rem;
}

.ig-loading,
.ig-error {
    color: var(--grey-dark);
    font-size: 0.95rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .instagram-grid {
        gap: 4px;
    }

    .ig-item {
        max-width: none;
    }
}

/* ============================================
   LOGOS MARQUEE (inside about)
   ============================================ */
.logos-marquee {
    background: var(--white);
    margin-bottom: 0;
    padding: 0 max(4rem, 7.135vw); /* 137px při šířce 1920 */
}

.logos-marquee .section-label {
    display: block;
    text-align: center;
    margin-bottom: 37px;
}

/* Užší okna — text nahoře, fotka pod ním: prst ukazuje nahoru na text (návrh pro mobil ve Figmě není) */
@media (max-width: 1100px) {
    .about {
        --u: min(calc((100vw - 3rem) / 547), 0.8px);
    }

    .about-stage {
        display: flex;
        flex-direction: column;
        width: auto;
        padding: 0 2rem;
        margin-top: 3.5rem;
    }

    /* Na střed jde černý box; průhledné okraje fotky se oříznou */
    .about-visual {
        width: calc(547 * var(--u));
        margin: 0 auto;
        overflow: hidden;
    }

    .about-box {
        border-radius: 28px;
    }

    .about-visual {
        order: 2;
        margin-top: 3rem;
    }

    .about-text {
        padding-top: 0;
    }

    .about-heading {
        font-size: clamp(3rem, 7vw, 6rem);
        white-space: normal;
        margin-bottom: 1.5rem;
    }
}

.logos-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.5rem, 4.5vw, 86px);
}

.logo-frame {
    flex: 0 1 211px;
    min-width: 0;
    height: 119px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-frame:last-child {
    flex-basis: 163px;
}

.logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ============================================
   PENCIL CURSOR
   ============================================ */
/* ============================================
   MOBILE (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Služby — nepravidelná mřížka ve 2 sloupcích (bez děr) */
    .services-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: minmax(100px, auto);
        gap: 12px;
    }

    .service-card:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
    .service-card:nth-child(2) { grid-column: 1 / 2; grid-row: 3 / 5; }
    .service-card:nth-child(3) { grid-column: 2 / 3; grid-row: 3 / 6; }
    .service-card:nth-child(4) { grid-column: 1 / 2; grid-row: 5 / 7; }
    .service-card:nth-child(5) { grid-column: 2 / 3; grid-row: 6 / 8; }
    .service-card:nth-child(6) { grid-column: 1 / 2; grid-row: 7 / 10; }
    .service-card:nth-child(7) { grid-column: 2 / 3; grid-row: 8 / 10; }
    .service-card:nth-child(8) { grid-column: 1 / 3; grid-row: 10 / 12; }

    .service-card {
        padding: 1.25rem;
        border-radius: 24px;
        gap: 1rem;
    }

    .service-num {
        font-size: 2.1rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.82rem;
    }

    /* Brand check + Workshop — vše pod sebou, tlačítka na plnou šířku */
    .bcta-text {
        padding: 0 1.5rem;
    }

    .bcta-text h2 {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .bcta-sub,
    .wsh-sub {
        font-size: 1.05rem;
    }

    /* Hero — tlačítka pod sebou (rozložení pod 1100px je u stylů hera) */
    .hero-stage {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-title {
        font-size: clamp(3.5rem, 18vw, 5.5rem);
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    /* tlačítka pod sebou na střed, jako v ostatních sekcích */
    .hero-actions {
        align-items: center;
    }

    .about-stage {
        padding: 0 1.5rem;
    }

    /* Sekce — menší vertikální odsazení */
    .services {
        padding: var(--section-gap) 0;
    }

    .services-title {
        margin-bottom: 2.5rem;
    }

    .portfolio {
        padding: var(--section-gap) 0;
    }

    .portfolio h2 {
        margin-bottom: 2rem;
    }

    .process {
        padding: var(--section-gap) 0;
    }

    .instagram-feed {
        padding-bottom: var(--section-gap);
    }

    /* Loga referencí — mřížka 2 vedle sebe */
    .logos-marquee {
        padding: 0 1.5rem;
        margin-bottom: 0;
    }

    .logos-track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem 1.5rem;
        max-width: 360px;
        margin: 0 auto;
    }

    .logo-frame {
        height: auto;
        padding: 0;
    }

    .logo-frame img {
        width: 100%;
        height: auto;
    }

    /* Ježek Sport má vyšší poměr stran — zmenšit, ať sedí k ostatním (jako na desktopu 163 / 211) */
    .logo-frame:last-child img {
        width: 77%;
    }

    /* Služby — samolepka hrnku uvnitř displeje */
    .services-sticker {
        top: 2.5rem;
        right: 1rem;
        width: 130px;
    }

    /* Mé práce — první karta zarovnaná s obsahem */
    .portfolio-carousel {
        scroll-padding-left: 1.5rem;
        gap: 12px;
        cursor: auto;
    }

    .portfolio-carousel .portfolio-card:first-child {
        margin-left: 1.5rem;
    }

    .portfolio-carousel .portfolio-card:last-child {
        margin-right: 1.5rem;
    }

    .portfolio-card {
        width: 78vw;
    }

    .portfolio-card-img {
        border-radius: 28px;
    }

    .portfolio-arrow-btn {
        display: none;
    }

    /* Proces */
    .process-left {
        text-align: center;
        align-items: center;
    }

    .process-right {
        max-width: 280px;
        border-radius: 28px;
    }

    /* Instagram — swipe místo 5 malých dlaždic */
    .instagram-grid {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding: 0 1.5rem;
        scroll-padding-left: 1.5rem;
    }

    .instagram-grid::-webkit-scrollbar {
        display: none;
    }

    .ig-item {
        flex: 0 0 62vw;
        scroll-snap-align: start;
    }

    .ig-item:last-child {
        margin-right: 1.5rem;
    }

    /* Patička — vše na střed */
    .footer {
        padding: var(--section-gap) 0 2.5rem;
    }

    .footer-top {
        align-items: center;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-logo-main {
        width: 180px;
        margin: 0 auto;
    }

    .footer-nav {
        justify-content: center;
        gap: 3rem;
    }

    .footer-nav-col {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

/* ============================================
   CASE STUDIES — karty (homepage #case-studies + přehled /case-studies/)
   Karty generuje scripts/build-case-studies.mjs
   ============================================ */
.case-studies {
    padding: var(--section-gap) 0;
    background: var(--white);
}

.cs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 2rem;
    margin-top: 2.5rem;
}

.cs-card {
    display: flex;
    flex-direction: column;
    color: var(--black);
}

.cs-card-img {
    aspect-ratio: 4 / 5;
    border-radius: 39px;
    border: 2px solid var(--black);
    overflow: hidden;
    background: var(--grey-light);
}

.cs-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.cs-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.5rem 0.25rem 0;
}

.cs-card-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1;
    margin: 0;
}

.cs-card-perex {
    color: var(--black);
    max-width: 46ch;
}

.cs-card .btn {
    margin-top: auto; /* tlačítka obou karet v jedné linii i při různě dlouhém perexu */
}

.cs-card-perex {
    margin-bottom: 0.5rem;
}

.cs-card:hover .btn-solid {
    background: transparent;
    color: var(--black);
}

/* Zástupný rámeček, dokud není fotka nahraná */
.cs-ph {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--grey-light);
    text-align: center;
}

.cs-ph span {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.cs-ph small {
    font-weight: 400;
    color: var(--grey-dark);
    word-break: break-all;
}

/* Chybějící text [doplnit] */
.cs-todo {
    background: var(--grey-mid);
    color: var(--black);
    padding: 0 0.3em;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .cs-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-top: 1.5rem;
    }

    .cs-card-img {
        border-radius: 28px;
    }
}

/* Telefon: Brand check, Workshop a Kontakt podle mobilních návrhů ve Figmě */
@media (max-width: 768px) {
    /* Brand check podle Figmy (node 102:149, rámec 402 široký, --m = 1 px návrhu):
       mozek je zapečený ve fotce bc_marek_mobil.jpg, fotka začíná za tlačítkem a končí na hraně sekce */
    .bcta {
        --m: calc(100vw / 402);
    }

    .bcta-text {
        padding: 0 1rem;
    }

    .bcta-text .section-label {
        margin-bottom: 2.25rem;
    }

    /* řádkování 1, aby háček nad Š a Č nezasahoval do řádku nad ním */
    .bcta-text h2 {
        font-size: min(64px, 16vw);
        line-height: 1;
        margin-bottom: 0.75rem;
    }

    .bcta-sub {
        max-width: none;
        font-size: 15px;
        line-height: 1.3;
        margin-bottom: 30px;
    }

    .bcta .btn {
        display: flex;
        width: min(280px, 100%);
        margin: 0 auto;
    }

    .bcta-visual {
        z-index: -1;
        height: auto;
        margin: calc(-76 * var(--m)) 0 0;
    }

    .bcta-ghost,
    .bcta-sticker {
        display: none;
    }

    .bcta-photo {
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1005 / 1433;
    }

    /* Workshop podle Figmy (node 109:443, --m = 1 px rámce 402): fotka nahoře, spodní hrana rozostřeného mozku
       se lehce dotýká nadpisu, štítky, tlačítko na střed, pod ním odkaz na brand check */
    .wsh {
        --m: calc(100vw / 402);
        height: auto;
        margin-bottom: 0;
        padding: var(--section-gap) 0;
    }

    .wsh-stage {
        width: auto;
        padding: 0 1rem;
    }

    .wsh-text {
        padding-top: 0;
    }

    .wsh .section-label {
        margin-bottom: 0;
    }

    .wsh-visual {
        position: relative;
        left: auto;
        top: auto;
        width: calc(372 * var(--m));
        height: calc(495 * var(--m));
        margin: 6px 0 0 -1rem;
    }

    .wsh-brain {
        left: calc(62 * var(--m));
        top: calc(275 * var(--m));
        width: calc(280 * var(--m));
        filter: blur(calc(5.7 * var(--m)));
    }

    .wsh h2 {
        font-size: min(64px, 16vw);
        white-space: normal;
    }

    .wsh-sub {
        width: auto;
        font-size: 15px;
        margin: 0.6rem 0 1.4rem;
    }

    .wsh-meta {
        width: auto;
        margin-bottom: 33px;
    }

    .wsh .btn {
        display: flex;
        width: min(280px, 100%);
        margin: 0 auto;
    }

    .wsh-check {
        align-self: center;
        text-align: center;
        font-size: 13px;
    }

    /* Kontakt podle Figmy (node 109:424, rámec 403 široký): text, konzultace přes celou šířku,
       tlačítko 280px na střed, údaje po dvou, dole vyřezaná fotka končící na hraně sekce */
    .contact {
        --u: 1px;
    }

    .contact-grid {
        padding: 0 1rem;
    }

    .contact-left .section-label {
        margin-bottom: 2.25rem;
    }

    .contact-left h2 {
        font-size: min(64px, 16vw);
        line-height: 0.87;
        padding-top: 0;
        margin-bottom: 0.75rem;
    }

    .contact-lead {
        font-size: 15px;
    }

    .contact-consult {
        width: 100%;
        min-width: 0;
        gap: 16px;
        padding: 13px 12px 12px 18px;
        margin: 1.25rem 0 0;
    }

    .contact-consult-title {
        font-size: min(24px, 6vw);
        white-space: nowrap;
    }

    .contact-consult-desc {
        font-size: 13px;
    }

    .contact-consult-desc br.contact-br-mob {
        display: inline;
    }

    .contact .btn {
        display: flex;
        width: min(280px, 100%);
        margin: 15px auto 0;
    }

    .contact-details {
        grid-template-columns: 166px 1fr;
        column-gap: 0;
        row-gap: 32px;
        margin-top: 41px;
    }

    /* Šedý podklad za fotkou jako na desktopu — hlava vystupuje nad něj.
       Fotka je JPG na bílé, multiply bílou propustí (na podkladu šedá, nad ním bílá sekce) */
    .contact-right {
        width: 100%;
        aspect-ratio: 370 / 520;
        margin-top: 0.75rem;
        isolation: isolate;
    }

    .contact-right::before {
        content: "";
        position: absolute;
        z-index: -1;
        left: 0;
        right: 0;
        top: 18%;
        bottom: 0;
        background: var(--photo-ground);
        border-radius: calc(39 * var(--u));
    }

    .contact-skeleton {
        width: 100%;
        height: 100%;
        object-fit: cover;
        mix-blend-mode: multiply;
    }
}

/* Zalomení popisu konzultace v Kontaktu jen na telefonu */
.contact-br-mob { display: none; }
