/* =========================
   style.css
   ========================= */
:root {
    --bg: #0b0604;
    --bg-alt: #150b07;
    --border: #ff8a3c;
    --accent: #ff3b1f;
    --text-main: #ffeede;
    --text-dim: #ffb48a;
    --scanline-strength: 0.16;
    --nav-height: 70px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

/* BODY + CRT OVERLAYS */

body {
    background: radial-gradient(circle at top, #251008 0%, #080301 60%, #000000 100%);
    color: var(--text-main);
    font-family: "Press Start 2P", system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, var(--scanline-strength)) 0,
        rgba(255, 255, 255, var(--scanline-strength)) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.4;
    mix-blend-mode: soft-light;
    z-index: 999;
    animation: flicker 5s infinite steps(1, end);
}

body::after {
    content: "";
    pointer-events: none;
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, transparent 0, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 998;
}

/* OUTER SCREEN FRAME */

.screen {
    position: relative;
    width: 100%;
    max-width: 1200px;
    min-height: 80vh;
    padding: 0 24px 24px;
    border-radius: 14px;
    border: 4px solid var(--border);
    background:
        radial-gradient(circle at top, #281309 0%, #0b0503 50%, #050101 100%);
    box-shadow:
        0 0 40px rgba(255, 138, 60, 0.25),
        0 0 100px rgba(255, 59, 31, 0.2);
    overflow: hidden;
}

/* NAV */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
    backdrop-filter: blur(6px);
}

.logo {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
    color: var(--accent);
}

.logo-bracket {
    color: var(--border);
}

.nav-links {
    display: flex;
    gap: 18px;
    font-size: 0.55rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    position: relative;
    transition: 0.15s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--text-main);
}

.nav-links a.active::after {
    width: 100%;
}

/* PAGE SYSTEM */

.page:not(.active) {
    display: none;
}

/* HERO LAYOUT */

.hero {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 40px;
    padding-top: 60px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.site-logo img {
    width: 110px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 0 14px rgba(255, 138, 60, 0.6));
}

.hero-inner {
    text-align: left !important;
}

.hero-label {
    font-size: 0.55rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 18px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-meta {
    margin-top: 14px;
    font-size: 0.55rem;
    color: var(--text-dim);
}

/* HERO GLOW */

.hero-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 138, 60, 0.26) 0%, transparent 70%);
    filter: blur(8px);
    opacity: 0.6;
    mix-blend-mode: screen;
    transform: translate(-50%, -50%);
}

/* GLITCH TEXT */

.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    width: 100%;
}

.glitch::before {
    text-shadow: -2px 0 var(--accent);
    animation: glitch-1 2.4s infinite;
}

.glitch::after {
    text-shadow: 2px 0 var(--border);
    animation: glitch-2 3s infinite;
}

/* BUTTONS */

.btn {
    font-size: 0.6rem;
    padding: 10px 18px;
    border-radius: 6px;
    border: 2px solid var(--border);
    text-decoration: none;
    background: rgba(0,0,0,0.5);
    color: var(--text-main);
    transition: 0.2s;
}

.btn.primary {
    background: linear-gradient(130deg, rgba(255,138,60,0.25), rgba(255,59,31,0.25));
}

.btn.ghost {
    background: rgba(0,0,0,0.6);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(255, 138, 60, 0.7);
}

/* GENERAL SECTIONS */

.section {
    padding: 40px 0;
}

.section-bordered {
    border-top: 1px solid rgba(255,138,60,0.26);
}

.section-dark {
    background: radial-gradient(circle at top, #1a0803 0%, #060201 80%);
}

.section-header h2 {
    font-size: 1.1rem;
}

.section-tag {
    font-size: 0.55rem;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 8px;
}

.section-intro {
    font-size: 0.65rem;
    color: var(--text-dim);
    max-width: 720px;
}

/* TRAILER */

.trailer-wrapper {
    margin-top: 22px;
}

.crt-frame {
    border-radius: 10px;
    border: 3px solid var(--border);
    padding: 4px;
    background: radial-gradient(circle at top, #2a0f07 0%, #050507 90%);
    box-shadow:
        0 0 30px rgba(255,138,60,0.4),
        inset 0 0 40px rgba(0,0,0,0.9);
    position: relative;
}

.crt-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none; /* IMPORTANT: so iframe can be clicked */
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.04) 0,
        rgba(255,255,255,0.04) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.6;
    mix-blend-mode: soft-light;
}

.crt-frame iframe {
    width: 100%;
    height: min(420px, 56vw);
}

/* STEAM LINK */

.steam-link a {
    display: inline-block;
    margin: 12px 0 20px;
    padding: 8px 12px;
    font-size: 0.65rem;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(255,59,31,0.5);
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(255,59,31,0.25);
    transition: 0.2s;
}

.steam-link a:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255,59,31,0.55);
}

