/* ============================================================
   DM FIRST GAMES - Design System
   Color palette extracted from logo/favicon:
   Deep Emerald Green + Rich Gold/Amber
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Design Tokens ── */
:root {
    /* Brand Colors - from logo */
    --dm-dark: #091A14;
    --dm-dark-alt: #0C231B;
    --dm-green: #0D3B2E;
    --dm-green-light: #14532D;
    --dm-emerald: #166534;
    --dm-gold: #D4A843;
    --dm-gold-light: #E8C35A;
    --dm-gold-dark: #B8922E;
    --dm-gold-pale: #F5E6B8;

    /* Neutral Palette */
    --dm-white: #F5F1E8;
    --dm-white-pure: #FFFFFF;
    --dm-muted: #9CA88F;
    --dm-muted-light: #B8C4A8;
    --dm-gray: #6B7A5E;

    /* Semantic Colors */
    --text-primary: #F5F1E8;
    --text-secondary: #9CA88F;
    --text-heading: #FFFFFF;
    --text-gold: #D4A843;
    --text-gold-light: #E8C35A;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #D4A843 0%, #E8C35A 50%, #D4A843 100%);
    --gradient-gold-hover: linear-gradient(135deg, #E8C35A 0%, #F5E6B8 50%, #E8C35A 100%);
    --gradient-green: linear-gradient(135deg, #0D3B2E 0%, #14532D 100%);
    --gradient-dark: linear-gradient(135deg, #091A14 0%, #0C231B 50%, #091A14 100%);
    --gradient-text: linear-gradient(135deg, #D4A843 0%, #E8C35A 40%, #D4A843 100%);
    --gradient-hero: radial-gradient(ellipse at 50% 0%, #0D3B2E 0%, #091A14 70%);

    /* Glass Effects */
    --glass-bg: rgba(13, 59, 46, 0.35);
    --glass-bg-hover: rgba(13, 59, 46, 0.55);
    --glass-border: rgba(212, 168, 67, 0.12);
    --glass-border-hover: rgba(212, 168, 67, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-shadow-hover: 0 20px 40px rgba(212, 168, 67, 0.15);

    /* Button Effects */
    --btn-gold-shadow: 0 4px 20px rgba(212, 168, 67, 0.35);
    --btn-gold-shadow-hover: 0 8px 30px rgba(212, 168, 67, 0.55);
    --btn-green-shadow: 0 4px 20px rgba(20, 83, 45, 0.4);
    --btn-green-shadow-hover: 0 8px 30px rgba(20, 83, 45, 0.6);

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 900px;
    --header-height: 70px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-full: 50px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dm-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    font-weight: 900;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Layout Utilities ── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container--narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: 5rem 0;
}

.section--compact {
    padding: 3.5rem 0;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--text-gold);
}

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

/* ── Grid System ── */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

@media (min-width: 768px) {
    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dm-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-gold);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dm-gold-light);
}

/* ── Header ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(9, 26, 20, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    transition: background var(--transition-normal);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.header__logo {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.header__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.btn--gold {
    background: var(--gradient-gold);
    color: var(--dm-dark);
    box-shadow: var(--btn-gold-shadow);
}

.btn--gold:hover {
    background: var(--gradient-gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--btn-gold-shadow-hover);
}

.btn--green {
    background: var(--gradient-green);
    color: var(--dm-gold-light);
    border: 1px solid var(--glass-border);
    box-shadow: var(--btn-green-shadow);
}

.btn--green:hover {
    transform: translateY(-2px);
    box-shadow: var(--btn-green-shadow-hover);
    border-color: var(--dm-gold);
    color: var(--dm-gold);
}

.btn--lg {
    padding: 1rem 2.75rem;
    font-size: 1.1rem;
}

.btn--sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
}

.btn--header {
    padding: 0.55rem 1.4rem;
    font-size: 0.85rem;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Glass Card ── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-hover);
    border-color: var(--glass-border-hover);
}

.glass-card--static {
    transition: none;
}

.glass-card--static:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
    border-color: var(--glass-border);
}

/* ── Hero Section ── */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 3rem) 1.25rem 4rem;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 30% 20%, rgba(212, 168, 67, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(20, 83, 45, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(2%, -2%) scale(1.05); }
}

.hero__content {
    max-width: 820px;
    position: relative;
    z-index: 2;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--dm-gold);
    margin-bottom: 1.75rem;
}

.hero__badge svg {
    width: 16px;
    height: 16px;
    fill: var(--dm-gold);
}

.hero__title {
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    font-weight: 400;
}

.hero__buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

@media (min-width: 480px) {
    .hero__buttons {
        flex-direction: row;
        gap: 1.25rem;
    }
}

/* ── Section Header ── */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header p {
    max-width: 700px;
    margin: 0.75rem auto 0;
    font-size: 1.1rem;
}

/* ── Feature / Benefit Cards ── */
.benefit-card {
    padding: 2rem;
}

.benefit-card__icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid rgba(212, 168, 67, 0.15);
}

