/* ============================================================
   OknaKBN — main stylesheet
   ============================================================ */

/* Reset / base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--okbn-font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--okbn-text);
    background: var(--okbn-bg);
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--okbn-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--okbn-font-heading); color: var(--okbn-text); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); line-height: 1.1; font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); line-height: 1.2; font-weight: 700; margin: 0 0 var(--okbn-space-5); }
h3 { font-size: 1.35rem; line-height: 1.3; font-weight: 600; margin: 0 0 var(--okbn-space-3); }
p  { margin: 0 0 var(--okbn-space-4); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link {
    position: absolute; top: -100px; left: var(--okbn-space-4);
    background: var(--okbn-primary); color: #fff; padding: 8px 16px; border-radius: var(--okbn-radius);
}
.skip-link:focus { top: 8px; }

/* Layout ---------------------------------------------------- */
.container {
    width: 100%; max-width: var(--okbn-container);
    margin: 0 auto; padding: 0 var(--okbn-gutter);
}
.container--narrow { max-width: var(--okbn-container-narrow); }

.section { padding: var(--okbn-space-9) 0; }
.section--text,
.section--cta,
.section--kontakt-oblast,
.section--fakturace { padding: var(--okbn-space-8) 0; }
.section__title { margin-bottom: var(--okbn-space-4); }
.section__lead { font-size: 1.1rem; color: var(--okbn-text-muted); margin-bottom: var(--okbn-space-6); max-width: 720px; }

/* Buttons --------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--okbn-radius);
    font-weight: 600; font-size: 1rem; line-height: 1;
    border: 2px solid transparent; transition: all 0.15s ease;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-primary  { background: var(--okbn-primary); color: #fff; border-color: var(--okbn-primary); }
.btn-primary:hover { background: var(--okbn-primary-dark); border-color: var(--okbn-primary-dark); color: #fff; }
.btn-accent   { background: var(--okbn-accent); color: #fff; border-color: var(--okbn-accent); }
.btn-accent:hover { background: var(--okbn-accent-dark); border-color: var(--okbn-accent-dark); color: #fff; }
.btn-outline  { background: transparent; color: var(--okbn-primary); border-color: var(--okbn-primary); }
.btn-outline:hover { background: var(--okbn-primary); color: #fff; }

/* Header ---------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--okbn-border); }
.site-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--okbn-space-5);
    padding: 14px var(--okbn-gutter);
}
.site-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--okbn-font-heading); font-weight: 700; font-size: 1.2rem;
    color: var(--okbn-text); text-decoration: none;
}
.site-logo:hover { text-decoration: none; color: var(--okbn-primary); }
.site-logo__img { width: 38px; height: 38px; flex-shrink: 0; }
.site-logo__text { letter-spacing: -0.02em; }

/* Menu — rovnoměrné rozložení */
.site-nav { justify-self: center; min-width: 0; }
.site-nav__list {
    list-style: none; margin: 0; padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.site-nav__item {
    flex: 0 0 auto;
}
.site-nav__list a {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 16px;
    color: var(--okbn-text); font-weight: 500; font-size: 0.95rem; border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.site-nav__list a:hover { background: var(--okbn-bg-soft); text-decoration: none; }
.site-nav__list a[aria-current="page"] { color: var(--okbn-primary); background: var(--okbn-primary-light); }

.site-nav__toggle {
    display: none;
    background: transparent; border: 2px solid var(--okbn-border);
    border-radius: 8px; padding: 8px 10px;
    align-items: center; justify-content: center;
}
.hamburger {
    display: block; width: 22px; height: 2px; background: var(--okbn-text);
    position: relative;
}
.hamburger::before, .hamburger::after {
    content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--okbn-text);
}
.hamburger::before { top: -6px; }
.hamburger::after  { top: 6px; }

.site-header__cta { padding: 10px 18px; font-size: 0.95rem; justify-self: end; }

@media (max-width: 1080px) {
    .site-header__cta { display: none; }
}
@media (max-width: 960px) {
    .site-header__inner { grid-template-columns: 1fr auto; }
    .site-nav__toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--okbn-border);
        padding: var(--okbn-space-3) var(--okbn-gutter);
        justify-self: stretch;
    }
    .site-nav--open { display: block; }
    .site-nav__list { flex-direction: column; gap: 4px; align-items: stretch; }
    .site-nav__list a { padding: 14px var(--okbn-space-4); justify-content: flex-start; }
}

