/* ============================================
   STALCRAFT CLAN — Public pages stylesheet
   (landing / clans / changelog / privacy)
   ============================================ */

:root {
    --bg-primary-dark: #0f172a;
    --bg-secondary-dark: #1e293b;
    --text-primary-dark: #f1f5f9;
    --text-secondary-dark: #94a3b8;
    --accent-dark: #3b82f6;
    --accent-hover-dark: #60a5fa;

    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f8fafc;
    --text-primary-light: #0f172a;
    --text-secondary-light: #475569;
    --accent-light: #2563eb;
    --accent-hover-light: #3b82f6;
}

[data-theme="dark"] {
    --bg-primary: var(--bg-primary-dark);
    --bg-secondary: var(--bg-secondary-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --accent: var(--accent-dark);
    --accent-hover: var(--accent-hover-dark);
}

[data-theme="light"] {
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --accent: var(--accent-light);
    --accent-hover: var(--accent-hover-light);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.25s ease, color 0.25s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Fixed header */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 18px 0;
    background: transparent;
    transition: all 0.25s ease;
}

.header.scrolled {
    background: rgba(30, 41, 59, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59,130,246,0.12);
    padding: 12px 0;
}
[data-theme="light"] .header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(37, 99, 235, 0.15);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.3px;
}
.logo span { color: var(--accent); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(59,130,246,0.18);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
[data-theme="light"] .header-btn {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--text-primary);
}
.header-btn:hover {
    border-color: rgba(96,165,250,0.5);
    color: var(--accent-hover);
    transform: translateY(-1px);
}
[data-theme="light"] .header-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--accent);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(59,130,246,0.18);
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-theme="light"] .theme-toggle {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(37, 99, 235, 0.2);
}
.theme-toggle:hover { border-color: rgba(96,165,250,0.5); transform: scale(1.03); }
[data-theme="light"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--accent);
}

/* Layout helpers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* main wrapper for public pages (offset under fixed header) */
.page-main {
    flex: 1 0 auto;
    padding-top: 85px;
}

/* Sections */
.section { padding: 84px 0; }
.hero + .section {
    padding-top: 120px; /* Больше отступ после hero */
}

.section-title {
    font-size: 2.6rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 760px;
    margin: 0 auto 46px;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59,130,246,0.12) 0%, transparent 52%),
        radial-gradient(circle at 80% 85%, rgba(59,130,246,0.10) 0%, transparent 52%);
    pointer-events: none;
}
.hero-content { 
    text-align: center; 
    position: relative; 
    z-index: 1;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 860px;
    margin: 0 auto 56px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    align-items: center;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 14px 26px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    border: 1px solid rgba(59,130,246,0.35);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(59,130,246,0.65);
    color: var(--accent-hover);
}
.btn-secondary:hover { background: rgba(59,130,246,0.12); transform: translateY(-2px); }

/* Features (modern tiles) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.feature-card {
    background: rgba(30,41,59,0.72);
    border: 1px solid rgba(59,130,246,0.14);
    border-radius: 18px;
    padding: 26px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}
[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96,165,250,0.35);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}
[data-theme="light"] .feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}
.feature-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,0.14);
    border: 1px solid rgba(59,130,246,0.22);
    color: var(--accent-hover);
    font-size: 1.35rem;
}
[data-theme="light"] .feature-icon {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--accent);
}
.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
}
.feature-points {
    list-style: none;
    margin-top: 10px;
}
.feature-points li {
    color: var(--text-secondary);
    margin: 6px 0;
    padding-left: 18px;
    position: relative;
    font-size: 0.98rem;
}
.feature-points li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 900;
}

/* Interface gallery */
.screenshot-section { background: var(--bg-secondary); }

