/* =========================================================
   MIKMOK Game Studio — style.css
   Monochrome · modern · animated
   ========================================================= */

:root {
    --black: #000000;
    --near-black: #0a0a0a;
    --panel: #101010;
    --panel-2: #161616;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.22);
    --white: #ffffff;
    --muted: #8a8a8a;
    --muted-2: #5c5c5c;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-2: cubic-bezier(0.65, 0.05, 0.36, 1);

    --maxw: 1280px;
    --gutter: clamp(20px, 5vw, 80px);

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--white); color: var(--black); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #3d3d3d; }

/* ---------- Grain overlay ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* ---------- Custom cursor ---------- */
.cursor, .cursor-dot {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    will-change: transform;
}
.cursor {
    width: 38px; height: 38px;
    border: 1px solid var(--white);
    transform: translate(-50%, -50%);
    transition: width .3s var(--ease), height .3s var(--ease), background .3s var(--ease);
}
.cursor-dot {
    width: 5px; height: 5px;
    background: var(--white);
    transform: translate(-50%, -50%);
}
.cursor.is-hover { width: 64px; height: 64px; background: rgba(255,255,255,.08); }
.cursor.is-play {
    width: 84px; height: 84px;
    background: var(--white);
    mix-blend-mode: normal;
}
.cursor.is-play::after {
    content: "PLAY";
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: var(--black);
    font-family: var(--font-display);
    font-weight: 700; font-size: 12px; letter-spacing: 1px;
}
.cursor.is-play + .cursor-dot { opacity: 0; }

@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-dot { display: none; }
}

/* ---------- Preloader ---------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 9vw, 96px);
    line-height: 0.86;
    text-align: center;
    letter-spacing: -2px;
}
.preloader__logo span { display: block; overflow: hidden; }
.preloader__logo span:nth-child(1) { animation: preIn .7s var(--ease) both; }
.preloader__logo span:nth-child(2) { animation: preIn .7s .08s var(--ease) both; }
@keyframes preIn { from { transform: translateY(110%); } to { transform: translateY(0); } }

.preloader__bar {
    width: min(280px, 60vw);
    height: 2px;
    background: var(--line);
    overflow: hidden;
}
.preloader__bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--white);
    transition: width .2s linear;
}
.preloader__pct {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 2px;
}

/* ---------- Header ---------- */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px var(--gutter);
    transition: padding .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
    border-bottom: 1px solid transparent;
}
.header.is-scrolled {
    padding: 14px var(--gutter);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.header__logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.5px;
}
.header__nav { display: flex; gap: 34px; }
.header__nav a {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: color .3s var(--ease);
}
.header__nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -5px;
    width: 0; height: 1px;
    background: var(--white);
    transition: width .35s var(--ease);
}
.header__nav a:hover { color: var(--white); }
.header__nav a:hover::after { width: 100%; }

.header__cta {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    padding: 11px 22px;
    border: 1px solid var(--line-strong);
    border-radius: 99px;
    transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.header__cta:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* ---------- Burger ---------- */
.burger { display: none; width: 40px; height: 40px; position: relative; }
.burger span {
    position: absolute;
    left: 9px; right: 9px;
    height: 2px;
    background: var(--white);
    transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { bottom: 15px; }
.burger.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { bottom: 19px; transform: rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 850;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 9vw, 52px);
    letter-spacing: -1px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    padding: 15px 28px;
    border-radius: 99px;
    transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
    will-change: transform;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn--primary { background: var(--white); color: var(--black); }
.btn--primary:hover { transform: translateY(-3px); }
.btn--primary:hover svg { transform: translateX(4px); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.06); border-color: var(--white); transform: translateY(-3px); }
.btn--lg { font-size: 17px; padding: 19px 38px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Section heading ---------- */
.section-head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 0 var(--gutter);
    margin-bottom: clamp(40px, 7vw, 80px);
}
.section-head__num {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--muted-2);
    letter-spacing: 1px;
}
.section-head__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(34px, 7vw, 72px);
    letter-spacing: -2px;
    line-height: 1;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 120px var(--gutter) 80px;
    overflow: hidden;
}
.hero__bg-grid {
    position: absolute;
    inset: -2px;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
    animation: gridFloat 24s linear infinite;
}
@keyframes gridFloat { to { background-position: 64px 64px; } }

