/*
 * Furia MU shell: design tokens, header, hero (home film + inner-page band), realm bar, footer, login modal, buttons.
 * Home content is in furia-home.css, inner pages in furia-pages.css. Palette and rules: DESIGN_SYSTEM.md.
 */

/* ---------- fonts (self-hosted) ---------- */
@font-face { font-family: 'Inter'; src: url('../Fonts/Inter-latin-VF.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('../Fonts/Cinzel-VF.ttf') format('truetype'); font-weight: 400 900; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
    --furia-bg: #06090e;            /* Obsidian */
    --furia-panel: #101b25;         /* Dark Steel */
    --furia-panel-deep: #0a1118;
    --furia-gold: #c6a15b;          /* Antique Gold */
    --furia-gold-hi: #dcc283;
    --furia-cyan: #37d9c5;          /* Magic Crystal */
    --furia-text: #ede7d9;          /* Ivory */
    --furia-muted: #a9b3b6;
    --furia-line: rgba(237, 231, 217, .14);
    --furia-gold-line: rgba(198, 161, 91, .32);
    --furia-ember: #ff713d;         /* urgent timers only */
    --furia-ok: #4fd6a0;
    --furia-bad: #ed8b82;
    --furia-font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
    --furia-font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --furia-ease: cubic-bezier(.16, 1, .3, 1);
    /* page container: one width for header, hero copy, home sections and inner pages (the class stage is the only "wide" exception) */
    --furia-wrap: 1280px;
    --furia-wrap-wide: 1600px;          /* home class stage at >= 1440 px */
    --furia-gutter: 64px;               /* total horizontal margin on desktop/tablet */
    --furia-gutter-wide: 96px;
    --furia-gutter-sm: 32px;            /* total horizontal margin on phones (<= 640 px) */
}
.furia-shell {
    background: var(--furia-bg);
    color: var(--furia-text);
    font-family: var(--furia-font-body);
    font-size: 16px;
    line-height: 1.6;
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
}
.furia-shell #wrapper { padding: 0; overflow: clip; }
.furia-shell .furia-wrap { width: min(var(--furia-wrap), calc(100% - var(--furia-gutter))); margin-inline: auto; }
.furia-shell :where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--furia-cyan); outline-offset: 4px; }
.furia-shell .furia-skip { position: fixed; left: 16px; top: -100px; z-index: 3000; padding: 12px 22px; background: var(--furia-gold); color: #1a1408; font-weight: 600; }
.furia-shell .furia-skip:focus { top: 12px; }
.furia-shell #furia-main { scroll-margin-top: 92px; min-height: 100px; }
.furia-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- buttons ---------- */
.furia-shell .furia-button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    min-width: 172px;
    padding: 14px 28px;
    border: 1px solid rgba(255, 236, 190, .4);
    border-radius: 2px;
    color: #1a1408;
    background: linear-gradient(180deg, #d4b06a, #b78f48);
    box-shadow: inset 0 1px rgba(255, 255, 255, .26);
    font: 600 15px/1.4 var(--furia-font-body);
    letter-spacing: .005em;
    text-shadow: none;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
    transition: transform .3s var(--furia-ease), filter .3s, border-color .3s, color .3s, background-color .3s;
}
.furia-shell .furia-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .4) 50%, transparent 62%);
    transform: translateX(-125%);
    transition: transform .8s var(--furia-ease);
    pointer-events: none;
}
.furia-shell .furia-button:hover { color: #120d05; filter: brightness(1.06); transform: translateY(-2px); text-decoration: none; }
.furia-shell .furia-button:hover::after { transform: translateX(125%); }
.furia-shell .furia-button:active { transform: translateY(1px); }
.furia-shell .furia-button svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.furia-shell .furia-button--secondary { color: var(--furia-text); background: rgba(6, 9, 14, .5); border-color: rgba(237, 231, 217, .3); box-shadow: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.furia-shell .furia-button--secondary::after { display: none; }
.furia-shell .furia-button--secondary:hover { color: var(--furia-cyan); border-color: var(--furia-cyan); filter: none; }

/* ---------- header ---------- */
.furia-shell .furia-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background: rgba(6, 9, 14, .92);
    border-bottom: 1px solid var(--furia-gold-line);
    transition: background-color .35s, border-color .35s;
}
@supports (backdrop-filter: blur(14px)) { .furia-shell .furia-topbar { background: rgba(6, 9, 14, .8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); } }
/* over the home film: transparent until the page is scrolled */
.furia-shell:not(.body-page):not(.is-scrolled) .furia-topbar { background: linear-gradient(180deg, rgba(6, 9, 14, .82), rgba(6, 9, 14, 0)); border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.furia-shell .furia-topbar__inner { display: flex; align-items: center; gap: 28px; min-height: 76px; width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.furia-shell .furia-brand { flex: 0 0 112px; display: flex; align-items: center; }
.furia-shell .furia-brand img { width: 112px; height: auto; display: block; transition: opacity .45s var(--furia-ease), transform .45s var(--furia-ease); }
/* on the home page the hero already shows the logo: the header logo appears once the page is scrolled */
.furia-shell:not(.body-page):not(.is-scrolled) .furia-brand img { opacity: 0; transform: translateY(-6px); }
.furia-shell .furia-nav { flex: 1; }
.furia-shell .furia-nav__list { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 30px); margin: 0; padding: 0; list-style: none; }
.furia-shell .furia-nav__list a { position: relative; display: flex; align-items: center; min-height: 76px; color: rgba(237, 231, 217, .76); font: 500 13.5px/1 var(--furia-font-body); letter-spacing: .005em; white-space: nowrap; text-decoration: none; transition: color .25s; }
.furia-shell .furia-nav__list a::after { content: ''; position: absolute; bottom: -1px; inset-inline: 0; height: 2px; background: var(--furia-gold); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--furia-ease); }
.furia-shell .furia-nav__list a:hover, .furia-shell .furia-nav__list a[aria-current="page"] { color: var(--furia-text); }
.furia-shell .furia-nav__list a:hover::after, .furia-shell .furia-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.furia-shell .furia-topbar .furia-lang { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; max-width: 140px; height: auto; margin: 0; padding: 0; }
.furia-shell .furia-topbar .furia-lang-item { display: grid; place-items: center; min-width: 32px; min-height: 32px; padding: 4px; font: 500 11px/1 var(--furia-font-body); color: var(--furia-muted); border: 1px solid transparent; border-radius: 2px; transition: color .25s; }
.furia-shell .furia-topbar a.furia-lang-item:hover { color: var(--furia-text); }
.furia-shell .furia-topbar .furia-lang-item.active { color: var(--furia-cyan); background: rgba(55, 217, 197, .08); background-image: none; box-shadow: none; text-shadow: none; border-color: rgba(55, 217, 197, .4); }
.furia-shell .furia-topbar .partial-login { flex-shrink: 0; }
.furia-shell .furia-topbar .sign-block { display: flex; gap: 16px; align-items: center; }
.furia-shell .furia-topbar .sign-up a { font: 500 13px/1 var(--furia-font-body); text-transform: none; color: var(--furia-muted); }
.furia-shell .furia-topbar .sign-up a:hover { color: var(--furia-text); }
.furia-shell .furia-topbar .sign-block .sign-up > span, .furia-shell .furia-topbar .separator { display: none; }
.furia-shell .furia-topbar .login-button { min-width: 92px; width: auto; min-height: 44px; height: auto; padding: 9px 20px; border: 1px solid var(--furia-gold-line); border-radius: 2px; background: transparent; color: var(--furia-gold-hi); font: 600 13px/1.2 var(--furia-font-body); text-shadow: none; box-shadow: none; text-transform: none; transition: background-color .3s, border-color .3s, color .3s; }
.furia-shell .furia-topbar .login-button:hover { background: rgba(198, 161, 91, .12); border-color: var(--furia-gold); color: var(--furia-text); filter: none; }
.furia-shell .furia-topbar .profile { height: 76px; }
.furia-shell .furia-topbar .profile .nickname { max-width: 145px; font: 600 13px/1.3 var(--furia-font-body); }
.furia-shell .furia-topbar .furia-user-sub { color: var(--furia-muted); font-size: 11px; }
.furia-shell .furia-topbar .furia-avatar { display: grid; place-items: center; width: 38px; height: 38px; margin-left: 10px; border: 1px solid var(--furia-gold-line); background: var(--furia-panel); color: var(--furia-gold-hi); border-radius: 50%; font: 600 15px/1 var(--furia-font-display); }
.furia-shell .furia-topbar .cpMenu { border: 1px solid var(--furia-line); border-radius: 3px; width: min(350px, calc(100vw - 32px)); background: var(--furia-panel); }
.furia-shell .furia-menu-toggle { display: none; }

/* ---------- home hero: the film ---------- */
.furia-shell .furia-hero { position: relative; isolation: isolate; background: var(--furia-bg); }
.furia-shell .furia-hero--home { display: flex; flex-direction: column; min-height: max(640px, 100svh); }
.furia-shell .furia-hero--home .furia-hero__stage { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--furia-bg); pointer-events: none; }
.furia-shell .furia-hero--home .furia-hero__art { position: absolute; inset: 0; display: block; }
.furia-shell .furia-hero--home .furia-hero__art img,
.furia-shell .furia-hero--home .furia-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 72% 30%;
    transform: scale(1.04) translate3d(calc(var(--furia-px, 0) * -14px), calc(var(--furia-py, 0) * -8px), 0);
    transition: transform .6s var(--furia-ease);
}
.furia-shell .furia-hero--home .furia-hero__video { opacity: 0; transition: opacity 1.6s ease, transform .6s var(--furia-ease); }
.furia-shell .furia-hero--home.is-playing .furia-hero__video { opacity: 1; }
.furia-shell .furia-hero--home .furia-hero__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(6, 9, 14, .62) 0, rgba(6, 9, 14, 0) 22%),
        linear-gradient(90deg, rgba(6, 9, 14, .84) 0%, rgba(6, 9, 14, .5) 36%, rgba(6, 9, 14, 0) 66%),
        linear-gradient(0deg, var(--furia-bg) 0%, rgba(6, 9, 14, 0) 34%);
}
.furia-shell .furia-hero--home .furia-hero__layout { flex: 1; min-height: 0; padding-block: 120px 44px; display: flex; align-items: center; }
.furia-shell .furia-hero--home .furia-hero__copy { width: 560px; max-width: 52%; position: relative; z-index: 1; }
.furia-shell .furia-hero--home .furia-hero__logo { position: relative; display: block; width: min(410px, 100%); margin: 0 0 14px -10px; }
.furia-shell .furia-hero--home .furia-hero__logo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .6)); }
/* logo layers (js/furia-logo.js): breathing halo behind the emblem (opacity/transform only), canvas over it, the plain <img> hidden once the canvas draws */
.furia-shell .furia-hero--home .furia-hero__logo[data-furia-logo-fx]::before {
    content: "";
    position: absolute;
    inset: -20% -14% -8%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse 50% 44% at 50% 50%, rgba(55, 217, 197, .3), rgba(55, 217, 197, .09) 48%, rgba(55, 217, 197, 0) 72%);
    opacity: .5;
    animation: furiaLogoBreath 8s ease-in-out infinite;
}
.furia-shell .furia-hero--home .furia-hero__logo.is-fx img { opacity: 0; }
.furia-shell .furia-hero--home .furia-hero__logo canvas.furia-logo-fx { display: block; z-index: 1; }
.furia-shell .furia-hero__tag { margin: 0 0 12px; color: var(--furia-gold-hi); font: 600 16px/1.4 var(--furia-font-body); letter-spacing: .01em; }
.furia-shell .furia-hero--home .furia-hero__intro { max-width: 460px; margin: 0 0 28px; font: 17px/1.65 var(--furia-font-body); color: #d9d3c6; }
.furia-shell .furia-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.furia-shell .furia-hero--home .furia-hero__guide, .furia-shell .furia-hero__guide { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; color: var(--furia-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(169, 179, 182, .4); transition: color .25s; }
.furia-shell .furia-hero__guide:hover { color: var(--furia-cyan); }
.furia-shell .furia-discover svg { width: 16px; height: 10px; fill: none; stroke: var(--furia-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }

/* secondary links under the buttons: trailer (only if a trailer file exists) + guides */
.furia-shell .furia-hero__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; margin-top: 22px; }
.furia-shell .furia-hero__links .furia-hero__guide { margin-top: 0; }
.furia-shell .furia-hero__trailer { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--furia-text); font: 600 14px/1.4 var(--furia-font-body); cursor: pointer; transition: color .25s; }
.furia-shell .furia-hero__trailer svg { width: 22px; height: 22px; fill: none; stroke: var(--furia-gold); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; transition: transform .4s var(--furia-ease); }
.furia-shell .furia-hero__trailer:hover { color: var(--furia-cyan); }
.furia-shell .furia-hero__trailer:hover svg { transform: scale(1.12); }
.furia-shell dialog.furia-trailer { width: min(1100px, 94vw); max-width: none; padding: 0; border: 1px solid var(--furia-gold-line); border-radius: 2px; background: #000; color: var(--furia-text); overflow: visible; }
.furia-shell dialog.furia-trailer::backdrop { background: rgba(3, 6, 10, .9); }
.furia-shell .furia-trailer__video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.furia-shell .furia-trailer__close { position: absolute; top: -48px; right: 0; width: 44px; height: 44px; border: 0; background: none; color: var(--furia-text); font: 30px/1 sans-serif; cursor: pointer; }
.furia-shell .furia-trailer__close:hover { color: var(--furia-cyan); }

/* one orchestrated entrance, once, on load */
.furia-shell .furia-hero--home .furia-hero__stage { animation: furiaStageIn 2.2s var(--furia-ease) both; }
.furia-shell .furia-hero--home .furia-hero__logo { animation: furiaHeroUp 1.1s var(--furia-ease) .3s both; }
.furia-shell .furia-hero--home .furia-hero__tag { animation: furiaHeroUp .9s var(--furia-ease) .65s both; }
.furia-shell .furia-hero--home .furia-hero__intro { animation: furiaHeroUp .9s var(--furia-ease) .8s both; }
.furia-shell .furia-hero--home .furia-hero__actions { animation: furiaHeroUp .9s var(--furia-ease) .95s both; }
.furia-shell .furia-hero--home .furia-hero__links { animation: furiaHeroUp .9s var(--furia-ease) 1.1s both; }
.furia-shell .furia-hero--home .furia-realm-bar { animation: furiaHeroUp 1s var(--furia-ease) 1.25s both; }
@keyframes furiaStageIn { from { opacity: 0; filter: brightness(.35); } to { opacity: 1; filter: none; } }
@keyframes furiaHeroUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes furiaLogoBreath { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: .95; transform: scale(1.05); } }

/* ---------- realm bar (real server status) ---------- */
.furia-shell .furia-realm-bar { position: relative; border-block: 1px solid var(--furia-line); background: rgba(6, 9, 14, .74); }
.furia-shell .furia-realm-bar__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 96px; padding-block: 18px; }
.furia-shell .furia-realms { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 36px; }
.furia-shell .furia-realm { display: flex; align-items: center; gap: 14px; }
.furia-shell .furia-realm__dot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: #8a949a; }
.furia-shell .furia-realm--online .furia-realm__dot { background: var(--furia-ok); }
.furia-shell .furia-realm--offline .furia-realm__dot { background: var(--furia-bad); }
.furia-shell .furia-realm strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--furia-text); }
.furia-shell .furia-realm span { color: var(--furia-muted); font-size: 12px; line-height: 1.6; }
.furia-shell .furia-realm__players { padding-inline-start: 24px; margin-inline-start: 10px; border-inline-start: 1px solid var(--furia-line); }
.furia-shell .furia-realm__players strong { color: var(--furia-cyan); font: 600 24px/1.2 var(--furia-font-display); font-variant-numeric: tabular-nums; }
.furia-shell .furia-realm-bar__links { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.furia-shell .furia-realm-bar__links a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--furia-muted); font-size: 13px; transition: color .25s; }
.furia-shell .furia-realm-bar__links a:hover { color: var(--furia-cyan); }

