/* ==========================================================================
   Format Hall — individual MTG format landing pages
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/* Hero section                                                                 */
/* -------------------------------------------------------------------------- */

.format-hall__hero {
    position: relative;
    padding-block: var(--space-20) var(--space-16);
    overflow: hidden;
    /* Inset depth shadow for vault atmosphere */
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3);
}

/* Subtle warm radial glow behind the mana icon */
.format-hall__hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 60% 70% at 12% 50%,
        rgba(201, 168, 76, 0.09) 0%,
        transparent 65%
    );
    pointer-events: none;
}

.format-hall__hero-inner {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

/* -------------------------------------------------------------------------- */
/* Giant mana symbol — museum medallion treatment                               */
/* -------------------------------------------------------------------------- */

/*
 * Double-ring medallion effect:
 *   - outer ring: thin gold at low opacity (the frame)
 *   - inner ring: via box-shadow inset, tighter and slightly brighter
 *   - subtle gold radial glow at centre via background
 * The <i> mana-font icon is an inline element by default.
 * We set display:flex on the wrap and display:block on the icon so that
 * flex centering actually controls the icon's bounding box, not its
 * inline baseline.
 */

.format-hall__mana-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    /* Outer ring */
    border: 1px solid rgba(201, 168, 76, 0.35);
    /* Inner ring via inset box-shadow; glow via outer box-shadow */
    box-shadow:
        inset 0 0 0 4px rgba(201, 168, 76, 0.08),
        inset 0 0 0 5px rgba(201, 168, 76, 0.18),
        0 0 32px rgba(201, 168, 76, 0.10),
        var(--shadow-sm);
    /* Very subtle gold wash at centre */
    background: radial-gradient(
        ellipse 70% 70% at 50% 50%,
        rgba(201, 168, 76, 0.07) 0%,
        transparent 80%
    );
    /* Smooth in on load */
    transition: box-shadow var(--transition-slow), border-color var(--transition-slow);
}

.format-hall__mana-wrap:hover {
    border-color: rgba(201, 168, 76, 0.55);
    box-shadow:
        inset 0 0 0 4px rgba(201, 168, 76, 0.10),
        inset 0 0 0 5px rgba(201, 168, 76, 0.25),
        0 0 48px rgba(201, 168, 76, 0.20),
        var(--shadow-sm);
}

/*
 * mana-font renders icons as pseudo-element content on the <i> tag.
 * Setting display:block removes the inline baseline offset that causes
 * the icon to appear vertically off-centre inside a flex container.
 * font-size drives the icon size; line-height:1 collapses the line box.
 */
.format-hall__mana-icon {
    display: block;
    font-size: 88px;
    line-height: 1;
    /* Without ms-cost the glyph inherits text colour — set it explicitly
       to a warm parchment/gold so it reads as an engraved symbol. */
    color: var(--color-stone-light);
    filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.45));
}

/* -------------------------------------------------------------------------- */
/* Hero text                                                                    */
/* -------------------------------------------------------------------------- */

.format-hall__hero-text {
    flex: 1;
    min-width: 0;
}

.format-hall__eyebrow {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--color-gold);
    margin: 0 0 var(--space-3);
}

/*
 * Gold underline accent:
 * display:block on ::after means the pseudo-element generates its own block
 * inside the heading's flow — it naturally left-aligns under the title text
 * and the fixed width keeps it as a short accent bar, not a full-width rule.
 * No absolute positioning needed; margin-top gives the spacing gap.
 */
.format-hall__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: var(--leading-tight);
    color: var(--color-parchment);
    margin: 0 0 var(--space-4);
    letter-spacing: var(--tracking-tight);
}

.format-hall__title::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: linear-gradient(
        90deg,
        var(--color-gold) 0%,
        var(--color-gold-pale) 60%,
        transparent 100%
    );
    margin-top: var(--space-3);
    border-radius: 1px;
}

.format-hall__desc {
    font-size: var(--text-lg);
    color: var(--color-stone-mid);
    line-height: var(--leading-relaxed, 1.7);
    margin: 0 0 var(--space-3);
    max-width: 60ch;
}

.format-hall__since {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-6);
    /* Slightly increased gap from desc for rhythm */
    padding-top: var(--space-1);
}

.format-hall__since strong {
    color: var(--color-stone-light);
    font-weight: 600;
}

.format-hall__cta {
    margin-top: var(--space-4);
}

/* -------------------------------------------------------------------------- */
/* Popular in-stock section                                                     */
/* -------------------------------------------------------------------------- */