.shots-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}
.shots-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}
.shot-card {
    background: rgba(15,23,42,0.55);
    border: 1px solid rgba(59,130,246,0.14);
    border-radius: 18px;
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
[data-theme="light"] .shot-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.shot-card:hover { transform: translateY(-3px); border-color: rgba(96,165,250,0.35); }
[data-theme="light"] .shot-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}
.shot-title {
    font-weight: 800;
    margin: 6px 4px 12px;
    font-size: 1.05rem;
}
.shot-desc {
    color: var(--text-secondary);
    margin: 10px 4px 4px;
    font-size: 0.98rem;
    line-height: 1.5;
}
.screenshot {
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(59,130,246,0.12);
    background: rgba(0,0,0,0.2);
}
.screenshot img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.screenshot:hover img { transform: scale(1.03); }
.shot-wide .screenshot img { height: 320px; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.9);
    overflow: auto; /* прокрутка для больших изображений */
}
.modal-content {
    display: block;
    width: min(1200px, 92vw);
    max-width: 92vw;
    max-height: none;
    margin: 60px auto 60px;
    border-radius: 12px;
}
.modal-close {
    position: fixed;
    top: 18px;
    right: 22px;
    font-size: 42px;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
}

/* CTA + Footer */
.cta-section {
    background: var(--bg-secondary);
    text-align: center;
    padding-top: 56px;
    padding-bottom: 142px; /* большой отступ перед футером */
}
.btn-large { padding: 16px 34px; font-size: 1.1rem; }

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(59,130,246,0.12);
    padding: 28px 0 22px; /* чуть больше воздуха */
    margin-top: 0;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-bottom: 12px; /* меньше пустоты сверху */
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent-hover); }
.footer-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-info p { margin: 4px 0; }
.footer-info a { color: var(--accent-hover); text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }

/* Keep footer at bottom even on short pages */
body > footer { margin-top: auto; }

/* Responsive */
@media (max-width: 1200px) {
    .hero h1 { font-size: 3.8rem; }
    .hero p { font-size: 1.3rem; }
}

@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero {
        min-height: 85vh;
        padding: 100px 0 80px;
    }
    .hero h1 { 
        font-size: 3.2rem; 
        margin-bottom: 28px;
    }
    .hero p { 
        font-size: 1.2rem; 
        margin-bottom: 48px;
    }
    .hero-buttons {
        gap: 14px;
    }
    .header-content {
        padding: 0 16px;
    }
    .header-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    .logo {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 90px 0 70px;
    }
    .hero h1 { 
        font-size: 2.8rem; 
        margin-bottom: 24px;
        line-height: 1.15;
    }
    .hero p { 
        font-size: 1.1rem; 
        margin-bottom: 40px;
        padding: 0 10px;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .header {
        padding: 12px 0;
    }
    .header.scrolled {
        padding: 10px 0;
    }
    .header-content {
        padding: 0 12px;
        gap: 10px;
    }
    .header-actions {
        gap: 8px;
    }
    .header-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    .logo {
        font-size: 1.1rem;
    }
    .section {
        padding: 60px 0;
    }
    .hero + .section {
        padding-top: 80px;
    }
    .section-title {
        font-size: 2rem;
    }
    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero {
        min-height: 75vh;
        padding: 80px 0 60px;
    }
    .hero h1 { 
        font-size: 2.4rem; 
        margin-bottom: 20px;
    }
    .hero p { 
        font-size: 1rem; 
        margin-bottom: 36px;
        line-height: 1.6;
    }
    .hero-buttons {
        gap: 12px;
    }
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 1rem;
    }
    .hero + .section {
        padding-top: 70px;
    }
    .header-btn {
        padding: 7px 10px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .header-btn:last-child {
        display: none; /* Скрываем "Выбор клана" на очень маленьких экранах */
    }
    .logo {
        font-size: 1rem;
    }
    .page-main {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    .hero h1 { 
        font-size: 2rem; 
    }
    .hero p { 
        font-size: 0.95rem; 
    }
    .header-content {
        padding: 0 10px;
    }
    .header-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2.6rem; }
    .hero p { font-size: 1.05rem; }
    .section { padding: 64px 0; }
    .section-title { font-size: 2rem; }
    .shots-grid-2x2 { grid-template-columns: 1fr; }
    .screenshot img { height: 210px; }
    .shot-wide .screenshot img { height: 240px; }
    .header-btn { padding: 8px 12px; font-size: 0.9rem; }
}

