/* =============================================================================
   BarGames Landing — Marketing site styles
   Color scheme derived from the app logo: deep navy + green CTA + amber accent
   Font: Outfit (display) + DM Sans (body) via Google Fonts import in the template
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Custom properties
   --------------------------------------------------------------------------- */
:root {
    /* Brand colors */
    --landing-bg:            #1A365D;
    --landing-surface:       #15294A;
    --landing-border:        #2B4A7A;
    --landing-primary:       #38A169;
    --landing-primary-hover: #2F855A;
    --landing-accent:        #DD6B20;
    --landing-text:          #F0F4F8;
    --landing-muted:         #8BAFD4;
    --landing-dim:           #5A7FA0;

    /* Derived */
    --landing-surface-hover: #1C3360;
    --landing-primary-glow:  rgba(56, 161, 105, 0.20);
    --landing-accent-glow:   rgba(221, 107, 32, 0.20);

    /* Typography */
    --font-landing-display: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-landing-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --landing-max-width:   1200px;
    --landing-nav-height:  68px;
    --landing-radius:      12px;
    --landing-radius-lg:   20px;
    --landing-radius-full: 999px;
}

/* ---------------------------------------------------------------------------
   Font imports
   --------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--landing-bg);
    color: var(--landing-text);
    font-family: var(--font-landing-body);
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul {
    list-style: none;
}

/* ---------------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------------- */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--landing-nav-height);
    background: var(--landing-surface);
    border-bottom: 1px solid var(--landing-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 1rem;
}

/* Brand lockup */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-title {
    font-family: var(--font-landing-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--landing-text);
    letter-spacing: -0.01em;
}

/* Desktop nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    position: relative;
    padding: 0.35rem 0.75rem;
    color: var(--landing-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--landing-radius);
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--landing-text);
}

.nav-link.active {
    color: var(--landing-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: var(--landing-primary);
    border-radius: 1px;
}

/* Language toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 1rem;
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius-full);
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
}

.lang-option {
    padding: 0.25rem 0.65rem;
    color: var(--landing-dim);
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-option:hover {
    color: var(--landing-text);
    background: var(--landing-border);
}

.lang-option.active {
    background: var(--landing-primary);
    color: #fff;
}

.lang-sep {
    color: var(--landing-border);
    user-select: none;
    pointer-events: none;
}

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle-bar {
    display: block;
    height: 2px;
    background: var(--landing-muted);
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* JS-driven open state */
.nav-links.open {
    display: flex;
}

/* ---------------------------------------------------------------------------
   Hero section
   --------------------------------------------------------------------------- */
.hero {
    padding: 5rem 2rem 3.5rem;
    text-align: center;
    background: linear-gradient(180deg, var(--landing-surface) 0%, var(--landing-bg) 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background glow */
.hero::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(ellipse at center, var(--landing-primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}

.hero-label {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid rgba(56, 161, 105, 0.4);
    border-radius: var(--landing-radius-full);
    background: rgba(56, 161, 105, 0.10);
    color: var(--landing-primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-landing-display);
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 800;
    color: var(--landing-text);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.hero-title .accent {
    color: var(--landing-primary);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--landing-muted);
    line-height: 1.6;
    margin-bottom: 2.25rem;
    font-weight: 300;
}

/* CTA button */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--landing-primary);
    color: #fff;
    font-family: var(--font-landing-body);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--landing-radius-full);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px var(--landing-primary-glow);
}

.btn-cta:hover {
    background: var(--landing-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--landing-primary-glow);
}

.btn-cta:active {
    transform: translateY(0);
}

/* Hero brand image (large illustrated logo) */
.hero-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-brand-img {
    max-width: 650px;
    width: 100%;
    height: auto;
    display: inline-block;
}

/* Hero screenshot container (used on features page) */
.hero-img {
    margin: 3rem auto 0;
    max-width: 900px;
    border-radius: var(--landing-radius-lg);
    border: 1px solid var(--landing-border);
    background: var(--landing-surface);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--landing-border);
}

.hero-img img {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: block;
}

/* ---------------------------------------------------------------------------
   Section scaffold
   --------------------------------------------------------------------------- */
.section {
    padding: 5rem 2rem;
}

