/* ============================================
   MORTAL GAMES — GLOBAL DESIGN SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Germania+One&family=Grenze:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=IM+Fell+French+Canon:ital@0;1&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Nova+Flat&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Rubik+Dirt&family=Rubik+Glitch&display=swap');

/* ── CSS VARIABLES ── */

:root {
  --black:        #080808;
  --near-black:   #0a0a0a;
  --surface:      #111111;
  --surface-2:    #161616;
  --surface-3:    #1c1c1c;
  --border:       rgba(255,255,255,0.07);
  --border-red:   rgba(179,0,0,0.4);

  --red:          #b30000;
  --red-bright:   #cc0000;
  --red-dim:      #7a0000;
  --red-glow:     rgba(179,0,0,0.15);
  --red-glow-strong: rgba(179,0,0,0.3);

  --white:        #ffffff;
  --grey-light:   #e8e8e8;
  --grey:         #bcbcbc;
  --grey-mid:     #888888;
  --grey-dark:    #555555;
  --grey-darker:  #333333;

  --font-display: 'Cinzel', serif;
  --font-body:    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-mono:    'Space Mono', monospace;

  --nav-height:   72px;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--black);
  color: var(--grey);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: default;
}

body.no-scroll {
  overflow: hidden;
}

/* ── CUSTOM SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red-dim); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: var(--white);
}

h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { font-size: 1.05rem; line-height: 1.8; color: var(--grey); }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* ── SELECTION ── */
::selection {
  background: var(--red);
  color: var(--white);
}

/* ── UTILITY CLASSES ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--red);
}

.text-red { color: var(--red); }
.text-grey { color: var(--grey-mid); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
  z-index: 0;
}

.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary:hover {
  color: var(--red);
}

.btn-primary span, .btn-primary svg {
  position: relative;
  z-index: 1;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 20px var(--red-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--grey);
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.btn-ghost:hover { color: var(--red); }

/* ── DIVIDER ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 80px 0;
}

/* ── PAGE TRANSITIONS ── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── NOISE TEXTURE OVERLAY ── */
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav.scrolled {
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 48px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  fill: var(--red);
}

.nav-logo:hover { color: var(--red); }

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-mid);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--red);
  transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-login {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid var(--border-red);
  padding: 8px 20px;
  transition: all 0.3s ease;
}

.nav-login:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  height: 1px;
  background: var(--white);
  transition: all 0.35s var(--ease-out);
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(179,0,0,0.08) 0%, transparent 70%);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mobile-menu-link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-dark);
  transition: color 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
}

.mobile-menu.open .mobile-menu-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-menu-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-menu-link:nth-child(6) { transition-delay: 0.3s; }

.mobile-menu-link:hover {
  color: var(--white);
}

.mobile-menu-footer {
  position: absolute;
  bottom: 40px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--grey-dark);
  text-transform: uppercase;
}

/* ── FOOTER ── */
.footer {
  background: var(--near-black);
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--grey-dark);
  text-align: center;
}

.footer-social {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
}

.footer-social a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-dark);
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: var(--red);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 24px; }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-social { justify-content: center; }
}

/* ── PAGE HERO ── */
.page-hero {
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-height) + 60px) 0 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,8,8,0.3) 0%, rgba(8,8,8,0.7) 60%, var(--black) 100%);
  z-index: 1;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.3);
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--red);
}

.page-section {
  padding: 120px 0;
}

.page-section + .page-section {
  padding-top: 0;
}
