/* ===================================================================
   Tuzi.cz — Architectural Minimal
   Volkhov (display) + Poppins (sans) · navy + terracotta on near-white
   Layered grays for bands · dark graphite for break + footer
   Mobile-first · 8 px spacing · 60-30-10 · WCAG AA · dual tokens
   =================================================================== */

/* ============================
   1. Reset & base
   ============================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 88px;     /* offset pro sticky header při anchor jumpech */
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul, ol { list-style: none; }
address { font-style: normal; }
[hidden] { display: none !important; }

/* ============================
   2. Tokens
   ============================ */
:root {
    /* 60% bg / 30% surface / 10% accent — Architectural Minimal */
    --c-bg:                 #FAFAF8;     /* near-white (jemně teplé) */
    --c-surface:            #FFFFFF;
    --c-bg-soft:            #F2F1ED;     /* light gray band */
    --c-bg-blue:            #E7E6E2;     /* deeper stone band */

    /* Accent — terracotta (kontrast s šedou paletou) */
    --c-accent:             #B85734;
    --c-accent-hover:       #9A4524;
    --c-accent-soft:        #F2D8C5;

    /* Pastel icon backgrounds — distinct on near-white */
    --c-pastel-peach:       #E5C6AB;
    --c-pastel-peach-ink:   #8C3E1C;
    --c-pastel-sky:         #D9DFE9;
    --c-pastel-sky-ink:     #0F2A45;
    --c-pastel-sand:        #E8D08A;
    --c-pastel-sand-ink:    #6B5009;
    --c-pastel-sage:        #DCDFCF;
    --c-pastel-sage-ink:    #4F6E3D;

    /* Light context text */
    --c-text:               #0F2A45;     /* navy = z loga */
    --c-text-muted:         #44506A;
    --c-text-subtle:        #82899B;
    --c-border:             #E0DFDA;
    --c-border-strong:      #B6B5AE;

    /* Dark context — graphite */
    --c-bg-dark:            #1F2126;     /* dark graphite */
    --c-surface-dark:       #2A2C32;
    --c-text-on-dark:       #FAFAF8;
    --c-text-muted-on-dark: #B6B7BC;
    --c-text-subtle-on-dark:#7A7C84;
    --c-border-on-dark:     #353740;
    --c-accent-on-dark:     #D87E54;
    --c-accent-on-dark-hover:#E08F66;

    /* Status */
    --c-error:   #B23A48;
    --c-success: #4A7C59;
    --c-warning: #C68A2F;
    --c-info:    #3D6B8C;

    /* Typography */
    --f-display: "Volkhov", "DM Serif Display", Georgia, serif;
    --f-sans:    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --fs-caption: 0.75rem;
    --fs-small:   0.875rem;
    --fs-body:    1rem;
    --fs-h4:      1.25rem;
    --fs-h3:      1.5rem;
    --fs-h2:      2rem;
    --fs-h1:      2.5rem;
    --fs-display: 3.5rem;

    --lh-tight:   1.1;
    --lh-snug:    1.25;
    --lh-normal:  1.6;
    --lh-relaxed: 1.75;

    /* Spacing (8 px) */
    --s-1: 0.25rem;
    --s-2: 0.5rem;
    --s-3: 1rem;
    --s-4: 1.5rem;
    --s-5: 2rem;
    --s-6: 3rem;
    --s-7: 4rem;
    --s-8: 6rem;
    --s-9: 8rem;

    /* Layout */
    --max-w:        1240px;
    --max-w-text:   640px;
    --pad-x:        1rem;

    /* Radii — playful, larger */
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 9999px;

    /* Shadows — neutrální graphite */
    --shadow-sm: 0 2px 6px rgba(31, 33, 38, 0.06);
    --shadow-md: 0 12px 30px rgba(31, 33, 38, 0.08);
    --shadow-lg: 0 24px 60px rgba(31, 33, 38, 0.12);
    --shadow-card: 0 12px 28px rgba(31, 33, 38, 0.06), 0 2px 6px rgba(31, 33, 38, 0.04);
    --shadow-card-hover: 0 18px 40px rgba(31, 33, 38, 0.10), 0 4px 8px rgba(31, 33, 38, 0.05);

    --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
    --dur-fast: 160ms;
    --dur-mid:  280ms;
}