.format-hall__popular {
    padding-top: 0;
}

/*
 * Display case — re-declared here so format-hall pages don't depend on
 * museum-halls.css being loaded. Kept in sync with the homepage version.
 */

.display-case {
    position: relative;
    border: 2px solid var(--color-olive-deep);
    border-radius: var(--radius-lg);
    background: var(--color-vault);
    padding: var(--space-6) var(--space-6) var(--space-10);
    overflow: hidden;
}

/* Glass sheen — top edge highlight */
.display-case::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.30) 25%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(201, 168, 76, 0.30) 75%,
        transparent 100%
    );
    pointer-events: none;
}

/* Brass plaque header */
.display-case__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

/*
 * Plaque: small uppercase gold label on top, large parchment title below.
 * Added gap between the two via margin-top on the strong.
 */
.display-case__plaque {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--color-gold);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.display-case__plaque strong {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    text-transform: none;
    color: var(--color-parchment);
    text-shadow: none;
    line-height: var(--leading-tight);
    margin-top: var(--space-1);
}

.section-link {
    flex-shrink: 0;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-stone-mid);
    text-decoration: none;
    letter-spacing: var(--tracking-wide);
    transition: color var(--transition-fast);
    white-space: nowrap;
    align-self: center;
}

.section-link:hover {
    color: var(--color-gold);
}

/* -------------------------------------------------------------------------- */
/* Empty / archival notice state                                                */
/* -------------------------------------------------------------------------- */

/*
 * Styled as a museum archival notice: centred, italic description,
 * generous vertical breathing room, ghost CTA button.
 */

.format-hall__empty {
    text-align: center;
    padding: var(--space-16) var(--space-8);
}

.format-hall__empty p {
    font-size: var(--text-base);
    font-style: italic;
    color: var(--color-text-muted);
    line-height: var(--leading-normal);
    max-width: 44ch;
    margin: 0 auto var(--space-8);
    /* Light top rule for archival feel */
    padding-top: var(--space-6);
    border-top: 1px solid rgba(201, 168, 76, 0.12);
}

/* Ghost button — matches the site's btn--ghost style */
.format-hall__empty .btn--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    border: 1px solid rgba(201, 168, 76, 0.40);
    border-radius: var(--radius-base);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    color: var(--color-stone-light);
    background: transparent;
    text-decoration: none;
    transition:
        border-color var(--transition-fast),
        color var(--transition-fast),
        background var(--transition-fast);
}

.format-hall__empty .btn--ghost:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: rgba(201, 168, 76, 0.06);
}

/* -------------------------------------------------------------------------- */
/* Responsive — tablet (≤ 900px)                                               */
/* -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .format-hall__hero-inner {
        gap: var(--space-8);
    }

    .format-hall__mana-wrap {
        width: 128px;
        height: 128px;
    }

    .format-hall__mana-icon {
        font-size: 72px;
    }
}

/* -------------------------------------------------------------------------- */
/* Responsive — mobile (≤ 768px)                                               */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .format-hall__hero {
        padding-block: var(--space-12) var(--space-10);
    }

    /*
     * Stack mana icon above the text, centred.
     * align-items: center keeps the circle centred horizontally on narrow screens.
     */
    .format-hall__hero-inner {
        flex-direction: column;
        align-items: center;
        gap: var(--space-6);
        text-align: center;
    }

    /*
     * When the hero stacks, we want the title underline to also centre.
     * Override the ::after so it's auto-margined.
     */
    .format-hall__title::after {
        margin-inline: auto;
    }

    .format-hall__mana-wrap {
        width: 100px;
        height: 100px;
    }

    .format-hall__mana-icon {
        font-size: 56px;
    }

    .format-hall__desc {
        margin-inline: auto;
    }

    .format-hall__cta {
        margin-top: var(--space-2);
    }

    .display-case {
        padding: var(--space-5) var(--space-4) var(--space-8);
    }

    .display-case__header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .display-case__plaque strong {
        font-size: var(--text-2xl);
    }
}

/* -------------------------------------------------------------------------- */
/* Responsive — small mobile (≤ 480px)                                         */
/* -------------------------------------------------------------------------- */

@media (max-width: 480px) {
    /* Hide the mana medallion on very small screens to save vertical space */
    .format-hall__mana-wrap {
        display: none;
    }

    .format-hall__hero {
        padding-block: var(--space-10) var(--space-8);
    }
}
