/* ============================================================
   VAMPIRE GENESIS — Public homepage (index.php, no step)
   Builds on vg-v4.css tokens. Prefix: hm-
   ============================================================ */

/* The home step drops the narrow 600px column and lays out its own sections */
.main-content--home { max-width: none; padding: 0; }

/* === Hero === */
.hm-hero {
    position: relative;
    z-index: 2;
    min-height: min(88vh, 860px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}
.hm-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.hm-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
    transform: scale(1.06);
    animation: hmDrift 40s ease-in-out infinite alternate;
}
@keyframes hmDrift {
    from { transform: scale(1.06) translate(0, 0); }
    to   { transform: scale(1.14) translate(-1.5%, -1%); }
}
.hm-hero::before {   /* darken for legibility; heavier at the edges and bottom */
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(10, 6, 8, 0.55) 0%, rgba(10, 6, 8, 0.25) 60%, rgba(10, 6, 8, 0.75) 100%),
        linear-gradient(180deg, rgba(10, 6, 8, 0.6) 0%, rgba(10, 6, 8, 0) 25%, rgba(10, 6, 8, 0) 65%, var(--bg) 100%);
}
.hm-hero__inner { max-width: 760px; }
.hm-hero__logo {
    width: min(520px, 86%);
    margin: 0 auto 1.25rem;
    display: block;
    filter: drop-shadow(0 0 30px rgba(212, 42, 42, 0.45)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.9));
}
.hm-hero__tag {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 3.2vw, 2.1rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-bright);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95);
    margin-bottom: 1rem;
}
.hm-hero__awaken {
    max-width: 620px;
    margin: 0 auto 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(10, 4, 6, 0.72);
    border: 1px solid rgba(212, 42, 42, 0.55);
    border-radius: 8px;
    box-shadow: 0 0 24px rgba(212, 42, 42, 0.25);
    color: var(--text);
    line-height: 1.6;
}
.hm-hero__awaken-title {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 3.2vw, 2.1rem);
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}
.hm-hero__awaken strong { color: var(--text-bright); }
.hm-hero__lead {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.7;
    color: var(--text);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95);
    max-width: 620px;
    margin: 0 auto 2rem;
}
.hm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    justify-content: center;
    align-items: center;
}
.hm-hero__actions form { margin: 0; }
.hm-btn-ghost {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 1.05rem 2.25rem;
    border: 1px solid var(--border-gold);
    border-radius: 2px;
    color: var(--gold-bright);
    background: rgba(10, 6, 8, 0.72);   /* was a backdrop blur over the drifting hero: re-blurred every frame */
    transition: all var(--transition);
}
.hm-btn-ghost:hover { border-color: var(--gold); color: #fff; background: rgba(212, 176, 80, 0.12); }
.hm-hero__note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-dim);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95);
}
.hm-hero__note a { color: var(--gold); }
@keyframes hmBlink { 50% { opacity: 0.35; } }

/* === Live stats strip === */
.hm-stats {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 960px;
    margin: -2.5rem auto 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-panel);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.hm-stat {
    padding: 1.1rem 0.75rem;
    text-align: center;
    border-left: 1px solid rgba(139, 26, 26, 0.2);
}
.hm-stat:first-child { border-left: 0; }
.hm-stat__num {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold-bright);
    line-height: 1.1;
}
.hm-stat__label {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.hm-stat--live .hm-stat__num::before {
    content: '';
    display: inline-block;
    width: 9px; height: 9px;
    margin-right: 0.5rem;
    vertical-align: middle;
    border-radius: 50%;
    background: #3ad16a;
    box-shadow: 0 0 10px #3ad16a;
    animation: hmBlink 2.4s ease-in-out infinite;
}

/* === Sections === */
.hm-section {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: 0 auto;
    padding: 5rem 1.5rem 0;
}
.hm-kicker {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--crimson-bright);
    margin-bottom: 0.6rem;
}
.hm-h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-bright);
    margin-bottom: 1rem;
}
.hm-section__head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.hm-section__head p { color: var(--text-dim); line-height: 1.7; }