/* Hero — fotka + #E7E0ED pozadí + glossy shine animace ------ */
.hero {
    position: relative;
    overflow: hidden;
    background: #E7E0ED;
    padding: clamp(60px, 9vw, 110px) 0 clamp(60px, 9vw, 110px);
    min-height: 540px;
    display: flex;
    align-items: center;
}

/* === BG layers (windows pattern + foto + shine) === */
.hero__bg {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Jedno velké logo vlevo jako jemný brand prvek — žádný repeat pattern */
.hero__bg-windows {
    position: absolute;
    left: clamp(-80px, -4vw, -40px);
    top: 50%;
    transform: translateY(-50%);
    width: clamp(320px, 36vw, 520px);
    height: clamp(320px, 36vw, 520px);
    background-image: url('/assets/icons/logo.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.18;
    pointer-events: none;
}

/* Fotka workman vpravo — větší proporce, workman vždy v záběru */
.hero__photo {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: clamp(460px, 58%, 820px);
    display: block;
}
.hero__photo img {
    width: 100%; height: 100%; object-fit: cover; object-position: 80% center;
    display: block;
}
/* Soft fade z fotky do levé strany aby text byl čitelný */
.hero__photo::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to right, #E7E0ED 0%, rgba(231, 224, 237, 0.75) 10%, rgba(231, 224, 237, 0.15) 32%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Glossy shine — vodorovný odlesk simulující světlo na skle okna */
.hero__shine {
    position: absolute;
    top: -20%;
    left: -30%;
    width: 35%;
    height: 140%;
    background: linear-gradient(110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.0) 35%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0.0) 65%,
        transparent 100%);
    transform: skewX(-18deg);
    animation: heroShine 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    mix-blend-mode: overlay;
    z-index: 2;
}
.hero__shine--2 {
    width: 18%;
    animation-duration: 9s;
    animation-delay: 2.5s;
    opacity: 0.7;
}

@keyframes heroShine {
    0%   { left: -30%; opacity: 0; }
    10%  { opacity: 1; }
    60%  { opacity: 1; }
    70%  { left: 130%; opacity: 0; }
    100% { left: 130%; opacity: 0; }
}

/* Šetříme motion-sensitive uživatele */
@media (prefers-reduced-motion: reduce) {
    .hero__shine { animation: none; opacity: 0; }
}

/* === Content layer === */
.hero__inner {
    position: relative;
    z-index: 3;
}
.hero__title { margin: 0 0 var(--okbn-space-4); color: var(--okbn-text); }
.hero__sub {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: #4a4351;
    margin: 0 0 var(--okbn-space-6);
    max-width: 560px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--okbn-space-3); }

/* === Varianta s fotkou (jen homepage) === */
.hero--with-photo .hero__inner { max-width: 620px; }

/* === Varianta bez fotky (podstránky) — text může být širší === */
.hero--simple { min-height: 360px; padding: clamp(56px, 7vw, 88px) 0; }
.hero--simple .hero__inner { max-width: 820px; }

/* Logo proporcionálně menší aby se vešlo do menší výšky a nebylo oříznuté */
.hero--simple .hero__bg-windows {
    width: clamp(200px, 24vw, 340px);
    height: clamp(200px, 24vw, 340px);
    left: clamp(-50px, -2vw, -20px);
    opacity: 0.16;
}

/* === Responsive — workman vždy v záběru === */
@media (max-width: 1280px) {
    .hero--with-photo .hero__photo { width: 55%; }
    .hero--with-photo .hero__inner { max-width: 45%; }
}

