@font-face {
    font-family: "Museo Sans";
    src: url("../fonts/museo-sans-300.30a72049da51.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Museo Sans";
    src: url("../fonts/museo-sans-700.3e5794fff068.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --background: #f4f4f4;
    --overlay: #dee1e9;
    --buca: #22376c;
    --foreground: #111111;
    --card: #ffffff;
    --border: #e3e4e8;
    --muted: #8c9199;
    --radius: .5rem;
    --max-width: 72rem;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

::selection {
    background: var(--overlay);
    color: var(--buca);
}

body {
    margin: 0;
    font-family: "Museo Sans", system-ui, sans-serif;
    font-weight: 300;
    background: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Jemný overlay v #dee1e9 — měkká záře za hero sekcí, dává hloubku nad plochým pozadím */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(1100px 580px at 50% -10%, var(--overlay), transparent 66%);
    pointer-events: none;
    z-index: 0;
}

main, footer { position: relative; z-index: 1; }

h1, h2, .initials, .name {
    font-family: "Museo Sans", system-ui, sans-serif;
    font-weight: 700;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.lang-switch {
    display: flex;
    justify-content: flex-end;
    gap: .25rem;
    padding-top: 1.5rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.lang-switch a {
    padding: .3rem .5rem;
    border-radius: .35rem;
    text-decoration: none;
    color: var(--muted);
    transition: color .2s var(--ease), background-color .2s var(--ease);
}

.lang-switch a:hover {
    color: var(--buca);
    background: var(--overlay);
}

.lang-switch a[aria-current="page"] {
    color: var(--buca);
}

.lang-switch a:focus-visible {
    outline: 2px solid var(--buca);
    outline-offset: 2px;
}

.hero {
    padding: 2rem 0 3.5rem;
}

@media (min-width: 768px) {
    .hero { padding: 2rem 0 4.5rem; }
}

.hero-logo {
    display: block;
    height: 41px;
    width: auto;
}

@media (min-width: 768px) {
    .hero-logo { height: 54px; }
}

h1 {
    margin: 1.75rem 0 0;
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--buca);
}

.lead {
    margin: 1.5rem 0 0;
    max-width: 34rem;
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--foreground);
}

.companies {
    padding-bottom: 6rem;
}

.companies h2 {
    margin: 0 0 1.75rem;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3em;
    color: var(--foreground);
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card);
}

@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    background: var(--card);
    padding: 2.5rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: background-color .2s ease;
}

.grid .card:last-child { border-bottom: none; }

@media (min-width: 640px) {
    .card { border-right: 1px solid var(--border); }
    .grid .card:nth-child(2n) { border-right: none; }
    .grid .card:nth-last-child(-n+2) { border-bottom: none; }
}

@media (min-width: 1024px) {
    .card { border-right: 1px solid var(--border); }
    .grid .card:nth-child(2n) { border-right: 1px solid var(--border); }
    .grid .card:nth-child(4n) { border-right: none; }
    .grid .card:nth-last-child(-n+4) { border-bottom: none; }
}

.card:hover {
    background: var(--overlay);
}

.card:focus-visible {
    outline: 2px solid var(--buca);
    outline-offset: -2px;
    background: var(--overlay);
}

.card:hover .visit,
.card:focus-visible .visit {
    opacity: 1;
    transform: translateY(0);
}

.card:hover .logo-box,
.card:focus-visible .logo-box {
    transform: scale(1.06);
}

/* Jednotný box pro logo firmy nebo placeholder (stejná výška, různý poměr stran) */
.logo-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4.5rem;
    width: 100%;
    transition: transform .3s var(--ease);
}

.logo-box img {
    max-height: 4.5rem;
    max-width: 10rem;
    width: auto;
    object-fit: contain;
}

/* Placeholder tam, kde firma nemá logo — buca modrý obrys bez výplně + buca modré iniciály */
.initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--buca);
    color: var(--buca);
    font-size: 1.35rem;
}

.name {
    font-size: 1.25rem;
    color: var(--foreground);
    overflow-wrap: break-word;
}

.category {
    margin-top: .25rem;
    font-size: .7rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--foreground);
}

.visit {
    font-size: .875rem;
    font-weight: 700;
    color: var(--buca);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}

footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    font-size: .875rem;
    font-weight: 300;
    color: var(--foreground);
}

footer p { margin: 0; }

.social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    color: var(--buca);
    transition: background-color .3s var(--ease), transform .3s var(--ease);
}

.social svg { display: block; }

.social:hover {
    background: var(--overlay);
    transform: translateY(-2px);
}

.social:focus-visible {
    outline: 2px solid var(--buca);
    outline-offset: 2px;
}

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

/* Nástupová animace je jen vylepšení: obsah je viditelný i kdyby animace neproběhla */
@media (prefers-reduced-motion: no-preference) {
    .hero-logo, h1, .lead, .companies h2, .card {
        opacity: 0;
        animation: fade-up .7s var(--ease) forwards;
    }
    .hero-logo { animation-delay: .05s; }
    h1 { animation-delay: .14s; }
    .lead { animation-delay: .24s; }
    .companies h2 { animation-delay: .34s; }

    .grid .card:nth-child(1) { animation-delay: .4s; }
    .grid .card:nth-child(2) { animation-delay: .46s; }
    .grid .card:nth-child(3) { animation-delay: .52s; }
    .grid .card:nth-child(4) { animation-delay: .58s; }
    .grid .card:nth-child(5) { animation-delay: .64s; }
    .grid .card:nth-child(6) { animation-delay: .7s; }
    .grid .card:nth-child(7) { animation-delay: .76s; }
    .grid .card:nth-child(8) { animation-delay: .82s; }
}