.section-inner {
    max-width: var(--landing-max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.section-label {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--landing-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-landing-display);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--landing-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.section-desc {
    color: var(--landing-muted);
    font-size: 1.05rem;
    font-weight: 300;
}

/* ---------------------------------------------------------------------------
   Selling points grid
   --------------------------------------------------------------------------- */
.points-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.point-card {
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius);
    padding: 1.75rem 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.point-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 161, 105, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.point-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    display: block;
    line-height: 1;
}

.point-icon-img {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.point-title {
    font-family: var(--font-landing-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--landing-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.point-desc {
    color: var(--landing-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 300;
}

/* ---------------------------------------------------------------------------
   Feature sections (alternating image + text)
   --------------------------------------------------------------------------- */
.features-section {
    padding: 5rem 2rem;
}

.features-section .section-inner {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    max-width: var(--landing-max-width);
    margin: 0 auto;
    width: 100%;
}

/* Even rows: text left, image right */
.feature-row:nth-child(even) .feature-img {
    order: 1;
}

.feature-row:nth-child(even) .feature-text {
    order: 0;
}

.feature-img {
    max-width: 500px;
    width: 100%;
}

.feature-row-wide {
    grid-template-columns: 3fr 2fr;
}

.feature-row-wide:nth-child(even) {
    grid-template-columns: 2fr 3fr;
}

.feature-img.wide {
    max-width: 100%;
}

.feature-img img {
    width: 100%;
    height: auto;
    border-radius: var(--landing-radius);
    border: 1px solid var(--landing-border);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.feature-eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--landing-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.feature-title {
    font-family: var(--font-landing-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--landing-text);
    letter-spacing: -0.02em;
    line-height: 1.22;
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--landing-muted);
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 300;
}

/* Feature list inside text block */
.feature-list {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--landing-muted);
    font-size: 0.92rem;
}

.feature-list li::before {
    content: '✓';
    color: var(--landing-primary);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.05em;
}

/* ---------------------------------------------------------------------------
   Contact form
   --------------------------------------------------------------------------- */
.contact-section {
    padding: 5rem 2rem;
}

.contact-form-wrap {
    max-width: 500px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--landing-muted);
    letter-spacing: 0.02em;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--landing-bg);
    border: 1px solid var(--landing-border);
    border-radius: var(--landing-radius);
    color: var(--landing-text);
    font-family: var(--font-landing-body);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--landing-dim);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--landing-primary);
    box-shadow: 0 0 0 3px var(--landing-primary-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.btn-submit {
    padding: 0.85rem 1.5rem;
    background: var(--landing-primary);
    color: #fff;
    font-family: var(--font-landing-body);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--landing-radius-full);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px var(--landing-primary-glow);
    width: 100%;
}

.btn-submit:hover {
    background: var(--landing-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--landing-primary-glow);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Feedback messages */
.form-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: var(--landing-radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background: rgba(56, 161, 105, 0.12);
    border: 1px solid rgba(56, 161, 105, 0.35);
    color: #68D391;
}

.form-message.error {
    display: block;
    background: rgba(245, 101, 101, 0.12);
    border: 1px solid rgba(245, 101, 101, 0.35);
    color: #FC8181;
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.landing-footer {
    background: var(--landing-surface);
    border-top: 1px solid var(--landing-border);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--landing-dim);
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--landing-dim);
    transition: color 0.2s ease;
}

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

/* ---------------------------------------------------------------------------
   Responsive — tablet (≤ 900px)
   --------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .points-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-row,
    .feature-row-wide,
    .feature-row-wide:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Mobile: text above image for all rows */
    .feature-row .feature-text {
        order: 0 !important;
    }

    .feature-row .feature-img {
        order: 1 !important;
    }

    .feature-img {
        max-width: 100%;
    }
}

/* ---------------------------------------------------------------------------
   Responsive — mobile (≤ 768px)
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Nav */
    .landing-nav {
        padding: 0 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--landing-nav-height);
        left: 0;
        right: 0;
        background: var(--landing-surface);
        border-bottom: 1px solid var(--landing-border);
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1.25rem 1rem;
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.65rem 0.75rem;
        font-size: 1rem;
    }

    .nav-link.active::after {
        display: none;
    }

    .lang-toggle {
        margin-left: 0;
        margin-top: 0.5rem;
        align-self: flex-start;
    }

    /* Hero */
    .hero {
        padding: 3.5rem 1.25rem 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-brand-img {
        max-width: 320px;
    }

    .hero-img {
        margin-top: 2rem;
    }

    /* Sections */
    .section,
    .features-section,
    .contact-section {
        padding: 3.5rem 1.25rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Points */
    .points-grid {
        grid-template-columns: 1fr;
    }

    /* Feature rows */
    .features-section .section-inner {
        gap: 3.5rem;
    }

    /* Footer */
    .landing-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
