/* ================================================================
   Krios2 "Observatory chapters" layout (design option B).
   Loaded after style.css and overrides it: navigation becomes an orbit
   rail on the right, the hero is a framed art panel with the animated
   logo, and every system card is a full-width numbered chapter band.
   js/chapters.js sets data-ch / .ch-alt / .ch-cat / .ch-num.
   ================================================================ */
:root { --rail-width: 260px; }

/* ---------- animated logo mark ---------- */
.krios-mark { position: relative; display: inline-block; line-height: 0; }
.krios-mark img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 10px rgba(224, 154, 60, 0.35)); animation: kriosGlow 4.5s ease-in-out infinite; }
/* light sweep clipped to the logo's own shape */
.krios-mark::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 236, 190, 0.75) 50%, transparent 65%) no-repeat;
    background-size: 250% 100%; background-position: 150% 0;
    -webkit-mask: url(../assets/krios-logo.webp) center / contain no-repeat;
    mask: url(../assets/krios-logo.webp) center / contain no-repeat;
    mix-blend-mode: screen; animation: kriosSweep 6s ease-in-out infinite;
}
.krios-mark--sm { width: 44px; }
.krios-mark--lg { width: clamp(150px, 18vw, 230px); animation: kriosFloat 7s ease-in-out infinite; }
.krios-mark--lg::before {
    content: ''; position: absolute; inset: -14%; border-radius: 50%; pointer-events: none;
    border: 1px dashed rgba(255, 213, 138, 0.28); animation: kriosOrbit 60s linear infinite;
}
@keyframes kriosGlow { 0%, 100% { filter: drop-shadow(0 0 8px rgba(224, 154, 60, 0.3)); } 50% { filter: drop-shadow(0 0 22px rgba(255, 213, 138, 0.65)); } }
@keyframes kriosSweep { 0%, 55% { background-position: 150% 0; } 85%, 100% { background-position: -60% 0; } }
@keyframes kriosFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes kriosOrbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .krios-mark img, .krios-mark::after, .krios-mark--lg, .krios-mark--lg::before { animation: none; }
}

/* ---------- top bar: slim, logo only ---------- */
.topbar { background: rgba(13, 8, 22, 0.88); border-bottom: 1px solid rgba(90, 58, 140, 0.25); box-shadow: none; }
.topbar-logo { display: flex; align-items: center; }
.topbar-logo .krios-mark { display: block; }

