:root {
    --night-1: #070c1c;
    --night-2: #0d1430;
    --night-3: #141b3e;
    --night-4: #1a2450;

    --violet: #9b87f5;
    --violet-soft: #b5a6ff;
    --violet-deep: #4a3e8c;
    --violet-glow: rgba(155, 135, 245, 0.35);

    --gold: #c9a657;
    --gold-bright: #e8c373;
    --gold-dim: #6e5a2f;

    --cream: #e6dcc0;

    --moonlight: #b8c5f0;
    --text-primary: #eef1fb;
    --text-secondary: #9aa3c7;
}

.meta_stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: radial-gradient(1px 1px at 12% 18%, var(--moonlight) 50%, transparent),
    radial-gradient(1px 1px at 28% 62%, #fff 50%, transparent),
    radial-gradient(1px 1px at 44% 12%, var(--moonlight) 50%, transparent),
    radial-gradient(1px 1px at 68% 34%, #fff 50%, transparent),
    radial-gradient(1px 1px at 83% 78%, var(--moonlight) 50%, transparent),
    radial-gradient(1px 1px at 92% 22%, #fff 50%, transparent),
    radial-gradient(2px 2px at 38% 40%, var(--moonlight) 50%, transparent),
    radial-gradient(2px 2px at 75% 58%, #fff 50%, transparent);
    opacity: 0.35;
    animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.5;
    }
}

.meta_container {
    position: relative;
    z-index: 2;
    max-width: 1360px;
    margin: 0 auto;
    padding: 90px 40px;
}

/* ==== Page header ==== */
.meta_page-header {
    text-align: center;
}

.cards {
    margin-bottom: 50px;
}

.meta_top-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 640px;
    margin: 0 auto 32px;
}

.meta_top-ornament .meta_line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim) 20%, var(--gold) 50%, var(--gold-dim) 80%, transparent);
}

.meta_top-ornament .meta_diamond {
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: rotate(45deg);
    box-shadow: 0 0 8px var(--gold), 0 0 16px rgba(201, 166, 87, 0.4);
}

.meta_top-ornament .meta_diamond.meta_small {
    width: 4px;
    height: 4px;
    opacity: 0.7;
}

.meta_eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.4em;
    color: var(--violet);
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 500;
}

.meta_title {
    font-family: 'Marcellus', serif !important;
    font-size: clamp(1.6rem, 5vw, 3.5rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, #c8cfe8 50%, #7e86b5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 35px;
    margin-top: 35px;
}

.meta_lead {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    font-weight: 300;
}

.meta_lead .meta_highlight {
    color: var(--violet);
    font-weight: 500;
}

.meta_features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

@media (max-width: 1100px) {
    .meta_features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .meta_features {
        grid-template-columns: 1fr;
    }
}

/* ==== Shared text + button ==== */
.meta_f-title {
    font-family: 'Marcellus', serif !important;
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 14px;
    line-height: 1.3;
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
    text-shadow: 0 0 10px var(--violet-glow);
}

.meta_f-desc {
    font-family: 'Manrope', sans-serif !important;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 24px;
    font-weight: 300;
    z-index: 2;
    position: relative;
    padding: 0 5px;
}

.meta_f-desc .meta_accent {
    color: var(--violet-soft);
    font-weight: 500;
    text-shadow: 0 0 8px var(--violet-glow);
}

.meta_f-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', sans-serif !important;
    font-size: 11px;
    letter-spacing: 0.28em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--cream);
    padding: 14px 40px;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    border-radius: 0;
    transition: transform 0.2s ease, filter 0.2s ease, color 0.2s ease;
    z-index: 2;
    overflow: visible;
    min-width: 180px;
    height: 46px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.meta_f-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/btn/btn-001.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transition: filter 0.2s ease;
    z-index: -1;
}

.meta_f-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 12px rgba(255,255,255,0.2);
}

