/* TabRank — main stylesheet (light editorial theme) */

:root {
    --paper: #f6f3ec;
    --paper-2: #efeae0;
    --white: #ffffff;
    --ink: #1b1a2e;
    --ink-2: #4a4860;
    --muted: #7b7990;
    --line: #dcd7cb;
    --coral: #e5473a;
    --coral-dark: #c8382c;
    --blue: #2f6df6;
    --green: #1f9d6a;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(27, 26, 46, 0.08);
    --font-head: 'Space Grotesk', 'Arial', sans-serif;
    --font-body: 'Manrope', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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.65;
    font-size: 16px;
}
img { max-width: 100%; display: block; }
main { min-height: 60vh; }
a { color: var(--blue); }

.container { max-width: 1120px; 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.08; letter-spacing: -0.02em; }
h1 { font-size: 3.5rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1em; }
.accent { color: var(--coral); }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); margin-bottom: 14px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); 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(--ink); color: var(--white);
    font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
    padding: 13px 24px; border-radius: 999px; border: 2px solid var(--ink);
    text-decoration: none; cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { background: var(--coral); border-color: var(--coral); color: var(--white); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn-coral { background: var(--coral); border-color: var(--coral); }
.btn-coral:hover { background: var(--coral-dark); border-color: var(--coral-dark); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn svg { width: 16px; height: 16px; }

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

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(246, 243, 236, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.logo img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.15s; }
.nav a:hover, .nav a.active { color: var(--coral); }
.nav a.btn { color: var(--white); }
.nav a.btn:hover { color: var(--white); }

.burger { display: none; width: 42px; height: 42px; background: var(--white); border: 1px solid var(--line); 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(--line); 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(--line); font-weight: 600; }
.drawer a.btn { margin-top: 24px; border-bottom: 2px solid var(--ink); 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(27, 26, 46, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 900; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

/* Hero */
.hero { padding: 80px 0 60px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(229, 71, 58, 0.16), transparent 65%); top: -160px; right: -120px; pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; position: relative; }
.hero h1 { margin-bottom: 22px; }
.hero-lead { font-size: 1.15rem; max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.leaderboard { box-shadow: var(--shadow); padding: 8px 8px 12px; }
.leaderboard-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.leaderboard-head strong { font-family: var(--font-head); color: var(--ink); font-size: 1.05rem; }
.leaderboard-head span { font-size: 0.8rem; color: var(--muted); }
.lb-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); transition: background 0.15s; }
.lb-row:hover { background: var(--paper); }
.lb-pos { font-family: var(--font-head); font-weight: 700; color: var(--muted); font-size: 1.1rem; }
.lb-name { font-weight: 700; }
.lb-name small { display: block; font-weight: 500; color: var(--muted); font-size: 0.8rem; }
.lb-score { font-family: var(--font-head); font-weight: 700; color: var(--white); background: var(--green); padding: 4px 10px; border-radius: 6px; font-size: 0.95rem; }

/* Trust strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); padding: 22px 0; }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.strip-item { display: flex; align-items: center; gap: 12px; font-size: 0.93rem; font-weight: 600; color: var(--ink); }
.strip-item svg { width: 22px; height: 22px; color: var(--coral); flex: none; }

/* Ranking list */
.ranking { padding: 70px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { margin: 0; font-size: 1.05rem; }
.game-list { display: grid; gap: 22px; }
.game { display: grid; grid-template-columns: 320px 1fr; overflow: hidden; box-shadow: var(--shadow); }
.game-cover { position: relative; background: var(--ink); }
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-pos { position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--white); font-family: var(--font-head); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.game-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.game-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.game-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); background: var(--paper-2); padding: 4px 9px; border-radius: 4px; }
.game h3 { font-size: 1.5rem; }
.score { text-align: center; flex: none; }
.score b { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--ink); line-height: 1; }
.score span { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.game p { margin: 0; }
.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-size: 0.9rem; }
.verdict li { list-style: none; padding-left: 20px; position: relative; }
.verdict li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px; border-radius: 50%; }
.verdict .plus::before { background: var(--green); }
.verdict .minus::before { background: var(--coral); }
.game-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.game-foot small { color: var(--muted); font-size: 0.85rem; }

