/* ==========================================================================
   RaidPlanner – landing page pro nepřihlášené návštěvníky
   Načítá se jen na homepage (viz home.html → extra_head) a staví na tokenech
   z app.css, takže funguje ve všech motivech.

   Struktura: hero (jediná malba stránky) → přichycená navigace sekcemi →
   tiché pásy přes celou šířku (nadpis vlevo, text vpravo) → závěrečná výzva.
   Podpisem je malý praporec (korouhev s vykrojeným cípem) – stav náboru,
   odrážky u raiderů a značka nad závěrečnou výzvou.
   Animace: jen vstup hero po načtení, vypnutý při prefers-reduced-motion.
   ========================================================================== */
.page-landing {
    --lp-display: Georgia, "Palatino Linotype", serif;   /* nadpisy sekcí */
    --lp-hero-font: var(--lp-display);                   /* headline v hero */
    --lp-hero-shade: 10, 13, 24;                         /* barva tmavého závoje přes banner */
    --lp-alt: color-mix(in srgb, var(--surface) 65%, var(--bg));
    --lp-hairline: color-mix(in srgb, var(--text) 8%, transparent);
    --lp-ok: #4cc38a;
    --lp-no: #e5484d;
    --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --lp-jump-h: 52px;
    overflow-x: clip;
}
.page-landing .page { padding-block: 0; }

/* Landing si šířku řídí sama: pásy jdou od kraje ke kraji a obsah centruje
   .lp-band__inner. (Dřív 100vw – to na Windows započítává i posuvník a obsah
   pak nebyl na ose s hlavičkou.) */
.page-landing .page > .container { max-width: none; padding-inline: 0; }

/* Podpis: praporec */
.lp-pennant {
    display: inline-block; flex-shrink: 0;
    width: 10px; height: 14px;
    background: var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}

/* HERO ===================================================================== */
.lp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(560px, 46vw, 760px);
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 96px clamp(16px, 5vw, 48px) clamp(64px, 7vw, 96px);
    text-align: center;
}
.lp-hero__media,
.lp-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-hero__media { z-index: -2; }
.lp-hero__media img { max-width: none; object-fit: cover; object-position: center 35%; }
.lp-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse 56% 52% at 50% 68%, rgba(var(--lp-hero-shade), .8), transparent 72%),
        linear-gradient(180deg, rgba(var(--lp-hero-shade), .3) 0%, rgba(var(--lp-hero-shade), 0) 28%, rgba(var(--lp-hero-shade), .6) 70%, var(--bg) 100%);
}
.lp-hero__content { max-width: 960px; display: flex; flex-direction: column; align-items: center; }

