/* Palette is sampled from the game itself: the warm charcoal of the in-game
   shop panels, and the ember/flare of the Wavecrashers logo. */
:root {
    --bg: #14100d;
    --bg-2: #191410;
    --panel: #221b15;
    --panel-2: #2b221a;
    --ink: #f3ece1;
    --muted: #a3968a;
    /* Accent vars keep their historic names so the items/heroes pages inherit
       the new colour without touching every rule in the file. */
    --gold: #ff9a3c;
    --gold-bright: #ffd166;
    --ember: #e0451c;
    --line: rgba(255, 154, 60, 0.26);
    --line-soft: rgba(243, 236, 225, 0.1);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    --content-width: 1280px;
    --font-display: "Archivo", "Segoe UI", Helvetica, Arial, sans-serif;
    --font-body: "Archivo", "Segoe UI", Helvetica, Arial, sans-serif;
    /* The game's own UI is built from plain rectangles — no bevelled corners. */
    --btn-clip: none;
    --chip-clip: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background:
        radial-gradient(circle at 50% -10%, rgba(224, 69, 28, 0.1), transparent 42%),
        linear-gradient(180deg, #1a1512 0%, var(--bg) 60%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: rgba(255, 154, 60, 0.34);
    color: #fff6e2;
}

body.has-music-dock {
    padding-bottom: 96px;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 28px;
}

h1,
h2,
h3,
.logo,
.btn,
.nav-links a,
.stat-value,
.item-cost-pill,
.item-section-label,
.recipe-plus {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ============================= */
/* Kickers, headings, ornaments  */
/* ============================= */

.eyebrow,
.card-kicker,
.filter-label,
.search-container > span,
.item-category,
.item-active-pill,
.hero-role,
.lightbox-kicker,
.screenshot-frame,
.social-action,
.stat-label,
.music-toggle-label,
.music-toggle-status,
.music-volume-label,
.music-volume-value,
.sort-container label {
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.section-heading,
.page-banner {
    width: min(760px, 100%);
    margin: 0 auto 48px;
    text-align: center;
}

/* Not every section gets the same centred stack — the homepage alternates. */
.section-heading--left {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 34ch);
    align-items: end;
    column-gap: 48px;
}

.section-heading--left .eyebrow {
    grid-column: 1;
    margin-bottom: 10px;
}

.section-heading--left h2 {
    grid-column: 1;
}

.section-heading--left .section-subtitle {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    margin-top: 0;
    padding-bottom: 4px;
}

.section-heading h2,
.cta h2 {
    font-size: clamp(1.9rem, 3.8vw, 2.9rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: #fdf6ea;
    text-wrap: balance;
}

.section-subtitle {
    margin-top: 18px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
}

.page-banner {
    padding: 68px 0 0;
    margin-bottom: 54px;
}

.page-banner--left {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    text-align: left;
}

.page-banner--left .section-subtitle {
    max-width: 58ch;
}

.page-banner h1 {
    font-size: clamp(2.5rem, 5.4vw, 4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #fdf6ea;
    text-wrap: balance;
}

/* ============================= */
/* Navbar                        */
/* ============================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    background: rgba(10, 8, 8, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}

.navbar::after {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 154, 60, 0.4), transparent);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    min-height: 74px;
}

.nav-toggle {
    display: none;
    position: relative;
    z-index: 2;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    background: rgba(20, 15, 16, 0.86);
    color: var(--gold-bright);
    cursor: pointer;
    clip-path: var(--chip-clip);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.navbar.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.navbar.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.logo img {
    display: block;
    width: auto;
    height: 46px;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.38));
}

.nav-links {
    display: flex;
    align-items: stretch;
    gap: 34px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--muted);
    padding: 26px 0;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-bright);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    opacity: 1;
}

/* ============================= */
/* Buttons                       */
/* ============================= */

.btn {
    position: relative;
    z-index: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: 0;
    clip-path: var(--btn-clip);
    transition: transform 0.25s ease, filter 0.25s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 8px 22px rgba(255, 138, 31, 0.32));
}

/* Straight off the logo: yellow core burning down into orange. */
.btn-primary {
    color: #24140a;
    background: linear-gradient(170deg, #ffd452 0%, #ff9a2e 48%, #f2701a 100%);
}

.btn-primary:hover {
    background: linear-gradient(170deg, #ffe07a 0%, #ffab4d 48%, #ff8128 100%);
}

.btn-secondary {
    color: var(--gold-bright);
    background: linear-gradient(180deg, rgba(255, 154, 60, 0.55), rgba(224, 69, 28, 0.45));
}

.btn-secondary::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    clip-path: var(--btn-clip);
    background: linear-gradient(180deg, #241c15 0%, #17110d 100%);
    transition: background 0.25s ease;
}

.btn-secondary:hover::before {
    background: linear-gradient(180deg, #33261a 0%, #1f170f 100%);
}

/* ============================= */
/* Card framework                */
/* ============================= */

.feature-card,
.item-card,
.hero-card,
.about-content,
.items-empty-state {
    position: relative;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(40, 32, 25, 0.9), rgba(24, 19, 15, 0.96));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
}

.feature-card,
.item-card,
.hero-card {
    overflow: hidden;
    transform: translateY(14px);
    opacity: 0;
    animation: rise 0.65s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 60ms);
    transition: border-color 0.3s ease, transform 0.35s ease;
}

.feature-card:hover,
.item-card:hover,
.hero-card:hover {
    border-color: var(--line);
    transform: translateY(-4px);
}

/* ============================= */
/* Sections                      */
/* ============================= */

.features,
.screenshots-section,
.socials-section,
.items-section,
.heroes-section,
.about-section {
    position: relative;
    padding: 96px 0;
}

.features {
    background: linear-gradient(180deg, rgba(18, 13, 12, 0.6), transparent 30%);
}

.section-divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 154, 60, 0.35), transparent);
}

/* ============================= */
/* Hero (homepage)               */
/* ============================= */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(92vh, 960px);
    padding: 90px 0 0;
    isolation: isolate;
    overflow: hidden;
}

