/* ================================================
   demonic.corvid — world / cosmology
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Delius&display=swap');
@font-face {
    font-family: 'Fantaisie Artistique';
    src: url('../assets/fonts/FantaisieArtistique.otf') format('opentype'),
         url('../assets/fonts/FantaisieArtistique.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink:            #142338;
    --ink-deep:       #0B1626;
    --parchment:      #F7E9C9;
    --parchment-deep: #EFD9A6;
    --blood:          #C41E2A;
    --blood-deep:     #6E1420;
    --wisp:           #86A9BE;
    --wisp-bright:    #B9D3E2;
    --gold:           #D8B25C;
    --ink-soft:       #3B4A5E;
    --radius: .6em;
    --radius-lg: 1.2em;
}

* { box-sizing: border-box; font-family: 'Delius', Verdana, Geneva, Tahoma, sans-serif; }

body {
    margin: 0;
    padding: 2.5em 1em;
    background: var(--ink-deep);
    color: var(--ink);
    display: flex;
    justify-content: center;
}

p { line-height: 1.6em; }
p:first-child { margin-top: 0; }

h1 {
    font-family: 'Fantaisie Artistique', 'Delius', cursive;
    font-weight: 400; font-synthesis: none;
    letter-spacing: .5px; font-size: 1.9em;
    color: var(--parchment); margin: 0 0 .3em;
}
h2 {
    font-family: 'Fantaisie Artistique', 'Delius', cursive;
    font-weight: 400; font-synthesis: none;
    font-size: 1.35em; color: var(--ink);
    letter-spacing: .5px; margin: 0 0 .5em;
}
h2 .hint { font-family: 'Delius', sans-serif; font-size: .55em; color: var(--ink-soft); font-weight: 500; letter-spacing: 0; margin-left: .4em; }
h3 { font-family: 'Fantaisie Artistique', 'Delius', cursive; font-weight: 400; font-synthesis: none; font-size: 1.2em; margin: 0 0 .1em; }

a { color: var(--wisp); font-weight: 700; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--blood); text-decoration: underline; }

.page-frame {
    width: 100%; max-width: 1100px;
    background-color: var(--parchment);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.55);
    position: relative;
}

/* ============ SITE HEAD + MENU (shared chrome) ============ */
.site-head { position: relative; background: linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 75%); text-align: center; padding: 2.2em 1em 1.6em; overflow: hidden; }
.starfield { position: absolute; inset: 0; opacity: .8; }
.starfield circle { fill: var(--wisp-bright); }
.constellation-line { stroke: var(--gold); stroke-width: 1; opacity: .35; }
.brand { position: relative; display: inline-flex; align-items: center; gap: .8em; text-decoration: none; z-index: 2; }
.brand-mark { width: 66px; height: 66px; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); }
.brand-title { font-family: 'Fantaisie Artistique', 'Delius', cursive; font-weight: 400; font-synthesis: none; font-size: 2.1em; color: var(--parchment); letter-spacing: 1px; }
.brand-title .dot { color: var(--blood); }
.brand-sub { position: relative; z-index: 2; color: var(--wisp); font-size: .85em; letter-spacing: 2px; margin-top: .3em; }
.phase-divider { display: flex; align-items: center; justify-content: center; gap: .5em; padding: .4em 0 .9em; position: relative; z-index: 2; }
.phase-divider .rule { height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.phase-divider .moon { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: inset 4px -1px 0 0 var(--ink); }
.phase-divider.footer-phase { padding: .1em 0 .7em; }

.menu-strip { background-color: var(--ink); border-bottom: 3px double var(--gold); display: flex; justify-content: center; padding: .3em 1em .8em; }
.menu-list { display: flex; align-items: center; justify-content: center; list-style: none; margin: 0; padding: 0; gap: .1em; flex-wrap: wrap; }
.menu-list > li { position: relative; }
.menu-list > li > a { display: block; padding: .6em 1.05em; color: var(--parchment); font-weight: 700; text-decoration: none; border-radius: var(--radius); letter-spacing: .3px; }
.menu-list > li > a:hover { color: var(--ink); background-color: var(--gold); }
.menu-list a:visited { color: var(--parchment); }
.menu-list > li.current > a { background-color: var(--blood-deep); }
.has-dropdown .dropdown { display: none; position: absolute; top: 100%; left: 0; flex-direction: column; background-color: var(--parchment); border: 2px solid var(--blood-deep); border-radius: var(--radius); min-width: 210px; padding: .3em 0; z-index: 10; list-style: none; margin: 0; }
.has-dropdown:hover .dropdown { display: flex; }
.dropdown li a { display: block; padding: .5em 1em; color: var(--ink); text-decoration: none; font-weight: 500; }
.dropdown li a:hover { color: var(--blood); background-color: var(--parchment-deep); text-decoration: none; }

.sparkle-divider, .raven-divider { display: flex; align-items: center; justify-content: center; gap: .6em; margin: 1.8em 0; }
.sparkle-divider .rule, .raven-divider .rule { height: 1px; width: 60px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.sparkle-icon { width: 16px; height: 16px; fill: var(--blood); }

/* ============ MAIN ============ */
main { padding: 1.6em 2em 2.4em; }

.world-crumb { font-size: .78em; color: var(--ink-soft); letter-spacing: .3px; margin-bottom: 1em; }
.world-crumb strong { color: var(--blood-deep); }

.cosmo-intro {
    background-color: var(--ink);
    border: 1px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 1.6em 1.8em;
    color: var(--parchment);
}
.cosmo-intro .eyebrow { font-size: .75em; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin: 0 0 .3em; }
.cosmo-intro p { color: var(--parchment); }
.cosmo-intro strong { color: var(--wisp-bright); }

/* ============ THE WHEEL ============ */
.wheel-section { margin-top: 1.8em; text-align: center; }
.section-note { max-width: 620px; margin: 0 auto .8em; color: var(--ink-soft); font-size: .92em; }

.wheel-wrap { display: flex; flex-direction: column; align-items: center; gap: 1em; }
.magic-wheel { width: 100%; max-width: 420px; height: auto; }

.wedge { stroke: var(--gold); stroke-width: 1.5; transition: opacity .2s ease; }
.wedge-primary { fill: var(--ink); }
.wedge-sub { fill: var(--ink-soft); }
.wedge:hover { opacity: .82; }

.wheel-core-ring { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.core-label { fill: var(--parchment); font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-anchor: middle; font-family: 'Delius', sans-serif; }
.core-sublabel { fill: var(--parchment-deep); font-size: 9px; text-anchor: middle; font-style: italic; font-family: 'Delius', sans-serif; }

.wheel-connector { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .7; }
.node-circle { fill: var(--parchment-deep); stroke: var(--gold); stroke-width: 1.5; }
.node-label { fill: var(--ink-soft); font-size: 12px; font-weight: 700; font-family: 'Delius', sans-serif; }

.wedge-label { fill: var(--ink); font-size: 14px; font-weight: 700; font-family: 'Delius', sans-serif; }
.wedge-label.sub { fill: var(--ink-soft); font-size: 12.5px; }
.wedge-sublabel { fill: var(--ink-soft); font-size: 9.5px; font-weight: 500; font-style: italic; }

.wheel-legend { text-align: left; max-width: 420px; font-size: .82em; color: var(--ink-soft); }
.wheel-legend p { display: flex; align-items: flex-start; gap: .5em; margin: .3em 0; }
.swatch { width: 12px; height: 12px; border-radius: 3px; margin-top: .2em; flex-shrink: 0; border: 1px solid var(--gold); }
.swatch-primary { background: var(--ink); }
.swatch-sub { background: var(--ink-soft); }
.swatch-core { background: var(--blood-deep); }

/* ============ GODS / ENTITIES ============ */
.pantheon-section { margin-top: 1.4em; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.compare-panel {
    background: var(--parchment-deep);
    border: 1px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 1.2em 1.4em;
}
.compare-panel-dark { background: var(--ink); color: var(--parchment); }
.compare-panel-dark h3 { color: var(--parchment); }
.compare-sub { font-size: .8em; letter-spacing: .5px; color: var(--blood-deep); margin: 0 0 .7em; font-style: italic; }
.compare-panel-dark .compare-sub { color: var(--gold); }
.compare-panel ul { margin: 0; padding-left: 1.1em; font-size: .92em; }
.compare-panel li { margin-bottom: .4em; }
.pantheon-note { text-align: center; font-size: .85em; color: var(--ink-soft); font-style: italic; margin-top: 1em; }

/* ============ FLIP CARDS (shared component) ============ */
.facts-section { margin-top: .4em; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1em; }
.factcard { perspective: 1200px; cursor: pointer; height: 140px; }
.factcard-inner { position: relative; width: 100%; height: 100%; transition: transform .6s ease; transform-style: preserve-3d; }
.factcard:hover .factcard-inner, .factcard:focus-visible .factcard-inner { transform: rotateY(180deg); }
.factcard:focus-visible { outline: 2px solid var(--blood); outline-offset: 3px; border-radius: var(--radius); }
.factcard-front, .factcard-back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; text-align: center; padding: 1em; }
.factcard-front { background: var(--parchment-deep); border: 1px solid var(--gold); box-shadow: 3px 4px 0 rgba(20,35,56,.2); }
.factcard-back { background: var(--ink); color: var(--parchment); border: 1px solid var(--gold); transform: rotateY(180deg); }
.fact-label { font-weight: 700; color: var(--ink-soft); font-size: .95em; }
.factcard-back span { font-size: .85em; line-height: 1.4; }

footer { text-align: center; font-size: .85rem; font-weight: 700; padding: 1em; background: var(--ink); color: var(--parchment); letter-spacing: .5px; }
footer a { color: var(--wisp-bright); }
footer a:hover { color: var(--gold); }

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