@media (max-width: 1080px) {
    .hero--with-photo .hero__photo { width: 52%; }
    .hero--with-photo .hero__photo img { object-position: 75% center; }
    .hero--with-photo .hero__inner { max-width: 48%; }
    .hero__photo::before {
        background: linear-gradient(to right, #E7E0ED 0%, rgba(231, 224, 237, 0.8) 15%, rgba(231, 224, 237, 0.2) 40%, transparent 55%);
    }
}

@media (max-width: 820px) {
    .hero--with-photo { min-height: 480px; }
    .hero--with-photo .hero__photo { width: 50%; }
    .hero--with-photo .hero__photo img { object-position: 70% center; }
    .hero--with-photo .hero__inner { max-width: 50%; }
    .hero--with-photo .hero__title { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    .hero--with-photo .hero__sub   { font-size: 1rem; }
}

/* === Mobile (≤ 640 px) — foto nahoře přes celou šířku, text pod tím === */
@media (max-width: 640px) {
    .hero--with-photo {
        min-height: auto;
        padding-top: clamp(280px, 56vw, 380px);
        padding-bottom: clamp(36px, 8vw, 56px);
        text-align: center;
    }
    .hero--with-photo .hero__photo {
        width: 100%;
        top: 0;
        bottom: auto;
        height: clamp(260px, 52vw, 360px);
    }
    .hero--with-photo .hero__photo img {
        object-position: 60% 28%;
    }
    /* Soft fade dolů, aby foto plynule navazovalo na pozadí pod ním */
    .hero--with-photo .hero__photo::before {
        background: linear-gradient(to bottom,
            transparent 0%,
            transparent 65%,
            rgba(231, 224, 237, 0.45) 88%,
            #E7E0ED 100%);
    }
    .hero--with-photo .hero__inner { max-width: 100%; }
    .hero--with-photo .hero__title { font-size: clamp(1.6rem, 7vw, 2rem); margin-bottom: 14px; }
    .hero--with-photo .hero__sub {
        font-size: 1rem;
        max-width: 440px;
        margin: 0 auto var(--okbn-space-5);
    }
    .hero--with-photo .hero__cta { justify-content: center; }
    /* Velký vodoznak loga na pozadí na mobilu skryjeme — málo místa */
    .hero--with-photo .hero__bg-windows { display: none; }
}

/* Sekce: boxy s ikonami — 3×2 pro 6 položek ----------------- */
.boxy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--okbn-space-5);
}
@media (max-width: 900px) {
    .boxy-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .boxy-grid { grid-template-columns: 1fr; }
}
.box {
    background: #fff; border: 1px solid var(--okbn-border);
    border-radius: var(--okbn-radius); padding: var(--okbn-space-5);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.box:hover { transform: translateY(-2px); box-shadow: var(--okbn-shadow); }
.box__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--okbn-primary-light); color: var(--okbn-primary);
    margin-bottom: var(--okbn-space-4);
}
.box__icon svg { width: 26px; height: 26px; }
.box__title { margin: 0 0 var(--okbn-space-2); font-size: 1.1rem; }
.box__text  { margin: 0; color: var(--okbn-text-muted); font-size: 0.97rem; }

/* Sekce: karty služeb (homepage) ---------------------------- */
.section--karty { background: var(--okbn-bg-soft); }
.karty-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--okbn-space-5);
}
@media (max-width: 900px) { .karty-grid { grid-template-columns: 1fr; } }
.karta {
    background: #fff; border: 1px solid var(--okbn-border); border-radius: var(--okbn-radius);
    padding: var(--okbn-space-6); display: flex; flex-direction: column;
}
.karta__title { margin: 0 0 var(--okbn-space-3); font-size: 1.25rem; }
.karta__text  { flex: 1; color: var(--okbn-text-muted); }
.karta__link {
    display: inline-flex; gap: 6px; align-items: center;
    color: var(--okbn-primary); font-weight: 600; margin-top: var(--okbn-space-4);
}
.karta__link-arrow { width: 18px; height: 18px; transition: transform 0.15s ease; }
.karta__link:hover .karta__link-arrow { transform: translateX(4px); }

