/* ============================================================
   HOUSES OF EDERIA — The Shield Hall
   houses-of-ederia.css

   Six banners on a gold rod, then the dossier for whichever one you
   pick. Shape and colour follow BRANDING.md: the surface is midnight,
   the hairlines are gold, and a house's own colour only ever appears
   on that house's banner, shield or nameplate rule — never as a flood
   fill that takes the page over.
   ============================================================ */

/* ── Hall prompt ─────────────────────────────────────────── */
.hall-prompt {
    text-align: center;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 18px;
    color: var(--court-secondary);
    margin: 0 0 22px;
}

/* ── Hanging Rod ─────────────────────────────────────────── */
.hall-rod {
    position: relative;
    height: 16px;
    margin: 0 18px;
}

.rod-bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
    background: var(--gradient-gold);
    box-shadow: none;
}

/* Diamonds, the same mark that heads each section on the hub. */
.rod-end {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translateY(-50%) rotate(45deg);
    background: var(--royal-gold);
}

.rod-end.left  { left: -4px; }
.rod-end.right { right: -4px; }

/* ── Banners Row ─────────────────────────────────────────── */
.banners-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

/* ── Individual Banner Button ────────────────────────────── */
.house-banner {
    clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
    width: 100%;
    min-height: 250px;
    background: var(--court-raised);
    border: 1px solid var(--court-line);
    border-top: 3px solid var(--house-top, var(--royal-gold));
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    position: relative;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
    transform-origin: top center;
}

.house-banner:hover,
.house-banner:focus-visible {
    background: var(--court-hover);
    transform: translateY(-4px);
}

.house-banner.active {
    background: var(--court-hover);
    border-color: var(--house-top, var(--royal-gold));
    border-top-color: var(--house-top, var(--royal-gold));
    transform: translateY(-4px);
}

/* ── Banner hook ─────────────────────────────────────────── */
.banner-ring {
    width: 10px;
    height: 10px;
    margin-top: -5px;
    flex-shrink: 0;
    background: var(--royal-gold);
    transform: rotate(45deg);
    position: relative;
    z-index: 2;
}

/* ── Banner Body ─────────────────────────────────────────── */
.banner-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px 44px;
    gap: 12px;
    width: 100%;
}

.banner-shield {
    width: 86px;
    height: auto;
    object-fit: contain;
    filter: none;
    transition: transform .18s ease;
}

.house-banner:hover .banner-shield { transform: scale(1.04); }

.banner-house-name {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13px;
    letter-spacing: 0;
    color: var(--royal-gold-light);
    text-align: center;
    line-height: 1.3;
    text-shadow: none;
}

.banner-motto {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    color: var(--court-secondary);
    text-align: center;
    line-height: 1.4;
    text-shadow: none;
}

/* ── House Detail Panel ──────────────────────────────────── */
.house-detail {
    display: none;
    position: relative;
    margin-top: 34px;
    background: var(--court-raised);
    border: 1px solid var(--court-border);
    border-top: 2px solid var(--house-accent, var(--royal-gold));
    border-radius: 0;
    box-shadow: none;
    animation: detailSlideIn .24s ease;
    overflow: hidden;
}

.house-detail.open { display: block; }

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

/* ── Close Button ────────────────────────────────────────── */
.detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--court-raised);
    border: 1px solid var(--court-border);
    border-radius: 2px;
    color: var(--royal-gold);
    font-size: 13px;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
    z-index: 10;
}

.detail-close:hover {
    background: var(--court-hover);
    border-color: var(--royal-gold);
}

/* ── Detail Inner Grid ───────────────────────────────────── */
.detail-inner {
    display: grid;
    grid-template-columns: 240px 1fr;
}

/* ── Detail Visual (left) ────────────────────────────────── */
.detail-visual {
    align-self: start;
    background: var(--court-surface);
    border-right: 1px solid var(--court-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 34px 20px 28px;
    gap: 22px;
}

.detail-shield-img {
    width: 140px;
    height: auto;
    object-fit: contain;
    filter: none;
}

.detail-lord-wrap {
    text-align: center;
    width: 100%;
}

/* The arched niche the hub gives every portrait. */
.detail-lord-img {
    width: 118px;
    height: 148px;
    object-fit: cover;
    object-position: top;
    background: var(--royal-black);
    border: 1px solid var(--house-accent, var(--royal-gold));
    border-bottom: 0;
    border-radius: 50% 50% 0 0 / 28% 28% 0 0;
    box-shadow: none;
    display: block;
    margin: 0 auto 10px;
}

.detail-lord-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    color: var(--court-secondary);
    line-height: 1.4;
    margin: 0;
}

/* ── Detail Content (right) ──────────────────────────────── */
/* No inner scroll: the page scrolls, as it does everywhere else. */
.detail-content { padding: 32px 36px 32px 30px; }

.detail-name {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 26px;
    color: var(--royal-gold-light);
    letter-spacing: 0;
    margin: 0 0 6px;
    padding-right: 44px;
}

.detail-motto {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 19px;
    color: var(--house-accent, var(--royal-gold));
    margin: 0 0 22px;
}

/* The share button under the motto (js/court-share.js). */
.detail-share { margin: -10px 0 22px; }
.detail-share:empty { display: none; }

/* ── Basics grid ─────────────────────────────────────────── */
.detail-basics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 22px;
    background: var(--court-surface);
    border: 1px solid var(--court-line);
    border-radius: 0;
    padding: 16px 18px;
    margin-bottom: 22px;
}

.basics-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.basics-label {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--royal-gold);
}

.basics-value {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    color: var(--parchment);
}

/* ── Detail body text ────────────────────────────────────── */
.detail-body {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 19px;
    line-height: 1.75;
    color: var(--parchment);
}

/* Gold, not the house colour: a section heading is structure. */
.detail-body h3 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--royal-gold);
    border-bottom: 1px solid var(--court-line);
    padding-bottom: 8px;
    margin: 26px 0 14px;
}

.detail-body p { margin: 0 0 14px; }

.detail-body ul {
    padding-left: 22px;
    margin: 0 0 14px;
}

.detail-body li {
    margin-bottom: 7px;
    color: var(--parchment);
}

/* ── Location image ──────────────────────────────────────── */
.detail-location {
    margin-top: 26px;
    text-align: center;
}

.detail-location-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid var(--court-line);
    display: block;
}

.detail-location-caption {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    color: var(--court-secondary);
    margin: 10px 0 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1020px) {
    .banners-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .house-banner { min-height: 240px; }
}

@media (max-width: 820px) {
    .detail-inner { grid-template-columns: 1fr; }

    .detail-visual {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-self: stretch;
        border-right: none;
        border-bottom: 1px solid var(--court-line);
        padding: 24px;
        gap: 24px;
    }

    .detail-content { padding: 24px; }
}

@media (max-width: 560px) {
    .hall-rod { margin: 0 8px; }

    .banners-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .house-banner { min-height: 230px; }

    .banner-body { padding: 16px 8px 34px; gap: 8px; }

    .banner-shield { width: 62px; }

    .banner-house-name { font-size: 12px; }

    .banner-motto { display: none; }

    .detail-basics { grid-template-columns: 1fr; }

    .detail-name { font-size: 23px; }

    .detail-body { font-size: 18px; }
}