/* ============================
   3. Base
   ============================ */
body {
    font-family: var(--f-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ============================
   4. Utilities
   ============================ */
.container {
    width: 100%;
    max-width: calc(var(--max-w) + 2 * var(--pad-x));
    margin: 0 auto;
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
}

.skip-link {
    position: absolute;
    left: var(--s-3);
    top: var(--s-3);
    padding: var(--s-2) var(--s-3);
    background: var(--c-text);
    color: var(--c-bg);
    border-radius: var(--r-sm);
    transform: translateY(-150%);
    transition: transform var(--dur-mid) var(--ease);
    z-index: 1000;
}
.skip-link:focus { transform: translateY(0); }

/* Focus ring */
*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
    border-radius: 4px;
}
.section--dark *:focus-visible { outline-color: var(--c-accent-on-dark); }

/* ===== Typography ===== */
.display-1 {
    font-family: var(--f-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 4.5vw + 1rem, 4.5rem);
    line-height: var(--lh-tight);
    letter-spacing: -0.01em;
    color: var(--c-text);
}
.h-1 {
    font-family: var(--f-display);
    font-size: clamp(var(--fs-h1), 3vw + 1.25rem, 3rem);
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: -0.005em;
    color: var(--c-text);
}
.h-2 {
    font-family: var(--f-display);
    font-size: var(--fs-h2);
    font-weight: 700;
    line-height: var(--lh-tight);
}
.h-3 {
    font-family: var(--f-sans);
    font-size: var(--fs-h3);
    font-weight: 600;
    line-height: var(--lh-snug);
    letter-spacing: -0.005em;
}
.h-4 {
    font-family: var(--f-sans);
    font-size: var(--fs-h4);
    font-weight: 600;
    line-height: var(--lh-snug);
}
.h-1--dark { color: var(--c-text-on-dark); }

.eyebrow,
.section-eyebrow {
    display: inline-block;
    font-family: var(--f-sans);
    font-size: var(--fs-caption);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-text-muted);
}
.section-eyebrow {
    color: var(--c-accent);
    margin-bottom: var(--s-3);
}
.eyebrow--accent { color: var(--c-accent); }
.eyebrow--dark { color: var(--c-accent-on-dark); }

.muted { color: var(--c-text-muted); }
.small { font-size: var(--fs-small); }

p { max-width: var(--max-w-text); }

/* ===== Hand-drawn underline ===== */
.underlined {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}
.scribble {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.15em;
    width: 100%;
    height: 0.4em;
    pointer-events: none;
}

/* ============================
   5. Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 44px;
    padding: var(--s-2) var(--s-4);
    font-family: var(--f-sans);
    font-size: var(--fs-small);
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--r-sm);
    border: 1.5px solid transparent;
    transition: background-color var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
}
.btn-sm { min-height: 40px; padding: 6px var(--s-3); font-size: 0.825rem; }
.btn-lg { min-height: 52px; padding: var(--s-3) var(--s-5); font-size: var(--fs-body); border-radius: var(--r-md); }

.btn-primary {
    background: var(--c-accent);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(184, 87, 52, 0.32);
}
.btn-primary:hover {
    background: var(--c-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(184, 87, 52, 0.42);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary[disabled], .btn-primary[aria-disabled="true"] {
    background: var(--c-border);
    color: var(--c-text-subtle);
    box-shadow: none;
    cursor: not-allowed;
}
.section--dark .btn-primary {
    background: var(--c-accent);
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(184, 87, 52, 0.42);
}
.section--dark .btn-primary:hover { background: var(--c-accent-on-dark-hover); }

.btn-ghost {
    background: var(--c-surface);
    color: var(--c-text);
    border-color: var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg); border-color: var(--c-text); }
.btn-ghost--dark {
    background: transparent;
    color: var(--c-text-on-dark);
    border-color: var(--c-border-on-dark);
}
.btn-ghost--dark:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--c-text-on-dark);
}

.btn-text {
    background: transparent;
    color: var(--c-text);
    padding: var(--s-2);
    min-height: 44px;
    box-shadow: none;
}
.btn-text:hover { color: var(--c-accent); }
.btn-text .play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    background: var(--c-accent);
    color: #fff;
    font-weight: 700;
    transition: transform var(--dur-fast) var(--ease);
}
.btn-text:hover .play-circle { transform: translateX(2px); }

/* ============================
   6. Header
   ============================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
}
.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    min-height: 72px;
    padding-top: var(--s-2);
    padding-bottom: var(--s-2);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
}
.brand-logo {
    height: 44px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}
.brand-logo--dark {
    height: 52px;
    max-width: 200px;
    /* If the logo is dark on transparent, invert it for the dark footer.
       If logo already works on dark, remove this filter. */
    filter: brightness(0) invert(1);
}
.brand-wordmark {
    font-family: var(--f-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--c-text-on-dark);
}