/* ---------- inner pages: cinematic page header (art band; the page title is pulled up into its lower left by furia-pages.css) ---------- */
.furia-shell .furia-hero--band { position: relative; height: clamp(320px, 27.5vw, 400px); overflow: hidden; isolation: isolate; background: var(--furia-bg); }
.furia-shell .furia-band__art { position: absolute; inset: 0; z-index: -2; }
.furia-shell .furia-band__art img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 40%; filter: saturate(1.08) brightness(.92); transform: scale(1.06); }
/* Two washes: top (under the fixed header) and bottom (into Obsidian, carries the title), plus a left vignette so the title reads over any art. */
.furia-shell .furia-band__shade { position: absolute; inset: 0; z-index: -1; background:
    linear-gradient(90deg, rgba(6, 9, 14, .78) 0, rgba(6, 9, 14, .34) 42%, rgba(6, 9, 14, 0) 72%),
    linear-gradient(180deg, rgba(6, 9, 14, .72) 0, rgba(6, 9, 14, 0) 26%, rgba(6, 9, 14, 0) 38%, rgba(6, 9, 14, .62) 72%, var(--furia-bg) 100%); }
@media (prefers-reduced-motion: no-preference) {
    /* one slow breath of the painted scene: transform only, 48 s, never restarts on hover */
    .furia-shell .furia-band__art img { animation: furiaBandDrift 48s ease-in-out infinite alternate; }
}
@keyframes furiaBandDrift { from { transform: scale(1.06) translate3d(-1.2%, 0, 0); } to { transform: scale(1.06) translate3d(1.2%, -1%, 0); } }

