/* ═══════════════════════════════════════════════════════════════
   Pheonix Games — styles.css
   Mobile-first, dark theme, glassmorphism
═══════════════════════════════════════════════════════════════ */

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

:root {
  --clr-bg:        #050816;
  --clr-bg2:       #080d22;
  --clr-primary:   #FF6B35;
  --clr-secondary: #FF8F3F;
  --clr-card:      rgba(255,255,255,.05);
  --clr-card-hov:  rgba(255,107,53,.08);
  --clr-text:      #FFFFFF;
  --clr-muted:     #B8B8B8;
  --clr-border:    rgba(255,255,255,.08);

  --glow-sm:  0 0 20px rgba(255,107,53,.25);
  --glow-md:  0 0 40px rgba(255,107,53,.35);
  --glow-lg:  0 0 80px rgba(255,107,53,.4);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --header-h: 72px;
  --transition: .3s cubic-bezier(.4,0,.2,1);

  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 100px 0; }

/* ── Typography helpers ─────────────────────────────────────── */
.section-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

/* ── Fade-in on scroll ──────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease calc(var(--delay, 0s)), transform .7s ease calc(var(--delay, 0s));
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.07);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.btn:hover::before { opacity: 1; }

.btn--primary {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  color: #fff;
  box-shadow: 0 4px 24px rgba(255,107,53,.4);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,107,53,.55);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--clr-text);
  border: 1.5px solid var(--clr-border);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-2px);
}

.btn--card {
  background: rgba(255,107,53,.12);
  border: 1px solid rgba(255,107,53,.3);
  color: var(--clr-primary);
  padding: 10px 22px;
  font-size: .88rem;
  border-radius: var(--radius-sm);
}
.btn--card:hover {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
}

/* contact buttons */
.btn--contact {
  border-radius: var(--radius-sm);
  font-size: .95rem;
  border: 1px solid transparent;
}
.btn--telegram {
  background: rgba(38,161,220,.15);
  border-color: rgba(38,161,220,.35);
  color: #29B6F6;
}
.btn--telegram:hover {
  background: #29B6F6;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(41,182,246,.35);
}
.btn--discord {
  background: rgba(88,101,242,.15);
  border-color: rgba(88,101,242,.35);
  color: #7289da;
}
.btn--discord:hover {
  background: #7289da;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(114,137,218,.35);
}
.btn--email {
  background: rgba(255,107,53,.12);
  border-color: rgba(255,107,53,.35);
  color: var(--clr-primary);
}
.btn--email:hover {
  background: var(--clr-primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--glow-sm);
}

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(5,8,22,.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 1px 0 var(--clr-border);
}

.header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  /* override container's 20px — match hero text indent exactly */
  padding: 0 clamp(24px, 6vw, 96px);
  max-width: none;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: auto; /* pushes everything else right on mobile */
}
.header__logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.header__logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 1px;
}
.header__logo-name {
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff;
}
.header__logo-sub {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--clr-primary);
}

.nav {
  display: none;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.nav__link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--clr-muted);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover, .nav__link.active {
  color: var(--clr-text);
  background: rgba(255,255,255,.07);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: 50px;
  padding: 4px 12px;
}
.lang-btn {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--clr-muted);
  transition: color var(--transition);
  padding: 2px 4px;
  border-radius: 4px;
}
.lang-btn:hover  { color: var(--clr-text); }
.lang-btn.active { color: var(--clr-primary); }
.lang-sep { color: var(--clr-border); font-size: .75rem; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), width var(--transition);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav.mobile-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  padding: 24px 20px 32px;
  background: rgba(5,8,22,.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--clr-border);
  gap: 4px;
  animation: slideDown .25s ease;
}
@keyframes slideDown {
  from { opacity:0; transform:translateY(-12px); }
  to   { opacity:1; transform:translateY(0); }
}
.nav.mobile-open .nav__link {
  font-size: 1.1rem;
  padding: 12px 16px;
}

