/* ============================================
   QUADBIX STUDIO — Main Stylesheet
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-bg-dark: #0a0e27;
  --color-bg-navy: #0f1535;
  --color-bg-section: #111940;
  --color-bg-card: rgba(255, 255, 255, 0.05);
  --color-primary: #5b6ef5;
  --color-primary-light: #7b8cff;
  --color-primary-glow: rgba(91, 110, 245, 0.35);
  --color-accent: #a78bfa;
  --color-accent-light: #c4b5fd;
  --color-text: #e8eaf6;
  --color-text-muted: #9ca3c2;
  --color-text-heading: #ffffff;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-card-bg: rgba(255, 255, 255, 0.04);
  --color-card-hover: rgba(255, 255, 255, 0.08);
  --gradient-hero: linear-gradient(175deg, #080c22 0%, #0f1535 30%, #141e50 60%, #1a2766 80%, #2541b2 100%);
  --gradient-primary: linear-gradient(135deg, #5b6ef5, #8b5cf6);
  --gradient-game-card: linear-gradient(135deg, #1a237e 0%, #283593 40%, #3949ab 100%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px var(--color-primary-glow);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --transition-slow: 0.6s ease;
  --max-width: 1140px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-light);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ---------- Focus Styles (Accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- Section Shared ---------- */
.section {
  padding: 100px 0;
  position: relative;
}

.section--alt {
  background-color: var(--color-bg-section);
}

.section__heading {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-text-heading);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section__subtext {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 56px;
  font-size: 1.05rem;
}

/* Section reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 14, 39, 0.8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-base);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.header__logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header__logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__list {
  display: flex;
  gap: 32px;
}

.nav__link {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-text-heading);
}

.nav__link:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1010;
}

.hamburger__bar {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.hamburger.active .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger__bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}

/* Floating block decorations */
.hero__blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-block {
  position: absolute;
  border: 2px solid rgba(91, 110, 245, 0.12);
  border-radius: 6px;
  background: rgba(91, 110, 245, 0.04);
  animation: floatBlock 18s ease-in-out infinite;
}

.floating-block:nth-child(1) {
  width: 60px;
  height: 60px;
  top: 12%;
  left: 8%;
  animation-delay: 0s;
  animation-duration: 20s;
}

.floating-block:nth-child(2) {
  width: 40px;
  height: 40px;
  top: 25%;
  right: 12%;
  animation-delay: -4s;
  animation-duration: 16s;
  border-color: rgba(167, 139, 250, 0.12);
  background: rgba(167, 139, 250, 0.04);
}

.floating-block:nth-child(3) {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 15%;
  animation-delay: -8s;
  animation-duration: 22s;
}

.floating-block:nth-child(4) {
  width: 50px;
  height: 50px;
  bottom: 30%;
  right: 8%;
  animation-delay: -2s;
  animation-duration: 19s;
  border-color: rgba(139, 92, 246, 0.12);
  background: rgba(139, 92, 246, 0.04);
}

.floating-block:nth-child(5) {
  width: 35px;
  height: 35px;
  top: 50%;
  left: 50%;
  animation-delay: -6s;
  animation-duration: 24s;
  border-color: rgba(91, 110, 245, 0.08);
  background: rgba(91, 110, 245, 0.03);
}

.floating-block:nth-child(6) {
  width: 45px;
  height: 45px;
  top: 15%;
  left: 60%;
  animation-delay: -10s;
  animation-duration: 17s;
  border-color: rgba(167, 139, 250, 0.1);
  background: rgba(167, 139, 250, 0.03);
}