/* FEATURE GRID */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.feature-card {
    border-radius: 8px;
    border: 1px solid rgba(255,138,60,0.35);
    padding: 14px;
    background: radial-gradient(circle at top left, #2b1308 0%, #080201 75%);
    font-size: 0.6rem;
}

/* NEWS */

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.news-card {
    border-radius: 8px;
    border: 1px solid rgba(255,138,60,0.3);
    padding: 14px;
    background: #140703;
    font-size: 0.6rem;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}

.news-card:hover {
    box-shadow: 0 0 18px rgba(255,138,60,0.4);
    transform: translateY(-1px);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-toggle {
    font-size: 0.8rem;
    color: var(--accent);
}

.news-summary {
    margin-top: 8px;
}

.news-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    margin-top: 4px;
    color: var(--text-dim);
}

.news-full p {
    margin: 6px 0;
}

.news-card.expanded .news-full {
    max-height: 400px;
}

.news-footer {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.55rem;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255,138,60,0.5);
}

/* X / Twitter Feed */
.x-feed{
    margin: 16px 0 26px;
    width: min(680px, 100%);
    padding: 14px;
    border: 1px solid rgba(255,138,60,0.30);
    border-radius: 10px;
    background: radial-gradient(circle at top left, #2b1308 0%, rgba(0,0,0,0.55) 70%);
    box-shadow: 0 0 18px rgba(255,138,60,0.22);
}

.x-feed-title{
    margin: 0 0 10px;
    font-size: 0.55rem;
    color: var(--accent);
    opacity: 0.95;
}

/* ABOUT / STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stat-card {
    border-radius: 6px;
    border: 1px solid rgba(255,138,60,0.4);
    padding: 8px 10px;
    font-size: 0.6rem;
}

.stat-label {
    font-size: 0.55rem;
    color: var(--text-dim);
}

.stat-value {
    font-size: 0.7rem;
}

.team-list {
    list-style: disc;
    padding-left: 20px;
}

.team-list li {
    margin-bottom: 4px;
}

/* ABOUT TEXT */

.about-text {
    margin-top: 18px;
}

.about-text p {
    font-size: 0.55rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* CONTACT GRID */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.contact-card {
    border-radius: 8px;
    padding: 14px;
    border: 1px solid rgba(255,138,60,0.4);
    font-size: 0.6rem;
}

/* CONTACT FORM (UPDATED) */

.contact-form {
    margin: 40px auto;
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(255,138,60,0.5);
    padding: 30px;
    border-radius: 14px;
    background: rgba(0,0,0,0.45);
    box-shadow: 0 0 25px rgba(255,138,60,0.25);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 0.65rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: #140703;
    color: var(--text-main);
    font-family: "Press Start 2P", monospace;
    font-size: 0.55rem;
    resize: none;
}

/* Larger textbox */
.contact-form textarea {
    height: 200px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(255,59,31,0.6);
}

.error-msg {
    font-size: 0.5rem;
    color: #ff3b1f;
    margin-top: 6px;
}

.form-submit {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.6rem;
    background: linear-gradient(140deg, rgba(255,138,60,0.35), rgba(255,59,31,0.35));
    border: 2px solid var(--border);
    border-radius: 10px;
    text-align: center;
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s ease;
}

.form-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 22px rgba(255,138,60,0.8);
}

.form-status {
    margin-top: 15px;
    font-size: 0.6rem;
    color: var(--accent);
    text-align: center;
}

/* FOOTER */

.footer {
    border-top: 1px solid rgba(255,138,60,0.28);
    padding-top: 10px;
    font-size: 0.55rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-dim);
}

/* ANIMATIONS */

@keyframes flicker {
    0%, 19%, 21%, 23%, 100% { opacity: 0.35; }
    20%, 22% { opacity: 0.25; }
}

@keyframes glitch-1 {
    0% { clip-path: inset(0 0 80% 0); }
    25% { clip-path: inset(20% 0 40% 0); }
    50% { clip-path: inset(40% 0 20% 0); }
    75% { clip-path: inset(10% 0 60% 0); }
    100% { clip-path: inset(0 0 80% 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(80% 0 0 0); }
    25% { clip-path: inset(40% 0 40% 0); }
    50% { clip-path: inset(20% 0 60% 0); }
    75% { clip-path: inset(60% 0 20% 0); }
    100% { clip-path: inset(0 0 80% 0); }
}

/* RESPONSIVE FIXES */

@media (max-width: 900px) {
    .news-grid { grid-template-columns: repeat(2,1fr); }
    .stats-grid { grid-template-columns: repeat(2,1fr); }
    .contact-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 640px) {
    .screen { padding: 0 14px 14px; }

    .hero {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .hero-inner { text-align: center !important; }

    .feature-grid,
    .news-grid,
    .stats-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-glow { display: none; }
}
