/* =========================================================
   HeBaSoft — designový systém (tmavý herní vibe, modernizovaný)
   ========================================================= */

:root{
    /* plátno a povrchy */
    --bg:        #0b0b0d;
    --surface:   #131316;
    --surface-2: #1b1b21;
    --line:      rgba(255, 255, 255, 0.08);

    /* text */
    --text:  #f5f4f2;
    --muted: #9a99a2;

    /* značka */
    --brand:      #e6312e;   /* HeBaSoft červená (logo) */
    --brand-2:    #ff5b40;   /* světlejší červená pro přechody */
    --brand-glow: rgba(230, 49, 46, 0.45);

    --gold:      #ffb700;    /* CTA zlatá */
    --gold-2:    #ffce4d;    /* světlejší zlatá pro přechody / hover */
    --gold-glow: rgba(255, 183, 0, 0.45);

    /* rozestupy a tvar */
    --radius:    16px;
    --radius-sm: 10px;
    --maxw:      1120px;
    --gutter:    clamp(1.25rem, 5vw, 4rem);

    --shadow:    0 24px 60px -28px rgba(0, 0, 0, 0.85);
}

body{
    display: flex;
    flex-flow: column nowrap;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* kotvy nezůstanou schované pod sticky lištou */
[id]{ scroll-margin-top: 84px; }

/* ---------- sdílené prvky ---------- */

.eyebrow{
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold);
    margin: 0;
}

.btn{
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.btn-primary{
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    color: #1c1400;
    box-shadow: 0 10px 30px -12px var(--gold-glow);
}

.btn-primary img{
    /* bílá Google Play ikona -> tmavá na zlatém tlačítku */
    filter: brightness(0);
    transition: transform .25s ease;
}

.btn-primary:hover{
    transform: translateY(-3px);
    box-shadow: 0 18px 38px -12px var(--gold-glow);
}

.btn-primary:hover img{ transform: translateX(-2px); }

/* ---------- navigace ---------- */

.nav{
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: space-between;
    align-items: center;
    padding: 14px var(--gutter);
    background: rgba(11, 11, 13, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line);
}

.nav-brand{
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--brand);
}

.nav-brand img{
    border-radius: 6px;
    filter: drop-shadow(0 2px 10px var(--brand-glow));
}

.nav-brand span{
    text-shadow: 0 2px 14px var(--brand-glow);
}

.nav-links{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(14px, 3vw, 28px);
}

.nav-links a{
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    padding: 4px 0;
    transition: color .2s ease;
}

.nav-links a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.nav-links a:hover{ color: var(--text); }
.nav-links a:hover::after{ transform: scaleX(1); }

/* ---------- hamburger (jen mobil) ---------- */

.nav-toggle{ display: none; }   /* skrytý ovládací checkbox */
.nav-burger{ display: none; }   /* tlačítko ☰ se objeví až na úzkém displeji */

/* ---------- přepínač jazyků ---------- */

.lang-switch{
    position: relative;
}

