@font-face {
  font-family: Cinzel;
  src: url('/assets/fonts/Cinzel.ttf') format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: Barlow;
  src: url('/assets/fonts/BarlowCondensed-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --background: #050b10;
  --surface: #090f14;
  --text: #e3ebef;
  --muted: #abbac5;
  --gold: #e4b866;
  --gold-light: #ffe4a8;
  --gold-dark: #785022;
  --border: #ad803c80;
  --display: Cinzel, Georgia, serif;
  --body: 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--background); color: var(--text); font: 14px/1.6 var(--body); }
a { color: inherit; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0 0 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.25; }
h1 { font-size: clamp(32px, 4vw, 60px); }
h2 { font-size: clamp(26px, 3vw, 42px); }
h3 { font-size: 23px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #fff2b9; outline-offset: 5px; }
::selection { background: #cf9b44; color: #071017; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vertical-align: middle; flex-shrink: 0; }
.eyebrow { font-size: 10px; color: var(--gold-light); text-transform: uppercase; letter-spacing: 1.7px; line-height: 1.5; }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px 20px; background: var(--gold-light); color: #111; z-index: 100; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 40; height: 67px; display: flex; align-items: center; gap: 30px; padding: 0 35px; background: linear-gradient(#03090eea, #03090edb); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
.site-header:after { content: ''; position: absolute; bottom: -3px; left: 28%; right: 12%; height: 4px; background: linear-gradient(90deg, transparent, #e4b86666, transparent); pointer-events: none; }
.site-brand { position: relative; width: 258px; align-self: flex-start; flex-shrink: 0; z-index: 4; text-decoration: none; padding-top: 10px; }
.wordmark { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; text-shadow: 0 3px 6px #000; }
.wordmark>span { font: 28px Georgia, serif; color: #f4f2e8; margin: 0 0 -3px; }
.wordmark>strong { font: 48px/.95 var(--display); letter-spacing: -3px; background: linear-gradient(#fff8dc, #f3cd81 37%, #8c572a 65%, #f4d28d 78%); background-clip: text; color: transparent; filter: drop-shadow(0 2px 1px #000); }
.wordmark>small { color: #c2d1dd; text-transform: uppercase; letter-spacing: 3px; font-size: 9px; margin-top: 8px; }
.primary-navigation { display: flex; align-items: center; justify-content: center; gap: 29px; flex: 1; height: 100%; }
.primary-navigation>a, .world-menu>summary { min-height: 44px; display: flex; align-items: center; gap: 5px; color: #dce7ef; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; list-style: none; cursor: pointer; position: relative; }
.primary-navigation>a:hover, .world-menu>summary:hover, .primary-navigation>a[aria-current] { color: var(--gold-light); }
.primary-navigation>a[aria-current]:after { content: '◆'; position: absolute; bottom: -5px; left: calc(50% - 4px); color: var(--gold); font-size: 9px; text-shadow: 0 0 12px var(--gold); }
.primary-navigation .icon { width: 12px; height: 12px; }
.world-menu { position: relative; }
.world-menu>summary::-webkit-details-marker { display: none; }
.world-menu>div { position: absolute; top: calc(100% + 10px); left: -25px; width: 275px; padding: 10px; background: #071017fa; border: 1px solid var(--border); box-shadow: 0 18px 35px #000b; }
.world-menu>div>a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; text-decoration: none; border-bottom: 1px solid #ffffff0c; }
.world-menu>div>a:hover { background: #d5a34a16; color: var(--gold-light); }
.world-menu>div .icon { width: 19px; height: 19px; color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 17px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ad803c66; background: #050c12bf; color: var(--gold-light); border-radius: 50%; padding: 9px; }
.icon-button:hover { background: #bf8a3822; border-color: var(--gold); }
.icon-button .icon { width: 20px; height: 20px; }
.language-label { display: inline-flex; align-items: center; gap: 8px; color: #c3d2dc; font-size: 11px; padding: 5px 10px; border: 1px solid #b9c5d42b; border-radius: 5px; }
.language-label .icon { width: 17px; height: 17px; }
.gold-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-align: center; text-decoration: none; font-size: 12px; line-height: 1.3; min-height: 44px; padding: 10px 22px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.gold-button { position: relative; color: #20170a; border: 1px solid #f6d18b; border-radius: 7px 2px; background: linear-gradient(#ffe5a2, #dbad57 45%, #b77b2e 50%, #e6ba68); box-shadow: inset 0 0 0 3px #5f3a1a, inset 0 0 0 4px #efc474, 0 0 0 1px #241505, 0 5px 15px #0008; font-family: var(--display); transition: filter .2s, transform .2s; }
.gold-button:before, .gold-button:after { content: '◇'; position: absolute; top: calc(50% - 12px); color: var(--gold-light); font-size: 17px; text-shadow: 0 1px 3px #4d2a0d; }
.gold-button:before { left: -7px; }
.gold-button:after { right: -7px; }
.gold-button:hover { filter: brightness(1.15); transform: translateY(-1px); }
.gold-button .icon { width: 16px; height: 16px; }
.outline-button { border: 1px solid var(--border); background: #b5893d0b; color: var(--gold-light); }
.outline-button:hover { background: #b5893d22; }
.text-link { display: inline-flex; align-items: center; gap: 12px; color: var(--gold-light); text-decoration: none; min-height: 44px; font-size: 12px; }
.text-link:hover { text-decoration: underline; }
.menu-toggle { display: none; }
.search-dialog { position: fixed; width: min(560px, calc(100% - 30px)); max-height: 85dvh; overflow: auto; background: #08131bed; color: var(--text); border: 1px solid var(--gold-dark); padding: 30px; box-shadow: 0 30px 100px #000; }
.search-dialog::backdrop { background: #000b; backdrop-filter: blur(6px); }
.search-dialog>form { float: right; margin: -15px -15px 0 0; }
.search-dialog h2 { font-size: 28px; padding-right: 40px; }
.search-dialog label { display: block; font-size: 12px; color: var(--muted); margin: 15px 0 7px; }
.search-dialog input { width: 100%; min-height: 46px; background: #030a10; border: 1px solid var(--border); color: white; padding: 10px 14px; }
.search-dialog ul { padding: 0; list-style: none; margin-bottom: 0; }
.search-dialog li>a { display: flex; align-items: center; gap: 15px; padding: 13px 4px; border-bottom: 1px solid #ffffff14; text-decoration: none; }
.search-dialog li>a:hover { color: var(--gold-light); }
.search-dialog li>a>span { flex: 1; }
.search-dialog li .icon { color: var(--gold); }
.search-dialog small { display: block; font-size: 11px; color: var(--muted); }
.search-empty { padding-top: 20px; }
.prose-section, .directory-section, .page-introduction, .game-directory, .information-page, .game-detail { max-width: 1200px; margin: 0 auto; }
.prose-section { text-align: center; padding: 85px 24px 70px; max-width: 850px; }
.prose-section p:not(.eyebrow) { color: var(--muted); font-size: 16px; line-height: 1.8; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding: 0 20px 25px; }
.section-heading h2 { font-size: 30px; margin: 0; }
.directory-section { padding-bottom: 55px; }
.directory-row { display: grid; grid-template-columns: 35px 210px minmax(0, 1fr) 145px; gap: 25px; padding: 30px 20px; border-top: 1px solid #c098532f; align-items: center; }
.directory-number { color: #9f7b40; font-family: var(--display); }
.directory-art { overflow: hidden; border: 1px solid #9f7b4055; }
.directory-art img { width: 100%; aspect-ratio: 1.75; object-fit: cover; transition: transform .4s; }
.directory-art:hover img { transform: scale(1.04); }
.directory-row h3 { font-size: 24px; margin-bottom: 9px; }
.directory-row h3 a { text-decoration: none; }
.directory-row h3 a:hover { color: var(--gold-light); }
.directory-row p:not(.eyebrow) { color: var(--muted); margin: 0; font-size: 13px; }
.directory-row .eyebrow { margin-bottom: 6px; font-size: 9px; }
.directory-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.directory-actions>a:last-child { color: var(--muted); font-size: 12px; min-height: 44px; display: flex; align-items: center; gap: 10px; }
.directory-actions .icon { width: 16px; height: 16px; }
.site-footer { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 40px; padding: 50px max(30px, calc((100% - 1160px) / 2)); border-top: 1px solid var(--border); background: radial-gradient(ellipse at center bottom, #18334755, transparent 70%), #050b10; }
.footer-brand { text-decoration: none; }
.footer-brand .wordmark>span { font-size: 19px; }
.footer-brand .wordmark>strong { font-size: 34px; }
.footer-brand .wordmark>small { display: none; }
.site-footer p { font-size: 12px; color: var(--muted); margin: 15px 0 0; }
.site-footer nav { display: grid; align-content: start; gap: 5px; }
.site-footer nav a { font-size: 12px; color: var(--muted); text-decoration: none; min-height: 30px; }
.site-footer nav a:hover { color: var(--gold-light); }
.site-footer .footer-note { grid-column: 1 / -1; border-top: 1px solid #ffffff13; padding-top: 20px; font-size: 11px; }
.content-page { background: radial-gradient(ellipse at 60% 0%, #12354a55, transparent 800px), #050b10; }
.content-page .site-brand { padding-top: 3px; }
.content-page .site-header .wordmark>span { font-size: 19px; }
.content-page .site-header .wordmark>strong { font-size: 32px; }
.content-page .site-header .wordmark>small { display: none; }
.page-introduction { padding: 75px 24px 50px; }
.page-introduction>p:not(.eyebrow) { color: var(--muted); font-size: 17px; }
.information-page { max-width: 850px; padding: 80px 25px 90px; }
.information-page h1 { margin-bottom: 35px; font-size: 42px; }
.information-page h2 { margin: 40px 0 16px; font-size: 25px; }
.information-page>p:not(.eyebrow) { color: #bdcbd4; font-size: 16px; line-height: 1.9; }
.information-page a:not(.gold-button) { color: var(--gold-light); }
.game-detail { padding: 0 24px 70px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); padding: 30px 0 20px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-light); }
.detail-hero { min-height: 430px; position: relative; display: flex; align-items: end; border: 1px solid var(--border); overflow: hidden; }
.detail-hero>img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: center 30%; }
.detail-hero:after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #03090ee8, #03090e77 60%, #03090e00), linear-gradient(0deg, #03090eaa, transparent); }
.detail-hero>div { position: relative; z-index: 1; max-width: 640px; padding: 45px; }
.detail-hero h1 { font-size: clamp(32px, 4.5vw, 62px); }
.detail-hero p:not(.eyebrow) { font-size: 16px; color: #d4e1e9; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 70px; padding-top: 60px; }
.detail-story>h2 { font-size: 27px; margin: 35px 0 20px; }
.detail-story>h2:first-of-type { margin-top: 0; }
.detail-story p { font-size: 16px; line-height: 1.9; color: #bdccd6; }
.detail-highlights { align-self: start; padding: 25px; border-top: 2px solid var(--border); background: #13212c66; }
.detail-highlights h2 { font-size: 22px; }
.detail-highlights>p { font-size: 12px; color: var(--muted); }
.detail-highlights .gold-button { width: 100%; margin-top: 10px; }
.feature-list { list-style: none; padding: 0; display: grid; gap: 12px; font-size: 12px; }
.feature-list li { display: flex; gap: 10px; align-items: center; }
.feature-list .icon { color: var(--gold); width: 19px; height: 19px; }
.related-worlds { margin-top: 60px; padding-top: 35px; border-top: 1px solid var(--border); }
.related-worlds h2 { font-size: 28px; }
.related-worlds>a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border: 1px solid #ba965733; margin: 5px; text-decoration: none; font-size: 12px; }
.related-worlds>a:hover { border-color: var(--gold); }

@media (min-width: 1800px) {
  .site-header { padding-left: max(40px, calc((100% - 1600px) / 2)); padding-right: max(40px, calc((100% - 1600px) / 2)); }
}

@media (max-width: 1100px) {
  .site-header { padding: 0 20px; gap: 20px; }
  .site-brand { width: 215px; }
  .wordmark>strong { font-size: 40px; }
  .wordmark>span { font-size: 25px; }
  .wordmark>small { letter-spacing: 2px; font-size: 8px; }
  .primary-navigation { gap: 18px; }
  .header-actions { gap: 10px; }
  .language-label { display: none; }
  .header-cta { padding: 10px 14px; font-size: 10px; }
}

@media (max-width: 800px) {
  .site-header { height: 66px; padding: 0 18px; }
  .site-brand { align-self: center; padding: 0; width: 180px; margin-right: auto; }
  .wordmark>span { font-size: 18px; }
  .wordmark>strong { font-size: 30px; letter-spacing: -2px; }
  .wordmark>small { display: none; }
  .menu-toggle { display: inline-grid; order: 3; width: 40px; height: 40px; border-radius: 5px; }
  .primary-navigation { display: none; position: absolute; top: 66px; right: 0; left: 0; padding: 15px 20px; background: #050d15fa; border-bottom: 1px solid var(--border); height: auto; align-items: stretch; flex-direction: column; gap: 4px; box-shadow: 0 20px 30px #0008; }
  .navigation-open .primary-navigation { display: flex; }
  .primary-navigation>a, .world-menu>summary { min-height: 46px; }
  .primary-navigation>a[aria-current]:after { display: none; }
  .world-menu>div { position: static; width: 100%; box-shadow: none; background: #0e1b2599; }
  .header-actions { gap: 8px; }
  .header-cta { display: none; }
  .header-actions .icon-button { width: 40px; height: 40px; }
  .directory-row { grid-template-columns: 130px 1fr; gap: 18px; padding: 24px 20px; }
  .directory-number { display: none; }
  .directory-actions { grid-column: 2; flex-direction: row; justify-content: flex-start; }
  .directory-row h3 { font-size: 21px; }
  .directory-row p:not(.eyebrow) { font-size: 12px; }
  .directory-art { align-self: start; }
  .directory-art img { aspect-ratio: 1; object-position: 30%; }
  .detail-columns { grid-template-columns: 1fr; gap: 35px; }
  .detail-highlights { max-width: none; }
  .detail-hero>div { padding: 30px; }
  .site-footer { grid-template-columns: 1fr 1fr; gap: 30px; padding: 35px 25px; }
  .site-footer>div:first-child { grid-column: 1 / -1; }
  .site-footer nav a { min-height: 36px; }
  .section-heading { align-items: start; flex-direction: column; gap: 15px; }
}

@media (max-width: 480px) {
  .directory-row { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; }
  .directory-row h3 { font-size: 18px; }
  .directory-row .eyebrow { font-size: 8px; }
  .directory-actions { grid-column: 1 / -1; padding-left: 104px; gap: 15px; }
  .directory-actions .outline-button { min-height: 44px; padding: 7px 10px; font-size: 10px; }
  .directory-actions>a:last-child { font-size: 11px; }
  .information-page { padding: 45px 22px 60px; }
  .information-page h1 { font-size: 31px; }
  .information-page>p:not(.eyebrow) { font-size: 14px; }
  .detail-hero { min-height: 430px; }
  .detail-hero>div { padding: 23px; }
  .detail-hero>img { object-position: 35%; }
  .detail-hero:after { background: linear-gradient(0deg, #03090ef5 10%, #03090eaa 60%, #03090e22); }
  .detail-hero p:not(.eyebrow) { font-size: 14px; }
  .game-detail { padding-left: 15px; padding-right: 15px; }
  .detail-columns { padding: 40px 8px 0; }
  .detail-story p { font-size: 14px; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer>div:first-child, .site-footer .footer-note { grid-column: auto; }
  .prose-section { padding: 55px 24px 35px; }
  .prose-section p:not(.eyebrow) { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Custom brand lockup remains entirely inside the header border. */
.site-header .site-brand { align-self: center; height: 64px; padding: 0; display: flex; align-items: center; }
.portal-logo { width: 100%; height: 64px; object-fit: contain; object-position: left center; background: transparent; }
.site-header .portal-logo { transform: translateY(-2px); }
.footer-brand { display: inline-block; width: 245px; max-width: 100%; }
.footer-brand .portal-logo { height: 85px; }
.game-menu-logo { width: 30px; height: 32px; object-fit: contain; }
.game-search-logo { width: 45px; height: 40px; object-fit: contain; }
.detail-game-logo { width: 240px; height: 70px; object-fit: contain; object-position: left; margin-bottom: 15px; }

@media (max-width: 800px) {
  .site-header .site-brand { height: 60px; width: 185px; }
  .site-header .portal-logo { height: 58px; }
  .detail-game-logo { width: 200px; height: 60px; }
}