/* ---------- footer ---------- */
.furia-shell .furia-footer { position: relative; margin-top: 0; padding: 0 0 28px; background: linear-gradient(180deg, var(--furia-panel-deep) 0, var(--furia-bg) 100%); border-top: 1px solid var(--furia-gold-line); }
.furia-shell .furia-footer::before { content: ""; display: block; height: 52px; margin-bottom: 36px; background: url('../images/generated/wing-divider.webp') center bottom / auto 100% no-repeat; opacity: .8; }
.furia-shell .furia-footer__grid { display: grid; grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(120px, 1fr)); gap: 40px 48px; align-items: start; }
.furia-shell .furia-footer__brand .footer-logo { display: inline-block; margin: 0 0 16px; }
.furia-shell .furia-footer__brand .footer-logo img { width: 150px; height: auto; display: block; }
.furia-shell .furia-footer__brand p { max-width: 320px; margin: 0; color: var(--furia-muted); font-size: 14px; line-height: 1.65; }
.furia-shell .furia-footer__col h2 { margin: 0 0 14px; color: var(--furia-text); font: 600 14px/1.4 var(--furia-font-body); letter-spacing: 0; text-transform: none; }
.furia-shell .furia-footer__col ul { margin: 0; padding: 0; list-style: none; }
.furia-shell .furia-footer__col li { margin: 0; }
.furia-shell .furia-footer__col a { display: flex; align-items: center; min-height: 44px; color: var(--furia-muted); font-size: 14px; text-decoration: none; transition: color .25s; }
.furia-shell .furia-footer__col a:hover { color: var(--furia-cyan); }
.furia-shell .furia-footer__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--furia-line); }
.furia-shell .furia-footer .copyright { color: var(--furia-muted); font: 12.5px/1.6 var(--furia-font-body); }
.furia-shell .furia-footer__note { color: rgba(169, 179, 182, .7); font: 12.5px/1.6 var(--furia-font-body); }