.hero__glow {
    position: absolute;
    top: 30%; left: 50%;
    width: 60vw; height: 60vw;
    max-width: 820px; max-height: 820px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,255,0.10) 0%, transparent 62%);
    filter: blur(20px);
    animation: glowPulse 7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes glowPulse {
    0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: .85; transform: translate(-50%, -50%) scale(1.12); }
}

.hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--muted);
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 99px;
    margin-bottom: 30px;
}
.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--white);
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
    50% { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(48px, 12vw, 168px);
    line-height: 0.92;
    letter-spacing: -4px;
    margin-bottom: 34px;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word {
    display: inline-block;
    transform: translateY(110%);
    animation: wordUp 1s var(--ease) forwards;
}
.hero__title .line:nth-child(1) .word { animation-delay: .15s; }
.hero__title .line:nth-child(2) .word { animation-delay: .28s; }
.hero__title .line:nth-child(3) .word { animation-delay: .41s; }
@keyframes wordUp { to { transform: translateY(0); } }

.outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--white);
    text-stroke: 1.5px var(--white);
}

.hero__sub {
    max-width: 560px;
    font-size: clamp(15px, 2vw, 19px);
    color: var(--muted);
    margin-bottom: 40px;
}
.hero__sub strong { color: var(--white); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__scroll {
    position: absolute;
    bottom: 34px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}
.hero__scroll span {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--muted-2);
}
.hero__scroll-line {
    width: 1px; height: 50px;
    background: linear-gradient(var(--white), transparent);
    position: relative;
    overflow: hidden;
}
.hero__scroll-line::after {
    content: "";
    position: absolute;
    top: -50%; left: 0;
    width: 100%; height: 50%;
    background: var(--white);
    animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown { to { top: 100%; } }

/* =========================================================
   MARQUEE
   ========================================================= */
.marquee {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 26px 0;
    overflow: hidden;
    white-space: nowrap;
    background: var(--near-black);
}
.marquee__track {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    animation: marquee 26s linear infinite;
}
.marquee__track span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 5vw, 56px);
    letter-spacing: -1px;
    color: var(--white);
}
.marquee__track i { color: var(--muted-2); font-size: 22px; font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   ABOUT
   ========================================================= */
.about { padding: clamp(80px, 12vw, 160px) 0; }
.about__grid {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
}
.about__lead {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(22px, 3.6vw, 42px);
    line-height: 1.28;
    letter-spacing: -1px;
    max-width: 880px;
    margin-bottom: clamp(50px, 8vw, 90px);
}
.about__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.pcard {
    position: relative;
    padding: 38px 34px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    overflow: hidden;
    transition: transform .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease);
}
.pcard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,0.08), transparent 60%);
    opacity: 0;
    transition: opacity .4s var(--ease);
}
.pcard:hover { transform: translateY(-8px); border-color: var(--line-strong); background: var(--panel-2); }
.pcard:hover::before { opacity: 1; }
.pcard__icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-bottom: 26px;
}
.pcard__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--white); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pcard h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    margin-bottom: 12px;
}
.pcard p { color: var(--muted); font-size: 15px; }

/* =========================================================
   GAMES
   ========================================================= */
.games { padding: clamp(60px, 10vw, 120px) 0; }
.games__list {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    border-top: 1px solid var(--line);
}
.game {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: clamp(26px, 4vw, 44px) 8px;
    border-bottom: 1px solid var(--line);
    transition: padding-left .5s var(--ease);
    overflow: hidden;
}
.game::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--white);
    transform: translateX(-101%);
    transition: transform .6s var(--ease);
    z-index: 0;
}
.game:hover::before { transform: translateX(0); }
.game:hover { padding-left: 28px; }
.game > * { position: relative; z-index: 1; transition: color .5s var(--ease); }