/* Showcase rows: picture + copy, alternating sides on desktop */
.hm-show {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 5rem;
}
.hm-show--flip .hm-show__media { order: 2; }
.hm-show__media {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-gold);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.6);
    background: #120a0d;
}
.hm-show__media img { display: block; width: 100%; height: auto; }
.hm-show__copy p { line-height: 1.75; color: var(--text); margin-bottom: 1rem; }
.hm-list { list-style: none; margin: 1.25rem 0 0; }
.hm-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-dim);
    line-height: 1.6;
}
.hm-list li::before {
    content: '\2666';
    position: absolute;
    left: 0;
    top: 0.05em;
    color: var(--crimson-bright);
    font-size: 0.8rem;
}
.hm-list strong { color: var(--text-bright); font-weight: 600; }

/* Familiar parade: real game sprites, playing their 8-frame idle strips */
.hm-parade {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 1.75rem 1rem 1.25rem;
    background:
        radial-gradient(ellipse 80% 70% at 50% 100%, rgba(139, 26, 26, 0.28), transparent 70%),
        linear-gradient(180deg, #120a0f 0%, #1c1016 100%);
}
.hm-fam { text-align: center; }
.hm-fam__sprite {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-size: 768px 96px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    animation: hmIdle 1s steps(8) infinite;
}
@keyframes hmIdle { from { background-position: 0 0; } to { background-position: -768px 0; } }
.hm-fam:nth-child(2n) .hm-fam__sprite { animation-delay: -0.37s; }
.hm-fam:nth-child(3n) .hm-fam__sprite { animation-delay: -0.71s; }
.hm-fam__name {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--c, var(--text-dim));
}

/* Feature cards */
.hm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.hm-card {
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(28, 14, 18, 0.9), rgba(14, 8, 12, 0.92));
    transition: border-color var(--transition), transform var(--transition);
}
.hm-card:hover { border-color: var(--border-gold); transform: translateY(-2px); }
.hm-card__icon {
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-gold);
    color: var(--gold-bright);
    background: rgba(212, 176, 80, 0.06);
}
.hm-card__icon svg { width: 22px; height: 22px; }
.hm-card h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}
.hm-card p { font-size: 0.95rem; line-height: 1.65; color: var(--text-dim); }
.hm-card p a { color: var(--gold); }
.hm-more { margin-top: 1.1rem; font-size: 0.95rem; }
.hm-more a { color: var(--gold); }
.hm-more a::after { content: " \2192"; }

/* Lore */
.hm-lore {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}
.hm-lore p {
    font-size: 1.1rem;
    line-height: 1.85;
    font-style: italic;
    color: var(--text);
}
.hm-lore strong { color: var(--text-bright); }
.hm-lore a { color: var(--gold); }

/* Join: closing call + login side by side */
.hm-join {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 4rem;
}
.hm-join__cta {
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    background:
        radial-gradient(ellipse 90% 80% at 50% 0%, rgba(139, 26, 26, 0.3), transparent 70%),
        rgba(14, 8, 12, 0.9);
}
.hm-join__cta p { color: var(--text-dim); line-height: 1.7; margin-bottom: 1.75rem; }
.hm-join .vg-panel { margin: 0; max-width: none; }
.hm-join .welcome-back { margin-bottom: 1.5rem; text-align: center; }