/* ---------- login modal ---------- */
.furia-shell #login-modal { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; left: 50%; transform: translateX(-50%); background: var(--furia-panel); border: 1px solid var(--furia-gold-line); border-radius: 3px; box-shadow: 0 30px 100px rgba(0, 0, 0, .75); }
.furia-shell #login-modal .top-border, .furia-shell #login-modal .bottom-border { display: none; }
.furia-shell #login-modal .modal-contentx { padding: 36px 32px; }
.furia-shell #login-modal .title { padding: 0; margin: 0 0 24px; background: none; text-align: start; font: 600 30px/1.2 var(--furia-font-display); color: var(--furia-text); }
.furia-shell #login-modal .title::before, .furia-shell #login-modal .title::after { display: none; }
.furia-shell #login-modal label { display: block; color: var(--furia-muted); font: 500 13px/1.4 var(--furia-font-body); text-align: start; text-transform: none; letter-spacing: 0; margin: 16px 0 7px; }
.furia-shell #login-modal form { width: 100%; max-width: none; margin: 0; padding: 0; }
.furia-shell #login-modal .input-wrap { width: 100%; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.furia-shell #login-modal input, .furia-shell #login-modal .submit-btn { box-sizing: border-box; }
.furia-shell #login-modal input { width: 100%; height: 48px; background: var(--furia-bg); color: var(--furia-text); border: 1px solid var(--furia-line); border-radius: 2px; padding: 10px 14px; font: 16px/1.4 var(--furia-font-body); text-align: start; transition: border-color .25s; }
.furia-shell #login-modal input:focus { border-color: var(--furia-cyan); outline: none; }
.furia-shell #login-modal .input-wrap::before { display: none; }
.furia-shell #login-modal .submit-btn { width: 100%; min-height: 48px; margin-top: 24px; background: linear-gradient(180deg, #d4b06a, #b78f48); border: 1px solid rgba(255, 236, 190, .4); color: #1a1408; box-shadow: none; text-shadow: none; border-radius: 2px; font: 600 15px/1.4 var(--furia-font-body); text-transform: none; letter-spacing: .01em; cursor: pointer; }
.furia-shell #login-modal .submit-btn:hover { filter: brightness(1.06); }
.furia-shell #login-modal .auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; font-size: 13px; color: var(--furia-muted); }
.furia-shell #login-modal .auth-links a { font-size: 13px; color: var(--furia-muted); }
.furia-shell #login-modal .auth-links a:hover { color: var(--furia-cyan); }
.furia-shell #login-modal .modal_close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; min-width: 44px; padding: 0; background: none; box-shadow: none; text-shadow: none; border: 0; color: var(--furia-muted); font: 28px/1 sans-serif; cursor: pointer; }
.furia-shell #login-modal .modal_close::before, .furia-shell #login-modal .modal_close::after { display: none; }
.furia-shell #overlay { position: fixed; inset: 0; background: rgba(3, 6, 10, .88); z-index: 998; display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
    .furia-shell .furia-topbar__inner { gap: 16px; }
    .furia-shell .furia-topbar .sign-block > .sign-up { display: none; }
    .furia-shell .furia-nav__list { gap: 15px; }
}
@media (max-width: 1023px) {
    .furia-shell .furia-topbar__inner { width: calc(100% - 32px); gap: 12px; }
    .furia-shell .furia-brand { flex-basis: 100px; margin-inline-end: auto; }
    .furia-shell .furia-brand img { width: 100px; }
    .furia-shell .furia-menu-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; min-width: 44px; border: 1px solid var(--furia-line); border-radius: 2px; padding: 10px; background: transparent; box-shadow: none; order: 5; }
    .furia-shell .furia-menu-toggle span { width: 20px; height: 2px; background: var(--furia-text); transition: transform .3s var(--furia-ease), opacity .2s; }
    .furia-shell .furia-menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
    .furia-shell .furia-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .furia-shell .furia-menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
    .furia-shell .furia-nav { display: none; position: absolute; inset: 76px 0 auto; background: var(--furia-panel-deep); border-bottom: 1px solid var(--furia-gold-line); max-height: calc(100dvh - 76px); overflow-y: auto; padding: 12px 24px 24px; }
    .furia-shell .furia-nav.is-open { display: block; }
    .furia-shell .furia-nav__list { display: block; }
    .furia-shell .furia-nav__list a { min-height: 50px; font-size: 16px; border-bottom: 1px solid var(--furia-line); }
    .furia-shell .furia-nav__list a::after { display: none; }
    .furia-shell .furia-topbar .furia-lang-item { min-width: 44px; min-height: 44px; }
    .furia-shell .furia-hero--home .furia-hero__copy { max-width: 70%; }
    .furia-shell .furia-hero--home .furia-hero__layout { align-items: flex-end; padding-block: 150px 40px; }
    .furia-shell .furia-hero--home .furia-hero__shade {
        background:
            linear-gradient(180deg, rgba(6, 9, 14, .62) 0, rgba(6, 9, 14, 0) 20%),
            linear-gradient(90deg, rgba(6, 9, 14, .82) 0%, rgba(6, 9, 14, .4) 52%, rgba(6, 9, 14, 0) 82%),
            linear-gradient(0deg, var(--furia-bg) 0%, rgba(6, 9, 14, .86) 24%, rgba(6, 9, 14, 0) 60%);
    }
    .furia-shell .furia-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .furia-shell .furia-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .furia-shell .furia-wrap { width: calc(100% - var(--furia-gutter-sm)); }
    .furia-shell .furia-topbar__inner { flex-wrap: wrap; gap: 8px; }
    .furia-shell .furia-topbar .furia-lang { gap: 0; max-width: none; flex-wrap: nowrap; }
    .furia-shell .furia-topbar .furia-lang-item { min-width: 40px; padding: 4px 2px; font-size: 11px; }
    .furia-shell .furia-topbar .login-button { min-width: 64px; min-height: 44px; padding: 8px 12px; }
    .furia-shell .furia-topbar .furia-user-text { max-width: 85px; }
    .furia-shell .furia-topbar .furia-avatar { display: none; }
    .furia-shell .furia-hero--home { min-height: max(620px, 100svh); }
    .furia-shell .furia-hero--home .furia-hero__art img,
    .furia-shell .furia-hero--home .furia-hero__video { object-position: 50% 20%; }
    .furia-shell .furia-hero--home .furia-hero__shade {
        background:
            linear-gradient(180deg, rgba(6, 9, 14, .6) 0, rgba(6, 9, 14, 0) 20%),
            linear-gradient(0deg, var(--furia-bg) 0%, rgba(6, 9, 14, .92) 38%, rgba(6, 9, 14, .1) 82%);
    }
    .furia-shell .furia-hero--home .furia-hero__layout { align-items: flex-end; padding-block: 140px 28px; }
    .furia-shell .furia-hero--home .furia-hero__copy { width: 100%; max-width: 100%; }
    .furia-shell .furia-hero--home .furia-hero__logo { width: min(260px, 70%); margin-left: -6px; }
    .furia-shell .furia-hero--home .furia-hero__intro { font-size: 16px; margin-bottom: 20px; }
    .furia-shell .furia-hero__actions { gap: 10px; }
    .furia-shell .furia-hero__actions .furia-button { min-width: 0; flex: 1; padding: 13px 10px; font-size: 14px; }
    .furia-shell .furia-hero--band { height: 264px; }
    .furia-shell .furia-realm-bar__inner { align-items: flex-start; flex-direction: column; gap: 12px; padding-block: 22px 12px; }
    .furia-shell .furia-realms { width: 100%; }
    .furia-shell .furia-realm { flex-wrap: wrap; width: 100%; }
    .furia-shell .furia-realm__name { flex: 1; }
    .furia-shell .furia-realm-bar__links { justify-content: space-between; width: 100%; border-top: 1px solid var(--furia-line); }
    .furia-shell .furia-footer__grid { gap: 28px 24px; }
    .furia-shell .furia-footer__bar { flex-direction: column; align-items: flex-start; }
    .furia-shell #login-modal .modal-contentx { padding: 32px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .furia-shell .furia-hero--home .furia-hero__stage,
    .furia-shell .furia-hero--home .furia-hero__logo,
    .furia-shell .furia-hero--home .furia-hero__tag,
    .furia-shell .furia-hero--home .furia-hero__intro,
    .furia-shell .furia-hero--home .furia-hero__actions,
    .furia-shell .furia-hero--home .furia-hero__links,
    .furia-shell .furia-hero--home .furia-realm-bar { animation: none; }
    .furia-shell .furia-hero--home .furia-hero__logo[data-furia-logo-fx]::before { animation: none; opacity: .5; }
    .furia-shell .furia-hero--home .furia-hero__art img,
    .furia-shell .furia-hero--home .furia-hero__video { transform: none; transition: none; }
    .furia-shell .furia-hero--home .furia-hero__video { display: none; }
    .furia-shell .furia-button, .furia-shell .furia-button::after, .furia-shell .furia-menu-toggle span, .furia-shell .furia-nav__list a::after, .furia-shell .furia-topbar, .furia-shell .furia-brand img { transition: none; }
    .furia-shell .furia-button:hover, .furia-shell .furia-button:active { transform: none; }
}

