/* =======================================
   Reset
   ======================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* =======================================
   ⬇ POZADÍ SEKCÍ — jedno místo na orientaci
   .hero    → cca ř. 520
   .work    → cca ř. 565
   .trust   → cca ř. 670
   .body    → cca ř. 115  (pozadí celé stránky pod sekcemi)

   Horizontální padding (80/40/16 px) je na každé sekci
   zvlášť — žádné `main { padding }`, takže barva sekce
   jde od okraje k okraji obrazovky.
   ======================================= */

/* =======================================
   RAMP-UP animace (scroll triggered + page load)
   ======================================= */
.ramp-up {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.ramp-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger grupa — děti se animují postupně */
.ramp-up-stagger > * {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.ramp-up-stagger.in-view > * {
    opacity: 1;
    transform: translateY(0);
}

.ramp-up-stagger.in-view > *:nth-child(1)  { transition-delay: 0ms;   }
.ramp-up-stagger.in-view > *:nth-child(2)  { transition-delay: 60ms;  }
.ramp-up-stagger.in-view > *:nth-child(3)  { transition-delay: 120ms; }
.ramp-up-stagger.in-view > *:nth-child(4)  { transition-delay: 180ms; }
.ramp-up-stagger.in-view > *:nth-child(5)  { transition-delay: 240ms; }
.ramp-up-stagger.in-view > *:nth-child(6)  { transition-delay: 300ms; }
.ramp-up-stagger.in-view > *:nth-child(7)  { transition-delay: 360ms; }
.ramp-up-stagger.in-view > *:nth-child(8)  { transition-delay: 420ms; }

/* Page-load animace pro hero + navbar */
@keyframes loadInUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes loadInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.navbar {
    animation: loadInDown 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title {
    animation: loadInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* Hero buttony naběhnou jednotlivě (ne na rodiči),
   aby Order service neměl problémy se stacking kontextem */
.hero-actions .see-work-btn {
    animation: fadeIn 0.8s ease 0.4s both;
}

/* Respekt prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .ramp-up,
    .ramp-up-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .navbar,
    .hero-title,
    .hero-actions {
        animation: none;
        opacity: 1;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    /* ↓ barva pozadí celé stránky (pod sekcemi) — uprav tady */
    background-color: #ffffff;
    color: #111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sdílené timing functions/durations pro plynulý dojem */
:root {
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.4, 0.64, 1);
    --dur-nav: 0.65s;
    --dur-fade: 0.35s;
}

/* =======================================
   NAVBAR (na scroll plynule do pillu)
   ======================================= */
.navbar {
    position: fixed;
    top: 32px;
    left: 80px;
    right: 80px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* mezera mezi logo dot a nav-right když se navbar zúží do pillu */
    height: 52px;
    padding: 0;
    background-color: transparent;
    border-radius: 999px;
    will-change: left, padding;
    transition:
        left var(--dur-nav) var(--ease-out-expo),
        padding var(--dur-nav) var(--ease-out-expo),
        background-color 0.45s ease,
        box-shadow 0.45s ease;
}

body.scrolled .navbar {
    left: auto;
    padding: 6px;
    background-color: #f3f3f1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
}

/* === Logo (text ⇄ dot, sjednocené timing) === */
.logo {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    width: 175px;
    text-decoration: none;
    color: #111;
    will-change: width;
    transition: width var(--dur-nav) var(--ease-out-expo);
}

body.scrolled .logo {
    width: 40px;
}

/* === Logo full (wordmark, img) === */
.logo-full {
    position: absolute;
    left: 0;
    top: 50%;
    height: 28px;
    width: auto;
    object-fit: contain;
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
    transform-origin: left center;
    will-change: opacity, transform;
    transition:
        opacity 0.35s ease,
        transform var(--dur-nav) var(--ease-out-expo);
}

/* === Logo dot (CSS kolečko s mini logem uvnitř) === */
.logo-dot {
    position: absolute;
    left: 0;
    top: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-50%) scale(0.4);
    transform-origin: left center;
    will-change: opacity, transform;
    transition:
        opacity 0.35s ease 0.12s,
        transform 0.55s var(--ease-bounce) 0.1s;
}

.logo-dot img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

body.scrolled .logo-full {
    opacity: 0;
    transform: translateY(-50%) translateX(-16px) scale(0.82);
    transition:
        opacity 0.28s ease,
        transform 0.5s var(--ease-out-expo);
}

body.scrolled .logo-dot {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* === Nav right === */
.nav-right {
    display: flex;
    align-items: center;
    /* mezera mezi nav-links / Contact / hamburger */
    gap: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-right: 8px;
    opacity: 1;
    max-width: 700px;
    overflow: hidden;
    will-change: opacity, max-width;
    transition:
        opacity 0.3s ease,
        max-width var(--dur-nav) var(--ease-out-expo),
        margin-right var(--dur-nav) var(--ease-out-expo);
}

body.scrolled .nav-links {
    opacity: 0;
    max-width: 0;
    margin-right: 0;
    pointer-events: none;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #111;
    font-size: 15px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.nav-item:hover {
    opacity: 0.6;
}

/* =======================================
   SERVICES DROPDOWN
   ======================================= */
.dropdown { position: relative; }

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    color: #111;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: opacity 0.2s ease;
}

.dropdown-trigger:hover { opacity: 0.6; }

.chevron {
    transition: transform 0.25s ease;
}

.dropdown.open .chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: -14px;
    background-color: #ffffff;
    border-radius: 14px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12),
                0 2px 6px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.3s var(--ease-bounce);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #111;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.dropdown-menu a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* =======================================
   HAMBURGER
   ======================================= */
.hamburger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 0;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0;
    opacity: 0;
    overflow: hidden;
    will-change: width, opacity;
    transition:
        width var(--dur-nav) var(--ease-out-expo),
        opacity 0.35s ease 0.2s,
        background-color 0.2s ease;
}

body.scrolled .hamburger {
    width: 40px;
    opacity: 1;
}

.hamburger:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.hamburger span {
    width: 18px;
    height: 1.6px;
    background-color: #111;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

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

.hamburger.open span:nth-child(2) {
    transform: translateY(-3.3px) rotate(-45deg);
}

/* =======================================
   MENU OVERLAY - hezká animace
   ======================================= */
.menu-overlay {
    position: fixed;
    top: 100px;
    /* zarovnaný pod hamburger: navbar right (80px) + navbar padding (6px) = 86px */
    right: 86px;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 8px;
    /* šířka odpovídá pill navbaru (logo + Contact + hamburger ≈ 210 px) */
    min-width: 0;
    width: 210px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14),
                0 3px 8px rgba(0, 0, 0, 0.05);
    z-index: 99;
    opacity: 0;
    transform: translateY(-10px) scale(0.94);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.2s ease-out,
                transform 0.4s var(--ease-bounce);
}

.menu-overlay.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.menu-overlay nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-overlay a {
    text-decoration: none;
    color: #111;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s ease,
                transform 0.3s var(--ease-bounce),
                background-color 0.15s ease;
}

.menu-overlay.open a {
    opacity: 1;
    transform: translateX(0);
}

.menu-overlay.open a:nth-child(1) { transition-delay: 0.06s; }
.menu-overlay.open a:nth-child(2) { transition-delay: 0.11s; }
.menu-overlay.open a:nth-child(3) { transition-delay: 0.16s; }
.menu-overlay.open a:nth-child(4) { transition-delay: 0.21s; }
.menu-overlay.open a:nth-child(5) { transition-delay: 0.26s; }

.menu-overlay a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* =======================================
   Buttons
   ======================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.btn-dark {
    background-color: #111;
    color: #fff;
}

.btn-dark:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.btn-light {
    background-color: #e6e6e3;
    color: #111;
}

.btn-light:hover {
    background-color: #d9d9d6;
}

.btn-sm {
    padding: 11px 22px;
    font-size: 14px;
}

/* =======================================
   ORDER SERVICE — v hero in-flow,
   po scrollu .is-fixed → fixní v rohu
   ======================================= */
.order-btn {
    /* žádný custom shadow zde, dostane se přes is-fixed */
}

.order-btn.is-fixed {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;                /* nad vším — i nad navbarem a menu */
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

/* =======================================
   Main — žádný horizontální padding.
   Padding sedí na každé sekci zvlášť.
   ======================================= */
main {
    padding: 0;
}

/* =======================================
   HERO  ← vlastní background slot, full-bleed
   ======================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 140px;
    padding-bottom: 32px;
    padding-left: 80px;
    padding-right: 80px;

    /* ↓ barva pozadí HERO sekce — uprav tady */
    background-color: #E9E8EC;
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.hero-title {
    font-size: clamp(40px, 5.5vw, 84px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #111;
    flex: 1;
    margin: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* =======================================
   SELECTED WORK  ← vlastní background slot, full-bleed
   ======================================= */
.work {
    padding-top: 240px;
    padding-bottom: 100px;
    padding-left: 80px;
    padding-right: 80px;

    /* ↓ barva pozadí WORK sekce — uprav tady */
    background-color: transparent;
}

.section-title {
    font-size: clamp(40px, 5vw, 72px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #111;
    margin-bottom: 0;
}

.divider {
    border: none;
    border-top: 1px solid #d4d4d0;
    margin: 32px 0 28px;
}

.filters {
    display: inline-flex;
    background-color: #ececea;
    border-radius: 999px;
    padding: 6px;
    margin-bottom: 40px;
}

.filter-pill {
    padding: 11px 24px;
    border-radius: 999px;
    border: none;
    background-color: transparent;
    color: #111;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.filter-pill:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.04);
}

.filter-pill.active {
    background-color: #111;
    color: #fff;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px 18px;
    row-gap: 56px;
}

.work-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.35s var(--ease-out-expo);
}

.work-card.hidden {
    display: none;
}

/* Filter animation — všechny karty fadenou ven, pak ven/dovnitř */
.work-grid.filtering .work-card {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

.work-thumb {
    aspect-ratio: 342 / 456;
    width: 100%;
    background-color: #ececea;
    border-radius: 14px;
    cursor: pointer;
    object-fit: cover;
    display: block;
    transition:
        transform 0.45s var(--ease-out-expo),
        filter 0.35s ease;
}

.work-name {
    font-size: 17px;
    font-weight: 500;
    color: #111;
    transition: opacity 0.35s ease;
}

/* =======================================
   TRUST sekce  ← vlastní background slot, full-bleed
   ======================================= */
.trust {
    /* ↓ barva pozadí TRUST sekce — uprav tady */
    background-color: #f5f5f7;

    padding-top: 80px;
    padding-bottom: 100px;
    padding-left: 80px;
    padding-right: 80px;
}

.trust .section-title {
    margin-bottom: 0;
}

.trust-subtitle {
    font-size: 16px;
    color: #888;
    margin: 28px 0 60px;
    font-weight: 500;
}

.logos-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    min-height: 48px;
}

.logo-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: scale(1) translateY(0);
    transition:
        opacity 0.4s ease,
        transform 0.55s var(--ease-out-expo);
}

.logo-item.is-out {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
}

.brand-logo {
    height: 32px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    /* dokud nejsou loga přidaná, ať to není rozbité */
    background: transparent;
}

/* =======================================
   RESULTS (testimonials) — uvnitř Trust containeru
   ======================================= */
.trust-divider {
    border: none;
    border-top: 1px solid #d8d8da;
    margin: 80px 0 40px;
}

.results-label {
    font-size: 16px;
    color: #888;
    font-weight: 500;
    margin-bottom: 32px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: start;
}

.results-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.testimonial {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    width: 100%;
    box-sizing: border-box;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e0e0e3;
    flex-shrink: 0;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.testimonial-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #111;
    line-height: 1.2;
}

.verified {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.testimonial-role {
    font-size: 14px;
    color: #777;
}

.stars {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
}

.star {
    width: 16px;
    height: 16px;
}

.testimonial-text {
    font-size: 14px;
    line-height: 1.55;
    color: #222;
}

.testimonial-text p {
    margin-bottom: 12px;
}

.testimonial-text p:last-child {
    margin-bottom: 0;
}

.testimonial-media {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.testimonial-media.two-cols {
    grid-template-columns: 1fr 1fr;
}

.testimonial-media.four-cols {
    grid-template-columns: repeat(4, 1fr);
}

.testimonial-media img {
    width: 100%;
    border-radius: 8px;
    background-color: #e0e0e3;
    object-fit: cover;
    display: block;
}

.testimonial-media .media-portrait {
    aspect-ratio: 9 / 16;
}

.testimonial-media .media-square {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
}

.ba-label {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-top: 16px;
    margin-bottom: 8px;
}

@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    .trust-divider {
        margin: 60px 0 32px;
    }
}

/* Hover efekt: hovrnutá karta zvětší, ostatní ztmavnou */
.work-grid:has(.work-card:hover) .work-card:not(:hover) .work-thumb {
    filter: brightness(0.55);
}

.work-grid:has(.work-card:hover) .work-card:not(:hover) .work-name {
    opacity: 0.35;
}

.work-card:hover .work-thumb {
    transform: scale(1.04);
}

/* =======================================
   Responsive — horizontální padding sekcí
   ======================================= */
@media (max-width: 1024px) {
    .navbar { left: 40px; right: 40px; }

    .hero, .work, .trust {
        padding-left: 40px;
        padding-right: 40px;
    }
    .trust { padding-top: 60px; padding-bottom: 80px; }

    .order-btn.is-fixed {
        bottom: 24px;
        right: 24px;
    }
    /* navbar right 40 + padding 6 = 46 */
    .menu-overlay { right: 46px; top: 96px; }
    .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { width: 40px; opacity: 1; }
}

@media (max-width: 640px) {
    .navbar { left: 16px; right: 16px; top: 16px; }

    /* menší logo na mobilu */
    .logo { width: 130px; }
    .logo-full { height: 22px; }

    .hero, .work, .trust {
        padding-left: 16px;
        padding-right: 16px;
    }
    .hero {
        padding-top: 100px;
        padding-bottom: 80px;
    }
    .work {
        padding-top: 40px;
        padding-bottom: 100px;
    }
    .trust {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    .hero-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
    }
    .hero-title { font-size: 40px; }
    .hero-actions {
        flex-wrap: wrap;
    }
    .order-btn.is-fixed {
        bottom: 16px;
        right: 16px;
    }
    /* navbar right 16 + padding 6 = 22 */
    .menu-overlay { right: 22px; top: 76px; }
    .work-grid { grid-template-columns: 1fr; }
    .filters {
        /* drží inline-flex z defaultu, aby pill nehulil přes celou šířku */
        flex-wrap: wrap;
    }
    .logos-row {
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .navbar {
        gap: 14px;
    }
}