/* The key art is the best asset this page has. The scrim only darkens far
   enough left to keep the copy legible — the right half stays open so the
   sunburst and the heroes actually read. */
.home-page .hero {
    background:
        linear-gradient(94deg, rgba(18, 13, 9, 0.94) 0%, rgba(18, 13, 9, 0.8) 24%, rgba(18, 13, 9, 0.34) 52%, rgba(18, 13, 9, 0.02) 78%),
        linear-gradient(180deg, rgba(18, 13, 9, 0.6) 0%, transparent 18%, transparent 62%, var(--bg) 100%),
        url("assets/background/background.jpg") center 32% / cover no-repeat;
}

/* Warm bounce light off the bottom edge, tying the art into the page. */
.home-page .hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    pointer-events: none;
    background: radial-gradient(ellipse 70% 100% at 62% 100%, rgba(255, 138, 31, 0.16), transparent 70%);
}

.hero-shell {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: inherit;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    padding: 40px 0 56px;
    animation: rise 0.8s ease both;
}

.hero-logo {
    display: block;
    width: min(480px, 88%);
    height: auto;
    margin: 8px 0 26px -6px;
    filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.65));
}

.hero-lead {
    font-size: 1.14rem;
    line-height: 1.7;
    color: #e2d7c8;
    max-width: 52ch;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
}

.hero-actions {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin: 34px 0 44px;
    flex-wrap: wrap;
}

/* A compact fact strip, the way a store page states specs — not three big
   numbers in a row, which reads as a SaaS metrics band. */
.hero-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 4px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.hero-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-right: 20px;
}

.hero-stat + .hero-stat {
    padding-left: 20px;
    border-left: 1px solid var(--line-soft);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold-bright);
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.stat-label {
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* ============================= */
/* Features                      */
/* ============================= */

.feature-grid,
.screenshots-grid,
.items-grid,
.heroes-grid {
    display: grid;
    gap: 22px;
}

/* Two roomy cards per row reads more deliberate than four thin ones. */
.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.feature-card {
    --accent: var(--gold);
    padding: 30px 30px 32px;
    border-top: 2px solid var(--accent);
}

/* Borrowed from the in-game rarity colours, so the site speaks the palette
   players already read in the shop. */
.feature-card:nth-child(1) { --accent: #ff9a3c; }
.feature-card:nth-child(2) { --accent: #8ec79d; }
.feature-card:nth-child(3) { --accent: #d5a6ff; }
.feature-card:nth-child(4) { --accent: #9fc4ff; }

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 120px;
    pointer-events: none;
    background: radial-gradient(ellipse 60% 100% at 12% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    border-top-color: var(--accent);
}

.feature-card h3 {
    position: relative;
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fdf6ea;
    margin-bottom: 12px;
}

.feature-card p {
    position: relative;
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ============================= */
/* Screenshots                   */
/* ============================= */

.screenshots-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.screenshot-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    background: var(--panel);
    cursor: pointer;
    padding: 0;
    color: inherit;
    text-align: left;
    appearance: none;
    transform: translateY(14px);
    opacity: 0;
    animation: rise 0.65s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 45ms);
    transition: border-color 0.3s ease;
}

.screenshot-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.screenshot-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 8, 9, 0) 60%, rgba(10, 8, 9, 0.45));
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-card:hover {
    border-color: rgba(255, 154, 60, 0.6);
}

.screenshot-card:hover::before {
    opacity: 1;
}

.screenshot-card:hover img {
    transform: scale(1.04);
}

.screenshot-card img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    /* The game is loud and saturated. Don't sand that off. */
    filter: saturate(1.08) contrast(1.02);
    transition: transform 0.4s ease;
}

.screenshot-card:first-child img {
    aspect-ratio: auto;
}

/* ============================= */
/* Socials                       */
/* ============================= */

/* Every channel gets the same weight and the same click target — each card
   carries its platform's own colour so none of them reads as an afterthought. */
.socials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.social-card {
    --brand: var(--gold);
    /* Borders and tints use the true brand colour; anything that carries text
       or an icon uses --brand-ink, lifted where the real colour is too dark to
       read on charcoal (Discord's blue lands at 3.6:1 otherwise). */
    --brand-ink: var(--brand);
    --brand-tint: rgba(255, 154, 60, 0.16);
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    /* Cards stretch to the tallest in the row; keep rows packed to the top so
       a two-line note doesn't shove its neighbours' headers out of line. */
    align-content: start;
    gap: 0 16px;
    padding: 24px 24px 22px;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-top: 2px solid var(--brand);
    background: linear-gradient(180deg, rgba(40, 32, 25, 0.9), rgba(24, 19, 15, 0.96));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.social-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 60% 130% at 8% 0%, var(--brand-tint), transparent 72%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--brand) 45%, transparent);
    border-top-color: var(--brand);
}