/* Sekce: seznam odrážek (proč my) --------------------------- */
.body-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--okbn-space-4); }
.body-list__item {
    display: flex; gap: var(--okbn-space-3); align-items: flex-start;
    padding: var(--okbn-space-3) 0; font-size: 1.05rem;
}
.body-list__icon {
    flex-shrink: 0; width: 28px; height: 28px;
    background: var(--okbn-primary); color: #fff;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
}
.body-list__icon svg { width: 16px; height: 16px; }

/* Sekce: kroky procesu -------------------------------------- */
.section--kroky { background: var(--okbn-bg-soft); }
.kroky-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--okbn-space-5); counter-reset: krok;
}
.krok { background: #fff; padding: var(--okbn-space-5); border-radius: var(--okbn-radius); border: 1px solid var(--okbn-border); }
.krok__cislo {
    font-family: var(--okbn-font-heading); font-weight: 800; font-size: 3rem; line-height: 1;
    color: var(--okbn-primary); margin-bottom: var(--okbn-space-3);
}
.krok__title { margin: 0 0 var(--okbn-space-2); font-size: 1.1rem; }
.krok__text  { margin: 0; color: var(--okbn-text-muted); font-size: 0.97rem; }

/* Sekce: reference ------------------------------------------ */
.reference-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--okbn-space-5);
}
.reference {
    background: #fff; border: 1px solid var(--okbn-border); border-radius: var(--okbn-radius);
    padding: var(--okbn-space-5); margin: 0;
}
.reference__stars { display: flex; gap: 2px; color: var(--okbn-accent); margin-bottom: var(--okbn-space-3); }
.reference__stars svg { width: 18px; height: 18px; }
.reference__text { margin: 0 0 var(--okbn-space-4); font-style: italic; color: var(--okbn-text); }
.reference__caption strong { display: block; }
.reference__caption span { color: var(--okbn-text-muted); font-size: 0.9rem; }