.meta_f-btn:hover::before {
    filter: brightness(1.15);
}

/* ============================================================== */
/*   GRIMOIRE PAGE                                                */
/* ============================================================== */
.meta_card--grimoire {
    position: relative;
    padding: 160px 29px 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(180deg,
    rgba(26, 36, 80, 0.85) 0%,
    rgba(13, 20, 48, 0.95) 100%);
    border: 1px solid rgba(201, 166, 87, 0.25);
    transition: transform 0.55s cubic-bezier(0.2, 1, 0.3, 1), border-color 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: cardEnter 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.meta_card--grimoire:nth-child(1) {
    animation-delay: 0.1s;
}

.meta_card--grimoire:nth-child(2) {
    animation-delay: 0.25s;
}

.meta_card--grimoire:nth-child(3) {
    animation-delay: 0.4s;
}

.meta_card--grimoire:nth-child(4) {
    animation-delay: 0.55s;
}

@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.meta_card--grimoire::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(201, 166, 87, 0.4);
    pointer-events: none;
    transition: border-color 0.5s ease;
}

.meta_card--grimoire::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 50% 30%, var(--violet-glow), transparent 65%);
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.meta_card--grimoire:hover {
    transform: translateY(-5px);
    border-color: rgba(232, 195, 115, 0.6);
}

.meta_card--grimoire:hover::before {
    border-color: rgba(232, 195, 115, 0.8);
}

.meta_card--grimoire:hover::after {
    opacity: 0.85;
}

/* Corner flourishes */
.meta_card--grimoire .meta_corner {
    position: absolute;
    width: 24px;
    height: 24px;
    color: var(--gold);
    opacity: 0.7;
    filter: drop-shadow(0 0 3px rgba(201, 166, 87, 0.4));
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.5s ease, color 0.5s ease;
}

.meta_card--grimoire:hover .meta_corner {
    opacity: 1;
    color: var(--gold-bright);
}

.meta_card--grimoire .meta_corner.meta_tl {
    top: 14px;
    left: 14px;
}

.meta_card--grimoire .meta_corner.meta_tr {
    top: 14px;
    right: 14px;
    transform: scaleX(-1);
}

.meta_card--grimoire .meta_corner.meta_bl {
    bottom: 14px;
    left: 14px;
    transform: scaleY(-1);
}

.meta_card--grimoire .meta_corner.meta_br {
    bottom: 14px;
    right: 14px;
    transform: scale(-1, -1);
}