/* Header CTA button */
.btn--header-cta {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 700;
  background: rgba(88,101,242,.2);
  border: 1px solid rgba(88,101,242,.5);
  color: #7289da;
  white-space: nowrap;
  transition: var(--transition);
}
.btn--header-cta:hover {
  background: #7289da;
  color: #fff;
  border-color: #7289da;
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav { display: flex; }
  .hamburger { display: none; }
  .header__logo { margin-right: 0; }
  .btn--header-cta { display: flex; }
}

/* ══════════════════════════════════════════════════════════════
   HERO  — cinematic AAA composition
══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: var(--header-h);
  background: url('../assets/images/site_bg.png') center center / cover no-repeat;
}

/* Cinematic overlay — opaque left, transparent right */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(3,5,20,.97)  0%,
    rgba(3,5,20,.92) 30%,
    rgba(3,5,20,.65) 52%,
    rgba(3,5,20,.15) 75%,
    rgba(3,5,20,.0) 100%
  );
}

/* Fire / ember canvas — hero section only */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ── Two-column layout ── */
.hero__layout {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  min-height: calc(100svh - var(--header-h));
}

/* LEFT: text */
.hero__left {
  flex: 0 0 52%;
  padding: 60px clamp(24px, 6vw, 96px);
}

/* RIGHT: scene — bleeds beyond column so phoenix feels huge */
.hero__right {
  flex: 0 0 52%;
  align-self: stretch;
  position: relative;
  overflow: visible;
}

/* ── Phoenix scene — right column, shifted left toward text ── */
.hero__scene {
  position: absolute;
  top: -10%;
  left: -32%;
  right: -4%;
  bottom: -10%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* glow blobs removed — drop-shadow on the img provides the halo */

/* Wrapper that drives the float animation — separate from scale */
.hero__phoenix-floater {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  animation: phoenixFloat 6s ease-in-out infinite;
  transform-origin: center center;
}

/* The image itself — blend mode fuses it with the lava scene */
.hero__phoenix-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  /* screen blend: black PNG pixels → transparent, fire stays vivid */
  mix-blend-mode: screen;
  /* bottom mask: phoenix fades into terrain naturally */
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  filter:
    brightness(1.15)
    saturate(1.3)
    drop-shadow(0 0 50px rgba(255,120,30,1))
    drop-shadow(0 0 15px rgba(255,200,50,.8));
  animation: phoenixBreathe 4s ease-in-out infinite;
}

@keyframes phoenixFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}
@keyframes phoenixBreathe {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}
@keyframes glowPulse {
  0%,100% { opacity: .75; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.07); }
}

/* ── Text ── */
.hero__eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: 20px;
  animation: fadeUp .7s ease .1s both;
}

.hero__title {
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -.03em;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeUp .7s ease .2s both;
}

.hero__line { display: block; }

.hero__line--sm {
  font-size: clamp(1.1rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: rgba(255,255,255,.88);
  letter-spacing: .03em;
  margin-bottom: 4px;
}

.hero__line--lg {
  font-size: clamp(2.6rem, 5.8vw, 5.6rem);
  line-height: .95;
  white-space: nowrap;
}

.hero__line--accent {
  background: linear-gradient(90deg, #ff6b35, #ff9d00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp .7s ease .28s both, textGlow 3s ease-in-out 1.5s infinite;
}

@keyframes textGlow {
  0%,100% { filter: drop-shadow(0 0 18px rgba(255,107,53,.4)); }
  50%      { filter: drop-shadow(0 0 36px rgba(255,157,0,.75)); }
}

.hero__sub {
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  color: var(--clr-muted);
  max-width: 440px;
  margin-bottom: 40px;
  line-height: 1.8;
  animation: fadeUp .7s ease .35s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  animation: fadeUp .7s ease .45s both;
}

.hero-btn--explore {
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .85rem;
  padding: 15px 28px;
}

/* Glassmorphism ghost btn */
.btn--ghost {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,.18);
  color: #fff;
  padding: 15px 28px;
}
.btn--ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-2px);
}