.nav-primary { display: none; }
.nav-primary a {
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--c-text);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-sm);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: color var(--dur-fast);
}
.nav-primary a:hover { color: var(--c-accent); }

.header-cta { display: none; }

.nav-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 12px 10px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--c-text);
    border-radius: 1px;
    transition: transform var(--dur-fast), opacity var(--dur-fast);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-3) var(--pad-x) var(--s-5);
    background: var(--c-bg);
    border-top: 1px solid var(--c-border);
}
.nav-mobile a {
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--c-border);
    font-size: var(--fs-body);
    color: var(--c-text);
    min-height: 44px;
    display: flex;
    align-items: center;
}
.nav-mobile a.btn { justify-content: center; margin-top: var(--s-3); border-bottom: none; }

/* ============================
   7. Section base
   ============================ */
.section {
    padding-top: var(--s-7);
    padding-bottom: var(--s-7);
    position: relative;
}
.section--dark {
    background: var(--c-bg-dark);
    color: var(--c-text-on-dark);
}
.section-head { margin-bottom: var(--s-6); max-width: 720px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.section-head.split {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}
.section-side { color: var(--c-text-muted); max-width: 420px; }
.section-sub {
    margin-top: var(--s-3);
    color: var(--c-text-muted);
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
}

/* ============================
   8. Hero
   ============================ */
.hero {
    padding-top: var(--s-6);
    padding-bottom: var(--s-7);
    overflow: hidden;
    position: relative;
}

/* Decorative dot grids */
.dots {
    position: absolute;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, var(--c-accent-soft) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
    opacity: 0.7;
    pointer-events: none;
}
.dots--top-left { top: 80px; left: -20px; }
.dots--bottom-right {
    bottom: 40px; right: -20px;
    background-image: radial-gradient(circle, var(--c-pastel-sky) 1.5px, transparent 1.5px);
}

.hero-grid {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
    position: relative;
    z-index: 1;
}
.hero-text .eyebrow { margin-bottom: var(--s-3); }
.hero-text .display-1 { margin-bottom: var(--s-4); }
.hero-sub {
    font-size: var(--fs-body);
    line-height: var(--lh-normal);
    color: var(--c-text-muted);
    margin-bottom: var(--s-5);
    max-width: 480px;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3);
}

.hero-media {
    position: relative;
    padding: var(--s-2);
}
.hero-blob {
    /* Drobný organický akcent vykukující zezadu zprava dole */
    display: block;
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 45%;
    height: 55%;
    max-width: 240px;
    max-height: 240px;
    min-width: 140px;
    min-height: 140px;
    background: var(--c-accent-soft);
    border-radius: 50% 45% 55% 50% / 50% 55% 45% 50%;
    z-index: 0;
}
.hero-img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: 28% center;       /* Vrták v 1. třetině viditelné plochy */
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
}
.hero-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 10px var(--s-3);
    background: var(--c-surface);
    border-radius: var(--r-full);
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--c-text);
    box-shadow: var(--shadow-md);
}
.hero-chip--1 { top: 12%; left: -8px; }
.hero-chip--2 { bottom: 14%; right: -8px; }
.hero-chip-dot {
    width: 10px;
    height: 10px;
    background: var(--c-accent);
    border-radius: var(--r-full);
    flex-shrink: 0;
}
.hero-chip-icon {
    width: 20px;
    height: 20px;
    color: var(--c-pastel-sage-ink);
}
.hero-chip-icon svg { width: 100%; height: 100%; }

/* ============================
   9. Capabilities — service cards
   ============================ */