/* === Responsive === */
@media (max-width: 900px) {
    .hm-show, .hm-join { grid-template-columns: 1fr; gap: 1.75rem; }
    .hm-show--flip .hm-show__media { order: 0; }
    .hm-grid { grid-template-columns: 1fr 1fr; }
    .hm-section { padding-top: 4rem; }
    .hm-show { margin-bottom: 4rem; }
}
@media (max-width: 600px) {
    .hm-hero { min-height: 0; padding: 3.5rem 1rem 4.5rem; }
    .hm-hero__bg img { object-position: 45% 50%; }
    .hm-hero__actions { flex-direction: column; align-items: stretch; }
    .hm-hero__actions .vg-btn, .hm-hero__actions .hm-btn-ghost, .hm-hero__actions form .vg-btn { width: 100%; }
    .hm-stats { grid-template-columns: 1fr 1fr; margin: -2.5rem 1rem 0; }
    .hm-stat:nth-child(3) { border-left: 0; }
    .hm-stat:nth-child(n+3) { border-top: 1px solid rgba(139, 26, 26, 0.2); }
    .hm-stat__num { font-size: 1.35rem; }
    .hm-section { padding: 3.5rem 1rem 0; }
    .hm-section__head { margin-bottom: 2rem; }
    .hm-grid { grid-template-columns: 1fr; }
    .hm-parade { grid-template-columns: repeat(4, 1fr); padding: 1.25rem 0.5rem 1rem; }
    .hm-fam__sprite { width: 72px; height: 72px; background-size: 576px 72px; animation-name: hmIdleSm; }
    .hm-fam__name { font-size: 0.75rem; line-height: 1.3; }
    .hm-join__cta { padding: 2rem 1.25rem; }
}
@keyframes hmIdleSm { from { background-position: 0 0; } to { background-position: -576px 0; } }

@media (prefers-reduced-motion: reduce) {
    .hm-hero__bg img { animation: none; }
}

/* Visible keyword headline under the logo */
.hm-hero__h1 {
    font-family: var(--font-heading);
    font-size: clamp(0.875rem, 1.4vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #ff6a5e;
    /* tight dark halo first so the small caps hold up over bright window lights in the photo */
    text-shadow: 0 0 2px #000, 0 0 6px rgba(0, 0, 0, 1), 0 1px 14px rgba(0, 0, 0, 0.95);
    margin: -0.25rem 0 1.25rem;
}
.hm-lore .hm-h2 { margin-bottom: 1.25rem; }

/* FAQ */
.hm-faq { max-width: 820px; margin: 0 auto; }
.hm-faq__item {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(14, 8, 12, 0.85);
    margin-bottom: 0.75rem;
}
.hm-faq__item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.1rem 3rem 1.1rem 1.4rem;
    position: relative;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-bright);
}
.hm-faq__item summary::-webkit-details-marker { display: none; }
.hm-faq__item summary::after {
    content: '+';
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--gold);
}
.hm-faq__item[open] summary::after { content: '\2212'; }
.hm-faq__item p { padding: 0 1.4rem 1.2rem; line-height: 1.7; color: var(--text-dim); }
@media (max-width: 600px) {
    .hm-hero__h1 { font-size: 0.8125rem; letter-spacing: 0.14em; line-height: 1.6; }
}

/* === Landing pages (inc/landing.php) === */
.hm-hero--lp { min-height: min(72vh, 720px); }
.hm-section--intro { padding-top: 4rem; }
.hm-prose { max-width: 760px; margin: 0 auto; }
.hm-prose .hm-h2 { text-align: center; }
.hm-prose p { line-height: 1.8; color: var(--text); margin-bottom: 1rem; }
.hm-prose strong { color: var(--text-bright); }
.hm-section--last { padding-bottom: 4rem; }
.hm-join__cta--solo { max-width: 720px; margin: 0 auto; }
.hm-join:has(.hm-join__cta--solo) { grid-template-columns: 1fr; }
.hm-join__alt { margin: 1.25rem 0 0; font-size: 0.875rem; }
.hm-join__alt a, .vg-modal__switch a { color: var(--gold); }
.vg-modal__switch { margin: 1.25rem 0 0; text-align: center; font-size: 0.875rem; color: var(--text-dim); }
.hm-join { scroll-margin-top: 90px; }
.hm-faq__item p a { color: var(--gold); }