.lang-switch summary{
    list-style: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: color .2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.lang-switch summary::-webkit-details-marker{ display: none; }

.lang-switch summary:hover,
.lang-switch[open] summary{ color: var(--text); }

.lang-switch ul{
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    margin: 0;
    padding: 6px;
    list-style: none;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 60;
}

.lang-switch a{
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    transition: color .2s ease, background-color .2s ease;
}

.lang-switch a::after{ content: none; } /* zrušit podtrhávací efekt z .nav-links a */

.lang-switch a:hover{
    color: var(--text);
    background: var(--surface-2);
}

.lang-switch a.is-active{ color: var(--gold); }

/* ---------- hero ---------- */

.hero{
    position: relative;
    isolation: isolate;
    min-height: min(86vh, 760px);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 6rem var(--gutter);
    overflow: hidden;
}

.hero::before{
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url("../img/main_img.webp") center / cover no-repeat;
    transform: scale(1.04);
}

.hero::after{
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    /* signature: dvojité brandové světlo (červená + zlatá) na téměř černé */
    background:
        radial-gradient(60% 55% at 28% 30%, var(--brand-glow), transparent 70%),
        radial-gradient(55% 50% at 78% 72%, rgba(255, 183, 0, 0.28), transparent 70%),
        linear-gradient(180deg, rgba(11, 11, 13, 0.45) 0%, rgba(11, 11, 13, 0.82) 60%, var(--bg) 100%);
}

.hero-inner{
    max-width: 780px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-title{
    font-size: clamp(2.75rem, 9vw, 6rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.hero-title .accent{
    background: linear-gradient(115deg, var(--brand) 10%, var(--gold) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub{
    max-width: 52ch;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: rgba(245, 244, 242, 0.85);
}

.hero-cta{ margin-top: 0.5rem; }

/* ---------- sekce: hlavička ---------- */

.section-head{
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(4rem, 9vw, 7rem) var(--gutter) 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.section-title{
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-lead{
    max-width: 58ch;
    color: var(--muted);
}

/* ---------- hry ---------- */

.games{
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 3.5rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}

.game{
    display: grid;
    grid-template-columns: minmax(0, 280px) 1fr;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .35s ease, border-color .35s ease;
}

.game:nth-child(2n){
    grid-template-columns: 1fr minmax(0, 280px);
}

.game:nth-child(2n) .game-media{ order: 2; }

.game:hover{
    transform: translateY(-4px);
    border-color: rgba(255, 183, 0, 0.35);
}

.game-media{
    position: relative;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--radius);
    background: var(--surface-2);
    overflow: hidden;
}

/* jemné brandové světlo za ikonou hry */
.game-media::before{
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(70% 70% at 50% 30%, var(--brand-glow), transparent 70%);
    opacity: 0.5;
}

.game-icon{
    position: relative;
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.9);
}

.game-body{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.tag{
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255, 183, 0, 0.3);
    border-radius: 999px;
    background: rgba(255, 183, 0, 0.06);
}

.game-title{
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.game-desc{
    color: var(--muted);
    max-width: 62ch;
}

.game-actions{ margin-top: 0.4rem; }

/* ---------- kontakty ---------- */

.contacts{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    padding: clamp(4rem, 9vw, 7rem) var(--gutter);
    border-top: 1px solid var(--line);
    background:
        radial-gradient(50% 80% at 50% 0%, rgba(255, 183, 0, 0.10), transparent 70%),
        var(--bg);
}

.contacts .section-head{
    align-items: center;
    text-align: center;
    padding: 0;
}

.contact-mail{
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    border-bottom: 1px dashed rgba(255, 183, 0, 0.5);
    padding-bottom: 2px;
    transition: color .2s ease, border-color .2s ease;
}

.contact-mail:hover{
    color: var(--gold);
    border-color: var(--gold);
}

.socials{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1rem, 3vw, 1.75rem);
    margin-top: 1.5rem;
}

.social{
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.social::before{
    content: "";
    width: 44%;
    height: 44%;
    background-color: var(--muted);
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
    transition: background-color .25s ease;
}

.social:hover{
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 0 28px -6px var(--gold-glow);
}

.social:hover::before{ background-color: var(--gold); }

.social.mail{      --icon: url("../img/icons/social/mail_icon.svg"); }
.social.facebook{  --icon: url("../img/icons/social/fb_icon.svg"); }
.social.instagram{ --icon: url("../img/icons/social/instagram_icon.svg"); }
.social.youtube{   --icon: url("../img/icons/social/youtube_icon.svg"); }

/* ---------- footer ---------- */

.footer{
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-inner{
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem var(--gutter);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    align-items: center;
    justify-content: space-between;
}

.footer-brand{
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.01em;
}

.footer-copy{
    color: var(--muted);
    font-size: 0.85rem;
}

/* ---------- pohyb: vstupní sekvence + scroll reveal ---------- */

@keyframes rise{
    from{ opacity: 0; transform: translateY(24px); }
    to{   opacity: 1; transform: translateY(0); }
}

.hero-inner > *{
    animation: rise .8s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-inner > *:nth-child(1){ animation-delay: .05s; }
.hero-inner > *:nth-child(2){ animation-delay: .15s; }
.hero-inner > *:nth-child(3){ animation-delay: .25s; }
.hero-inner > *:nth-child(4){ animation-delay: .35s; }

/* scroll-reveal jako progressive enhancement — obsah je vždy viditelný */
@supports (animation-timeline: view()){
    @media (prefers-reduced-motion: no-preference){
        .game,
        .section-head{
            animation: rise linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 22%;
        }
    }
}

/* ---------- responzivita ---------- */

@media (max-width: 760px){
    /* ----- navigace: kompaktní lišta + hamburger menu ----- */
    .nav{
        justify-content: space-between;
        gap: 12px;
    }

    /* tlačítko ☰ */
    .nav-burger{
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 11px 9px;
        cursor: pointer;
        border-radius: var(--radius-sm);
    }

    .nav-burger span{
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: var(--text);
        transition: transform .25s ease, opacity .2s ease;
    }

    /* checkbox vizuálně skrytý, ale dostupný z klávesnice */
    .nav-toggle{
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .nav-toggle:focus-visible + .nav-burger{
        outline: 2px solid var(--gold);
        outline-offset: 3px;
    }

    /* animace ☰ → ✕ */
    .nav-toggle:checked + .nav-burger span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked + .nav-burger span:nth-child(2){ opacity: 0; }
    .nav-toggle:checked + .nav-burger span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

    /* rozbalovací panel pod lištou */
    .nav-links{
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px var(--gutter) 14px;
        background: rgba(11, 11, 13, 0.96);
        backdrop-filter: blur(14px) saturate(140%);
        -webkit-backdrop-filter: blur(14px) saturate(140%);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .nav-toggle:checked ~ .nav-links{ display: flex; }

    .nav-links a{
        padding: 13px 4px;
        font-size: 1rem;
        border-top: 1px solid var(--line);
    }
    .nav-links a:first-child{ border-top: 0; }

    /* přepínač jazyků uvnitř mobilního menu (rozbalí se inline, ne jako plovoucí panel) */
    .lang-switch{
        border-top: 1px solid var(--line);
    }
    .lang-switch summary{ padding: 13px 4px; }
    .lang-switch ul{
        position: static;
        transform: none;
        min-width: 0;
        max-width: none;
        margin: 0 0 4px;
        padding: 0 0 0 8px;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    /* ----- hero: méně svislého prostoru na telefonu ----- */
    .hero{
        min-height: min(78vh, 620px);
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    /* ----- hry: jeden sloupec, vycentrované ----- */
    .game,
    .game:nth-child(2n){
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .game-media{ width: min(220px, 70%); }

    .game:nth-child(2n) .game-media{ order: 0; }

    .game-body{ align-items: center; }
}