.social-card:hover::before {
    opacity: 1;
}

.social-card:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
}

.social-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--brand-ink);
    background: var(--brand-tint);
    border: 1px solid color-mix(in srgb, var(--brand) 38%, transparent);
    transition: background 0.3s ease;
}

.social-card:hover .social-mark {
    background: color-mix(in srgb, var(--brand) 26%, transparent);
}

.social-icon {
    display: block;
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.social-copy {
    position: relative;
    z-index: 1;
}

.social-copy h3 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fdf6ea;
}

.social-handle {
    margin-top: 2px;
    font-size: 0.82rem;
    color: var(--muted);
}

.social-note {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    margin-top: 16px;
    font-size: 0.93rem;
    line-height: 1.55;
    color: var(--muted);
}

.social-action {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.social-action::after {
    content: "→";
    font-family: var(--font-body);
    letter-spacing: 0;
    transition: transform 0.25s ease;
}

.social-card:hover .social-action::after {
    transform: translateX(4px);
}

.social-card-discord {
    --brand: #5865f2;
    --brand-ink: #949cf7;
    --brand-tint: rgba(88, 101, 242, 0.16);
}

.social-card-youtube {
    --brand: #ff3b3b;
    --brand-tint: rgba(255, 59, 59, 0.16);
}

.social-card-tiktok {
    --brand: #25f4ee;
    --brand-tint: rgba(37, 244, 238, 0.16);
}

.social-card-instagram {
    --brand: #f2609e;
    --brand-tint: rgba(242, 96, 158, 0.16);
}

.social-card-x {
    --brand: #e7e9ea;
    --brand-tint: rgba(231, 233, 234, 0.16);
}

.social-card-facebook {
    --brand: #4a9bff;
    --brand-tint: rgba(74, 155, 255, 0.16);
}

/* ============================= */
/* Lightbox                      */
/* ============================= */

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(4, 3, 4, 0.88);
    backdrop-filter: blur(12px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-panel {
    width: min(1200px, 100%);
    max-height: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 16, 17, 0.98), rgba(11, 9, 10, 0.98));
    box-shadow: var(--shadow);
}

.lightbox-panel img {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #0b0909;
}

.lightbox-copy {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 18px 24px 20px;
    border-top: 1px solid var(--line-soft);
}

.lightbox-kicker {
    color: var(--gold);
    font-size: 0.7rem;
}

.lightbox-copy h3 {
    font-size: 1.1rem;
    color: #fff3d7;
}

.lightbox-copy p {
    color: var(--muted);
    font-size: 0.92rem;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    border: 1px solid var(--line);
    background: rgba(16, 12, 13, 0.92);
    color: var(--gold-bright);
    padding: 12px 20px;
    text-transform: uppercase;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    cursor: pointer;
    clip-path: var(--chip-clip);
}

.lightbox-close:hover {
    background: rgba(32, 24, 22, 0.96);
}

/* ============================= */
/* CTA                           */
/* ============================= */

.cta {
    position: relative;
    padding: 100px 0;
    margin-top: 20px;
    border-top: 1px solid var(--line-soft);
    background:
        radial-gradient(ellipse at 25% 130%, rgba(224, 69, 28, 0.22), transparent 62%),
        radial-gradient(ellipse at 78% -20%, rgba(255, 154, 60, 0.14), transparent 58%),
        linear-gradient(180deg, #1b1510, #14100d);
}

.cta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 646px);
    align-items: center;
    gap: 56px;
}

.cta h2 {
    max-width: 18ch;
}

.cta p {
    margin: 20px 0 30px;
    max-width: 54ch;
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--muted);
}

.steam-widget iframe {
    display: block;
    width: 100%;
    height: 190px;
    border: 1px solid var(--line-soft);
    background: #0b0909;
}

.cta-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================= */
/* Items page                    */
/* ============================= */

.filter-label,
.search-container > span {
    display: inline-flex;
    align-items: center;
    color: var(--gold);
    font-size: 0.7rem;
}

.items-controls {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.search-container,
.sort-container,
.filter-group {
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(24, 18, 17, 0.85), rgba(14, 11, 10, 0.9));
}

.search-container {
    display: grid;
    gap: 10px;
    flex: 1 1 320px;
    min-width: min(360px, 100%);
    padding: 16px 18px;
}

.search-container input,
.sort-container select {
    padding: 11px 14px;
    color: var(--ink);
    background: rgba(10, 8, 8, 0.85);
    border: 1px solid var(--line-soft);
    font: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s ease;
}

.search-container input:focus,
.sort-container select:focus {
    border-color: rgba(255, 209, 102, 0.55);
}

.sort-container select {
    color-scheme: dark;
}