@keyframes floatBlock {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-10px) rotate(-3deg);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-25px) rotate(4deg);
    opacity: 0.7;
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 0 24px;
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--color-text-heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero__title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--color-primary-light);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero__description {
  font-size: clamp(0.95rem, 1.8vw, 1.12rem);
  color: var(--color-text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px var(--color-primary-glow);
}

.btn--primary:hover {
  box-shadow: 0 6px 32px var(--color-primary-glow);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  background: rgba(91, 110, 245, 0.06);
}

.btn--disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ============================================
   GAMES SECTION
   ============================================ */
.game-card {
  background: var(--gradient-game-card);
  border-radius: var(--radius-xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* Decorative blocks inside game card */
.game-card__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.game-block {
  position: absolute;
  border-radius: 5px;
  opacity: 0.5;
}

.game-block--1 {
  width: 32px;
  height: 32px;
  background: rgba(239, 83, 80, 0.35);
  top: 20px;
  right: 60px;
  transform: rotate(12deg);
}

.game-block--2 {
  width: 24px;
  height: 24px;
  background: rgba(102, 187, 106, 0.35);
  top: 40px;
  right: 24px;
  transform: rotate(-8deg);
}

.game-block--3 {
  width: 28px;
  height: 28px;
  background: rgba(66, 165, 245, 0.35);
  bottom: 30px;
  right: 40px;
  transform: rotate(20deg);
}

.game-block--4 {
  width: 20px;
  height: 20px;
  background: rgba(255, 202, 40, 0.4);
  bottom: 24px;
  right: 80px;
  transform: rotate(-15deg);
}

.game-block--5 {
  width: 36px;
  height: 36px;
  background: rgba(171, 71, 188, 0.3);
  top: 50%;
  right: 16px;
  transform: rotate(8deg);
}

.game-card__content {
  position: relative;
  z-index: 2;
}

.game-card__badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 16px;
}

.game-card__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--color-text-heading);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.game-card__subtitle {
  font-size: 1.1rem;
  color: var(--color-primary-light);
  font-weight: 500;
  margin-bottom: 20px;
}

.game-card__description {
  color: var(--color-text);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 24px;
  opacity: 0.9;
}

.game-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.tag {
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ============================================
   WHAT WE BUILD
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: transform var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
  transform: translateY(-4px);
  background: var(--color-card-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
}

/* CSS-based icons */
.icon-games {
  background: linear-gradient(135deg, rgba(239, 83, 80, 0.2), rgba(255, 152, 0, 0.2));
  border: 1px solid rgba(239, 83, 80, 0.2);
}

.icon-games::before {
  content: '';
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ef5350, #ff9800);
  border-radius: 4px;
  transform: rotate(10deg);
}

.icon-games::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #ff7043, #ffb74d);
  border-radius: 3px;
  top: 12px;
  right: 12px;
  transform: rotate(-5deg);
}

.icon-software {
  background: linear-gradient(135deg, rgba(66, 165, 245, 0.2), rgba(41, 182, 246, 0.2));
  border: 1px solid rgba(66, 165, 245, 0.2);
}

.icon-software::before {
  content: '';
  width: 22px;
  height: 16px;
  border: 2.5px solid #42a5f5;
  border-radius: 3px;
}

.icon-software::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 2.5px;
  background: #42a5f5;
  bottom: 14px;
  border-radius: 1px;
}

.icon-creative {
  background: linear-gradient(135deg, rgba(171, 71, 188, 0.2), rgba(186, 104, 200, 0.2));
  border: 1px solid rgba(171, 71, 188, 0.2);
}

.icon-creative::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid #ab47bc;
}

.icon-creative::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ce93d8;
  border-radius: 50%;
  top: 10px;
  right: 14px;
}

.icon-ai {
  background: linear-gradient(135deg, rgba(102, 187, 106, 0.2), rgba(129, 199, 132, 0.2));
  border: 1px solid rgba(102, 187, 106, 0.2);
}

.icon-ai::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2.5px solid #66bb6a;
  border-radius: 50%;
}

.icon-ai::after {
  content: '';
  position: absolute;
  width: 2.5px;
  height: 10px;
  background: #66bb6a;
  top: 32px;
  border-radius: 1px;
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.service-card__text {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ============================================
   ABOUT
   ============================================ */
.about__content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.about__text {
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.85;
  margin-bottom: 20px;
  opacity: 0.9;
}

.about__text:last-child {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* ============================================
   CONTACT
   ============================================ */
.contact__content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.contact__text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  line-height: 1.75;
}

.contact__email {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary-light);
  margin-bottom: 32px;
  display: block;
  word-break: break-all;
}

.contact__email:hover {
  color: var(--color-accent-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg-dark);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__copy {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.footer__links {
  display: flex;
  gap: 28px;
}

.footer__link {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-text-heading);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-card {
    padding: 36px;
  }

  .section {
    padding: 80px 0;
  }
}

/* Mobile */
@media (max-width: 640px) {
  /* Mobile Navigation */
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 14, 39, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 80px 32px 32px;
    transition: right var(--transition-base);
    border-left: 1px solid var(--color-border);
    z-index: 1005;
  }

  .nav.open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__link {
    display: block;
    padding: 16px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav__link::after {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Mobile overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-overlay.active {
    display: block;
  }

  /* Layout */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .game-card {
    padding: 28px 22px;
    border-radius: var(--radius-lg);
  }

  .game-card__title {
    font-size: 1.6rem;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }

  .container {
    padding: 0 18px;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .header__logo {
    font-size: 1.15rem;
  }

  .hero__title {
    font-size: 2rem;
  }
}