/* ---------- orbit rail (left) ---------- */
.sidebar {
    left: 0; right: auto; width: var(--rail-width);
    background: rgba(13, 8, 22, 0.9); backdrop-filter: blur(6px);
    border-left: 0; border-right: 1px solid #241838;
}
.sidebar.collapsed { transform: translateX(-100%); }
.sidebar-scroll { padding: 24px 0 16px; }
.nav-category { margin: 0 0 10px; }
.category-header {
    background: none !important; border: 0 !important; box-shadow: none !important;
    padding: 8px 24px 4px !important; cursor: default; pointer-events: none;
}
.category-header .category-icon, .category-header .category-arrow { display: none; }
.category-title { font-size: 12px !important; font-weight: 700 !important; letter-spacing: 0.3em; color: #C9B6DD !important; }
.category-items { max-height: none !important; opacity: 1 !important; overflow: visible !important; padding: 0 !important; }
.nav-group-label { padding: 14px 24px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.25em; color: #F0B968; opacity: 0.85; }
.nav-group-label::after { display: none; }
.nav-item {
    margin: 0; padding: 7px 20px 7px 24px; gap: 10px; border-radius: 0;
    background: none; border-left: 0; color: #DCCDEA; font-size: 14.5px; font-weight: 600; transform: none !important;
}
.nav-item::before {
    content: ''; flex: none; width: 9px; height: 9px; border-radius: 50%;
    border: 1.5px solid #8A6BB8; transition: all 0.25s ease;
}
.nav-item .nav-item-icon { display: none; }
.nav-item .ch-num { flex: none; width: 22px; font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; color: #9C88B4; }
.nav-item:hover { background: none; color: #F1E8F7; }
.nav-item:hover::before { border-color: #F0B968; }
.nav-item.active { background: none; color: #FFD58A; font-weight: 700; }
.nav-item.active::before { width: 13px; height: 13px; margin-left: -2px; border: 0; background: #FFD58A; box-shadow: 0 0 12px #E09A3C; }
.nav-item.active .ch-num { color: #F0B968; }
.sidebar-footer { border-top: 1px solid #241838; }

/* ---------- page frame ---------- */
.main-content {
    position: relative; z-index: 1;
    margin-left: var(--rail-width); margin-right: 0;
    padding: calc(var(--topbar-height) + 24px) 0 0;
}
.footer, .back-to-website { position: relative; z-index: 1; margin-left: var(--rail-width); margin-right: 0; }
body.sidebar-collapsed .main-content, body.sidebar-collapsed .footer, body.sidebar-collapsed .back-to-website { margin-left: 0; }
.content-section { max-width: none; }

/* ---------- framed hero ---------- */
.s5-hero {
    position: relative; display: flex; align-items: flex-end;
    max-width: none; min-height: 560px; margin: 0 32px 0; padding: 64px;
    border-radius: 28px; overflow: hidden; border: 1px solid #2B1D40;
    background: transparent;  /* the live sky (js/starfield.js) shows through */
}
.s5-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(13, 8, 22, 0.72) 0%, rgba(13, 8, 22, 0.25) 50%, rgba(13, 8, 22, 0) 100%);
}
.s5-hero-copy { position: relative; max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.s5-hero-title { margin: 0; line-height: 0; }
.s5-hero-pitch { margin: 0; }
.s5-btn { border-radius: 999px; }

/* ---------- group dividers: quiet chapter-group markers ---------- */
.s5-group-divider { margin: 0; padding: 72px 56px 8px; justify-content: flex-start; gap: 16px; }
.s5-group-divider .s5-group-line:first-child { display: none; }
.s5-group-title { font-size: 13px !important; letter-spacing: 0.35em; color: #F0B968 !important; }

/* ---------- chapters ---------- */
.main-content .feature-card {
    --ch-pad: max(56px, calc((100% - 1320px) / 2));
    margin: 0; border: 0; border-radius: 0; box-shadow: none;
    padding: 96px var(--ch-pad) 96px;
    background: linear-gradient(180deg, rgba(13, 8, 22, 0.3) 0%, rgba(18, 11, 30, 0.45) 100%);
    text-align: left; overflow: hidden;
}
.main-content .feature-card.ch-alt { background: rgba(21, 14, 32, 0.55); border-top: 1px solid #241838; border-bottom: 1px solid #241838; }
.main-content .feature-card:not(:first-child) { margin-top: 0; padding-top: 96px; border-image: none; }
/* outlined chapter number behind the header */
.main-content .feature-card[data-ch]::before {
    content: attr(data-ch); position: absolute; top: 34px; left: calc(var(--ch-pad) - 8px);
    font-family: var(--font-heading); font-size: 150px; font-weight: 700; line-height: 0.8;
    color: transparent; -webkit-text-stroke: 1.5px rgba(90, 58, 140, 0.55); pointer-events: none; z-index: 0;
}
.main-content .feature-card > * { position: relative; z-index: 1; }
.ch-cat { margin: 0 0 10px; padding-top: 64px; font-size: 13px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: #F0B968; }
.main-content .feature-card .feature-title {
    justify-content: flex-start; font-size: clamp(32px, 3.4vw, 46px); color: #FBF2FF; margin-bottom: 10px;
}
.main-content .feature-card .feature-title::before, .main-content .feature-card .feature-title::after { content: none; }
.main-content .feature-card .feature-subtitle { text-align: left; margin-left: 0; margin-bottom: 36px; }

/* every preview stands on a soft violet glow, like a stage */
.main-content .feature-card .metin-preview,
.main-content .feature-card .alchemy-row-preview,
.main-content .feature-card .feature-split-asset,
.main-content .feature-card .world-boss-previews {
    background: radial-gradient(ellipse at center, rgba(90, 58, 140, 0.4) 0%, rgba(13, 8, 22, 0) 70%);
}

/* lists become fact chips where they are short */
.main-content .feature-card .styled-list.compact { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.main-content .feature-card .styled-list.compact li {
    margin: 0; padding: 8px 14px; border-radius: 999px; list-style: none;
    background: #241838; border: 1px solid #3A2A52; font-size: 14px; line-height: 1.4;
}
.main-content .feature-card .styled-list.compact li::before { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content, .footer, .back-to-website { margin-left: 0; }
}
@media (max-width: 768px) {
    .s5-hero { margin: 0 12px; padding: 32px 22px; min-height: 480px; }
    .main-content .feature-card { --ch-pad: 20px; padding: 72px 20px; }
    .main-content .feature-card[data-ch]::before { font-size: 96px; top: 28px; }
    .ch-cat { padding-top: 40px; }
    .s5-group-divider { padding: 56px 20px 8px; }
}

/* the old single big card around every section: chapters are bands now */
.cards-container { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; overflow: visible; }
.cards-container::before, .cards-container::after { display: none; }
.s5-hero { margin-top: -24px; }
.main-content .feature-card .editorial-content { margin-left: 0; text-align: left; }
.main-content .feature-card .editorial-content > * { margin-left: 0; text-align: left; }

/* top bar text: heavier so it reads over the art */
.topbar .nav-link, .topbar .lang-toggle { font-weight: 700; color: #F1E8F7; }

/* live starfield (js/starfield.js) sits behind everything */
#kriosSky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body { background-image: none; }