.capabilities { background: var(--c-bg); }
.cap-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
}
.cap-card {
    position: relative;
    background: var(--c-surface);
    border-radius: var(--r-lg);
    padding: var(--s-4);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.cap-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}
.cap-card--featured { box-shadow: var(--shadow-card-hover); }

.cap-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s-3);
}
.cap-icon svg { width: 28px; height: 28px; }
.cap-icon--peach { background: var(--c-pastel-peach); color: var(--c-pastel-peach-ink); }
.cap-icon--sky   { background: var(--c-pastel-sky);   color: var(--c-pastel-sky-ink); }
.cap-icon--sand  { background: var(--c-pastel-sand);  color: var(--c-pastel-sand-ink); }
.cap-icon--sage  { background: var(--c-pastel-sage);  color: var(--c-pastel-sage-ink); }

.cap-card h3 { margin-bottom: var(--s-2); }
.cap-card p { color: var(--c-text-muted); font-size: var(--fs-small); }

/* Jadoo-style bookmark accent on featured card */
.cap-bookmark {
    position: absolute;
    bottom: -10px;
    left: 32px;
    width: 18px;
    height: 18px;
    background: var(--c-accent);
    border-radius: 4px;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity var(--dur-fast);
}
.cap-card--featured .cap-bookmark { opacity: 1; }

/* ============================
   10. Projects
   ============================ */
.projects { background: var(--c-bg-soft); }
.proj-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
}
.proj-card {
    background: var(--c-surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.proj-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.proj-img-link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.proj-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-mid) var(--ease);
}
.proj-card:hover .proj-img-link img { transform: scale(1.04); }

.proj-body { padding: var(--s-3) var(--s-4) var(--s-4); }
.proj-body h3 { margin-bottom: var(--s-3); }
.proj-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-2);
}
.proj-meta-item {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    font-size: var(--fs-small);
    color: var(--c-text-muted);
}
.proj-meta-item svg { width: 16px; height: 16px; color: var(--c-accent); }
.proj-price {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--c-text);
}

/* ============================
   11. Process
   ============================ */
.process { background: var(--c-bg); }
.process-grid {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
}
.process-head .h-1 { margin-bottom: var(--s-2); }

.step-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}
.step-item {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    background: var(--c-surface);
    border-radius: var(--r-md);
    padding: var(--s-4);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.step-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.step-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.step-icon svg { width: 24px; height: 24px; }
.step-icon--peach { background: var(--c-pastel-peach); color: var(--c-pastel-peach-ink); }
.step-icon--sky   { background: var(--c-pastel-sky);   color: var(--c-pastel-sky-ink); }
.step-icon--sage  { background: var(--c-pastel-sage);  color: var(--c-pastel-sage-ink); }
.step-item h3 { margin-bottom: var(--s-1); }
.step-item p { color: var(--c-text-muted); font-size: var(--fs-small); }

.process-media {
    position: relative;
    padding: var(--s-4);
}
.process-blob {
    position: absolute;
    top: -5%;
    right: -5%;
    width: 60%;
    height: 50%;
    background: var(--c-pastel-sky);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.6;
}
.process-media img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
}
.process-chip {
    position: absolute;
    z-index: 2;
    bottom: 8%;
    right: 0;
    background: var(--c-surface);
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--s-3);
}
.process-chip-num {
    font-family: var(--f-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--c-accent);
    line-height: 1;
}
.process-chip strong { font-weight: 600; color: var(--c-text); }

/* ============================
   12. Machines
   ============================ */
.machines { background: var(--c-bg-blue); }
.machine-block {
    padding: var(--s-5) 0;
    border-top: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}
.machine-block:last-child { border-bottom: 1px solid var(--c-border); }
.machine-cat { color: var(--c-text); }
.machine-list { display: flex; flex-direction: column; }
.machine-list li {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    padding: var(--s-3) 0;
    border-bottom: 1px dashed var(--c-border);
}
.machine-list li:last-child { border-bottom: none; }
.machine-list strong { font-weight: 600; color: var(--c-text); }
.machine-list span { color: var(--c-text-muted); font-size: var(--fs-small); }

/* ============================
   13. Dark CTA break
   ============================ */