.sort-container select option {
    color: #f4ead5;
    background: #1a1416;
}

.search-container input::placeholder {
    color: rgba(168, 156, 134, 0.7);
}

.sort-container {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}

.sort-container label {
    color: var(--gold);
    font-size: 0.7rem;
}

.sort-container select {
    min-width: 190px;
}

.items-filter-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: grid;
    gap: 12px;
    flex: 1 1 560px;
    padding: 16px 18px;
}

.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-chip {
    border: 0;
    position: relative;
    z-index: 0;
    clip-path: var(--chip-clip);
    background: linear-gradient(180deg, rgba(255, 154, 60, 0.35), rgba(255, 154, 60, 0.14));
    color: var(--muted);
    padding: 9px 16px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease;
}

.category-chip::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    clip-path: var(--chip-clip);
    background: #14100e;
    transition: opacity 0.25s ease;
}

.category-chip:hover {
    color: var(--gold-bright);
}

.category-chip.is-active {
    color: #1a130d;
    background: linear-gradient(170deg, #ffd166, #e0761f);
}

.category-chip.is-active::before {
    opacity: 0;
}

.items-results-copy {
    max-width: 360px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    padding-top: 12px;
}

.items-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ============================= */
/* Build maker                   */
/* ============================= */

.items-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.items-main {
    min-width: 0;
}

.build-panel {
    position: sticky;
    top: 94px;
    max-height: calc(100vh - 118px);
    overflow-y: auto;
    padding: 22px 20px 20px;
    border: 1px solid var(--line-soft);
    border-top: 2px solid var(--gold);
    background: linear-gradient(180deg, rgba(24, 18, 17, 0.94), rgba(14, 11, 10, 0.97));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 154, 60, 0.35) transparent;
}

.build-panel::-webkit-scrollbar {
    width: 6px;
}

.build-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 154, 60, 0.3);
}

.build-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f8ebca;
}

.build-hint {
    margin: 8px 0 18px;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--muted);
}

.build-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.build-slot {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 10px;
    border: 1px dashed rgba(255, 154, 60, 0.3);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 154, 60, 0.45);
    font-family: var(--font-display);
    font-size: 1.3rem;
    overflow: hidden;
}

.build-slot.is-filled {
    border: 1px solid var(--line);
    background: radial-gradient(circle at 50% 40%, rgba(255, 154, 60, 0.1), transparent 70%), rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.build-slot-border {
    position: absolute;
    inset: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    object-fit: contain;
    pointer-events: none;
}

.build-slot-icon {
    position: relative;
    z-index: 1;
    width: 68%;
    height: 68%;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
}

.build-slot-remove {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background: rgba(10, 7, 7, 0.78);
    color: #f3d5cf;
    font-family: var(--font-body);
    font-size: 1.05rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.build-slot.is-filled:hover .build-slot-remove,
.build-slot.is-filled:focus-visible .build-slot-remove {
    opacity: 1;
}

.build-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 18px 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.build-total-label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.build-total-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--gold-bright);
}

.build-block {
    margin-bottom: 16px;
}

.build-stats {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.build-stats li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
}

.build-empty {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
    border: 0 !important;
}

.build-abilities {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.build-ability {
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.02);
}

.build-ability-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.build-ability-name {
    color: #f7edd8;
    font-size: 0.88rem;
    font-weight: 600;
}

.build-ability-tag {
    flex-shrink: 0;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f3d5cf;
    padding: 3px 7px;
    border: 1px solid rgba(224, 69, 28, 0.4);
    background: rgba(143, 45, 33, 0.22);
}

.build-ability p {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.build-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.build-btn {
    position: relative;
    z-index: 0;
    flex: 1;
    padding: 10px 8px;
    border: 0;
    clip-path: var(--chip-clip);
    background: linear-gradient(180deg, rgba(255, 154, 60, 0.4), rgba(255, 154, 60, 0.16));
    color: var(--gold-bright);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease;
}

.build-btn::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    clip-path: var(--chip-clip);
    background: #14100e;
    transition: background 0.25s ease;
}

.build-btn:hover::before {
    background: #1f1712;
}

.build-add {
    position: relative;
    z-index: 0;
    display: block;
    width: min(200px, 100%);
    margin: 14px auto 0;
    padding: 9px 12px;
    border: 0;
    clip-path: var(--chip-clip);
    background: linear-gradient(180deg, rgba(255, 154, 60, 0.4), rgba(255, 154, 60, 0.16));
    color: var(--gold-bright);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease;
}

.build-add::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    clip-path: var(--chip-clip);
    background: #161011;
    transition: background 0.25s ease;
}

.build-add:hover {
    color: #1a130d;
}

