/* ============================================================
   Wainwork — studio site styles
   ============================================================ */

:root {
  --bg:        #0a0a0f;
  --bg-soft:   #12121a;
  --surface:   #1a1a24;
  --text:      #f2f2f5;
  --text-dim:  #9a9aa8;
  --accent:    #6c5ce7;
  --accent-2:  #00d2ff;
  --border:    rgba(255,255,255,0.08);
  --maxw:      1180px;
  --radius:    18px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

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

h1, h2, .logo, .hero__tagline, .stat__value {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 100px;
  font-weight: 600; font-size: 15px;
  cursor: pointer; border: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), opacity .3s;
}
.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--accent);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px var(--accent); }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-size: 22px; letter-spacing: -0.02em; }

.nav { display: flex; gap: 34px; }
.nav a {
  font-size: 15px; color: var(--text-dim); font-weight: 500;
  position: relative; transition: color .25s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--accent-2); transition: width .3s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.header__right { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.lang-switch button {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font: inherit; font-weight: 600; padding: 4px; transition: color .2s;
}
.lang-switch button.is-active { color: var(--text); }
.lang-switch span { color: var(--text-dim); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); transition: .3s var(--ease); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
/* world map backdrop — only in the hero, lightly blurred and faded at the edges */
.hero__map {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../assets/img/world-map.svg") center / cover no-repeat;
  filter: blur(2.5px);
  opacity: .28;
  -webkit-mask-image: radial-gradient(120% 95% at 50% 42%, #000 45%, transparent 85%);
          mask-image: radial-gradient(120% 95% at 50% 42%, #000 45%, transparent 85%);
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .4;
  animation: float 16s ease-in-out infinite;
}
.orb--1 { width: 480px; height: 480px; background: var(--accent);   top: -120px; left: -80px; }
.orb--2 { width: 420px; height: 420px; background: var(--accent-2); bottom: -140px; right: -60px; animation-delay: -5s; }
.orb--3 { width: 320px; height: 320px; background: #e84393;         top: 40%; left: 45%; animation-delay: -9s; opacity: .35; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(40px,-30px) scale(1.1); }
  66%     { transform: translate(-30px,20px) scale(0.95); }
}

.hero__content { position: relative; z-index: 2; max-width: 820px; }
.hero__tagline {
  display: inline-block; font-size: 14px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 22px;
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 100px;
}
.hero__title {
  font-size: clamp(38px, 7vw, 76px); line-height: 1.05; letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.hero__subtitle { font-size: clamp(16px, 2.2vw, 21px); color: var(--text-dim); max-width: 560px; margin-bottom: 38px; }

.hero__scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: var(--text-dim);
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--text-dim), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity:.3; transform: scaleY(.6); } 50% { opacity:1; transform: scaleY(1); } }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section__heading { font-size: clamp(30px, 4.5vw, 52px); letter-spacing: -0.02em; margin-bottom: 14px; }
.section__subtitle { color: var(--text-dim); font-size: 18px; margin-bottom: 8px; }

/* ---------- Games (vertical cards in a row, expand-on-hover) ---------- */
.games__head { margin-bottom: clamp(36px, 5vh, 60px); }
.games__track {
  display: flex; gap: 24px; justify-content: center;
  padding: 30px 24px 44px;          /* room for the lifted/enlarged card */
}

.game-card {
  flex: 0 0 258px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), opacity .45s var(--ease);
  will-change: transform;
}
.game-card__media {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(135deg, var(--card-color, var(--accent)), #050507);
}
.game-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }

/* expand-on-hover: hovered card grows & lifts, neighbours slide aside, the rest dim */
@media (hover: hover) {
  .games__track:hover .game-card { opacity: .45; }
  /* same specificity as the dim rule, so the hovered card wins back full brightness */
  .games__track:hover .game-card:hover { opacity: 1; }
  .game-card:hover {
    transform: scale(1.16) translateY(-8px);
    box-shadow: 0 44px 90px -28px var(--card-color, var(--accent));
    z-index: 3;
  }
  .game-card:hover .game-card__media img { transform: scale(1.07); }
  /* shove the cards that come after the hovered one to the right ... */
  .game-card:hover ~ .game-card { transform: translateX(46px); }
  /* ... and the cards before it to the left (needs :has, supported in modern browsers) */
  .game-card:has(~ .game-card:hover) { transform: translateX(-46px); }
}

/* narrow screens: no hover — let the row scroll horizontally by swipe */
@media (max-width: 920px) {
  .games__track {
    justify-content: flex-start; overflow-x: auto;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: max(24px, calc((100vw - var(--maxw)) / 2 + 24px));
  }
  .games__track::-webkit-scrollbar { display: none; }
  .game-card { scroll-snap-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .game-card:hover { transform: none; }
  .game-card:hover ~ .game-card,
  .game-card:has(~ .game-card:hover) { transform: none; }
}
.game-card__platforms { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.game-card__platforms span {
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  font-size: 11px; padding: 4px 10px; border-radius: 100px; letter-spacing: .04em;
}
.game-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.game-card__genre { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 8px; }
.game-card__title { font-family: "Space Grotesk"; font-size: 24px; font-weight: 600; margin-bottom: 10px; }
.game-card__desc { color: var(--text-dim); font-size: 15px; flex: 1; margin-bottom: 20px; }
.game-card__links { display: flex; gap: 10px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; padding: 9px 16px;
  border: 1px solid var(--border); border-radius: 100px; color: var(--text);
  transition: border-color .25s, background .25s;
}
.store-btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); }
.store-btn svg { width: 15px; height: 15px; }

/* ---------- About ---------- */
.about { background: var(--bg-soft); }
.about__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.about__lead { font-size: 22px; color: var(--text); margin: 14px 0 18px; }
.about__text p:last-child { color: var(--text-dim); font-size: 17px; }
.about__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
}
.stat:first-child { grid-column: 1 / -1; }
.stat__value { display: block; font-size: 44px; line-height: 1; background: linear-gradient(120deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { display: block; color: var(--text-dim); font-size: 14px; margin-top: 8px; }

/* ---------- Careers ---------- */
.careers__inner { max-width: 640px; }
.careers .about__lead { margin-top: 14px; }
.careers p:not(.about__lead) { color: var(--text-dim); font-size: 17px; margin-bottom: 28px; }

/* ---------- Contacts ---------- */
.contacts { background: var(--bg-soft); }
.contacts__inner { max-width: 640px; }
.contacts p:not(.about__lead) { color: var(--text-dim); font-size: 17px; margin-bottom: 32px; }
.contacts__email { margin-bottom: 30px; }
.contacts__label, .contacts__followLabel { display: block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.contacts__mail { font-family: "Space Grotesk"; font-size: clamp(24px, 4vw, 38px); font-weight: 600; background: linear-gradient(120deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; transition: opacity .25s; }
.contacts__mail:hover { opacity: .8; }
.contacts__social { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.contacts__social a {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%; color: var(--text-dim);
  transition: border-color .25s, color .25s, transform .25s;
}
.contacts__social a:hover { color: var(--text); border-color: var(--accent-2); transform: translateY(-3px); }
.contacts__social svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__copy { color: var(--text-dim); font-size: 14px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .nav {
    position: fixed; top: 72px; right: 0; left: 0;
    flex-direction: column; gap: 0;
    background: rgba(10,10,15,0.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 24px;
    transform: translateY(-120%); transition: transform .4s var(--ease);
    z-index: 90;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
  .burger { display: flex; }
  .burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.is-open span:nth-child(2) { opacity: 0; }
  .burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 80px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