/* Ribbon bookmark */
.meta_card--grimoire .meta_bookmark {
    position: absolute;
    top: -2px;
    right: 20px;
    width: 14px;
    height: 38px;
    background: linear-gradient(180deg, var(--violet) 0%, var(--violet-deep) 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 3;
    transition: transform 0.4s ease;
}

.meta_card--grimoire:hover .meta_bookmark {
    transform: translateY(3px);
}

/* Illuminated initial */
.meta_card--grimoire .meta_initial {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.meta_card--grimoire .meta_initial::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(201, 166, 87, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(155, 135, 245, 0.15), transparent);
    border: 1px solid rgba(201, 166, 87, 0.5);
}

.meta_card--grimoire .meta_initial svg {
    width: 48px;
    height: 48px;
    color: var(--violet-soft);
    filter: drop-shadow(0 0 8px var(--violet-glow));
    z-index: 2;
    transition: transform 0.5s ease;
}

.meta_card--grimoire:hover .meta_initial svg {
    transform: scale(1.1);
}

.meta_card--grimoire .meta_gold-flourish {
    width: 80%;
    height: 14px;
    margin-bottom: 16px;
    z-index: 2;
}

.meta_card--grimoire .meta_gold-flourish svg {
    width: 100%;
    height: 100%;
    color: var(--gold);
    opacity: 0.7;
    filter: drop-shadow(0 0 3px rgba(201, 166, 87, 0.3));
}

/* ==== Medallion icon ==== */
@keyframes spin-cw  { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 18px var(--violet-glow), inset 0 2px 4px rgba(232,195,115,0.25), inset 0 -2px 6px rgba(0,0,0,0.4), 0 6px 14px rgba(0,0,0,0.5); }
    50%      { box-shadow: 0 0 38px rgba(155,135,245,0.75), inset 0 2px 4px rgba(232,195,115,0.4), inset 0 -2px 6px rgba(0,0,0,0.4), 0 6px 14px rgba(0,0,0,0.5); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
@keyframes img-pulse {
    0%, 100% { filter: drop-shadow(0 0 6px var(--violet-glow)) brightness(1); }
    50%      { filter: drop-shadow(0 0 14px rgba(155,135,245,0.9)) brightness(1.1); }
}

.medallion-wrap {
    position: absolute;
    top: 46px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    z-index: 2;
}

.spin-ring,
.spin-ring-2 {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.spin-ring {
    inset: -8px;
    border: 1.5px solid transparent;
    border-top-color: var(--gold);
    border-right-color: rgba(201, 166, 87, 0.35);
}
.spin-ring-2 {
    inset: -14px;
    border: 1px dashed rgba(201, 166, 87, 0.3);
    border-bottom-color: var(--gold-bright);
    transition-delay: 0.05s;
}

.medallion {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(155,135,245,0.4), rgba(74,62,140,0.4) 50%, rgba(20,27,62,0.95) 100%);
    border: 2px solid var(--gold);
    box-shadow: 0 0 18px var(--violet-glow), inset 0 2px 4px rgba(232,195,115,0.25), inset 0 -2px 6px rgba(0,0,0,0.4), 0 6px 14px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 3;
    transition: border-color 0.4s ease;
}

.medallion::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px dashed rgba(201, 166, 87, 0.45);
    z-index: 4;
    pointer-events: none;
    transition: border-color 0.4s ease;
}

.medallion img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rivet-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}
.rivet-ring span {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f0d890, #8a6a2a);
    box-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 0 5px rgba(232,195,115,0.5);
    transition: box-shadow 0.4s ease;
}
.rivet-ring span:nth-child(1) { top: -3px;    left: 50%; transform: translateX(-50%); }
.rivet-ring span:nth-child(2) { bottom: -3px; left: 50%; transform: translateX(-50%); }
.rivet-ring span:nth-child(3) { left: -3px;   top: 50%;  transform: translateY(-50%); }
.rivet-ring span:nth-child(4) { right: -3px;  top: 50%;  transform: translateY(-50%); }

/* Always animated */
.spin-ring   { opacity: 0.6; animation: spin-cw  3s linear infinite; }
.spin-ring-2 { opacity: 0.4; animation: spin-ccw 5s linear infinite; }
.medallion   { animation: pulse-glow 3s ease-in-out infinite, float 4s ease-in-out infinite; }
.medallion::before { animation: spin-ccw 6s linear infinite; }
.medallion img     { animation: img-pulse 3s ease-in-out infinite; }
.rivet-ring        { animation: spin-cw 4s linear infinite; }

/* Hover — faster + brighter */
.medallion-wrap:hover .spin-ring   { opacity: 1; animation-duration: 1.6s; }
.medallion-wrap:hover .spin-ring-2 { opacity: 1; animation-duration: 2.4s; }
.medallion-wrap:hover .medallion   { border-color: var(--gold-bright); animation: pulse-glow 2s ease-in-out infinite, float 3s ease-in-out infinite; }
.medallion-wrap:hover .medallion::before { border-color: rgba(232,195,115,0.8); animation-duration: 3s; }
.medallion-wrap:hover .medallion img     { transform: scale(1.1); animation-duration: 2s; }
.medallion-wrap:hover .rivet-ring        { animation-duration: 2s; }
.medallion-wrap:hover .rivet-ring span   { box-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 0 10px rgba(232,195,115,0.9); }