.build-add:hover::before {
    background: linear-gradient(170deg, #ffd166, #e0761f);
}

.build-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    z-index: 210;
    transform: translateX(-50%) translateY(10px);
    max-width: calc(100vw - 40px);
    padding: 11px 20px;
    border: 1px solid var(--line);
    background: rgba(16, 12, 11, 0.96);
    color: var(--ink);
    font-size: 0.86rem;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.build-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Rarity theming */

.item-card {
    --rarity: #ff9a3c;
    --rarity-glow: rgba(255, 154, 60, 0.14);
    border-top: 2px solid var(--rarity);
}

.item-card.category-basic {
    --rarity: #d7cfbe;
    --rarity-glow: rgba(215, 207, 190, 0.1);
    border-top-color: rgba(215, 207, 190, 0.4);
}

.item-card.category-uncommon {
    --rarity: #8ec79d;
    --rarity-glow: rgba(142, 199, 157, 0.12);
}

.item-card.category-magical {
    --rarity: #9fc4ff;
    --rarity-glow: rgba(159, 196, 255, 0.12);
}

.item-card.category-unique {
    --rarity: #d5a6ff;
    --rarity-glow: rgba(213, 166, 255, 0.12);
}

.item-card.category-legendary {
    --rarity: #e8a54b;
    --rarity-glow: rgba(232, 165, 75, 0.16);
}

.item-card.category-boots {
    --rarity: #7fd8d0;
    --rarity-glow: rgba(127, 216, 208, 0.12);
}

.item-header {
    padding: 26px 24px 22px;
    background:
        radial-gradient(circle at 50% 32%, var(--rarity-glow), transparent 68%),
        linear-gradient(180deg, rgba(26, 19, 18, 0.95), rgba(17, 13, 12, 0.92));
    border-bottom: 1px solid var(--line-soft);
}

.item-body {
    padding: 24px;
}

.item-hero-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    margin-bottom: 18px;
}

.item-name {
    font-family: var(--font-display);
    font-size: 1.42rem;
    font-weight: 700;
    color: #fff4dd;
    max-width: 14ch;
    min-height: calc(1.18em * 2);
    margin: 0 auto;
    line-height: 1.18;
    text-align: center;
    text-wrap: balance;
}

.item-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    width: 144px;
    height: 144px;
}

.item-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
}

.item-icon {
    display: block;
    position: relative;
    z-index: 1;
    width: 106px;
    height: 106px;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
}

.item-category,
.item-cost-pill,
.item-active-pill,
.hero-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 0.64rem;
    white-space: nowrap;
}

.item-badge-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 120px;
    justify-content: center;
}

.item-category {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-cost-pill {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #f6e3b6;
    background: rgba(255, 154, 60, 0.12);
    border: 1px solid rgba(255, 154, 60, 0.3);
}

.item-active-pill {
    color: #f3d5cf;
    background: rgba(143, 45, 33, 0.24);
    border: 1px solid rgba(224, 69, 28, 0.4);
}

.item-card.category-basic .item-category {
    color: #d7cfbe;
    border-color: rgba(215, 207, 190, 0.26);
    background: rgba(215, 207, 190, 0.07);
}

.item-card.category-uncommon .item-category {
    color: #8ec79d;
    border-color: rgba(142, 199, 157, 0.26);
    background: rgba(142, 199, 157, 0.07);
}

.item-card.category-magical .item-category {
    color: #9fc4ff;
    border-color: rgba(159, 196, 255, 0.28);
    background: rgba(159, 196, 255, 0.07);
}

.item-card.category-unique .item-category {
    color: #d5a6ff;
    border-color: rgba(213, 166, 255, 0.28);
    background: rgba(213, 166, 255, 0.07);
}

.item-card.category-legendary .item-category {
    color: #e8a54b;
    border-color: rgba(232, 165, 75, 0.32);
    background: rgba(232, 165, 75, 0.07);
}

.item-card.category-boots .item-category {
    color: #7fd8d0;
    border-color: rgba(127, 216, 208, 0.3);
    background: rgba(127, 216, 208, 0.07);
}

.item-recipe-block,
.item-ability-block {
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.025);
}

.item-recipe-block {
    margin-bottom: 16px;
}

.item-ability-block {
    margin-top: 18px;
}

.item-section-label {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.item-recipe-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.recipe-item {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 8px;
    min-height: 140px;
    padding: 10px 10px 12px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    text-align: center;
}

.recipe-item-icon {
    display: block;
    position: relative;
    z-index: 1;
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
}

.recipe-item-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
}

.recipe-item-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.24));
}

.recipe-item-name {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #e9dfc9;
    font-size: 0.82rem;
    line-height: 1.4;
    max-width: 12ch;
    min-height: calc(1.4em * 2);
    text-align: center;
    text-wrap: balance;
}

.item-stats {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.item-stats li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.95rem;
}

.stat-key {
    color: var(--muted);
}

.stat-amount {
    color: #f7edd8;
    font-weight: 600;
}

.item-description {
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.68;
}

.items-empty-state {
    grid-column: 1 / -1;
    overflow: hidden;
    padding: 36px 32px;
}

.items-empty-state h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    color: #fff3d7;
    line-height: 1.12;
    margin-bottom: 12px;
}

/* ============================= */
/* Heroes                        */
/* ============================= */

.hero-card {
    --role-tint: rgba(255, 154, 60, 0.12);
    --role-color: var(--gold);
}

.hero-card.role-strength {
    --role-tint: rgba(215, 163, 100, 0.14);
    --role-color: #d7a364;
}

.hero-card.role-agility {
    --role-tint: rgba(203, 143, 165, 0.14);
    --role-color: #cb8fa5;
}

