/**
 * The Unwaking — Horror FPS
 * Black & yellow theme, inspired by Gopex Games
 */

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

:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(18, 18, 18, 0.92);
    --text-primary: #f2f2f2;
    --text-muted: rgba(242, 242, 242, 0.72);
    --accent: #e6b800;
    --accent-bright: #ffd700;
    --accent-dim: rgba(230, 184, 0, 0.5);
    --border: rgba(255, 255, 255, 0.08);
    --font-display: 'Syne', sans-serif;
    --font-body: 'Roboto', Arial, sans-serif;
    --container-max: 1100px;
    --section-padding: clamp(2rem, 5vw, 4rem);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg-dark) 0%, #121212 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header */
header {
    padding: clamp(3rem, 8vw, 5rem) 1.5rem clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    border-bottom: 1px solid var(--border);
}

.game-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.25rem;
    color: var(--accent-bright);
    text-shadow: 0 2px 14px #000, 0 0 25px rgba(230, 184, 0, 0.4);
    line-height: 1.1;
}

.subtitle {
    font-size: 1.2rem;
    margin-top: 18px;
    color: var(--text-muted);
    letter-spacing: 0.035rem;
    text-shadow: 0 2px 7px #000;
}

.subtitle .accent {
    color: var(--accent);
}

/* CTA Buttons */
.cta-buttons {
    margin: 32px auto 12px auto;
    text-align: center;
}

.btn {
    display: inline-block;
    margin: 0 18px;
    padding: 15px 45px;
    border: none;
    background: linear-gradient(90deg, var(--accent) 0%, #8a7000 100%);
    color: #000;
    font-size: 1.22rem;
    font-family: var(--font-display);
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(230, 184, 0, 0.35);
    cursor: pointer;
    transition: background 0.2s, transform 0.13s;
    text-decoration: none;
    letter-spacing: 0.06rem;
}

.btn:hover {
    background: linear-gradient(90deg, var(--accent-bright) 0%, var(--accent) 100%);
    transform: scale(1.045);
}

.btn:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 3px;
}

.btn-secondary {
    background: linear-gradient(90deg, #2a2a2a 0%, #1a1a1a 100%);
    color: var(--accent);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #3a3a3a 0%, #2a2a2a 100%);
    color: var(--accent-bright);
}

.btn-sm {
    font-size: 1.09rem;
    padding: 12px 34px;
}

/* Main content wrapper */
main {
    margin: 0 auto;
    padding: 0 1.5rem 5rem 1.5rem;
    background: var(--bg-card) url('../assets/img/unwaking_body_bg.png') center / cover no-repeat;
}


/* Features Section (story) */
section.features {
    max-width: var(--container-max);
    filter: brightness(1.2);
    background: rgba(0, 0, 0, 0.25);
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
    padding: var(--section-padding);
    border: 1px solid var(--border);
}

.section-title {
    color: var(--accent);
    text-align: center;
    font-family: var(--font-display);
    letter-spacing: 0.13rem;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 700;
    text-shadow: 0 1px 13px #000;
}

.section-intro {
    text-align: center;
    font-size: 1.15rem;
    max-width: 840px;
    margin: 23px auto 38px auto;
    line-height: 1.6;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.feature {
    max-width: 340px;
    background: rgba(28, 28, 28, 0.98);
    border-radius: 8px;
    padding: 23px;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.1);
    margin: 0 8px;
    flex: 1;
    min-width: 220px;
    border: 1px solid var(--border);
    transition: border-color 0.3s, transform 0.3s;
}

.feature:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}

.feature-title {
    font-size: 1.13rem;
    font-weight: bold;
    margin-bottom: 11px;
    color: var(--accent);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.feature-description {
    font-size: 1rem;
    line-height: 1.79;
    color: var(--text-muted);
}

/* Gallery — full-width horizontal scroll */
.gallery-section {
    padding: 3rem 0 4rem;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.gallery-header {
    max-width: var(--container-max);
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    text-align: center;
}

.gallery-title {
    margin: 0;
}

.gallery-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dim) transparent;
    padding: 0.5rem 0 1.5rem;
}

.gallery-scroll::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-dim);
    border-radius: 4px;
}

.gallery-track {
    display: flex;
    gap: 1.25rem;
    padding: 0 2rem;
    justify-content: center;
    flex-wrap: nowrap;
    min-width: min-content;
}

.gallery-item {
    flex: 0 0 auto;
    width: min(320px, 85vw);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(230, 184, 0, 0.35);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.gallery-item:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(230, 184, 0, 0.2);
}

.gallery-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    vertical-align: middle;
    background: rgba(20, 20, 20, 0.8);
}

/* Play Section */
.play-section {
    text-align: center;
    margin: var(--section-padding) 0;
    padding: 2rem 0;
}

.play-section h2 {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1.65rem;
}

.play-section p {
    font-size: 1.08rem;
    margin-bottom: 24px;
    color: var(--text-muted);
}

.play-section .warning {
    color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-muted);
    padding: 2.5rem 1.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
    background: rgba(5, 5, 5, 0.6);
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Trailer Page */
.trailer-page {
    background: #000;
}

.trailer-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid var(--border);
}

.trailer-back {
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
}

.trailer-back:hover {
    color: var(--accent-bright);
}

.trailer-section {
    min-height: 100vh;
    padding: 5rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trailer-container {
    position: relative;
    width: 100vw;
    height: calc(100vh - 5rem);
    background: #000;
    cursor: pointer;
}

.trailer-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.trailer-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trailer-play-btn:hover {
    background: rgba(230, 184, 0, 0.8);
}

.trailer-play-btn svg {
    width: 48px;
    height: 48px;
    margin-left: 6px;
}

.trailer-play-btn--hidden {
    opacity: 0;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 799px) {
    .features-list {
        flex-direction: column;
        gap: 16px;
        padding: 0;
    }
    section.features {
        padding: 18px 1rem;
    }
    .feature {
        margin: 0 auto;
    }
    .cta-buttons .btn {
        margin: 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: min(280px, 90vw);
    }
    .gallery-track {
        padding: 0 1rem;
        gap: 1rem;
    }
}