/* Narrow phones (360 px class): keep brand, three language targets, login and menu on ONE row. Must stay after the 640 px block. */
@media (max-width: 389px) {
    .furia-shell .furia-topbar__inner { gap: 4px; }
    .furia-shell .furia-topbar .furia-lang-item { min-width: 36px; }
    .furia-shell .furia-topbar .login-button { min-width: 56px; padding: 8px 10px; }
}

/* ---------- back-to-top (legacy .toTop: dark box, orange arrow image, mint glow) ---------- */
.furia-shell .toTop { width: 44px; height: 44px; min-width: 44px; margin: 56px auto 36px; padding: 0; background: transparent; background-image: none; border: 1px solid var(--furia-gold-line); border-radius: 2px; box-shadow: none; transform: none; cursor: pointer; transition: border-color .25s, background-color .25s; }
.furia-shell .toTop::before { content: ""; width: 12px; height: 12px; border-top: 2px solid var(--furia-gold-hi); border-left: 2px solid var(--furia-gold-hi); transform: translateY(3px) rotate(45deg); }
.furia-shell .toTop:hover { border-color: var(--furia-gold); background-color: rgba(198, 161, 91, .1); }
@media (prefers-reduced-motion: reduce) { .furia-shell .toTop { transition: none; } }

/* Side rails (view.footer.php, css/furia-rails.css): hidden everywhere by default; furia-rails.css (media >= 1840 px) switches them on. Kept here because that sheet is not applied on narrower screens. */
.furia-shell .furia-rails { display: none; }