/* Criteria */
.criteria { padding: 70px 0; background: var(--ink); color: #c9c7d8; }
.criteria h2, .criteria h3 { color: var(--white); }
.criteria .section-head p { color: #c9c7d8; }
.criteria-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.crit { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius); padding: 24px 22px; }
.crit-weight { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--coral); line-height: 1; margin-bottom: 10px; }
.crit h3 { font-size: 1.05rem; margin-bottom: 8px; }
.crit p { font-size: 0.92rem; margin: 0; }
.criteria .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.4); margin-top: 30px; }
.criteria .btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* FAQ home */
.faq-home { padding: 70px 0; }
.faq-home .container { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.acc-item { border-bottom: 1px solid var(--line); }
.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-body); font-size: 1.05rem; font-weight: 700; text-align: left; padding: 18px 2px; cursor: pointer; }
.acc-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.acc-btn .chev { width: 22px; height: 22px; flex: none; color: var(--coral); transition: transform 0.25s; }
.acc-item.open .acc-btn .chev { transform: rotate(45deg); }
.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: 20px 0 80px; }
.cta-box { background: var(--coral); color: var(--white); border-radius: var(--radius); padding: 56px 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-box h2 { color: var(--white); margin-bottom: 8px; }
.cta-box p { margin: 0; max-width: 520px; color: rgba(255, 255, 255, 0.9); }
.cta-box .btn { background: var(--white); color: var(--ink); border-color: var(--white); }
.cta-box .btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Inner pages */
.page { padding: 70px 0 80px; }
.page-head { max-width: 740px; margin-bottom: 40px; }
.page-head h1 { font-size: 3rem; margin-bottom: 12px; }
.page-date { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.page-intro { font-size: 1.15rem; color: var(--ink); margin: 0; }
.page-body { max-width: 740px; }
.page-body h2 { font-size: 1.6rem; margin: 40px 0 14px; }
.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-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--coral); text-decoration: none; }
.email-link:hover { text-decoration: underline; }
.contact-box { margin-top: 44px; padding: 24px 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: 600; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 44px 0; }
.stat { padding: 26px 20px; text-align: center; }
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; color: var(--coral); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 0.9rem; }

.steps { display: grid; gap: 18px; margin-bottom: 40px; max-width: 820px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 26px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; }
.step ul { margin: 12px 0 0; padding-left: 20px; }
.step li { margin-bottom: 5px; font-size: 0.95rem; }

.faq-list { max-width: 820px; }
.faq-list .acc-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq-list .acc-btn { padding: 18px 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; }
.contact-grid h1 { font-size: 3rem; margin-bottom: 16px; }
.contact-meta { margin-top: 24px; display: grid; gap: 10px; }
.contact-meta span { color: var(--ink); font-weight: 700; }
.form { padding: 30px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; }
.form label { display: block; font-size: 0.85rem; color: var(--ink); margin-bottom: 6px; font-weight: 700; }
.form input, .form textarea { width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); font-family: var(--font-body); font-size: 0.95rem; padding: 12px 14px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); background: var(--white); }
.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.95rem; }
.form-msg.ok { display: block; background: rgba(31, 157, 106, 0.1); border: 1px solid var(--green); color: var(--ink); }
.form-msg.err { display: block; background: rgba(229, 71, 58, 0.08); border: 1px solid var(--coral); color: var(--ink); }

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

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 50px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 0.93rem; max-width: 320px; margin: 0; }
.footer-nav { display: grid; gap: 10px; align-content: start; }
.footer-title { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 0.9rem; margin-bottom: 4px; }
.footer-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.93rem; }
.footer-nav a:hover { color: var(--coral); }
.footer-note { font-size: 0.82rem; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 24px; color: var(--muted); }
.footer-copy { font-size: 0.82rem; margin-top: 14px; color: var(--muted); }

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 2.9rem; }
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .strip-inner { grid-template-columns: repeat(2, 1fr); }
    .criteria-grid { grid-template-columns: repeat(2, 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; }
    .game { grid-template-columns: 260px 1fr; }
}
@media (max-width: 768px) {
    .nav { display: none; }
    .burger { display: flex; }
    .hero { padding: 54px 0 44px; }
    h1, .page-head h1, .contact-grid h1 { font-size: 2.3rem; }
    h2 { font-size: 1.75rem; }
    .game { grid-template-columns: 1fr; }
    .game-cover img { height: auto; aspect-ratio: 16 / 10; }
    .game-body { padding: 20px; }
    .verdict { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .step { grid-template-columns: 1fr; gap: 12px; }
    .cta-box { padding: 40px 24px; }
    .page { padding: 50px 0 60px; }
}
@media (max-width: 480px) {
    .strip-inner, .criteria-grid { grid-template-columns: 1fr; }
    .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; }
}
