/* ============================================================
   Destrim Landing — Стили
   Тёмная средневековая тема, шрифты Cinzel + Inter
   ============================================================ */

/* --- Переменные --- */
:root {
    --bg-dark: #141820;
    --bg-section: #181c26;
    --bg-card: #1e2230;
    --bg-card-hover: #252a3a;
    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dark: #a07d2e;
    --text-primary: #e8e6e2;
    --text-secondary: #a8a4a0;
    --text-dim: #6b6864;
    --border: rgba(201, 168, 76, 0.15);
    --border-hover: rgba(201, 168, 76, 0.35);
    --shadow-gold: 0 0 30px rgba(201, 168, 76, 0.08);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    --font-ui: 'Inter', sans-serif;
}

/* --- Сброс и базовые стили --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Кастомный скроллбар --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.25);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.45);
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 76, 0.25) var(--bg-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

/* --- Кнопки --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: #0a0a0f;
    padding: 14px 32px;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0a0a0f;
    box-shadow: 0 6px 30px rgba(201, 168, 76, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    padding: 14px 32px;
    border: 1.5px solid var(--gold);
}
.btn-outline:hover {
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-2px);
}

.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-xl { padding: 20px 52px; font-size: 18px; border-radius: 12px; }

.btn-nav {
    background: var(--gold);
    color: #0a0a0f;
    padding: 10px 24px;
    font-size: 13px;
}
.btn-nav:hover {
    background: var(--gold-light);
    color: #0a0a0f;
    transform: translateY(-1px);
}

/* --- Навигация --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
    background: transparent;
}
.nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.08em;
}
.nav-logo:hover { color: var(--gold-light); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a:not(.btn) {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.nav-links a:not(.btn):hover { color: var(--gold); }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* --- HERO --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(80, 40, 20, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(40, 20, 60, 0.1) 0%, transparent 50%),
        var(--bg-dark);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 120px 24px 80px;
}

.hero-tagline {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(56px, 10vw, 120px);
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    color: var(--text-primary);
    margin-bottom: 28px;
    background: linear-gradient(180deg, var(--text-primary) 40%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-family: var(--font-body);
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-family: var(--font-ui);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* --- Секции --- */
.section {
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.03em;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 20px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
    line-height: 1.7;
}

/* --- 2. Об игре --- */
.section-about {
    background: var(--bg-section);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 60px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: all var(--transition);
}
.about-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.about-icon {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1;
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--gold);
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.7;
}

/* --- 3. Как это работает --- */
.steps {
    max-width: 700px;
    margin: 60px auto 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 36px;
    bottom: 36px;
    width: 2px;
    background: linear-gradient(180deg, var(--gold), var(--gold-dark), transparent);
}

.step {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 28px 0;
    position: relative;
}

.step-number {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    background: var(--bg-dark);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 17px;
}

/* --- 4. Возможности --- */
.section-features {
    background: var(--bg-section);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all var(--transition);
}
.feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 16px;
    line-height: 1;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

/* --- 5. Атмосфера --- */
.section-atmosphere {
    position: relative;
    padding: 120px 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(160, 60, 20, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(201, 168, 76, 0.05) 0%, transparent 60%),
        var(--bg-dark);
}

.atmosphere-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.atmosphere-text .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.atmosphere-text p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 16px;
    line-height: 1.8;
}

.atmosphere-quote blockquote {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 19px;
    color: var(--text-primary);
    line-height: 1.8;
    padding: 32px;
    background: var(--bg-card);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    position: relative;
}

.quote-label {
    display: block;
    margin-top: 12px;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: right;
}

/* --- 6. Механики D&D --- */
.section-mechanics {
    background: var(--bg-section);
}

.mechanics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.mechanic-item {
    text-align: center;
    padding: 36px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.mechanic-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-3px);
}

.mechanic-dice {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--gold);
    width: 72px;
    height: 72px;
    line-height: 72px;
    margin: 0 auto 20px;
    border: 2px solid var(--gold);
    border-radius: 12px;
    background: rgba(201, 168, 76, 0.05);
}

.mechanic-item h3 {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.mechanic-item p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* --- 7. Роли --- */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.role-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: all var(--transition);
}
.role-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-gold);
    transform: translateY(-3px);
}

