/* ============================================
   MajestyLauncher — Theme
   Dark modern theme, same design language as
   majestycraft.com / majestychallenge.fr
   ============================================ */

:root {
    --bg-0: #0a0a0a;
    --bg-1: #0f0f0f;
    --bg-card: #141420;
    --bg-card-alt: #111118;
    --bg-header: rgba(10, 10, 10, 0.85);
    --bg-footer: #0d0d0d;
    --bg-input: #1a1a2e;

    --border: #1a1a2e;
    --border-light: #2a2a3e;
    --border-hover: #ff4500;

    --accent: #ff4500;
    --accent-end: #ff6b35;
    --accent-gradient: linear-gradient(135deg, var(--accent), var(--accent-end));
    --accent-glow: rgba(255, 69, 0, 0.3);
    --accent-glow-strong: rgba(255, 69, 0, 0.5);

    --text-1: #ffffff;
    --text-2: #a0a0a0;
    --text-3: #71717a;

    --success: #22c55e;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.25s ease;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 4px 30px rgba(255, 69, 0, 0.2);

    --header-h: 76px;
}

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

.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text-2);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

::selection { background: var(--accent-glow); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

h1, h2, h3, h4, h5 { color: var(--text-1); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.section { padding: 100px 0; }
.section-alt { background: var(--bg-1); }

.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.sec-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.sec-head p { margin-top: 14px; font-size: 1.05rem; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 40px var(--accent-glow-strong); }
.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-1);
    border: 1px solid var(--border-light);
}
.btn-outline:hover { color: var(--text-1); border-color: var(--accent); background: rgba(255, 69, 0, 0.08); }
.btn-lg { padding: 18px 40px; font-size: 1.05rem; }

/* ============================================
   Header / Nav
   ============================================ */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
}
.header-inner {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-1);
    flex-shrink: 0;
}
.brand img { height: 38px; width: auto; }
.brand .brand-craft { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

#main-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
    color: var(--text-2);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover { color: var(--text-1); background: rgba(255, 255, 255, 0.05); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-1);
    border-radius: var(--radius-sm);
    width: 42px; height: 42px;
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 960px) {
    #main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--bg-0);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 4px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }
    #main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-link { padding: 14px 16px; }
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .header-actions .btn-primary-header { display: none; }
}

/* ============================================
   Hero
   ============================================ */
#hero {
    position: relative;
    padding: calc(var(--header-h) + 90px) 0 100px;
    overflow: hidden;
    text-align: center;
}
#hero::before,
#hero::after {
    content: "";
    position: absolute;
    width: 640px; height: 640px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.28;
    z-index: 0;
}
#hero::before { background: var(--accent); top: -220px; left: -160px; }
#hero::after { background: #7c2d12; bottom: -260px; right: -160px; opacity: .22; }

.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }

.hero-rotator { min-height: 1.2em; }
.hero-rotator-item {
    display: none;
}
.hero-rotator-item.active { display: block; animation: heroFade .5s ease; }
@keyframes heroFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-2);
    max-width: 560px;
    margin: 22px auto 36px;
}

.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 52px; }

.hero-badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hero-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 8px 18px;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}
.hero-badge:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   Feature cards
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow-card-hover); }
.feature-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    background: rgba(255, 69, 0, 0.12);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.feature-card p { font-size: 0.92rem; color: var(--text-2); }

/* ============================================
   Screenshots gallery
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: zoom-in;
    transition: var(--transition);
}
.gallery-item:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.gallery-item img { aspect-ratio: 4/3; object-fit: contain; object-position: top center; width: 100%; background: #0a0a10; }
.gallery-caption { padding: 14px 16px; font-size: 0.85rem; color: var(--text-2); text-align: center; border-top: 1px solid var(--border); }

/* Lightbox */
#lightbox {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(5, 5, 5, 0.92);
    display: none;
    align-items: center; justify-content: center;
    padding: 40px 20px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: min(1100px, 92vw); max-height: 86vh; border-radius: var(--radius); box-shadow: 0 20px 80px rgba(0,0,0,.6); }
#lightbox-close {
    position: absolute; top: 22px; right: 26px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-light);
    color: #fff; font-size: 1.3rem;
    cursor: pointer;
}
#lightbox-close:hover { background: var(--accent); border-color: var(--accent); }

/* ============================================
   Trailer
   ============================================ */
.trailer-wrap { max-width: 860px; margin: 0 auto; }
.trailer-frame {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    background: #000;
}
.trailer-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
}
.play-btn span {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.7rem;
    box-shadow: 0 8px 40px var(--accent-glow-strong);
    transition: var(--transition);
}
.trailer-frame:hover .play-btn span { transform: scale(1.08); }

/* ============================================
   Modloader strip
   ============================================ */
.modloader-strip {
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 26px 0;
}
.modloader-list { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.modloader-pill {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    transition: var(--transition);
}
.modloader-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   Download counter + cards
   ============================================ */
.download-counter {
    max-width: 460px;
    margin: 0 auto 44px;
    padding: 20px 28px;
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.15), rgba(255, 69, 0, 0.03));
    border: 1px solid rgba(255, 69, 0, 0.28);
}
.download-counter .counter-value {
    display: block; color: #fff; font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em;
}
.download-counter .counter-label { display: block; color: var(--text-2); font-size: 0.9rem; margin-top: 4px; }

.dl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1020px;
    margin: 0 auto;
}
@media (max-width: 900px) { .dl-grid { grid-template-columns: 1fr; max-width: 420px; } }