.hero-card.role-intelligence {
    --role-tint: rgba(168, 185, 255, 0.14);
    --role-color: #a8b9ff;
}

.hero-card.role-hybrid {
    --role-tint: rgba(142, 199, 157, 0.14);
    --role-color: #8ec79d;
}

.hero-image {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    min-height: 200px;
    padding: 28px 24px;
    background:
        radial-gradient(circle at 50% 42%, var(--role-tint), transparent 70%),
        linear-gradient(180deg, rgba(26, 19, 18, 0.95), rgba(15, 11, 11, 0.92));
    border-bottom: 1px solid var(--line-soft);
}

.hero-portrait-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 118px;
    height: 118px;
    padding: 6px;
    clip-path: var(--btn-clip);
    background: linear-gradient(180deg, rgba(255, 209, 102, 0.55), rgba(224, 69, 28, 0.4));
}

.hero-portrait {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: var(--btn-clip);
}

.hero-sigil {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--role-color);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero-sigil::before,
.hero-sigil::after {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

.hero-info {
    padding: 24px;
}

.hero-name {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff4dd;
    margin-bottom: 8px;
}

.hero-role {
    color: var(--role-color);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 14px;
}

.hero-summary {
    align-self: start;
}

.hero-description {
    margin-top: 8px;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--muted);
}

.hero-skills {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.hero-skill {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.025);
}

.hero-skill-icon {
    display: block;
    width: 60px;
    height: 60px;
    border: 1px solid var(--line);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.hero-skill-copy h3 {
    color: #fff3d7;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4px;
}

.hero-skill-copy p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.heroes-page .heroes-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    width: min(1180px, 100%);
    margin: 0 auto;
}

/* The portrait lives with the name and description rather than in its own
   stretched column, which left ~500px of empty panel beside every card. */
.heroes-page .hero-info {
    display: grid;
    grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
    gap: 34px;
    padding: 30px 32px 34px;
}

.heroes-page .hero-image {
    justify-items: start;
    align-content: start;
    gap: 14px;
    min-height: 0;
    padding: 0 0 20px;
    background: none;
    border: 0;
}

.heroes-page .hero-portrait-frame {
    width: 128px;
    height: 128px;
}

.heroes-page .hero-summary {
    /* Overrides the shared align-self:start so the divider runs the full
       height of the card instead of stopping under the description. */
    align-self: stretch;
    padding-right: 28px;
    border-right: 1px solid var(--line-soft);
}

.heroes-page .hero-name {
    font-size: clamp(1.9rem, 2.8vw, 2.5rem);
    line-height: 1.05;
}

.heroes-page .hero-role {
    margin-bottom: 18px;
}

.heroes-page .hero-description {
    font-size: 1.02rem;
    line-height: 1.72;
}

.heroes-page .hero-skills {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
}

.roster-note {
    margin: 34px auto 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.roster-note::before,
.roster-note::after {
    content: "—";
    color: var(--gold);
    margin: 0 12px;
    opacity: 0.6;
}

/* ============================= */
/* About                         */
/* ============================= */

/* The whole page is one reading column, so the banner and the panel share a
   left edge instead of the banner floating wider than the card. */
.about-section .container {
    width: min(940px, 100%);
}

.about-content {
    width: 100%;
    margin: 0;
    padding: 12px 40px 20px;
}

.about-block {
    padding: 28px 0 30px;
}

.about-block + .about-block {
    border-top: 1px solid var(--line-soft);
}

.about-block h2 {
    color: #fdf6ea;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.about-block p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--muted);
}

.about-block p + p {
    margin-top: 10px;
}

.about-block strong {
    color: #e9dfc9;
}

.about-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.about-list li {
    padding-left: 22px;
    position: relative;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.about-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 10px;
    height: 2px;
    background: var(--gold);
}

/* "What ships" and "what's planned" are a now/next pair — read them together. */
.about-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 44px;
}

.about-columns + .about-block,
.about-columns {
    border-top: 1px solid var(--line-soft);
}

.about-columns .about-block {
    padding-bottom: 30px;
}

.about-columns .about-block + .about-block {
    border-top: 0;
}

/* System requirements are a spec sheet, not two run-on paragraphs. */
.spec-table {
    margin-top: 16px;
    border: 1px solid var(--line-soft);
}

.spec-row {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    padding: 12px 18px;
    font-size: 0.94rem;
    color: var(--muted);
}

.spec-row + .spec-row {
    border-top: 1px solid var(--line-soft);
}

.spec-row span:first-child {
    color: #d8ccbc;
    font-weight: 600;
}

.spec-row--head {
    background: rgba(255, 154, 60, 0.07);
}