/* Stav náboru: vlastní tmavý podklad, aby byl čitelný přes jakoukoli část malby */
.lp-status {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 24px; padding: 8px 16px;
    background: rgba(var(--lp-hero-shade), .85);
    border: 1px solid color-mix(in srgb, #fff 16%, transparent);
    border-radius: 10px;
    color: #fff; font-size: 15px; font-weight: 500;
}
.lp-status .lp-pennant { background: var(--lp-ok); }
.lp-status.is-closed .lp-pennant { background: var(--lp-no); }

.page-landing .lp-hero__title {
    margin-top: 0;
    color: #fff;
    font-family: var(--lp-hero-font);
    font-size: clamp(34px, 4.4vw, 64px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: 0;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .75);
}
.lp-hero__title em { font-style: normal; color: var(--accent); }
.lp-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

.lp-scroll-cue {
    position: absolute; left: 50%; bottom: 20px;
    width: 40px; height: 40px; margin-left: -20px;
    display: grid; place-items: center; border-radius: 50%;
    color: #fff; opacity: .7;
}
.lp-scroll-cue .icon { width: 22px; height: 22px; transform: rotate(90deg); }
.lp-scroll-cue:hover { opacity: 1; }

/* Jediná barevná akce stránky: zlatá „Podat přihlášku“ (místo Discord fialové). */
.lp-hero .btn--discord,
.lp-join .btn--discord {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.lp-hero .btn--discord:hover:not(:disabled),
.lp-join .btn--discord:hover:not(:disabled) { background: var(--accent-hover); }
.lp-hero .btn--secondary {
    background: rgba(var(--lp-hero-shade), .55);
    border-color: color-mix(in srgb, #fff 20%, transparent);
    color: #fff;
}
.lp-hero .btn--secondary:hover:not(:disabled) { background: rgba(var(--lp-hero-shade), .85); border-color: color-mix(in srgb, #fff 35%, transparent); }

/* PŘICHYCENÁ NAVIGACE SEKCEMI ============================================== */
.lp-jump {
    position: sticky; top: var(--header-h); z-index: 40;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--lp-hairline);
}
.lp-jump__inner {
    position: relative;
    display: flex; justify-content: center; gap: 8px;
    max-width: var(--container); height: var(--lp-jump-h);
    margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px);
    overflow-x: auto; scrollbar-width: none;
}
.lp-jump__inner::-webkit-scrollbar { display: none; }
.lp-jump a {
    position: relative; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 0 16px;
    color: var(--text-muted); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.lp-jump__num { color: var(--text-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.lp-jump a::after {
    content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px;
    background: var(--accent); border-radius: 2px;
    transform: scaleX(0); transform-origin: center;
}
.lp-jump a:hover { color: var(--text); }
.lp-jump a.is-active { color: var(--text); }
.lp-jump a.is-active .lp-jump__num { color: var(--accent); }
.lp-jump a.is-active::after { transform: scaleX(1); }

/* PÁSY SEKCÍ ===============================================================
   Jediná malba je v hero. Pásy pod ním jsou tiché: střídá se jen tón pozadí,
   obsah je v jednom sloupci na střed – nadpis nad textem. */
.lp-band {
    position: relative;
    padding-block: clamp(64px, 7vw, 96px);
    scroll-margin-top: calc(var(--header-h) + var(--lp-jump-h) - 1px);
    background: var(--bg);
}
.lp-band--alt {
    background: var(--lp-alt);
    border-block: 1px solid var(--lp-hairline);
}
.lp-band__inner { position: relative; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }

.lp-head__title {
    font-family: var(--lp-display);
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 500;
    line-height: 1.15;
    text-wrap: balance;
}
.lp-head__intro { margin-top: 12px; color: var(--text-muted); font-size: 16px; }
.lp-muted { color: var(--text-muted); font-size: 14px; }

.lp-prose {
    display: flex; flex-direction: column; gap: 16px; max-width: 68ch;
    color: var(--text-muted); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.7;
}
.lp-prose .link-arrow { align-self: flex-start; font-size: 15px; }

/* Jeden sloupec na střed: nadpis, pod ním text (odstavce na střed, seznamy
   a box s údaji jako blok na střed se zarovnáním vlevo). */
.lp-centered { text-align: center; }
.lp-centered .lp-prose { margin: 24px auto 0; align-items: center; }
.lp-centered .lp-prose .link-arrow { align-self: center; }

/* 01 Kdo jsme – box se základním info pod textem */
.lp-centered .lp-facts { max-width: 420px; margin: 40px auto 0; text-align: left; }
.lp-facts {
    padding: 20px 24px 8px;
    background: var(--surface); border: 1px solid var(--lp-hairline); border-radius: 16px;
}
.lp-facts__title { margin-bottom: 8px; font-family: var(--lp-display); font-size: 18px; font-weight: 500; }
.lp-facts dl { margin: 0; }
.lp-fact {
    display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
    min-height: 48px; border-top: 1px solid var(--lp-hairline);
}
.lp-fact dt { color: var(--text-muted); font-size: 14px; }
.lp-fact dd { margin: 0; font-size: 14px; font-weight: 500; text-align: right; }

/* 03 Jak se přidat – úvod a časová osa kroků */
.lp-centered .lp-intro { max-width: 64ch; }
.lp-centered .lp-step__num { margin-inline: auto; }
.lp-centered .lp-step__text { margin-inline: auto; }
.lp-centered .lp-step:not(:last-child)::after { left: calc(50% + 32px); right: -50%; }
.lp-steps {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
    margin: clamp(40px, 5vw, 56px) 0 0; padding: 0; list-style: none;
}
.lp-step { position: relative; }
.lp-step__num {
    position: relative; z-index: 1;
    width: 40px; height: 40px; display: grid; place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 50%;
    background: var(--bg);
    color: var(--accent); font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums;
}
/* spojnice od čísla kroku k dalšímu kroku */
.lp-step:not(:last-child)::after {
    content: ""; position: absolute; top: 20px; left: 56px; right: -16px; height: 1px;
    background: color-mix(in srgb, var(--text) 14%, transparent);
}
.lp-step__title { margin-top: 16px; font-size: 18px; font-weight: 500; }
.lp-step__text { margin-top: 8px; max-width: 40ch; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.lp-note { margin-top: 40px; color: var(--text-subtle); font-size: 13px; }
.lp-join { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px; text-align: center; }
.lp-join__title { font-family: var(--lp-display); font-size: 22px; font-weight: 500; }
.lp-join__text { max-width: 36rem; margin-bottom: 8px; color: var(--text-muted); font-size: 16px; }

/* 04 Pro raidery – kosočtverec jako odrážka, nábor pod tím */
.lp-centered .lp-raiders { max-width: 68ch; margin: 24px auto 0; text-align: left; }
.lp-centered .lp-recruit__head { align-items: center; }
.lp-centered .lp-recruit__intro { margin-inline: auto; }
.lp-centered .lp-recruit .recruit-list { text-align: left; }
.lp-raiders__intro { margin-bottom: 16px; color: var(--text); font-size: 16px; font-weight: 500; }
.lp-list {
    display: flex; flex-direction: column; gap: 16px; max-width: 68ch;
    margin: 0; padding: 0; list-style: none;
    color: var(--text-muted); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.6;
}
.lp-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 16px; }
.lp-bullet {
    width: 7px; height: 7px; margin: .72em 0 0 1.5px;
    border: 1.5px solid var(--accent); transform: rotate(45deg);
}

.lp-recruit {
    display: flex; flex-direction: column; gap: 16px;
    margin-top: clamp(48px, 6vw, 72px); padding-top: clamp(40px, 5vw, 56px);
    border-top: 1px solid var(--lp-hairline);
}
.lp-recruit__head { display: flex; flex-direction: column; gap: 8px; }
.lp-recruit__title { font-family: var(--lp-display); font-size: 22px; font-weight: 500; }
.lp-recruit__intro { max-width: 68ch; color: var(--text-muted); font-size: 15px; }

/* POHYB ====================================================================
   Jediný vstup: obsah hero po načtení. Zbytek stránky stojí. */
@media (prefers-reduced-motion: no-preference) {
    html:has(.page-landing) { scroll-behavior: smooth; }

    .lp-hero__content { animation: lp-rise .6s var(--lp-ease) .1s both; }

    .lp-jump a { transition: color .2s var(--lp-ease); }
    .lp-jump a::after { transition: transform .3s var(--lp-ease); }
    .lp-hero .btn,
    .lp-join .btn { transition: background-color .15s var(--lp-ease), border-color .15s var(--lp-ease), transform .15s var(--lp-ease); }
    .lp-hero .btn:active,
    .lp-join .btn:active { transform: scale(.98); }
    .lp-scroll-cue { transition: opacity .2s var(--lp-ease); }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* RESPONZIVITA ============================================================= */
@media (max-width: 760px) {
    .page-landing { --lp-jump-h: 48px; }
    .lp-jump__inner { justify-content: flex-start; gap: 0; }
    .lp-jump a { padding: 0 12px; }
    .lp-jump a::after { left: 12px; right: 12px; }

    /* Časová osa kroků svisle */
    .lp-steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .lp-step,
    .lp-centered .lp-step { padding-left: 64px; min-height: 40px; text-align: left; }
    .lp-centered .lp-step__text { margin-inline: 0; }
    .lp-step__num { position: absolute; left: 0; top: 0; }
    .lp-step__title { margin-top: 8px; }
    .lp-step:not(:last-child)::after,
    .lp-centered .lp-step:not(:last-child)::after {
        top: 48px; bottom: -24px; left: 20px; right: auto; width: 1px; height: auto;
    }
}
@media (max-width: 640px) {
    .lp-hero { min-height: 600px; padding-top: 64px; }
    .lp-hero__media img { object-position: 42% center; }
    .lp-scroll-cue { display: none; }
    .lp-hero__actions { flex-direction: column; align-items: stretch; width: 100%; }
    .lp-hero__actions .btn,
    .lp-hero__actions .nav-login-form,
    .lp-join .btn,
    .lp-join .nav-login-form { width: 100%; }
}