/* Sekce: CTA blok ------------------------------------------- */
.section--cta { background: var(--okbn-primary); color: #fff; }
.cta-block { text-align: center; }
.cta-block__title { color: #fff; margin-bottom: var(--okbn-space-4); }
.cta-block__text  { color: var(--okbn-primary-light); font-size: 1.1rem; margin-bottom: var(--okbn-space-5); }

/* Sekce: kontakt karta -------------------------------------- */
.kontakt-card {
    background: #fff; border: 1px solid var(--okbn-border); border-radius: var(--okbn-radius);
    padding: var(--okbn-space-6);
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--okbn-space-6);
}
@media (max-width: 800px) { .kontakt-card { grid-template-columns: 1fr; } }
.kontakt-card__label { font-size: 0.85rem; color: var(--okbn-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.kontakt-card__value { font-size: 1.1rem; font-weight: 600; color: var(--okbn-text); font-style: normal; word-break: break-word; }
.kontakt-card__value--small { font-size: 1rem; font-weight: 500; line-height: 1.5; }
.kontakt-card__sub   { font-size: 0.9rem; color: var(--okbn-text-muted); margin-top: 6px; }

/* Sekce: formulář ------------------------------------------- */
.form { background: #fff; border: 1px solid var(--okbn-border); border-radius: var(--okbn-radius-lg); padding: var(--okbn-space-6); margin-top: var(--okbn-space-5); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--okbn-space-4); }
.form__field { display: flex; flex-direction: column; gap: 6px; }
.form__field--full { grid-column: 1 / -1; }
.form__label { font-size: 0.95rem; font-weight: 500; }
.form input, .form textarea {
    font: inherit; padding: 12px 14px; border: 2px solid var(--okbn-border); border-radius: var(--okbn-radius);
    background: #fff; color: var(--okbn-text); transition: border-color 0.15s ease;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--okbn-primary); }
.form__error { color: #dc2626; font-size: 0.85rem; }
.form__actions { margin-top: var(--okbn-space-5); display: flex; align-items: center; gap: var(--okbn-space-4); flex-wrap: wrap; }
.form__note { color: var(--okbn-text-muted); }

.form-alert {
    padding: 14px 18px; border-radius: var(--okbn-radius);
    margin-bottom: var(--okbn-space-4); font-weight: 500;
    display: flex; align-items: center; gap: 12px;
}
.form-alert__icon { display: inline-flex; flex-shrink: 0; }
.form-alert__icon svg { width: 22px; height: 22px; }
.form-alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-alert--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

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

/* Sekce: fakturace ------------------------------------------ */
.fakturace { background: var(--okbn-bg-soft); padding: var(--okbn-space-5); border-radius: var(--okbn-radius); }
.fakturace__title { margin: 0 0 var(--okbn-space-2); font-size: 1rem; color: var(--okbn-text-muted); }
.fakturace__text  { margin: 0; color: var(--okbn-text-muted); font-size: 0.9rem; line-height: 1.6; }

/* Sekce: FAQ ------------------------------------------------ */
.faq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--okbn-space-3); }
.faq-item { background: #fff; border: 1px solid var(--okbn-border); border-radius: var(--okbn-radius); overflow: hidden; }
.faq-item details summary { list-style: none; cursor: pointer; padding: var(--okbn-space-4) var(--okbn-space-5); display: flex; align-items: center; gap: var(--okbn-space-3); }
.faq-item details summary::-webkit-details-marker { display: none; }
.faq-item__cat { font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; background: var(--okbn-primary-light); color: var(--okbn-primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.faq-item__question { flex: 1; font-weight: 600; }
.faq-item__chevron { color: var(--okbn-text-muted); transition: transform 0.2s ease; }
.faq-item__chevron svg { width: 20px; height: 20px; }
.faq-item details[open] .faq-item__chevron { transform: rotate(180deg); }
.faq-item__a { padding: 0 var(--okbn-space-5) var(--okbn-space-5); color: var(--okbn-text-muted); }

/* Prose (rich text v text_blok) ----------------------------- */
.prose { font-size: 1.1rem; color: var(--okbn-text); line-height: 1.7; }
.prose p { margin: 0 0 var(--okbn-space-4); }

/* Footer ---------------------------------------------------- */
/* Bez margin-top — patička navazuje přímo na fialovou CTA sekci */
.site-footer { background: #1a1a1a; color: #d1d5db; padding: var(--okbn-space-8) 0 var(--okbn-space-5); margin-top: 0; }
.site-footer h4 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 var(--okbn-space-4); }
.site-footer__grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: var(--okbn-space-6); padding-bottom: var(--okbn-space-7); border-bottom: 1px solid #2d2d2d;
}
.site-footer__brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--okbn-font-heading); font-weight: 700; color: #fff; font-size: 1.25rem; margin-bottom: var(--okbn-space-3);
}
.site-footer__brand img { filter: brightness(0) invert(1); }
.site-footer__tagline { color: #9ca3af; }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { padding: 6px 0; }
.site-footer__list a { color: #d1d5db; }
.site-footer__list a:hover { color: #fff; }
.site-footer__list small { color: #6b7280; font-size: 0.8rem; display: block; margin-top: 2px; }
.site-footer address { font-style: normal; color: #9ca3af; line-height: 1.7; }
.site-footer__pobocky { margin-top: var(--okbn-space-3); color: #9ca3af; }
.site-footer__pobocky span { color: #fff; font-weight: 500; }
.site-footer__social { list-style: none; margin: var(--okbn-space-4) 0 0; padding: 0; display: flex; gap: var(--okbn-space-3); }
.site-footer__social a { color: #9ca3af; transition: color 0.15s ease; }
.site-footer__social a:hover { color: #fff; }

.site-footer__bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: var(--okbn-space-5); color: #9ca3af; flex-wrap: wrap; gap: var(--okbn-space-3);
}
.site-footer__bottom a { color: #d1d5db; }

@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .site-footer__grid { grid-template-columns: 1fr; }
}
