/* Supreme Empires — light companion hub
   Loaded after empires.css. Fonts linked from layouts/app.blade.php. */

:root {
    --grass: #f3f6f2;
    --wood: #c5d0c0;
    --wood-light: #d7e0d4;
    --gold: #9a7a1c;
    --gold-sel: #b8922e;
    --gold-hover: #c9a227;
    --gold-deep: #7a6014;
    --parchment: #ffffff;
    --paper: #f7faf6;
    --ink: #1a2420;
    --muted: #5c6b63;
    --line: #d5ddd6;
    --accent: #2f7a4a;
    --err: #c43c2e;
    --ok: #1f8a4c;
    --panel: #ffffff;
    --panel-2: #f0f4ef;
    --glow: rgba(154, 122, 28, 0.1);
    --font-ui: "Oxanium", "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html, body {
    background: var(--grass);
}

body.empire {
    color: var(--ink);
    font-family: var(--font-ui);
    background-color: var(--grass);
    background-image:
        radial-gradient(ellipse 90% 50% at 50% -8%, rgba(47, 122, 74, 0.12), transparent 55%),
        radial-gradient(ellipse 55% 35% at 100% 0%, rgba(201, 162, 39, 0.1), transparent 50%),
        linear-gradient(180deg, #f7faf6 0%, #eef3ec 45%, #e8efe6 100%);
    background-attachment: fixed;
}

a { color: var(--accent); }
a:hover { color: var(--gold-deep); }

.stage {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 0 16px 64px;
}

/* ——— Top chrome ——— */
.gamebar {
    position: sticky;
    top: 0;
    z-index: 40;
    margin: 0 -16px 0;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(26, 36, 32, 0.04);
    background-image: none;
}

.gamebar-top {
    min-height: 64px;
    align-items: center;
    padding: 10px 0 8px;
    gap: 16px;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.brand-mark {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    line-height: 1.1;
}

.brand-mark span {
    color: var(--gold-sel);
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.gamebar-logo {
    display: none;
}

.gamebar-user {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--muted);
    max-width: 42%;
}

.gamebar-user strong {
    color: var(--ink);
    font-size: 13px;
    letter-spacing: 0.02em;
}

.hub-status {
    display: none;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    margin-right: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}

.hub-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(31, 138, 76, 0.18);
    display: inline-block;
    margin-right: 6px;
}

@media (min-width: 900px) {
    .hub-status { display: inline-flex; }
}

.gamebar-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 0 0 10px;
    overflow-x: auto;
    background: transparent;
    border-top: 0;
    scrollbar-width: thin;
}

.tab {
    height: 34px;
    padding: 0 12px;
    margin-top: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
}

.tab img {
    display: none;
}

.tab:hover {
    background: rgba(26, 36, 32, 0.04);
    color: var(--ink);
}

.tab.is-on {
    background: rgba(154, 122, 28, 0.1);
    color: var(--gold-deep);
    box-shadow: inset 0 -2px 0 var(--gold-sel);
    border-radius: 8px 8px 0 0;
}

.legal-banner {
    margin: 12px 0 0;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.page {
    margin-top: 28px;
}

/* ——— Surfaces ——— */
.card {
    background: var(--panel);
    background-image: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px 24px 28px;
    box-shadow: 0 10px 28px rgba(26, 36, 32, 0.06);
}

.card + .card { margin-top: 18px; }

h1, h2, h3 { color: var(--ink); font-family: var(--font-ui); }

h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0 0 10px;
}

h2 {
    font-size: 12px;
    margin: 0 0 14px;
    padding: 0;
    display: block;
    width: auto;
    max-width: none;
    background: none;
    border: 0;
    border-radius: 0;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.lede {
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
    max-width: 42rem;
}

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

.flash {
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--ink);
    border-radius: 10px;
}

.flash.ok { border-color: rgba(31, 138, 76, 0.35); color: var(--ok); }
.flash.err, .err { color: var(--err); }
.flash.warn {
    border-color: rgba(154, 122, 28, 0.35);
    background: rgba(154, 122, 28, 0.08);
    color: var(--ink);
}

