/* PlayInTab — main stylesheet
   Light editorial layout. Barlow Condensed for headings, Barlow for text.
   Colours: paper background, ink text, cobalt links/buttons, marigold scores. */

:root {
    --paper: #f6f8fb;
    --paper-2: #eef2f7;
    --white: #ffffff;
    --ink: #0e1626;
    --ink-2: #33405a;
    --grey: #6b7790;
    --rule: #d7deea;
    --rule-2: #c3ccdc;
    --cobalt: #1f4fd8;
    --cobalt-2: #173fb0;
    --cobalt-soft: #e4ebfb;
    --marigold: #f2b134;
    --marigold-2: #d9971c;
    --red: #c9432b;
    --radius: 8px;
    --radius-sm: 5px;
    --font-head: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
    --font-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
body { font-family: var(--font-body); background: var(--paper); color: var(--ink-2); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; display: block; }
main { min-height: 60vh; }
a { color: var(--cobalt); }
a:hover { color: var(--cobalt-2); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; color: var(--ink); line-height: 1.02; }
h1 { font-size: 4.4rem; letter-spacing: -0.005em; }
h2 { font-size: 2.6rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1em; }
.label { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--marigold); letter-spacing: 0.02em; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--marigold); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm); z-index: 2000; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--cobalt); color: var(--white); font-family: var(--font-body); font-weight: 600; font-size: 1rem; padding: 12px 22px; border-radius: var(--radius-sm); border: 2px solid var(--cobalt); text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { background: var(--cobalt-2); border-color: var(--cobalt-2); color: var(--white); }
.btn-primary { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.btn-primary:hover { background: var(--marigold-2); border-color: var(--marigold-2); color: var(--ink); }
.btn-outline { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: var(--white); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-ghost:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 0.93rem; }
.btn svg { width: 16px; height: 16px; }

.panel { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(246, 248, 251, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 38px; height: 30px; }
.logo-word { font-family: var(--font-head); font-weight: 700; font-size: 1.75rem; letter-spacing: 0.01em; color: inherit; line-height: 1; }
.logo-footer { color: var(--white); margin-bottom: 14px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 1rem; padding-bottom: 2px; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s; }
.nav a:hover { color: var(--ink); border-color: var(--marigold); }
.nav a.active { color: var(--ink); border-color: var(--cobalt); }
.nav a.btn, .nav a.btn:hover { color: var(--white); border-bottom: 2px solid var(--cobalt); }
.burger { display: none; width: 42px; height: 42px; background: var(--white); border: 1px solid var(--rule-2); border-radius: var(--radius-sm); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--white); border-left: 1px solid var(--rule); padding: 70px 28px 28px; transform: translateX(100%); transition: transform 0.3s ease; z-index: 1000; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer a { color: var(--ink); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.drawer a.btn { margin-top: 24px; border-bottom: 2px solid var(--cobalt); justify-content: center; color: var(--white); }
.drawer-close { position: absolute; top: 14px; right: 20px; background: transparent; border: none; color: var(--ink); font-size: 32px; line-height: 1; cursor: pointer; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(14, 22, 38, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 900; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

/* Hero */
.hero { position: relative; background: var(--ink) url('/assets/img/hero-empire.webp') calc(50% + 140px) center / cover no-repeat; color: #d8e0ee; padding: 84px 0 40px; border-bottom: 4px solid var(--marigold); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr); gap: 60px; align-items: center; }
.hero .label { display: block; margin-bottom: 14px; }
.hero h1 { color: var(--white); max-width: 14ch; margin-bottom: 22px; }
.hero-lead { font-size: 1.2rem; max-width: 560px; margin-bottom: 30px; color: #d8e0ee; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-credit { margin: 40px 0 0; text-align: right; font-size: 0.78rem; color: rgba(216, 224, 238, 0.55); padding: 0 22px; }

.hero-rank { list-style: none; counter-reset: rank; background: rgba(14, 22, 38, 0.72); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius); padding: 8px 10px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-rank li { counter-increment: rank; }
.hero-rank li + li { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.hero-rank a { display: grid; grid-template-columns: 28px 1fr auto; grid-template-areas: "n name score" "n sub score"; column-gap: 12px; align-items: center; padding: 11px 8px; text-decoration: none; color: var(--white); border-radius: var(--radius-sm); }
.hero-rank a::before { content: counter(rank); grid-area: n; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--marigold); }
.hero-rank a:hover { background: rgba(255, 255, 255, 0.08); }
.hero-rank span { grid-area: name; font-weight: 600; font-size: 1.05rem; }
.hero-rank small { grid-area: sub; color: rgba(216, 224, 238, 0.7); font-size: 0.85rem; }
.hero-rank b { grid-area: score; font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; color: var(--marigold); font-variant-numeric: tabular-nums; }

/* Section heads */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.section-head p { margin: 0; max-width: 520px; color: var(--grey); }

/* Games */
.games { padding: 64px 0 70px; }
.games-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.game { overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 90px; }
.game:target { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-soft); }
.game:last-child { grid-column: 1 / -1; flex-direction: row; }
.game:last-child .game-cover { flex: 0 0 46%; aspect-ratio: auto; }
.game:last-child .game-body { flex: 1; }
.game-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-cover .badge { position: absolute; top: 12px; left: 12px; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; background: var(--white); color: var(--ink); padding: 4px 10px; border-radius: var(--radius-sm); }
.game-cover .score-big { position: absolute; right: 0; bottom: 0; background: var(--marigold); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; line-height: 1; padding: 10px 16px 8px; border-radius: var(--radius-sm) 0 0 0; }
.game-body { padding: 22px 24px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game-meta { font-size: 0.9rem; color: var(--grey); }
.game h3 { font-size: 2rem; }
.game p { margin: 0; }
.bars { display: grid; gap: 7px; margin-top: 6px; padding: 14px 16px; background: var(--paper); border-radius: var(--radius-sm); }
.bar { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--ink-2); }
.bar i { display: block; height: 7px; background: var(--rule); border-radius: 4px; overflow: hidden; }
.bar i::after { content: ""; display: block; height: 100%; width: var(--w); background: var(--cobalt); border-radius: 4px; }
.bar span:last-child { text-align: right; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.game-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--rule); }
.game-foot small { color: var(--grey); font-size: 0.88rem; }

/* Compare table */
.compare { padding: 64px 0; background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 0.97rem; min-width: 720px; }
.cmp th, .cmp td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--rule); }
.cmp thead th { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; color: var(--ink); background: var(--paper); }
.cmp tbody tr:last-child td { border-bottom: none; }
.cmp tbody tr:nth-child(even) td { background: #fbfcfe; }
.cmp td a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.cmp td a:hover { color: var(--cobalt); border-color: var(--cobalt); }
.cmp td.num { color: var(--ink); font-variant-numeric: tabular-nums; }
.cmp td.total { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.35rem; }
.cmp td .pill { display: inline-block; font-size: 0.85rem; padding: 2px 9px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt-2); }
.cmp-note { font-size: 0.9rem; color: var(--grey); margin: 14px 0 0; }

/* Process */
.process { padding: 70px 0; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.proc { padding: 26px 24px 24px; }
.proc .n { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--marigold); font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.proc h3 { margin-bottom: 8px; }
.proc p { margin: 0; font-size: 0.97rem; }

/* FAQ */
.faq-home { padding: 0 0 70px; }
.faq-home .container { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.faq-home h2 { margin-bottom: 10px; }
.acc { border-top: 1px solid var(--rule-2); }
.acc-item { border-bottom: 1px solid var(--rule-2); }
.acc-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: transparent; border: none; color: var(--ink); font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; text-align: left; padding: 16px 2px; cursor: pointer; }
.acc-btn:focus-visible { outline: 2px solid var(--marigold); outline-offset: -2px; }
.acc-btn .chev { width: 22px; height: 22px; flex: none; color: var(--cobalt); transition: transform 0.25s; }
.acc-item.open .acc-btn .chev { transform: rotate(180deg); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-panel p { padding: 0 2px 18px; margin: 0; }

/* CTA */
.cta { padding: 0 0 80px; }
.cta-box { border-radius: var(--radius); padding: 44px 44px; background: var(--ink); color: #d8e0ee; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; border-left: 6px solid var(--marigold); }
.cta-box h2 { margin-bottom: 8px; color: var(--white); }
.cta-box p { margin: 0; max-width: 520px; }

/* Inner pages */
.page { padding: 0 0 80px; }
.page-head { background: var(--ink) url('/assets/img/band-elvenar.webp') right center / cover no-repeat; color: #d8e0ee; margin: 0 calc(50% - 50vw) 44px; padding: 56px calc(50vw - 50%) 40px; border-bottom: 4px solid var(--marigold); }
.page-head > * { max-width: 760px; }
.page-head h1 { font-size: 3.6rem; margin-bottom: 10px; color: var(--white); }
.page-date { font-size: 0.9rem; color: rgba(216, 224, 238, 0.65); margin-bottom: 16px; }
.page-intro { font-size: 1.2rem; color: var(--white); margin: 0; }
.page-body { max-width: 760px; }
.page-body h2 { font-size: 2rem; margin: 40px 0 12px; }
.page-body h2:first-child { margin-top: 0; }
.page-body ul { padding-left: 22px; margin-bottom: 1.2em; }
.page-body li { margin-bottom: 8px; }
.page-body strong { color: var(--ink); }
.email-link { font-weight: 600; font-size: 1.1rem; color: var(--cobalt); text-decoration: none; border-bottom: 2px solid var(--cobalt-soft); }
.email-link:hover { border-color: var(--cobalt); }
.contact-box { margin-top: 44px; padding: 22px 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.contact-box p { margin: 0; color: var(--ink); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; }
.stat { padding: 22px 20px; border-top: 4px solid var(--marigold); }
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 2.8rem; color: var(--ink); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 0.92rem; color: var(--grey); }

.weights { padding: 26px 26px; margin: 0 0 44px; max-width: 760px; }
.weights h3 { margin-bottom: 16px; }
.weights .bar { grid-template-columns: 90px 1fr 44px; font-size: 0.95rem; margin-bottom: 10px; }
.weights p { margin: 18px 0 0; font-size: 0.95rem; }

.faq-list { max-width: 820px; }
.faq-list .acc { border-top: 0; }
.faq-list .acc-item { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 12px; }
.faq-list .acc-btn { padding: 16px 20px; }
.faq-list .acc-panel p { padding: 0 20px 20px; }

.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: start; padding-top: 56px; }
.contact-grid h1 { font-size: 3.6rem; margin-bottom: 16px; }
.contact-meta { margin-top: 24px; display: grid; gap: 10px; }
.contact-meta span { color: var(--ink); font-weight: 600; }
.form { padding: 30px; }
.form-row { margin-bottom: 16px; }
.form label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--ink); margin-bottom: 6px; }
.form input, .form textarea { width: 100%; background: var(--paper); border: 1px solid var(--rule-2); border-radius: var(--radius-sm); color: var(--ink); font-family: var(--font-body); font-size: 1rem; padding: 12px 14px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--cobalt); outline-offset: 0; border-color: var(--cobalt); }
.form textarea { resize: vertical; min-height: 130px; }
.form-msg { display: none; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.97rem; }
.form-msg.ok { display: block; background: var(--cobalt-soft); border: 1px solid var(--cobalt); color: var(--ink); }
.form-msg.err { display: block; background: #fbe9e5; border: 1px solid var(--red); color: var(--ink); }

.resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 10px 0 44px; }
.resource { padding: 24px 22px; display: flex; flex-direction: column; }
.resource h3 { margin-bottom: 8px; }
.resource p { font-size: 0.95rem; flex: 1; }
.resource .btn { align-self: flex-start; }

/* Footer */
.site-footer { background: var(--ink); color: #b9c3d6; padding: 50px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand p { font-size: 0.95rem; max-width: 320px; margin: 0; }
.footer-nav { display: grid; gap: 8px; align-content: start; }
.footer-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.footer-nav a { color: #b9c3d6; text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--marigold); }
.footer-note { font-size: 0.85rem; line-height: 1.6; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 22px; color: #8e9ab3; }
.footer-copy { font-size: 0.82rem; margin-top: 14px; color: #8e9ab3; }

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 3.4rem; }
    .hero-inner { grid-template-columns: 1fr; gap: 34px; }
    .hero-rank { max-width: 520px; }
    .games-grid { grid-template-columns: 1fr; }
    .game:last-child { flex-direction: column; }
    .game:last-child .game-cover { flex: none; aspect-ratio: 16 / 9; }
    .process-grid { grid-template-columns: 1fr; }
    .faq-home .container { grid-template-columns: 1fr; gap: 30px; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .resources { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav { display: none; }
    .burger { display: flex; }
    .hero { padding: 52px 0 30px; background-position: 62% center; }
    .hero::before { content: ""; position: absolute; inset: 0; background: rgba(14, 22, 38, 0.45); }
    .hero-inner, .hero-credit { position: relative; }
    h1, .page-head h1, .contact-grid h1 { font-size: 2.7rem; }
    h2 { font-size: 2rem; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .stats { grid-template-columns: 1fr; }
    .cta-box { padding: 32px 24px; }
    .page-head { padding-top: 44px; padding-bottom: 32px; }
    .game h3 { font-size: 1.6rem; }
}
@media (max-width: 480px) {
    .footer-top { grid-template-columns: 1fr; gap: 26px; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .game-foot { flex-direction: column; align-items: stretch; }
    .game-foot .btn { justify-content: center; }
    .bar { grid-template-columns: 64px 1fr 30px; }
}
