/* M80 Games — shared site styles */

:root {
    --bg: #0a0b0e;
    --surface: #121419;
    --surface-2: #1a1d24;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #ece8df;
    --muted: #9b9ea7;
    --cream: #f7f0e0;
    --accent: #e0352f;
    --accent-hover: #f04a43;
    --accent-deep: #8e1414;
    --accent-soft: rgba(224, 53, 47, 0.12);

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius: 14px;
    --radius-sm: 8px;
    --container: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --nav-height: 72px;
}

/* ---------- Base ---------- */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--cream);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3,
.h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p {
    margin: 0 0 1em;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 2000;
    background: var(--cream);
    color: var(--bg);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}

/* ---------- Layout ---------- */

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

.section {
    padding: clamp(64px, 10vw, 120px) 0;
}

.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    max-width: 720px;
    margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--muted);
    max-width: 640px;
}

.muted {
    color: var(--muted);
}

.nowrap {
    white-space: nowrap;
}

.divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: clamp(48px, 7vw, 80px) 0;
}

.grid-2,
.grid-3 {
    display: grid;
    gap: clamp(20px, 3vw, 32px);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line-strong);
    color: var(--cream);
}

.btn-ghost:hover {
    border-color: var(--cream);
    background: rgba(255, 255, 255, 0.08);
}

.text-link {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--cream);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
}

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

/* ---------- Navigation ---------- */

nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(10, 11, 14, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.nav-logo img {
    height: 38px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.93rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
    color: var(--cream);
}

.nav-links a[aria-current="page"] {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.07);
}

.nav-links .nav-cta {
    margin-left: 8px;
    color: #fff;
    background: var(--accent);
}

.nav-links .nav-cta:hover,
.nav-links .nav-cta[aria-current="page"] {
    color: #fff;
    background: var(--accent-hover);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    margin-left: -10px;
    background: var(--cream);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before { content: ""; top: -6px; left: 0; margin-left: 0; }
.nav-toggle span::after { content: ""; top: 6px; left: 0; margin-left: 0; }

.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px var(--gutter) 24px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        display: none;
    }

    .nav-open .nav-links {
        display: flex;
    }

    .nav-links a {
        padding: 12px 14px;
        font-size: 1.05rem;
        border-radius: var(--radius-sm);
    }

    .nav-links .nav-cta {
        margin: 8px 0 0;
        text-align: center;
    }
}

main {
    padding-top: var(--nav-height);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: min(88vh, 820px);
    display: flex;
    align-items: flex-end;
    padding: 120px 0 clamp(56px, 8vw, 96px);
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 11, 14, 0.94) 0%, rgba(10, 11, 14, 0.7) 45%, rgba(10, 11, 14, 0.2) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(10, 11, 14, 0) 40%);
}

.hero h1 {
    max-width: 14ch;
}

.hero .lead {
    color: #c9c6be;
}

.page-hero {
    padding: clamp(72px, 10vw, 120px) 0 clamp(40px, 6vw, 64px);
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse 60% 80% at 85% 0%, rgba(224, 53, 47, 0.14), transparent 70%),
        var(--bg);
}

.page-hero h1 {
    max-width: 18ch;
}

/* ---------- Cards & pillars ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 3vw, 36px);
}

.section-alt .card {
    background: var(--surface-2);
}

.card p:last-child {
    margin-bottom: 0;
}

.pillar-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 700;
}

.check-list,
.cross-list,
.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.check-list li,
.cross-list li,
.feature-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.check-list li::before,
.cross-list li::before,
.feature-list li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}

.check-list li::before { content: "✓"; color: var(--accent); }
.cross-list li::before { content: "—"; color: var(--muted); }
.feature-list li::before { content: "▸"; color: var(--accent); }

.check-list strong,
.cross-list strong {
    color: var(--cream);
}

/* ---------- Game features ---------- */

.game {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.game.reverse .game-media {
    order: 2;
}

.game-media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
}

.game-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-logo {
    height: 84px;
    width: auto;
    margin-bottom: 20px;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
}

.tag-live {
    border-color: rgba(224, 53, 47, 0.5);
    background: var(--accent-soft);
    color: #ffb4b0;
}

@media (max-width: 860px) {
    .game {
        grid-template-columns: 1fr;
    }

    .game.reverse .game-media {
        order: 0;
    }

    .game-logo {
        height: 64px;
    }
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: clamp(24px, 4vw, 40px);
}

.gallery img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

@media (max-width: 640px) {
    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Click-to-load video */

.video-facade {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: block;
}

.video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-list {
    margin-bottom: 8px;
}

.video-facade::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 34px no-repeat;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.video-facade:hover::after {
    transform: scale(1.08);
}

.video-facade-label {
    position: absolute;
    left: 16px;
    bottom: 14px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cream);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.game-media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Platform strip ---------- */

.platforms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(28px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(120deg, var(--surface) 0%, var(--surface-2) 100%);
}

.platforms h3 {
    margin: 0 0 4px;
}

.platforms p {
    margin: 0;
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.platform-list li {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--cream);
}

/* ---------- Team ---------- */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 40px);
}

@media (max-width: 760px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.profile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.profile-photo {
    width: 168px;
    height: 168px;
    margin-bottom: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--surface-2);
    box-shadow: 0 0 0 2px var(--accent-deep), 0 16px 40px rgba(0, 0, 0, 0.45);
}

.profile-body {
    padding: clamp(28px, 4vw, 44px);
    background:
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(224, 53, 47, 0.12), transparent 70%),
        var(--surface);
    height: 100%;
}

.profile-body h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.profile-role {
    display: block;
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.profile-links {
    margin-top: 20px;
}

/* ---------- CTA band ---------- */

.cta-band {
    text-align: center;
    padding: clamp(48px, 7vw, 80px) var(--gutter);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(ellipse 70% 120% at 50% 100%, rgba(224, 53, 47, 0.2), transparent 70%),
        var(--surface);
}

.cta-band .lead {
    margin: 0 auto;
}

.cta-band .btn-row {
    justify-content: center;
}

/* ---------- Contact ---------- */

.contact-card h3 {
    margin-bottom: 6px;
}

.contact-card a.email {
    display: inline-block;
    margin-top: 6px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--cream);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    word-break: break-all;
}

/* ---------- Legal / long-form prose ---------- */

.prose {
    max-width: 760px;
    margin: 0 auto;
}

.prose h2 {
    font-size: 1.4rem;
    margin-top: 2.2em;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose p,
.prose li {
    color: #cfccc4;
}

.prose ul {
    padding-left: 1.3em;
    margin: 0 0 1.2em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose strong {
    color: var(--cream);
}

.last-updated {
    margin-top: 3em;
    padding-top: 1.2em;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--muted);
}

/* ---------- Footer ---------- */

footer {
    margin-top: clamp(64px, 10vw, 120px);
    border-top: 1px solid var(--line);
    background: #07080a;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 56px var(--gutter) 32px;
}

.footer-brand img {
    height: 44px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--accent-hover);
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: 20px var(--gutter) 32px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.footer-legal a {
    color: var(--muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--cream);
}

@media (max-width: 760px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