.role-emblem {
    font-size: 40px;
    margin-bottom: 16px;
    line-height: 1;
}

.role-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 10px;
}

.role-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

/* --- 8. Превью игры --- */
.section-preview {
    background: var(--bg-section);
}

.preview-window {
    max-width: 800px;
    margin: 60px auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(20, 20, 31, 0.8);
    border-bottom: 1px solid var(--border);
}

.preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
}
.preview-dot:first-child { background: #e55; }
.preview-dot:nth-child(2) { background: #eb5; }
.preview-dot:nth-child(3) { background: #5b5; }

.preview-title {
    margin-left: 12px;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-dim);
}

.preview-body {
    padding: 28px 24px;
    max-height: 500px;
    overflow-y: auto;
}

.preview-msg {
    margin-bottom: 20px;
    padding: 16px 20px;
    border-radius: var(--radius);
    line-height: 1.7;
}

.preview-narrator {
    background: rgba(201, 168, 76, 0.04);
    border-left: 3px solid var(--gold-dark);
}
.preview-narrator p { margin-bottom: 10px; }
.preview-narrator p:last-child { margin-bottom: 0; }

.preview-dice {
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-block;
}

.preview-player {
    background: rgba(100, 140, 200, 0.08);
    border-left: 3px solid #648cc8;
    margin-left: 40px;
}
.preview-player p {
    color: #a0b8dc;
    font-style: italic;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.preview-action-btn {
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    text-align: left;
    cursor: default;
    transition: var(--transition);
}
.preview-action-btn:hover {
    background: rgba(201, 168, 76, 0.12);
    border-color: var(--border-hover);
}

/* --- 9. FAQ --- */
.faq-list {
    max-width: 720px;
    margin: 60px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--text-primary);
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}
.faq-item summary:hover { color: var(--gold); }

.faq-item summary::after {
    content: '+';
    font-size: 24px;
    color: var(--gold);
    font-weight: 300;
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
    color: var(--text-secondary);
    font-size: 17px;
    padding: 0 0 20px;
    line-height: 1.7;
}

/* --- 10. CTA --- */
.section-cta {
    padding: 120px 0;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
        var(--bg-dark);
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.cta-desc {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

/* --- Кнопка наверх --- */
.btn-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 900;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(30, 34, 48, 0.9);
    backdrop-filter: blur(12px);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all var(--transition);
}
.btn-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.btn-top:hover {
    background: rgba(201, 168, 76, 0.15);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* --- Cookie-баннер --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 950;
    background: rgba(24, 28, 38, 0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}
.cookie-banner.visible {
    transform: translateY(0);
}
.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-banner p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 10px 20px !important;
    font-size: 13px !important;
}

/* --- Футер --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-dark);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.06em;
}

.footer-copy {
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--text-dim);
}

.footer-link {
    color: var(--text-dim);
    border-bottom: 1px solid transparent;
    margin-left: 12px;
}
.footer-link:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* --- Анимации появления --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.7s; }

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Частицы (золотые точки) --- */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: particleFade 4s ease-in-out infinite;
}

@keyframes particleFade {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.4; transform: translateY(-40px); }
}

/* --- Адаптив --- */
@media (max-width: 1024px) {
    .mechanics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    .section { padding: 70px 0; }

    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: rgba(20, 24, 32, 0.98);
        backdrop-filter: blur(20px);
        justify-content: center;
        align-items: center;
        gap: 24px;
        z-index: 999;
    }
    .nav-links.open a:not(.btn) { font-size: 18px; }
    .nav-burger { display: flex; z-index: 1001; }

    .hero-content { padding: 100px 16px 60px; }

    .about-grid,
    .features-grid,
    .roles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mechanics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .atmosphere-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .atmosphere-text .section-title { text-align: center; }

    .steps::before { left: 28px; }
    .step-number { width: 56px; height: 56px; font-size: 18px; }
    .step { gap: 20px; }

    .preview-player { margin-left: 0; }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
        gap: 14px;
    }

    .btn-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-lg, .btn-xl { width: 100%; }

    .mechanics-grid {
        grid-template-columns: 1fr;
    }
}