.cta-break {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-top: var(--s-8);
    padding-bottom: var(--s-8);
}
.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: saturate(0.7) contrast(1.05);
}
.cta-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31,33,38,0.78) 0%, rgba(31,33,38,0.94) 100%);
}
.cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cta-inner .h-1 { color: var(--c-text-on-dark); margin-bottom: var(--s-4); }
.underlined--dark .scribble path { stroke: var(--c-accent-on-dark); }
.cta-sub {
    color: var(--c-text-muted-on-dark);
    font-size: var(--fs-h4);
    line-height: var(--lh-snug);
    margin-bottom: var(--s-5);
    max-width: 540px;
}
.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    justify-content: center;
}

/* ============================
   14. History
   ============================ */
.history { background: var(--c-bg-soft); }
.history-grid {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
}
.history-head .h-1 { margin-bottom: var(--s-2); }
.timeline { border-left: 1.5px solid var(--c-border-strong); padding-left: var(--s-4); }
.timeline li {
    padding: var(--s-4) 0;
    border-bottom: 1px solid var(--c-border);
    position: relative;
}
.timeline li:last-child { border-bottom: none; }
.timeline li::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--s-4) - 6px);
    top: var(--s-5);
    width: 11px;
    height: 11px;
    background: var(--c-accent);
    border-radius: var(--r-full);
    border: 2px solid var(--c-bg-soft);
}
.t-year {
    font-family: var(--f-display);
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--c-accent);
    margin-bottom: var(--s-2);
}
.t-body p { color: var(--c-text-muted); font-size: var(--fs-small); }
.t-body h3 { margin-bottom: var(--s-1); }

/* ============================
   15. Contact
   ============================ */
.contact { background: var(--c-bg); }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-3);
    margin-bottom: var(--s-6);
}
.contact-card {
    background: var(--c-surface);
    border-radius: var(--r-md);
    padding: var(--s-4);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.card-label {
    display: block;
    font-size: var(--fs-caption);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-accent);
    font-weight: 600;
    margin-bottom: var(--s-2);
}
.contact-card h3 { margin-bottom: var(--s-3); }
.contact-card p,
.contact-card address {
    font-size: var(--fs-small);
    color: var(--c-text-muted);
    margin-bottom: var(--s-2);
    line-height: var(--lh-snug);
}
.contact-card a {
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    transition: color var(--dur-fast), border-color var(--dur-fast);
    padding: 2px 0;
    display: inline-block;
}
.contact-card a:hover {
    color: var(--c-accent);
    border-color: var(--c-accent);
}

.map {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--c-border);
    background: var(--c-bg-soft);
    box-shadow: var(--shadow-card);
}

/* ============================
   16. Footer
   ============================ */
.site-footer {
    padding: var(--s-7) 0 var(--s-5);
    color: var(--c-text-muted-on-dark);
}
.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-bottom: var(--s-5);
    border-bottom: 1px solid var(--c-border-on-dark);
}
.footer-brand .brand { margin-bottom: var(--s-2); }
.footer-tag {
    font-size: var(--fs-small);
    color: var(--c-text-subtle-on-dark);
}
.footer-h {
    font-family: var(--f-sans);
    font-size: var(--fs-caption);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-accent-on-dark);
    margin-bottom: var(--s-3);
    font-weight: 600;
}
.footer-nav { display: flex; flex-direction: column; gap: var(--s-1); }
.footer-nav a {
    color: var(--c-text-muted-on-dark);
    font-size: var(--fs-small);
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    transition: color var(--dur-fast);
}
.footer-nav a:hover { color: var(--c-text-on-dark); }

.footer-contact p,
.footer-contact address {
    font-size: var(--fs-small);
    color: var(--c-text-muted-on-dark);
    margin-bottom: var(--s-2);
    line-height: var(--lh-snug);
}
.footer-contact a {
    color: var(--c-text-on-dark);
    border-bottom: 1px solid var(--c-border-on-dark);
    transition: color var(--dur-fast), border-color var(--dur-fast);
}
.footer-contact a:hover {
    color: var(--c-accent-on-dark);
    border-color: var(--c-accent-on-dark);
}
.footer-legal p {
    font-size: var(--fs-small);
    color: var(--c-text-muted-on-dark);
    line-height: var(--lh-snug);
    margin-bottom: var(--s-3);
}
.legal-links { display: flex; flex-direction: column; gap: var(--s-1); }
.legal-links a {
    font-size: var(--fs-small);
    color: var(--c-text-muted-on-dark);
    text-decoration: underline;
    text-decoration-color: var(--c-border-on-dark);
    text-underline-offset: 3px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}