/* Footer on phones: the sentence under the logo repeats the hero, the links are what a visitor needs */
@media (max-width: 639px) {
    .furia-shell .furia-footer__brand p { display: none; }
    .furia-shell .furia-footer__brand .footer-logo { margin-bottom: 4px; }
    .furia-shell .furia-footer__brand .footer-logo img { width: 120px; }
}

/* ---------- W4 home hero: scale with the canvas, no hole next to the nav, scroll-linked exit ---------- */
/* The header logo is hidden at the top of the home (the hero logo is right below), so the nav is centred in its lane: nothing moves when the logo fades in. */
@media (min-width: 1024px) {
    .furia-shell:not(.body-page) .furia-nav__list { justify-content: center; }
}
/* Larger canvases get a larger composition instead of the same small cluster in the lower left third */
@media (min-width: 1280px) {
    .furia-shell .furia-hero--home .furia-hero__copy { width: clamp(560px, 36vw, 720px); }
    .furia-shell .furia-hero--home .furia-hero__logo { width: min(clamp(410px, 25vw, 540px), 100%); }
    .furia-shell .furia-hero--home .furia-hero__tag { font-size: clamp(16px, .45vw + 9.5px, 19px); }
    .furia-shell .furia-hero--home .furia-hero__intro { max-width: 30em; font-size: clamp(17px, .55vw + 10px, 21px); }
    .furia-shell .furia-hero--home .furia-hero__actions .furia-button { min-height: clamp(54px, 1.2vw + 38px, 62px); padding-inline: clamp(24px, 1.6vw, 34px); }
}
/* Scrolling away from the hero: the film darkens and the copy recedes (CSS scroll-driven animation; browsers without support keep the static hero) */
@keyframes furiaHeroDim { to { background-color: rgba(6, 9, 14, .66); } }
@keyframes furiaHeroRecede { to { transform: translateY(-56px) scale(.97); opacity: .15; } }
@supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
        .furia-shell .furia-hero--home .furia-hero__shade { animation: furiaHeroDim linear both; animation-timeline: scroll(root block); animation-range: 0 90vh; }
        .furia-shell .furia-hero--home .furia-hero__copy { animation: furiaHeroRecede linear both; animation-timeline: scroll(root block); animation-range: 0 70vh; }
    }
}

/* ---------- W5 page transitions: a cross-document View Transition, so moving between pages feels like one world ----------
   Zero JS. Browsers without support ignore it; reduced motion opts out. Every page of the site loads this sheet (the opt-in has to be on both pages).
   The topbar is its own named layer: it stays put while the page content cross-fades under it. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    .furia-shell .furia-topbar { view-transition-name: furia-topbar; }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
}