.game__index {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--muted-2);
    width: 30px;
    flex-shrink: 0;
}
.game__main { flex: 1; min-width: 0; }
.game__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 4vw, 46px);
    letter-spacing: -1.5px;
    line-height: 1.05;
}
.game__meta { font-size: 14px; color: var(--muted); margin-top: 6px; }
.game__tags { display: flex; gap: 8px; flex-shrink: 0; }
.game__tags i {
    font-style: normal;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 99px;
    color: var(--muted);
}
.game__arrow {
    width: 52px; height: 52px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}
.game__arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }

/* Hover -> invert colors */
.game:hover .game__title,
.game:hover .game__index,
.game:hover .game__meta { color: var(--black); }
.game:hover .game__tags i { color: var(--black); border-color: rgba(0,0,0,.3); }
.game:hover .game__arrow { border-color: var(--black); background: var(--black); }
.game:hover .game__arrow svg { stroke: var(--white); transform: translate(3px, -3px); }

/* =========================================================
   STATS
   ========================================================= */
.stats { padding: clamp(60px, 9vw, 110px) var(--gutter); }
.stats__grid {
    max-width: var(--maxw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
}
.stat {
    background: var(--black);
    padding: clamp(34px, 5vw, 56px) 28px;
    text-align: center;
}
.stat__num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(46px, 7vw, 92px);
    line-height: 1;
    letter-spacing: -3px;
}
.stat__label {
    margin-top: 14px;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
    position: relative;
    padding: clamp(90px, 15vw, 200px) var(--gutter);
    text-align: center;
    overflow: hidden;
}
.contact__glow {
    position: absolute;
    bottom: -40%; left: 50%;
    width: 70vw; height: 70vw;
    max-width: 760px; max-height: 760px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%);
    filter: blur(30px);
    pointer-events: none;
}
.contact__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; }
.contact__kicker {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--muted);
    letter-spacing: 1px;
    margin-bottom: 22px;
}
.contact__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 9vw, 128px);
    line-height: 0.98;
    letter-spacing: -3px;
    margin-bottom: 44px;
}
.contact__email {
    margin-top: 26px;
    font-size: 15px;
    color: var(--muted);
}
.contact__email a {
    position: relative;
    color: var(--white);
    font-weight: 500;
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
    transition: border-color .3s var(--ease), opacity .3s var(--ease);
}
.contact__email a:hover { border-color: var(--white); opacity: .8; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { padding: clamp(50px, 7vw, 80px) var(--gutter) 40px; border-top: 1px solid var(--line); }
.footer__top {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}
.footer__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
}
.footer__nav { display: flex; gap: 30px; }
.footer__nav a { font-size: 14px; color: var(--muted); transition: color .3s var(--ease); }
.footer__nav a:hover { color: var(--white); }
.footer__bottom {
    max-width: var(--maxw);
    margin: 28px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--muted-2);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .header__nav, .header__cta { display: none; }
    .burger { display: block; }
    .about__cards { grid-template-columns: 1fr; }
    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .game__tags { display: none; }
}

@media (max-width: 560px) {
    .hero__title { letter-spacing: -2px; }
    .stats__grid { grid-template-columns: 1fr; }
    .game { gap: 16px; }
    .footer__top { flex-direction: column; align-items: flex-start; }
}

/* Very small phones: keep the longest words from clipping */
@media (max-width: 360px) {
    .hero__title { font-size: clamp(40px, 11.5vw, 48px); letter-spacing: -1.5px; }
    .contact__title { letter-spacing: -2px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .hero__title .word { transform: none; }
    .reveal { opacity: 1; transform: none; }
}
