/* ==========================================================================
   blackend — design tokens
   ========================================================================== */
:root{
  --bg:        #0B0B0C;
  --bg-raised: #141416;
  --bg-card:   #19191B;
  --line:      #2B2B2E;
  --line-soft: #202022;
  --text:      #ECECEA;
  --text-dim:  #97979C;
  --text-faint:#5C5C60;
  --accent:    #FF5A36;
  --accent-2:  #FFB020;
  --accent-dim: rgba(255,90,54,.14);
  --ok:        #35D07F;

  --font-display: 'Anton', 'IBM Plex Sans Arabic', sans-serif;
  --font-body: 'IBM Plex Sans', 'IBM Plex Sans Arabic', sans-serif;

  --wrap: 1180px;
  --radius-s: 6px;
  --radius-m: 10px;

  --ease: cubic-bezier(.16,.8,.28,1);
}

html[lang="ar"]{
  --font-display: 'IBM Plex Sans Arabic', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', sans-serif;
}

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

html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* subtle static / grain texture over the whole page */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .2px;
  margin: 0;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3{
  font-weight: 700;
  letter-spacing: 0;
}

p{ margin: 0; color: var(--text-dim); }

.wrap{
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
  position: relative;
  z-index: 1;
}

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

/* ==========================================================================
   Floating translate button
   ========================================================================== */
.translate-fab{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px 13px 15px;
  background: var(--accent);
  color: #17100C;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,90,54,.32), 0 2px 6px rgba(0,0,0,.4);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.translate-fab:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255,90,54,.4), 0 2px 8px rgba(0,0,0,.45);
}
.translate-fab:active{ transform: translateY(0); }
.translate-fab__mark{ display: inline-flex; }
.translate-fab[aria-pressed="true"]{
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(11,11,12,.72);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .5px;
}
html[lang="ar"] .logo{ font-weight: 700; }
.nav{ display: flex; gap: 28px; }
.nav a{
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color .15s var(--ease);
}
.nav a:hover{ color: var(--text); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.btn-primary{
  background: var(--accent);
  color: #180F0A;
}
.btn-primary:hover{ transform: translateY(-2px); background: #ff6b48; }
.btn-ghost{
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--text-dim); transform: translateY(-2px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position: relative;
  padding: 108px 0 96px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.hero-bg-type{
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(140px, 26vw, 420px);
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.hero-inner{ max-width: 760px; }
.hero-kicker{
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.hero h1{
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-sub{
  font-size: 17.5px;
  max-width: 52ch;
  margin-bottom: 36px;
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Section heads
   ========================================================================== */
.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 44px;
}
.section-head h2{
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text);
}
.section-head p{ max-width: 40ch; font-size: 15.5px; }

.games, .social{ padding: 88px 0; }

/* ==========================================================================
   Tags / status badges
   ========================================================================== */
.tag{
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tag--live{ background: rgba(53,208,127,.14); color: var(--ok); }
.tag--dev{ background: var(--accent-dim); color: var(--accent-2); }
.tag--proto{ background: rgba(151,151,156,.16); color: var(--text-dim); }
.tag--beta{ background: rgba(255,176,32,.14); color: var(--accent-2); }

/* ==========================================================================
   Games grid
   ========================================================================== */
.games-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.game-card{
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.game-card:hover{ border-color: var(--text-faint); transform: translateY(-3px); }

.game-card__art{
  height: 128px;
  display: flex;
  align-items: center;
  padding-inline: 24px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
}
.game-card__art span{
  font-family: var(--font-display);
  font-size: 64px;
  color: rgba(0,0,0,.28);
}
.game-card--1 .game-card__art{ background: linear-gradient(135deg, #3A2A6B, #6E3AA8); }
.game-card--2 .game-card__art{ background: linear-gradient(135deg, #1F5C4E, #35A07E); }
.game-card--3 .game-card__art{ background: linear-gradient(135deg, #1E3A5C, #2E6FA0); }
.game-card--4 .game-card__art{ background: linear-gradient(135deg, #5C2A2A, #A8452F); }

.game-card__body{ padding: 22px 24px 26px; flex: 1; }
.game-card__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.game-card__row h3{ font-size: 20px; color: var(--text); letter-spacing: .3px; }
.game-card__genre{
  font-size: 12.5px;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 10px;
}
.game-card__body p:last-child{ font-size: 14.5px; }

/* ==========================================================================
   Social list
   ========================================================================== */
.social-list{ display: flex; flex-direction: column; }
.social-row{
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 26px 20px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  transition: background .18s var(--ease);
}
.social-row:first-child{ border-top: 1px solid var(--line-soft); }
.social-row:hover{ background: var(--bg-raised); }

.social-row__id{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-dim);
}
.social-row__head{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.social-row__head h3{ font-size: 19px; color: var(--text); }
.social-row__main p{ font-size: 14.5px; max-width: 60ch; }
.social-row__link{
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.social-row__link:hover{ border-color: var(--accent); color: var(--accent-2); }

/* ==========================================================================
   Contact band
   ========================================================================== */
.contact-cta{
  padding: 96px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-raised);
}
.contact-cta__inner{ max-width: 560px; text-align: left; }
.contact-cta h2{ font-size: clamp(26px, 4vw, 36px); color: var(--text); margin-bottom: 14px; }
.contact-cta p{ font-size: 16px; margin-bottom: 30px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{ background: #000; }
.footer-top{
  padding: 72px 0 48px;
  position: relative;
  overflow: hidden;
}
.footer-word{
  font-family: var(--font-display);
  font-size: clamp(46px, 9vw, 132px);
  line-height: .9;
  letter-spacing: 1px;
  margin-bottom: 44px;
}
html[lang="ar"] .footer-word{ font-weight: 700; }
.footer-word span{ color: transparent; -webkit-text-stroke: 1px var(--line); margin-right: 28px; }
.footer-word--solid{
  position: absolute;
  top: 72px;
  left: 24px;
  color: var(--text);
  margin: 0;
  z-index: 1;
}
html[dir="rtl"] .footer-word--solid{ left: auto; right: 24px; }
.footer-top .footer-word:first-child{ white-space: nowrap; opacity: .9; }

.footer-cols{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 32px;
  max-width: 560px;
  margin-left: auto;
  padding-top: 12px;
}
html[dir="rtl"] .footer-cols{ margin-left: 0; margin-right: auto; }
.footer-col h4{
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.footer-col{ display: flex; flex-direction: column; }
.footer-col a{
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color .15s var(--ease);
}
.footer-col a:hover{ color: var(--text); }

.footer-bottom{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-soft);
}
.footer-bottom p{ font-size: 13px; color: var(--text-faint); margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px){
  .games-grid{ grid-template-columns: 1fr; }
  .footer-cols{ max-width: 100%; margin: 0; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .footer-word--solid{ position: static; margin-bottom: 40px; }
  .footer-top .footer-word:first-child{ display: none; }
}

@media (max-width: 640px){
  .header-inner{ height: 60px; }
  .nav{ gap: 16px; }
  .nav a{ font-size: 13px; }
  .hero{ padding: 84px 0 64px; }
  .hero-sub{ font-size: 16px; }
  .games, .social{ padding: 64px 0; }
  .social-row{
    grid-template-columns: 1fr;
    text-align: left;
    gap: 14px;
    padding: 22px 16px;
  }
  .social-row__id{ display: none; }
  .social-row__link{ width: fit-content; }
  .footer-cols{ grid-template-columns: 1fr 1fr; }
  .translate-fab{ right: 14px; bottom: 14px; padding: 11px 15px 11px 13px; font-size: 13px; }
}

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