.benefit-card__icon svg {
    width: 28px;
    height: 28px;
    color: var(--dm-gold);
    stroke: var(--dm-gold);
}

.benefit-card__icon--green {
    background: rgba(20, 83, 45, 0.25);
    border-color: rgba(20, 83, 45, 0.4);
}

.benefit-card__icon--green svg {
    color: var(--dm-gold-light);
    stroke: var(--dm-gold-light);
}

.benefit-card h3 {
    margin-bottom: 0.75rem;
}

.benefit-card p {
    margin-bottom: 0;
    line-height: 1.7;
}

/* ── Feature Card (centered) ── */
.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.feature-card__icon {
    width: 72px;
    height: 72px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.12), rgba(20, 83, 45, 0.2));
    border: 1px solid rgba(212, 168, 67, 0.12);
}

.feature-card__icon svg {
    width: 32px;
    height: 32px;
    color: var(--dm-gold);
    stroke: var(--dm-gold);
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    margin-bottom: 0;
}

/* ── Content Block (glass card for text sections) ── */
.content-block {
    padding: 2.5rem;
}

.content-block h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.content-block p {
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-block p + p {
    margin-top: 0.25rem;
}

.text-accent {
    color: var(--dm-gold);
    font-weight: 600;
}

/* ── Steps ── */
.steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step {
    padding: 1.75rem 2rem;
}

.step__inner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.step__number {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: var(--dm-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(212, 168, 67, 0.3);
}

.step__content {
    flex: 1;
}

.step__content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

.step__content p {
    margin-bottom: 0;
    line-height: 1.7;
}

/* Invite code callout */
.invite-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(212, 168, 67, 0.08);
    border: 1px dashed rgba(212, 168, 67, 0.35);
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 1rem;
    color: var(--dm-gold-light);
    animation: codePulse 3s ease-in-out infinite;
}

.invite-code__label {
    color: var(--text-secondary);
    font-weight: 500;
}

.invite-code__value {
    color: var(--dm-gold-light);
    font-family: 'Courier New', monospace;
    font-weight: 800;
    letter-spacing: 0.05em;
}

@keyframes codePulse {
    0%, 100% { opacity: 1; border-color: rgba(212, 168, 67, 0.35); }
    50% { opacity: 0.85; border-color: rgba(212, 168, 67, 0.55); }
}

/* ── FAQ / Accordion ── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.faq-item {
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    cursor: pointer;
    list-style: none;
    transition: color var(--transition-fast);
    gap: 1rem;
}

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

.faq-item summary::marker {
    display: none;
    content: '';
}

.faq-item summary .faq-chevron {
    width: 20px;
    height: 20px;
    min-width: 20px;
    color: var(--dm-gold);
    transition: transform var(--transition-normal);
}

.faq-item[open] summary {
    color: var(--dm-gold);
}

.faq-item[open] summary .faq-chevron {
    transform: rotate(180deg);
}

.faq-item .faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.98rem;
}

/* ── CTA Section ── */
.cta-section {
    padding: 3.5rem 2.5rem;
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.15rem;
}

/* ── Footer ── */
.footer {
    background: rgba(9, 26, 20, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
}

.footer__brand {
    text-align: center;
    margin-bottom: 2rem;
}

.footer__brand h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dm-gold);
}

.footer__brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer__divider {
    height: 1px;
    background: var(--glass-border);
    margin-bottom: 1.5rem;
}

.footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer__copyright {
    font-size: 0.85rem;
    color: var(--dm-muted);
}

.footer__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.85rem;
}

.footer__links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--dm-gold);
}

.footer__links .separator {
    color: rgba(212, 168, 67, 0.2);
}

@media (min-width: 768px) {
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ── Responsive Adjustments ── */
@media (max-width: 768px) {
    .section {
        padding: 3.5rem 0;
    }

    .content-block {
        padding: 1.75rem;
    }

    .step {
        padding: 1.25rem 1.5rem;
    }

    .benefit-card,
    .feature-card {
        padding: 1.5rem;
    }

    .cta-section {
        padding: 2.5rem 1.5rem;
    }

    .hero {
        min-height: 75vh;
        padding-top: calc(var(--header-height) + 2rem);
    }

    .hero__subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .header__logo {
        height: 36px;
    }

    .btn--header {
        padding: 0.45rem 1rem;
        font-size: 0.78rem;
    }

    .step__inner {
        gap: 1rem;
    }

    .step__number {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 0.95rem;
    }
}

/* ── Print ── */
@media print {
    .header, .footer, .btn {
        display: none;
    }

    body {
        background: #fff;
        color: #111;
    }
}