.legal-links a:hover {
    color: var(--c-text-on-dark);
    text-decoration-color: var(--c-accent-on-dark);
}

.footer-bottom {
    padding-top: var(--s-4);
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}
.footer-credit {
    font-size: var(--fs-small);
    color: var(--c-text-muted-on-dark);
    line-height: var(--lh-snug);
}
.footer-credit strong {
    color: var(--c-text-on-dark);
    font-weight: 600;
}
.footer-copy {
    font-size: var(--fs-caption);
    color: var(--c-text-subtle-on-dark);
}

/* ===================================================================
   RESPONSIVE — min-width breakpoints
   sm 640 · md 768 · lg 1024 · xl 1280
   =================================================================== */

@media (min-width: 640px) {
    :root { --pad-x: 1.5rem; }
    .cap-grid { grid-template-columns: 1fr 1fr; gap: var(--s-4); }
    .proj-grid { grid-template-columns: 1fr 1fr; }
    .machine-block {
        flex-direction: row;
        gap: var(--s-5);
        align-items: flex-start;
    }
    .machine-cat { flex: 0 0 220px; }
    .machine-list { flex: 1; }
    .machine-list li {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        gap: var(--s-4);
    }
    .machine-list span { text-align: right; }
}

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .nav-mobile { display: none !important; }
    .nav-primary { display: flex; gap: var(--s-3); }
    /* header-cta zůstává skryté na md kvůli šířce — odhalí se na lg */

    .section { padding-top: var(--s-8); padding-bottom: var(--s-8); }
    .hero { padding-top: var(--s-6); padding-bottom: var(--s-8); }

    .hero-grid {
        display: grid;
        grid-template-columns: 1fr 1.25fr;
        gap: var(--s-6);
        align-items: stretch;
    }
    .hero-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .hero-sub { font-size: var(--fs-h4); }
    .hero-media {
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 5.5rem var(--s-2) var(--s-2);   /* Posun shora — obrázek začíná u 2. řádku H1 */
        min-height: 480px;
    }
    .hero-img {
        aspect-ratio: auto;
        flex: 1;
        width: 100%;
    }

    .cap-grid { grid-template-columns: repeat(4, 1fr); }
    .proj-grid { grid-template-columns: repeat(3, 1fr); }

    .process-grid {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        grid-template-rows: auto auto;
        gap: var(--s-6) var(--s-7);
        align-items: start;
    }
    .process-head { grid-column: 1; grid-row: 1; }
    .step-list { grid-column: 1; grid-row: 2; }
    .process-media { grid-column: 2; grid-row: 1 / span 2; }

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

    .footer-top {
        grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr;
        gap: var(--s-5);
    }
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .section-head.split {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        gap: var(--s-6);
    }
    .section-side { margin-left: auto; }

    .history-grid {
        flex-direction: row;
        gap: var(--s-7);
        align-items: flex-start;
    }
    .history-head { flex: 0 0 280px; position: sticky; top: 96px; }
    .timeline { flex: 1; }
}

@media (min-width: 1024px) {
    .section { padding-top: var(--s-9); padding-bottom: var(--s-9); }
    .hero { padding-top: var(--s-7); padding-bottom: var(--s-9); }
    .contact-grid { grid-template-columns: repeat(4, 1fr); }
    .nav-primary { gap: var(--s-4); }
    .nav-primary a { font-size: var(--fs-body); }
    .header-cta { display: inline-flex; }     /* CTA v hlavičce až tady, místo se vejde */
    .display-1 { font-size: clamp(3rem, 5vw + 1rem, 4.75rem); }
    .hero-grid { grid-template-columns: 1fr 1.4fr; gap: var(--s-7); }
    .hero-media { padding-top: 6.5rem; min-height: 560px; }
}

/* ===================================================================
   Print
   =================================================================== */
@media print {
    .site-header, .cta-break, .site-footer, .nav-mobile, .dots, .hero-blob, .process-blob { display: none; }
    body { background: white; color: black; }
    .section { page-break-inside: avoid; padding: 1rem 0; }
}
