/* v2RAGE - Styles
 * ============================================ */

:root {
    /* Brand */
    --accent: #E85A28;
    --accent-dark: #D14020;
    --accent-light: #F58D40;
    --accent-hover: #F26B3A;
    --accent-muted: rgba(232, 90, 40, 0.12);

    /* Surfaces */
    --bg-base: #0c0c0c;
    --bg-dark: #111111;
    --bg-card: #161616;
    --bg-elevated: #1c1c1c;

    /* Text */
    --text-primary: #f5f5f5;
    --text-secondary: #9a9a9f;
    --text-tertiary: #8a8a8f;

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] {
    --bg-base: #fafafa;
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #525256;
    --text-tertiary: #8a8a8f;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv01', 'cv02', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    background: var(--bg-dark);
    line-height: 1.6;
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-hover); }

img { display: block; max-width: 100%; }

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

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border-color);
}

html[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.8);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.logo-small img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--accent); }

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Toggle */
.theme-toggle,
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.theme-toggle:hover,
.lang-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.theme-toggle svg { width: 16px; height: 16px; }

html[data-theme="light"] .icon-sun { display: none; }
html:not([data-theme="light"]) .icon-moon { display: none; }

/* Hero */
.hero {
    text-align: center;
    padding: 100px 0 80px;
    background: #000000;
    position: relative;
    overflow: hidden;
}

html[data-theme="light"] .hero {
    background: var(--bg-base);
}

.hero-icon {
    width: 180px;
    height: 180px;
    border-radius: 40px;
    margin: 0 auto 32px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 38px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    line-height: 1.2;
}

.hero .tagline {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

.store-badge {
    display: inline-block;
    transition: transform 0.2s ease;
}

.store-badge:hover { transform: scale(1.05); }

.hero-platforms {
    margin-top: 20px;
}

.hero-platforms p {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.hero-platforms p:first-child {
    font-weight: 500;
    color: var(--text-secondary);
}
.store-badge svg { width: 180px; height: 60px; }
html:not([data-theme="light"]) .store-badge svg { filter: invert(1); }

/* Platform Icons */
.platform-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.platform-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.platform-icon svg { width: 20px; height: 20px; fill: currentColor; }
.platform-icon.active { color: var(--text-primary); border-color: var(--border-hover); }
.platform-icon.active:hover { color: var(--accent); border-color: var(--accent); }
.platform-icon.disabled { opacity: 0.3; cursor: default; }

/* Features Section */
.features {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.features h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 48px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

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

/* Protocols Section */
.protocols {
    padding: 0 0 80px;
}

.protocols h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 48px;
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.protocol-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.protocol-card:hover { border-color: var(--border-hover); }

.protocol-card .protocol-name {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.protocol-card .protocol-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* Info Section */
.info-section {
    padding: 0 0 80px;
    text-align: center;
}

.info-section p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.info-section p + p { margin-top: 16px; }

.info-section .highlight-box {
    background: linear-gradient(135deg, rgba(232,90,40,0.15), rgba(232,90,40,0.05));
    border: 1px solid rgba(232,90,40,0.3);
    padding: 24px;
    border-radius: 12px;
    max-width: 600px;
    margin: 32px auto 0;
    text-align: left;
}

.info-section .highlight-box p {
    text-align: left;
    font-size: 14px;
}

/* FAQ Section */
.faq {
    padding: 0 0 80px;
}

.faq h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 32px;
}

.faq-compact {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.faq-compact details { border-bottom: 1px solid var(--border-color); }
.faq-compact details:last-child { border-bottom: none; }

.faq-compact summary {
    padding: 16px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
    user-select: none;
}

.faq-compact summary::-webkit-details-marker { display: none; }
.faq-compact summary::marker { display: none; content: ''; }

.faq-compact summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-compact details[open] summary::after {
    transform: rotate(-135deg);
}

.faq-compact summary:hover { color: var(--accent); }

.faq-compact details p {
    padding: 0 20px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--accent); }

.footer-text {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Legal Pages */
.page-header {
    padding: 80px 0 48px;
    text-align: center;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.legal-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.legal-layout--no-sidebar {
    display: block;
    max-width: 720px;
}

.toc-sidebar {
    position: sticky;
    top: 72px;
    align-self: start;
}

.toc-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-link {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.toc-link:hover { color: var(--accent); }

.legal-content {
    max-width: 720px;
}

.legal-content h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.legal-content h1 + p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
    scroll-margin-top: 72px;
}

.legal-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-content ul {
    margin: 8px 0 16px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.legal-content li { margin-bottom: 4px; }

.legal-content strong { color: var(--text-primary); }

/* Support Page */
.support-page {
    padding: 0 0 80px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px 24px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.contact-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.contact-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-card-title {
    font-size: 16px;
    font-weight: 600;
}

.contact-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 80px 24px 60px; }
    .hero h1 { font-size: 36px; }
    .hero .tagline { font-size: 16px; }
    .hero-icon { width: 140px; height: 140px; border-radius: 32px; }
    .store-badge svg { width: 150px; height: 50px; }

    .feature-grid { grid-template-columns: 1fr; }
    .protocol-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; max-width: 320px; }

    .nav-links { gap: 20px; }

    .legal-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .toc-sidebar {
        position: static;
        margin-bottom: 24px;
    }

    .toc-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 28px; }
    .nav-links { gap: 16px; }
    .nav-hide-mobile { display: none; }
    .feature-card { padding: 24px; }
    .footer-links { gap: 16px; }
}
