/**
 * Opera GX Prelander - Gaming Performance Focus
 * Mobile-first, system fonts, dark gaming aesthetic
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Opera GX Colors */
    --gx-red: #FF1B2D;
    --gx-red-dark: #D91424;
    --gx-red-glow: rgba(255, 27, 45, 0.35);
    --gx-cyan: #00E5FF;
    
    /* Backgrounds */
    --bg-dark: #0C0C0C;
    --bg-card: #151515;
    --bg-elevated: #1A1A1A;
    
    /* Borders */
    --border: #2A2A2A;
    
    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8B8;
    --text-muted: #6A6A6A;
    
    /* System Font Stack */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    
    /* Effects */
    --transition: 0.2s ease;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --glow: 0 0 30px var(--gx-red-glow);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER (Sticky)
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.logo:hover {
    color: var(--gx-red);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gx-red);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--gx-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--gx-cyan);
    outline-offset: 3px;
}

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

.btn-sm {
    padding: 10px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 40px 0 30px;
    position: relative;
    background: var(--bg-dark);
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 27, 45, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 50px;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--gx-red), rgba(255, 27, 45, 0.3));
    border-radius: 14px;
    z-index: -1;
    opacity: 0.6;
}

.hero-image::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 10%;
    right: 10%;
    height: 25px;
    background: var(--gx-red);
    filter: blur(25px);
    opacity: 0.25;
    border-radius: 50%;
}

.hero-headline {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 480px;
}

/* ============================================
   PAIN POINTS LIST
   ============================================ */
.pain-list {
    list-style: none;
    text-align: left;
    max-width: 420px;
    margin: 0 0 20px 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
}

.pain-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.pain-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pain-list li:first-child {
    padding-top: 0;
}

.pain-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1.5;
}

/* ============================================
   HERO INSIGHT & SOCIAL PROOF
   ============================================ */
.hero-insight {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-style: italic;
}

.social-proof {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border-left: 3px solid var(--gx-red);
    border-radius: 0 8px 8px 0;
    text-align: left;
    max-width: 460px;
    line-height: 1.7;
}

.social-proof span {
    color: var(--gx-cyan);
    font-weight: 600;
}

.hero-ctas {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
}

/* ============================================
   FINAL CTA SECTION
   ============================================ */
.final-cta {
    padding: 40px 0 50px;
    background: var(--bg-dark);
}

.final-cta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .final-cta-grid {
        grid-template-columns: 0.9fr 1.1fr;
        gap: 50px;
    }
}

.final-cta-image {
    position: relative;
}

.final-cta-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.final-cta-image::before {
    content: '';
    position: absolute;
    inset: -3px;
    max-width: 406px;
    background: linear-gradient(135deg, var(--gx-red), rgba(255, 27, 45, 0.3));
    border-radius: 14px;
    z-index: -1;
    opacity: 0.6;
}

.final-cta-content h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.final-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--gx-cyan);
    color: var(--gx-cyan);
    transform: translateY(-2px);
}

.final-micro {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

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

.footer-links button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.footer-links button:hover {
    color: var(--gx-red);
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.disclaimer span {
    color: var(--text-secondary);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--gx-red);
}

.modal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-right: 30px;
    color: var(--gx-red);
}

.modal-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 20px 0 8px;
    color: var(--text-primary);
}

.modal-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.modal-body strong {
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .hero-grid {
        text-align: center;
    }
    
    .hero-image {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .pain-list {
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-proof {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .final-cta-image {
        order: -1;
        text-align: center;
    }
    
    .final-cta-content {
        text-align: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-inner {
        gap: 12px;
    }
    
    .logo {
        height: 24px;
    }
    
    .btn-sm {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
    
    .hero-ctas {
        gap: 12px;
    }
    
    .hero {
        padding: 30px 0 20px;
    }
    
    .pain-list {
        padding: 20px 22px;
    }
    
    .pain-list li {
        font-size: 0.85rem;
        gap: 10px;
    }
    
    .social-proof {
        padding: 16px 20px;
        font-size: 0.9rem;
    }
    
    .final-cta {
        padding: 32px 0 48px;
    }
    
    .final-cta-image {
        text-align: center;
    }
    
    .final-cta-image img {
        max-width: 300px;
    }
    
    .final-cta-image::before {
        max-width: 306px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .final-cta-content {
        text-align: center;
    }
    
    .cta-buttons {
        justify-content: center;
        gap: 12px;
    }
    
    .cta-buttons .btn {
        padding: 14px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 380px) {
    .hero-ctas {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-ctas .btn {
        flex: 1 1 100%;
        text-align: center;
    }
    
    .cta-buttons {
        flex-wrap: wrap;
    }
    
    .cta-buttons .btn {
        flex: 1 1 100%;
        text-align: center;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard users */
:focus-visible {
    outline: 2px solid var(--gx-cyan);
    outline-offset: 3px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #444;
        --text-secondary: #CCC;
        --text-muted: #999;
    }
}