.spec-row--head span {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.spec-note {
    margin-top: 14px;
    font-size: 0.9rem;
    color: rgba(163, 150, 138, 0.85);
}

/* ============================= */
/* 404 page                      */
/* ============================= */

.error-section {
    padding: 110px 0 130px;
    text-align: center;
}

.error-code {
    font-size: clamp(5rem, 14vw, 8.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #fdf6ea;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.error-lead {
    margin: 22px auto 36px;
    max-width: 46ch;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================= */
/* Footer                        */
/* ============================= */

footer {
    border-top: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(12, 9, 9, 0.4), rgba(9, 7, 7, 0.95));
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 52px 24px 28px;
    text-align: center;
}

.footer-logo img {
    display: block;
    height: 40px;
    width: auto;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

.footer-nav,
.footer-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 26px;
    list-style: none;
}

.footer-nav a,
.footer-socials a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.footer-nav a:hover,
.footer-socials a:hover {
    color: var(--gold-bright);
}

.footer-socials a {
    color: rgba(168, 156, 134, 0.75);
    font-size: 0.76rem;
}

.footer-copyright {
    padding: 0 24px 34px;
    text-align: center;
    color: rgba(168, 156, 134, 0.6);
    font-size: 0.82rem;
}

/* ============================= */
/* Music dock                    */
/* ============================= */

.music-dock {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 150;
    padding: 8px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 15, 14, 0.94), rgba(10, 8, 8, 0.97));
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.music-dock[data-expanded="true"] {
    width: min(320px, calc(100vw - 36px));
    padding: 14px;
}

.music-dock-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.music-toggle {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.music-toggle:hover {
    border-color: rgba(255, 209, 102, 0.42);
    background: rgba(255, 154, 60, 0.08);
}

.music-expand-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 10px 0;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.music-expand-toggle:hover {
    border-color: rgba(255, 209, 102, 0.42);
    background: rgba(255, 154, 60, 0.08);
}

.music-dock-details {
    position: relative;
    z-index: 1;
    margin-top: 12px;
}

.music-dock[data-expanded="false"] .music-dock-details {
    display: none;
}

.music-toggle-copy {
    display: grid;
    gap: 3px;
    text-align: left;
}

.music-toggle-label {
    font-size: 0.66rem;
    color: var(--gold-bright);
}

.music-toggle-label::before {
    content: "♪\00a0\00a0";
    letter-spacing: 0;
}

.music-toggle-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 6px 10px;
    border: 1px solid var(--line-soft);
    font-size: 0.6rem;
    color: var(--muted);
    background: rgba(255, 154, 60, 0.07);
}

.music-note {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.music-volume {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.music-volume-label,
.music-volume-value {
    font-size: 0.64rem;
    color: var(--muted);
}

.music-volume-value {
    color: var(--gold-bright);
    min-width: 42px;
    text-align: right;
}

.music-volume-slider {
    width: 100%;
    appearance: none;
    height: 4px;
    background: linear-gradient(90deg, rgba(255, 209, 102, 0.72), rgba(224, 118, 31, 0.72));
    outline: none;
    cursor: pointer;
}

.music-volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 209, 102, 0.6);
    background: #fbf1db;
    transform: rotate(45deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.music-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 209, 102, 0.6);
    border-radius: 0;
    background: #fbf1db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.music-volume-slider::-moz-range-track {
    height: 4px;
    border: none;
    background: linear-gradient(90deg, rgba(255, 209, 102, 0.72), rgba(224, 118, 31, 0.72));
}

.music-dock[data-state="playing"] .music-toggle {
    border-color: rgba(255, 209, 102, 0.4);
    background: rgba(255, 154, 60, 0.1);
}

.music-dock[data-state="playing"] .music-toggle-status {
    color: #1a130d;
    background: linear-gradient(135deg, #ffd166, #e0761f);
    border-color: rgba(255, 209, 102, 0.5);
}

.music-dock[data-state="armed"] .music-toggle-status {
    color: #f6dfb0;
}

.music-dock[data-state="unsupported"] .music-toggle {
    cursor: not-allowed;
    opacity: 0.72;
}

/* ============================= */
/* Page backgrounds              */
/* ============================= */

.inner-page .items-section,
.inner-page .heroes-section,
.inner-page .about-section {
    padding-top: 20px;
}

.items-page {
    background:
        radial-gradient(circle at 50% -6%, rgba(255, 154, 60, 0.11), transparent 30%),
        linear-gradient(180deg, #1a1512 0%, var(--bg) 100%);
}

.heroes-page {
    background:
        radial-gradient(circle at 12% -6%, rgba(224, 69, 28, 0.14), transparent 34%),
        linear-gradient(180deg, #1a1512 0%, var(--bg) 100%);
}

.lore-page {
    background:
        radial-gradient(circle at 88% -6%, rgba(255, 154, 60, 0.11), transparent 28%),
        linear-gradient(180deg, #1a1512 0%, var(--bg) 100%);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================= */
/* Responsive                    */
/* ============================= */

@media (max-width: 900px) {
    .logo img {
        height: 40px;
    }

    .navbar .container {
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        min-height: 64px;
    }

    .navbar.has-mobile-nav .nav-toggle {
        display: inline-flex;
    }

    .navbar.has-mobile-nav .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        padding: 10px 16px;
        border: 1px solid var(--line);
        background: rgba(12, 9, 10, 0.97);
        box-shadow: var(--shadow);
        backdrop-filter: blur(16px);
        justify-content: stretch;
        gap: 0;
    }

    .navbar.has-mobile-nav.is-open .nav-links {
        display: grid;
    }

    .navbar.has-mobile-nav .nav-links li,
    .navbar.has-mobile-nav .nav-links a {
        width: 100%;
    }

    .navbar.has-mobile-nav .nav-links a {
        display: flex;
        justify-content: center;
        padding: 16px 0;
    }

    .navbar.has-mobile-nav .nav-links li + li a {
        border-top: 1px solid var(--line-soft);
    }

    .navbar.has-mobile-nav .nav-links a::after {
        display: none;
    }

    .section-heading--left {
        grid-template-columns: 1fr;
        row-gap: 14px;
    }

    .section-heading--left .section-subtitle {
        grid-column: 1;
        grid-row: auto;
        padding-bottom: 0;
    }

    .hero {
        min-height: 78vh;
    }

    .home-page .hero {
        background:
            linear-gradient(90deg, rgba(8, 6, 6, 0.88) 0%, rgba(8, 6, 6, 0.6) 42%, rgba(8, 6, 6, 0.35) 100%),
            linear-gradient(180deg, rgba(8, 6, 6, 0.5) 0%, transparent 24%, transparent 68%, var(--bg) 100%),
            url("assets/background/background.jpg") 62% 30% / cover no-repeat;
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cta-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .socials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .items-layout {
        grid-template-columns: 1fr;
    }

    .build-panel {
        order: -1;
        position: static;
        max-height: none;
        overflow: visible;
    }

    .build-slots {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .heroes-page .hero-info {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 26px 24px 28px;
    }

    .heroes-page .hero-summary {
        padding-right: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line-soft);
        padding-bottom: 20px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 18px;
    }

    body.has-music-dock {
        padding-bottom: 84px;
    }

    body.has-music-dock.music-dock-expanded {
        padding-bottom: 190px;
    }

    .logo img {
        height: 34px;
    }

    .hero {
        min-height: auto;
        padding: 40px 0 0;
    }

    .hero-content {
        width: 100%;
        padding: 16px 0 44px;
    }

    .hero-logo {
        width: min(340px, 92%);
        margin-left: -3px;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .eyebrow {
        font-size: 0.68rem;
        margin-bottom: 12px;
    }

    .hero-actions {
        margin: 26px 0 32px;
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .hero-stats {
        gap: 10px 0;
    }

    .hero-stat {
        padding-right: 14px;
    }

    .hero-stat + .hero-stat {
        padding-left: 14px;
    }

    .stat-value {
        font-size: 1.05rem;
    }

    .stat-label {
        font-size: 0.64rem;
    }

    .features,
    .screenshots-section,
    .socials-section,
    .items-section,
    .heroes-section,
    .about-section {
        padding: 60px 0;
    }

    .cta {
        padding: 64px 0;
    }

    .page-banner {
        padding-top: 44px;
        margin-bottom: 34px;
    }

    .section-heading {
        margin-bottom: 32px;
    }

    .section-heading h2,
    .cta h2 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .feature-card {
        padding: 24px 20px 26px;
    }

    .social-card {
        padding: 20px 20px 18px;
    }

    .items-grid,
    .heroes-grid,
    .feature-grid,
    .socials-grid {
        grid-template-columns: 1fr;
    }

    /* Keep the gallery two-up on phones — fifteen full-width shots is a
       2,500px scroll to get past. */
    .screenshots-grid {
        gap: 8px;
    }

    .screenshot-card:first-child {
        grid-column: auto;
        grid-row: auto;
    }

    .screenshot-card:first-child img {
        aspect-ratio: 16 / 9;
    }

    .sort-container {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .search-container,
    .filter-group {
        min-width: 0;
        width: 100%;
    }

    .items-filter-row {
        flex-direction: column;
    }

    .filter-group {
        flex: 1 1 auto;
        padding: 14px;
        gap: 10px;
    }

    .category-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .category-filters::-webkit-scrollbar {
        display: none;
    }

    .category-chip {
        flex: 0 0 auto;
        padding: 8px 12px;
    }

    .items-results-copy {
        max-width: none;
        padding-top: 0;
    }

    .item-hero-row {
        gap: 12px;
    }

    .item-visual {
        width: 128px;
        height: 128px;
    }

    .item-icon {
        width: 92px;
        height: 92px;
    }

    .item-badge-stack {
        min-height: 96px;
    }

    .sort-container select {
        width: 100%;
        min-width: 0;
    }

    .item-stats li {
        flex-direction: column;
        gap: 4px;
    }

    .build-slots {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .build-panel {
        padding: 18px 16px 16px;
    }

    .hero-skill {
        grid-template-columns: 1fr;
    }

    .hero-skill-icon {
        width: 56px;
        height: 56px;
    }

    .about-content {
        padding: 6px 22px 12px;
    }

    .about-columns {
        grid-template-columns: 1fr;
    }

    .spec-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 16px;
    }

    .spec-row span:first-child {
        grid-column: 1 / -1;
    }

    .spec-row--head span:first-child {
        display: none;
    }

    .lightbox {
        padding: 14px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        padding: 10px 14px;
    }

    .lightbox-copy {
        flex-direction: column;
        gap: 4px;
    }

    .music-dock {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }

    .footer-inner {
        padding: 40px 18px 22px;
        gap: 18px;
    }

    .footer-nav,
    .footer-socials {
        gap: 8px 18px;
    }
}
