/* Homepage directory and closing panels; isolated from the other archives. */
body.home-page .section-title,
body.home-page .portal-grid,
body.home-page .info-block,
body.home-page .quote-box {
    box-sizing: border-box;
    width: min(1280px, calc(100% - 48px));
    max-width: 1280px;
    margin-inline: auto;
}
body.home-page .section-title { display: flex; flex-direction: column; align-items: center; padding: 0; margin-top: 90px; text-align: center; gap: 0; }
body.home-page .section-title .home-directory-label { display: block; }
body.home-page .home-directory-label { color: #e35060; font: 700 10px/1.6 Arial, sans-serif; letter-spacing: .19em; text-transform: uppercase; }
body.home-page .section-title h2 { margin: 12px 0 16px; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.08; text-shadow: none; }
body.home-page .section-title h2::after { display: none; }
body.home-page .section-title p { color: #b4aca6; font-style: normal; }
body.home-page .portal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 0; margin-top: 32px; margin-bottom: 80px; perspective: none; counter-reset: portal; }
body.home-page .portal-grid::before,
body.home-page .portal-grid::after,
body.home-page .info-block::before,
body.home-page .info-block::after { display: none; }
body.home-page .portal-card {
    min-width: 0; min-height: 330px; display: flex; align-items: flex-end;
    clip-path: none; border-radius: 16px !important; border: 1px solid #393132 !important;
    transform: none !important; transform-style: flat; isolation: isolate;
    background-color: #101012 !important; background-size: cover !important; background-position: center !important;
    box-shadow: 0 16px 40px #0005 !important; counter-increment: portal;
    transition: border-color .25s, box-shadow .25s;
}
body.home-page .portal-card[href="characters.html"] { background-image: url('images/characters.jpg') !important; }
body.home-page .portal-card[href="artifacts.html"] { background-image: url('images/weapons.jpg') !important; }
body.home-page .portal-card[href="lore.html"] { background-image: url('images/lore.jpg') !important; }
body.home-page .portal-card[href="timeline.html"] { background-image: url('images/timeline.jpg') !important; }
body.home-page .portal-card[href="gallery.html"] { background-image: url('images/gallery.jpg') !important; }
body.home-page .portal-card[href="map.html"] { background-image: url('images/map.jpg') !important; }
body.home-page .portal-card[href="anime.html"] { background-image: url('images/anime.png') !important; }
body.home-page .portal-card[href="quiz.html"] { background-image: url('images/quiz-card.png') !important; }
body.home-page .portal-card::before { z-index: 0; transform: none; background: linear-gradient(180deg, #06060808 10%, #07070965 44%, #070709f5 78%, #070709 100%) !important; }
body.home-page .portal-card::after { content: counter(portal, decimal-leading-zero) ' / АРХІВ'; position: absolute; top: 20px; left: 22px; color: #f0d6a4; background: #090909b8; border: 1px solid #ffffff24; border-radius: 6px; padding: 7px 9px; font: 700 9px/1 Arial, sans-serif; letter-spacing: .13em; }
body.home-page .portal-group-title { grid-column: 1 / -1; margin: 26px 0 2px; padding: 0 0 16px; border-bottom: 1px solid #79603d66; color: #e7c184; font-size: 26px; text-align: left; }
body.home-page .portal-group-title:first-child { margin-top: 0; }
body.home-page .portal-card > div:not(.js-tilt-glare) { position: relative; bottom: auto; width: 100%; box-sizing: border-box; padding: 24px; transform: none; z-index: 1; }
body.home-page .portal-card h3 { font-size: 25px; margin: 0 0 10px; color: #f6f0e9; text-shadow: none; }
body.home-page .portal-card p { min-height: 64px; color: #c0b8b1; font-size: 14px; line-height: 1.55; }
body.home-page .portal-card > div:not(.js-tilt-glare)::after { content: 'ВІДКРИТИ РОЗДІЛ ↗'; display: block; margin-top: 20px; color: #efc16f; font: 700 10px/1.4 Arial, sans-serif; letter-spacing: .08em; }
body.home-page .portal-card .js-tilt-glare { display: none !important; }
body.home-page .portal-card:hover,
body.home-page .portal-card:focus-visible { border-color: #c44150 !important; box-shadow: 0 18px 48px #0008, 0 0 24px #9f162321 !important; outline: 2px solid #d7556540; outline-offset: 4px; }
body.home-page .info-block { padding: 0; margin-bottom: 26px; gap: 24px; grid-template-columns: 1.15fr 1fr; align-items: stretch; }
body.home-page .about-box,
body.home-page .character-day { clip-path: none; min-width: 0; padding: 36px; border: 1px solid #443336; border-radius: 18px; background: radial-gradient(ellipse at top left, #6a172325, transparent 65%), linear-gradient(130deg, #171315f5, #09090af5); box-shadow: 0 20px 55px #0005; }
body.home-page .about-box::after,
body.home-page .character-day::after { display: none; }
body.home-page .about-box h2 { margin-top: 12px; }
body.home-page .info-block h2 { font-size: clamp(25px, 2.4vw, 34px); margin-bottom: 22px; line-height: 1.2; }
body.home-page .info-block p { font-size: 15px; line-height: 1.8; color: #bdb4af; }
body.home-page .home-about-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #ffffff16; }
body.home-page .home-about-links a { color: #efc16f; text-decoration: none; font-size: 14px; }
body.home-page .home-about-links a:hover { text-decoration: underline; }
body.home-page .character-day { display: grid; grid-template-columns: 145px minmax(0, 1fr); column-gap: 26px; align-content: center; }
body.home-page .character-day h2 { grid-column: 1 / -1; }
body.home-page .character-day img { grid-column: 1; grid-row: 2 / 4; width: 145px; height: 205px; object-fit: cover; object-position: center 20%; border: 1px solid #695046; border-radius: 10px; margin: 0; }
body.home-page .character-day h3 { grid-column: 2; align-self: end; margin: 0 0 10px; color: #edc77e; font-size: 24px; line-height: 1.25; }
body.home-page .character-day p { grid-column: 2; margin: 0; }
body.home-page .quote-box { position: relative; padding: 38px 62px; margin-bottom: 80px; border: 1px solid #ffffff18; border-radius: 14px; background: linear-gradient(100deg, #34141ae6, #0d0c0ee6 70%); text-align: center; color: #e4d9cb; font-size: clamp(19px, 2vw, 25px); text-wrap: balance; box-shadow: none; }
body.home-page .quote-box::before { content: '“'; position: absolute; left: 24px; top: 8px; color: #c4515a80; font: 80px/1 Georgia, serif; }
@media (max-width: 1100px) {
    body.home-page .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.home-page .info-block { grid-template-columns: 1fr; }
    body.home-page .character-day { grid-template-columns: 180px minmax(0, 1fr); }
    body.home-page .character-day img { width: 180px; }
}
@media (max-width: 560px) {
    body.home-page .section-title, body.home-page .portal-grid, body.home-page .info-block, body.home-page .quote-box { width: calc(100% - 32px); }
    body.home-page .portal-grid { grid-template-columns: 1fr; gap: 16px; }
    body.home-page .portal-card { min-height: 350px; }
    body.home-page .about-box, body.home-page .character-day { padding: 24px; }
    body.home-page .character-day { grid-template-columns: 100px minmax(0, 1fr); gap: 12px 18px; }
    body.home-page .character-day img { width: 100px; height: 155px; }
    body.home-page .character-day h3 { font-size: 21px; }
    body.home-page .character-day p { font-size: 13px; line-height: 1.6; }
    body.home-page .quote-box { padding: 32px; }
}
@media (prefers-reduced-motion: reduce) { body.home-page .portal-card { transition: none; } }