.grid {
    gap: 14px;
}

.stat {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.stat:hover {
    border-color: rgba(154, 122, 28, 0.4);
    transform: translateY(-1px);
}

.stat b { color: var(--ink); }
.stat span { color: var(--muted); }

input, select, textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(47, 122, 74, 0.25);
    border-color: var(--accent);
}

.btn {
    border-radius: 10px;
    border: 1px solid rgba(154, 122, 28, 0.35);
    background: linear-gradient(180deg, #fff8e0, #f0e0a8);
    color: var(--gold-deep);
    box-shadow: 0 2px 0 rgba(122, 96, 20, 0.15);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 12px;
    padding: 11px 16px;
}

.btn:hover {
    background: linear-gradient(180deg, #fff8e0, #f5e8b4);
    color: var(--ink);
}

.btn-primary {
    background: linear-gradient(180deg, #4fad72, #2f7a4a);
    border-color: #24633b;
    color: #fff;
    text-shadow: none;
    box-shadow: 0 4px 14px rgba(47, 122, 74, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #5bb87a, #358552);
    color: #fff;
}

.btn img { opacity: 0.95; }

/* ——— Landing hub ——— */
.hub-hero {
    position: relative;
    min-height: min(72vh, 640px);
    margin: 8px 0 28px;
    padding: clamp(28px, 6vw, 56px) clamp(20px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(100deg, rgba(247, 250, 246, 0.96) 0%, rgba(247, 250, 246, 0.72) 45%, rgba(247, 250, 246, 0.25) 100%),
        radial-gradient(ellipse at 80% 40%, rgba(201, 162, 39, 0.16), transparent 45%),
        url("/se/ui/supreme-logo.png") right 8% center / min(520px, 55vw) auto no-repeat,
        linear-gradient(160deg, #e8f2ea, #f3f6f2 55%, #eef3ec);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 18px;
}

.hub-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 36%;
    background: linear-gradient(transparent, rgba(243, 246, 242, 0.9));
    pointer-events: none;
}

.hub-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 34rem;
}

.hub-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 10px;
}

.hub-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.hub-hero .lede {
    margin: 0 0 22px;
    font-size: 16px;
    font-weight: 500;
}

.hub-hero .actions {
    margin-top: 0;
}

.hub-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.hub-strip-item {
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(26, 36, 32, 0.04);
}

.hub-strip-item .label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.hub-strip-item .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.hub-strip-item .value.on { color: var(--ok); }

.hub-section {
    margin-top: 28px;
}

.hub-section .lede {
    margin-bottom: 18px;
}

.hub-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.hub-feature {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(26, 36, 32, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.hub-feature:hover {
    border-color: rgba(154, 122, 28, 0.45);
    background: #fff;
    color: inherit;
    transform: translateY(-1px);
}

.hub-feature img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
}

.hub-feature strong {
    display: block;
    font-size: 14px;
    letter-spacing: 0.03em;
    color: var(--ink);
}

.hub-feature span {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 6px;
}

.terminal-line .ok { color: var(--ok); }
.terminal-line .info { color: var(--gold-deep); }

.legal {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.legal .foot,
.legal .foot-discord,
.legal .legal-text {
    color: var(--muted);
}

.badge {
    background: rgba(154, 122, 28, 0.1);
    border: 1px solid rgba(154, 122, 28, 0.28);
    color: var(--gold-deep);
}

.table,
table {
    color: var(--ink);
}

.list li,
.compact-storage li {
    background: var(--panel-2);
    border-color: var(--line);
}

.sprite {
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: none;
    border-radius: 10px;
}

.page-head .head-art {
    filter: drop-shadow(0 4px 10px rgba(26, 36, 32, 0.12));
}

.card[style],
.panel,
.market-card,
.rank-row,
.ticket-card {
    color: var(--ink);
}

@media (max-width: 720px) {
    .hub-hero {
        min-height: 52vh;
        background-position: center top, center, center 20%, center;
        background-size: auto, auto, min(280px, 70vw) auto, auto;
    }

    .gamebar-user { max-width: 48%; font-size: 11px; }
}