/* ── Scroll indicator ── */
.hero__scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  z-index: 4;
}
.hero__scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--clr-primary);
  border-radius: 2px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { transform: translateY(0); opacity: 1; }
  80%      { transform: translateY(14px); opacity: 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .hero__layout   { flex-direction: column; align-items: flex-start; }
  .hero__left     { flex: none; width: 100%; padding: 48px 20px 32px; }
  .hero__right    { flex: none; width: 100%; height: 55vw; min-height: 260px; }
  .hero__scene    { inset: 0; }
  .hero__overlay  {
    background: linear-gradient(
      180deg,
      rgba(3,5,20,.9) 0%,
      rgba(3,5,20,.5) 60%,
      rgba(3,5,20,.85) 100%
    );
  }
  .hero__line--lg { font-size: clamp(2.2rem, 9vw, 4rem); }
}

/* ══════════════════════════════════════════════════════════════
   GAMES
══════════════════════════════════════════════════════════════ */
.games {
  background: var(--clr-bg2);
  position: relative;
}
.games::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-primary), transparent);
  opacity: .3;
}

.games__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 640px) {
  .games__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .games__grid { grid-template-columns: repeat(3, 1fr); }
}

.game-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255,107,53,.4);
  background: var(--clr-card-hov);
  box-shadow: 0 20px 60px rgba(255,107,53,.2), 0 0 0 1px rgba(255,107,53,.15);
}

.game-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.game-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.game-card:hover .game-card__img { transform: scale(1.06); }

.game-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(5,8,22,.8));
}

.game-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.game-card__title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.game-card__desc {
  font-size: .9rem;
  color: var(--clr-muted);
  line-height: 1.65;
  flex: 1;
}

/* ══════════════════════════════════════════════════════════════
   STATISTICS
══════════════════════════════════════════════════════════════ */
.stats {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.stats__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,107,53,.07) 0%, transparent 70%);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 24px;
  text-align: center;
}

@media (min-width: 768px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); gap: 0; }
}

.stat {
  position: relative;
}

@media (min-width: 768px) {
  .stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--clr-border);
  }
}

.stat__number {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat__label {
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-muted);
}

/* ══════════════════════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════════════════════ */
.about { background: var(--clr-bg2); }

.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}

@media (min-width: 768px) {
  .about__inner { grid-template-columns: 1fr 1fr; }
}

.about__body {
  color: var(--clr-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 20px 0 32px;
  max-width: 480px;
}

.about__pillars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about__pillar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: .92rem;
  font-weight: 500;
  transition: border-color var(--transition), background var(--transition);
}
.about__pillar:hover {
  border-color: rgba(255,107,53,.3);
  background: var(--clr-card-hov);
}
.about__pillar-icon { font-size: 1.2rem; }

.about__emblem {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.about__emblem img {
  width: 260px;
  height: 260px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 40px rgba(255,107,53,.4));
  animation: floatImg 4s ease-in-out infinite;
}
@keyframes floatImg {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.about__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,107,53,.2);
  animation: ringPulse 4s ease-in-out infinite;
}
.about__ring--1 { width: 300px; height: 300px; }
.about__ring--2 { width: 380px; height: 380px; animation-delay: .7s; opacity: .6; }

@keyframes ringPulse {
  0%,100% { transform: scale(1); opacity: .2; }
  50%      { transform: scale(1.05); opacity: .45; }
}

/* ══════════════════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════════════════ */
.contact { background: var(--clr-bg); }

.contact__inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact__sub {
  color: var(--clr-muted);
  font-size: 1rem;
  margin: 16px 0 44px;
}

.contact__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--clr-border);
  padding: 32px 0;
  background: var(--clr-bg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: .95rem;
}
.footer__logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.footer__copy {
  font-size: .82rem;
  color: var(--clr-muted);
}

/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
