/* Infinite Dominion public website (D-085). Builds on style.css (colors, buttons, forms, tables). */

body.site { background: var(--bg); }
.site-main { flex: 1; }
.site-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.site-wrap.narrow { max-width: 860px; }
.site-wrap.center { text-align: center; padding-top: 4rem; }

/* ---------------------------------------------------------------- header */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(7, 11, 20, .82); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header-in {
    max-width: 1180px; margin: 0 auto; padding: .6rem 1.25rem;
    display: flex; align-items: center; gap: 1.75rem;
}
.site-brand {
    display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text);
    font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .95rem; white-space: nowrap;
}
.site-mark { width: 28px; height: 28px; }
.site-mark .mark-core { fill: var(--accent-2); }
.site-mark .mark-ring { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a, .site-utility > a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-utility > a:not(.btn):hover { color: var(--text); }
.site-nav a.current { color: var(--text); box-shadow: 0 2px 0 var(--accent); padding-bottom: .2rem; }
.site-utility { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.site-utility .link { color: var(--muted); font-size: .95rem; }
.site-discord { display: inline-flex; align-items: center; gap: .35rem; }
.site-discord img { width: 18px; height: 18px; object-fit: contain; }
@media (max-width: 860px) {
    .site-header-in { flex-wrap: wrap; gap: .5rem 1rem; }
    .site-nav { order: 3; width: 100%; overflow-x: auto; gap: 1rem; padding-bottom: .2rem; }
    .site-utility { gap: .75rem; }
}

/* ---------------------------------------------------------------- hero */
.hero {
    position: relative; overflow: hidden; text-align: left; padding: 0;
    min-height: 540px; display: flex; align-items: center;
    background:
        radial-gradient(ellipse 55% 60% at 78% 45%, rgba(42, 127, 212, .28), transparent 70%),
        radial-gradient(ellipse 40% 50% at 20% 80%, rgba(122, 74, 154, .25), transparent 70%),
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(13, 26, 51, .9), transparent 80%),
        linear-gradient(180deg, #060a13 0%, #0a1222 60%, var(--bg) 100%);
    border-bottom: 1px solid var(--line);
}
.hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; fill: #dfe8ff; }
.hero-stars .tw { animation: twinkle 3.2s ease-in-out infinite; }
.hero-stars .tw2 { animation-delay: 1.1s; }
.hero-stars .tw3 { animation-delay: 2.2s; }
@keyframes twinkle { 50% { opacity: .15; } }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-planet { position: absolute; }
.hero-planet svg { display: block; width: 100%; height: 100%; }
.hero-planet-main { width: 400px; height: 400px; right: 6%; top: 50%; margin-top: -200px; filter: drop-shadow(0 0 40px rgba(79, 179, 255, .25)); animation: drift 18s ease-in-out infinite; }
.hero-planet-moon { width: 120px; height: 120px; right: 33%; top: 14%; animation: drift 14s ease-in-out infinite reverse; }
.hero-planet-far { width: 56px; height: 56px; right: 4%; bottom: 10%; opacity: .85; }
@keyframes drift { 50% { transform: translateY(-10px); } }
.hero-text { position: relative; max-width: 1180px; width: 100%; margin: 0 auto; padding: 3rem 1.25rem; }
.hero-text > * { max-width: 600px; }
.hero-tag { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; margin: 0 0 .6rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 1rem; line-height: 1.05; }
.hero-lead { font-size: 1.15rem; color: #b9c6de; line-height: 1.55; margin: 0 0 1.25rem; }
.hero-online { display: flex; align-items: center; gap: .5rem; color: var(--muted); margin: 0 0 1.5rem; }
.hero-online strong { color: var(--text); }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn.big { padding: .75rem 1.3rem; font-size: 1rem; border-radius: 8px; }
.btn:not(.primary).big { background: rgba(15, 22, 38, .7); }
@media (max-width: 900px) {
    .hero { min-height: 0; }
    .hero-planet-main { width: 220px; height: 220px; right: -50px; top: 30px; margin-top: 0; opacity: .55; }
    .hero-planet-moon, .hero-planet-far { display: none; }
}

/* ---------------------------------------------------------------- sections */
.page-head { margin: .5rem 0 1.5rem; }
.page-head h1 { font-size: 2rem; margin: 0 0 .3rem; }
.page-head p { margin: 0; }
.crumbs { margin: 0 0 .25rem; font-size: .9rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.site-section { margin: 2rem 0; }
.site-section h2 { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .75rem; }
.section-head h2 { margin: 0; }
.section-head a { font-size: .9rem; text-decoration: none; }
.site-columns { display: grid; grid-template-columns: 3fr 2fr; gap: 2rem; }
@media (max-width: 860px) { .site-columns { grid-template-columns: 1fr; } }
.badge { display: inline-block; vertical-align: middle; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
         padding: .15rem .45rem; border-radius: 4px; border: 1px solid var(--accent-2); color: var(--accent); }
.badge.bad { border-color: var(--bad); color: var(--bad); }

/* ---------------------------------------------------------------- stats */
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 960px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: .2rem; }
.stat-num { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.stat-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; }
.stat-box h2 { margin: 0 0 .6rem; }
.stat-box dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }
.stat-box dt { color: var(--muted); }
.stat-box dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-box .highlight { margin: .8rem 0 0; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .92rem; }
.stat-box > p.small { margin: .8rem 0 0; }

/* ---------------------------------------------------------------- news */
.news-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: .75rem; }
.news-card h3 { margin: 0; font-size: 1.05rem; }
.news-card h3 a { color: var(--text); text-decoration: none; }
.news-card h3 a:hover { color: var(--accent); }
.news-date { color: var(--accent); font-size: .85rem; margin: .15rem 0 .5rem; }
.news-card ul, .news-post ul { margin: 0; padding-left: 1.2rem; line-height: 1.55; }
.news-card ul { color: #b9c6de; }
.news-post { border-bottom: 1px solid var(--line); padding: 1.25rem 0; scroll-margin-top: 80px; }
.news-post h2 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 1.25rem; margin: 0 0 .6rem; }
.news-post h2 .news-date { display: block; font-size: .85rem; font-weight: 500; margin: 0 0 .15rem; }
.news-post li { margin: .2rem 0; }
.news-post ul ul { margin-top: .2rem; color: #b9c6de; }
.news-ver { font-size: .75rem; margin: .6rem 0 0; }
code { background: var(--panel-2); border-radius: 4px; padding: .05rem .35rem; font-size: .88em; }

/* ---------------------------------------------------------------- guide */
.guide-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.guide-links a { display: flex; align-items: center; gap: .9rem; padding: .6rem; border: 1px solid var(--line); border-radius: 10px;
                 background: var(--panel); text-decoration: none; color: var(--text); }
.guide-links a:hover { border-color: var(--accent-2); }
.guide-links img, .guide-ico { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: #050810; }
.guide-ico { display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; color: var(--accent); border: 1px solid var(--line); }
.guide-links a > span, .guide-section > span, .guide-card-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.guide-links .muted { font-size: .85rem; }
.guide-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .guide-sections { grid-template-columns: 1fr; } }
.guide-section { display: flex; align-items: center; gap: 1rem; padding: .9rem; border: 1px solid var(--line); border-radius: 12px;
                 background: var(--panel); text-decoration: none; color: var(--text); }
.guide-section:hover { border-color: var(--accent-2); }
.guide-section img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: #050810; flex: none; }
.guide-section strong { font-size: 1.15rem; }
.guide-basics { max-width: 860px; }
.guide-basics h3 { margin: 1.4rem 0 .4rem; font-size: 1.05rem; }
.guide-basics p, .guide-basics li { line-height: 1.6; color: #c4cfe4; }
.guide-basics ul { padding-left: 1.2rem; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .6rem; }
.guide-card { display: flex; gap: .8rem; align-items: center; padding: .55rem; border: 1px solid var(--line); border-radius: 10px;
              background: var(--panel); text-decoration: none; color: var(--text); }
.guide-card:hover { border-color: var(--accent-2); }
.guide-card img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex: none; background: #050810; }
.guide-card .muted { font-size: .84rem; line-height: 1.35; }
.guide-item { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 640px) { .guide-item { grid-template-columns: 1fr; } .guide-item-img { width: 140px; height: 140px; } }
.guide-item-img { border-radius: 14px; border: 1px solid var(--line); background: #050810; object-fit: cover; }
.guide-item h1 { font-size: 2rem; margin: 0; }
.guide-item > div > p.muted:first-of-type { margin: .1rem 0 .8rem; }
.guide-desc { font-size: 1.05rem; line-height: 1.55; }
.guide-facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 1rem 0 0; }
.guide-facts dt { color: var(--muted); }
.guide-facts dd { margin: 0; }
.unlock-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .35rem 1rem; }
.unlock-lvl { display: inline-block; min-width: 4.8rem; color: var(--muted); font-size: .88rem; }

/* ---------------------------------------------------------------- tables & leaderboards */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.site-table { font-size: .92rem; }
.site-table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-2); white-space: nowrap; }
.site-table tbody tr:last-child td { border-bottom: 0; }
.site-table tbody tr:hover { background: rgba(79, 179, 255, .05); }
.level-table td, .level-table th { padding: .35rem .6rem; white-space: nowrap; }
.level-table tr.past-wall td:first-child { color: var(--warn); }
.lb-search { display: flex; gap: .5rem; max-width: 420px; margin: 0 0 .75rem; }
.lb-search input { flex: 1; }
.lb-found { margin: 0 0 1rem; }
.lb-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 .6rem; }
.lb-tabs a { padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .9rem; }
.lb-tabs a:hover { color: var(--text); border-color: var(--accent-2); }
.lb-tabs a.current { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.lb-table .rank { font-weight: 700; width: 3rem; }
.lb-table .rank-1 { color: #ffd166; }
.lb-table .rank-2 { color: #d6dde8; }
.lb-table .rank-3 { color: #e0a06a; }
.lb-table tr.me td { background: rgba(42, 127, 212, .14); }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.rank-card { display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px;
             background: var(--panel); text-decoration: none; color: var(--text); }
.rank-card:hover { border-color: var(--accent-2); }
.rank-pos { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.rank-label { font-weight: 600; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.25rem; display: flex; justify-content: center; gap: 1rem; color: var(--muted); font-size: .85rem; }
.site-footer .muted { opacity: .7; }

/* Login / sign-up cards sit on the site background */
.site-main > .card.narrow { margin: 3rem auto; }

/* ---------------------------------------------------------------- splash picture (v0.2-00053) */
.hero.has-splash { background: #05080f; min-height: 600px; }
.hero-splash { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 8, 15, .88) 0%, rgba(5, 8, 15, .6) 38%, rgba(5, 8, 15, .1) 70%, rgba(5, 8, 15, 0) 100%),
        linear-gradient(180deg, rgba(5, 8, 15, 0) 60%, var(--bg) 100%);
}
.hero.has-splash .hero-lead { color: #d3dcee; }
@media (max-width: 900px) {
    .hero.has-splash { min-height: 0; }
    .hero-shade { background: linear-gradient(180deg, rgba(5, 8, 15, .55) 0%, rgba(5, 8, 15, .85) 70%, var(--bg) 100%); }
}
.empire-friend { margin: .4rem 0 .5rem; }
.civ-tag { color: var(--accent); font-weight: 600; font-size: .85em; text-decoration: none; }
.empire-alliance { margin: .3rem 0; }
.alliance-about { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; line-height: 1.6; overflow-wrap: anywhere; }
.act-marker { display: inline-block; min-width: 1.1em; padding: 0 .25em; border-radius: 3px; font-size: .75em; font-weight: 700; text-align: center; text-decoration: none; cursor: help; vertical-align: 1px; }
.act-inactive3 { color: #c9cfd8; background: rgba(201, 207, 216, .15); }
.act-inactive5 { color: #fff; background: rgba(201, 207, 216, .35); }
.act-vacation { color: #7fd3ff; background: rgba(79, 179, 255, .18); }
.empire-status { margin: .3rem 0; color: var(--muted); }
.lb-legend { display: inline-block; margin-left: .5rem; font-size: .85rem; }
.score-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 560px) { .score-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.score-part { display: flex; flex-direction: column; gap: .2rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; }
.score-part strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
