/* ===========================================================================
   OMG Studios — Site Institucional
   Tema claro/escuro (dark default) via CSS variables
   =========================================================================== */

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1140px;
    --radius: 14px;
    --radius-sm: 10px;
    --transition: 0.25s ease;
}

/* Dark theme (default) */
:root,
[data-theme="dark"] {
    --bg: #0e0e12;
    --bg-alt: #16161d;
    --bg-elevated: #1c1c26;
    --surface: #20202c;
    --border: #2c2c3a;
    --text: #f2f2f5;
    --text-muted: #a0a0b0;
    --accent: #ffcc00;
    --accent-hover: #ffd633;
    --accent-text: #0e0e12;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.3);
    --overlay: rgba(0, 0, 0, 0.7);
}

/* Light theme */
[data-theme="light"] {
    --bg: #f7f8fa;
    --bg-alt: #ffffff;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --border: #e4e6ec;
    --text: #1a1a24;
    --text-muted: #5f6372;
    --accent: #c89500;
    --accent-hover: #b38500;
    --accent-text: #ffffff;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
    --overlay: rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

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

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

/* ===========================================================================
   Buttons
   =========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

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

/* ===========================================================================
   Navbar
   =========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand { display: flex; align-items: center; gap: 12px; }

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

.brand-name {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

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

.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition);
    background: none;
    border: none;
    font-family: var(--font);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); }

/* Dropdown */
.dropdown { position: relative; }

.caret { transition: transform var(--transition); }
.dropdown.open .caret { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.dropdown-item:hover { background: var(--surface); }
.dropdown-item-name { font-weight: 600; font-size: 0.92rem; }
.dropdown-item-tag { font-size: 0.8rem; color: var(--text-muted); }

/* Nav actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: 8px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
}
.lang-switch a { color: var(--text-muted); transition: color var(--transition); }
.lang-switch a.active { color: var(--accent); }
.lang-switch a:hover { color: var(--text); }
.lang-sep { color: var(--text-muted); opacity: 0.5; }

.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================================================================
   Hero
   =========================================================================== */
.hero {
    padding: 90px 0 70px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
}

.hero-logo {
    width: 130px;
    height: 130px;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 18px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto 34px;
}

.hero-inner .btn { margin-top: 6px; }

/* ===========================================================================
   Sections
   =========================================================================== */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }
.section-hero { padding-top: 64px; }

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 44px;
    font-size: 1.05rem;
}

.section-text {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.section .btn { display: block; margin: 28px auto 0; }

.section-lead {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-top: 8px;
}

.prose { max-width: 720px; }
.prose p { margin-bottom: 18px; font-size: 1.05rem; color: var(--text-muted); }

.mission-text { font-style: italic; }

/* Values grid */
.values-grid, .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.value-card, .game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}
.value-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.value-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.value-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Game cards */
.game-card { padding: 0; overflow: hidden; }
.game-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }

.game-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.game-card-media img { width: 100%; height: 100%; object-fit: cover; }

.badge-mobile {
    position: absolute;
    top: 12px;
    right: 12px;
    background: color-mix(in srgb, var(--accent) 90%, transparent);
    color: var(--accent-text);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card-body { padding: 24px; }
.game-card-title { font-size: 1.3rem; margin-bottom: 6px; }
.game-card-tagline { color: var(--accent); font-weight: 600; font-size: 0.92rem; margin-bottom: 10px; }
.game-card-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }

.game-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* CTA section */
.cta-section {
    text-align: center;
    background:
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
.cta-inner .btn { margin-top: 24px; }

/* ===========================================================================
   Contact
   =========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.85rem; font-weight: 600; }

.form-field input,
.form-field textarea {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border var(--transition);
    resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form .btn { align-self: flex-start; margin-top: 6px; }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 8px;
}

.info-block { display: flex; flex-direction: column; gap: 10px; }
.info-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 1.05rem; font-weight: 600; }
.info-value:hover { color: var(--accent); }

/* ===========================================================================
   Social icons
   =========================================================================== */
.social-icons { display: flex; gap: 12px; }
.social-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    transition: all var(--transition);
}
.social-icon:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* ===========================================================================
   Flash messages
   =========================================================================== */
.flash-wrap { padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.flash {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
}
.flash-success { background: color-mix(in srgb, #2f9e5f 18%, transparent); border: 1px solid #2f9e5f; }
.flash-error { background: color-mix(in srgb, #c0455a 18%, transparent); border: 1px solid #c0455a; }

/* ===========================================================================
   Footer
   =========================================================================== */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 48px 0 28px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.footer-brand strong { display: block; font-size: 1rem; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--text-muted); font-size: 0.92rem; transition: color var(--transition); }
.footer-nav a:hover { color: var(--accent); }

.footer-social { display: flex; flex-direction: column; gap: 14px; }
.footer-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.footer-bottom { padding-top: 22px; text-align: center; }
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 860px) {
    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        box-shadow: var(--shadow);
        transform: translateY(-150%);
        transition: transform var(--transition);
        max-height: calc(100vh - 68px);
        overflow-y: auto;
    }
    .nav-links.open { transform: translateY(0); }

    .nav-link { padding: 14px 12px; border-radius: 0; }
    .nav-link:hover, .nav-link.active { background: var(--surface); }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-alt);
        margin: 0 0 4px;
        display: none;
    }
    .dropdown.open .dropdown-menu { display: block; }

    .nav-actions {
        margin-left: 0;
        padding: 14px 12px 6px;
        justify-content: center;
        border-top: 1px solid var(--border);
        margin-top: 8px;
    }

    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 520px) {
    .hero { padding: 56px 0 48px; }
    .section { padding: 52px 0; }
    .container { padding: 0 18px; }
    .contact-form { padding: 22px; }
    .hero-logo { width: 100px; height: 100px; }
}