.dl-card {
    background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 38px 28px;
    text-align: center;
    transition: var(--transition);
}
.dl-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow-card-hover); }
.dl-card .dl-icon { font-size: 2.6rem; color: var(--accent); margin-bottom: 14px; }
.dl-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.dl-card .dl-sub { font-size: 0.85rem; color: var(--text-3); margin-bottom: 24px; }
.dl-card .btn { width: 100%; margin-bottom: 22px; }
.dl-steps { text-align: left; list-style: none; }
.dl-steps li { position: relative; padding-left: 22px; font-size: 0.82rem; color: var(--text-2); margin-bottom: 8px; }
.dl-steps li::before { content: attr(data-step); position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.dl-note { text-align: center; color: var(--text-3); font-size: 0.85rem; max-width: 620px; margin: 34px auto 0; }

/* ============================================
   Install guide
   ============================================ */
.install-guide { max-width: 860px; margin: 0 auto; }
.os-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.os-tab-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    color: var(--text-2);
    padding: 11px 26px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: var(--transition);
}
.os-tab-btn:hover { color: var(--text-1); }
.os-tab-btn.active { background: var(--accent-gradient); border-color: transparent; color: #fff; }

.os-panel { display: none; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }
.os-panel.active { display: block; animation: heroFade .35s ease; }

.guide-step { display: flex; gap: 18px; margin-bottom: 26px; }
.guide-step:last-child { margin-bottom: 0; }
.guide-step-num {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255, 69, 0, 0.12);
    color: var(--accent);
    border: 1px solid rgba(255, 69, 0, 0.3);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}
.guide-step-content h4 { color: var(--text-1); font-size: 1rem; margin-bottom: 4px; font-weight: 700; }
.guide-step-content p { font-size: 0.9rem; color: var(--text-2); }
.guide-step-content code {
    background: rgba(0,0,0,0.35);
    color: var(--accent-end);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: monospace;
}

/* ============================================
   FAQ
   ============================================ */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    font-weight: 700; color: var(--text-1); font-size: 0.98rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    font-size: 1.3rem;
    color: var(--accent);
    transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 20px; font-size: 0.92rem; color: var(--text-2); }

/* ============================================
   Partners (style aligné sur majestychallenge.fr)
   ============================================ */
.partners-wrap { max-width: 1080px; margin: 0 auto; display: grid; gap: 24px; }

.partner-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(20,20,20,0.98), rgba(12,12,12,0.98));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-card);
}
.partner-card.featured {
    border-color: rgba(16, 185, 129, 0.22);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    padding: 36px;
}
.partner-card.featured::before {
    content: '';
    position: absolute; inset: 0 auto 0 0; width: 4px;
    background: linear-gradient(180deg, #10b981, #34d399);
}

.partner-featured-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(260px,0.9fr); gap: 30px; align-items: center; }
@media (max-width: 900px) { .partner-featured-grid { grid-template-columns: 1fr; } }

.partner-badge {
    display: inline-flex; align-items: center;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-light);
    color: var(--text-2);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    margin-bottom: 14px;
}
.partner-badge.featured { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #6ee7b7; }

.partner-name { font-size: 1.3rem; margin-bottom: 10px; }
.partner-name.featured { font-size: 1.9rem; }
.partner-description { font-size: 0.92rem; color: var(--text-2); margin-bottom: 18px; }

.partner-points { list-style: none; display: grid; gap: 8px; margin-bottom: 20px; }
.partner-points li { position: relative; padding-left: 20px; font-size: 0.87rem; color: var(--text-2); }
.partner-points li::before {
    content: ''; position: absolute; left: 0; top: 0.55em;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-gradient);
}

.partner-promo {
    background: rgba(16,185,129,0.07);
    border: 1px solid rgba(16,185,129,0.22);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
}
.partner-promo-kicker { color: #6ee7b7; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.partner-promo-title { color: var(--text-1); font-weight: 700; font-size: 0.98rem; margin-bottom: 4px; }
.partner-promo-text { color: var(--text-2); font-size: 0.85rem; }

.partner-logo-frame {
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: 140px;
    padding: 20px;
}
.partner-logo-frame.large { min-height: 190px; }
.partner-logo-frame img { max-width: 100%; max-height: 130px; width: auto; object-fit: contain; }
.partner-logo-frame.large img { max-height: 170px; }

.partners-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .partners-stack { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .partners-stack { grid-template-columns: 1fr; } }

.partner-card-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.partner-card-head .partner-logo-frame { min-height: 110px; }
.partner-card-head .partner-logo-frame img { max-height: 90px; }

.partners-note {
    display: flex; align-items: flex-start; gap: 14px;
    background: rgba(255,69,0,0.05);
    border: 1px solid rgba(255,69,0,0.15);
    border-radius: var(--radius);
    padding: 18px 22px;
    color: var(--text-2);
    font-size: 0.86rem;
    max-width: 1080px;
    margin: 26px auto 0;
}
.partners-note .icon { color: var(--accent); font-size: 1.2rem; margin-top: 2px; }

/* ============================================
   Footer
   ============================================ */
#site-footer { background: var(--bg-footer); border-top: 1px solid var(--border); padding: 70px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; color: var(--text-1); margin-bottom: 14px; }
.footer-brand img { height: 34px; }
.footer-desc { font-size: 0.9rem; color: var(--text-3); max-width: 320px; }
.footer-title { color: var(--text-1); font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; }
.footer-links { list-style: none; display: grid; gap: 10px; }
.footer-links a { color: var(--text-2); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 26px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-copy { font-size: 0.82rem; color: var(--text-3); }
.social-row { display: flex; gap: 10px; }
.social-row a {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.social-row a:hover { color: #fff; border-color: var(--accent); background: var(--accent); }

/* ============================================
   Misc
   ============================================ */
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--accent); color: #fff; padding: 12px 20px; z-index: 3000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

@media (max-width: 620px) {
    .section { padding: 70px 0; }
    #hero { padding-top: calc(var(--header-h) + 60px); }
}
