/* ========================================
   CSS Custom Properties
   ======================================== */

:root {
  --color-primary: #E85D75;
  --color-primary-dark: #d14460;
  --color-secondary: #4A90D9;
  --color-accent-yellow: #F5A623;
  --color-accent-green: #7ED321;
  --color-accent-purple: #9B59B6;
  --color-dark: #2C3E50;
  --color-dark-light: #5a6c7d;
  --color-light: #FFF8F0;
  --color-white: #FFFFFF;
  --color-grid: rgba(200, 180, 160, 0.12);
  --color-border: rgba(44, 62, 80, 0.08);

  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-round: 50%;

  --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.08);
  --shadow-md: 0 4px 20px rgba(44, 62, 80, 0.1);
  --shadow-lg: 0 8px 40px rgba(44, 62, 80, 0.12);

  --header-height: 72px;
  --max-width: 1200px;
}

/* ========================================
   Reset & Base
   ======================================== */

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-light);
  background-image: radial-gradient(circle, var(--color-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

address {
  font-style: normal;
}

/* ========================================
   Utilities
   ======================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-sm);
}

.stitch-divider {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-xs);
}

.stitch-divider::before,
.stitch-divider::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  align-self: center;
}

.stitch-divider::before {
  background: linear-gradient(90deg, transparent, var(--color-primary));
}

.stitch-divider::after {
  background: linear-gradient(90deg, var(--color-primary), transparent);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

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

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(232, 93, 117, 0.3);
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  box-shadow: 0 6px 24px rgba(232, 93, 117, 0.4);
}

/* ========================================
   Header
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  transition: box-shadow 0.3s;
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

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

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-dark);
  text-decoration: none;
}

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

.header__logo-icon {
  flex-shrink: 0;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.header__link {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-dark-light);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}

.header__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: width 0.3s;
}

.header__link:hover,
.header__link--active {
  color: var(--color-primary);
}

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

.header__menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.header__menu-btn span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.header__menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.header__menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header__menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--header-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  overflow: hidden;
  text-align: center;
}

.hero__decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__motif {
  position: absolute;
  animation: float 8s ease-in-out infinite;
}

.hero__motif--1 { top: 15%; left: 8%; animation-delay: 0s; }
.hero__motif--2 { top: 25%; right: 12%; animation-delay: 1.5s; }
.hero__motif--3 { bottom: 30%; left: 15%; animation-delay: 3s; }
.hero__motif--4 { top: 60%; right: 8%; animation-delay: 4.5s; }
.hero__motif--5 { bottom: 15%; left: 45%; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(3deg); }
  66% { transform: translateY(8px) rotate(-2deg); }
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero__title br {
  display: block;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-dark-light);
  max-width: 540px;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

.hero__cta {
  margin-top: var(--space-sm);
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-dark-light);
  opacity: 0.4;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   About
   ======================================== */

.about {
  padding: var(--space-2xl) 0;
}

.about__text {
  text-align: center;
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  color: var(--color-dark-light);
  line-height: 1.8;
}

.about__text strong {
  color: var(--color-dark);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.stat {
  text-align: center;
  padding: var(--space-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat__label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-dark-light);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   Games
   ======================================== */

.games {
  padding: var(--space-2xl) 0;
  background: var(--color-white);
  background-image: radial-gradient(circle, var(--color-grid) 1px, transparent 1px);
  background-size: 20px 20px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-md);
}

.game-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.game-card--featured {
  grid-column: 1 / -1;
  max-width: 600px;
  margin: 0 auto var(--space-sm);
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: var(--shadow-md);
}

.game-card__icon {
  flex-shrink: 0;
}

.game-card__icon img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.game-card--featured .game-card__icon img {
  width: 100px;
  height: 100px;
}

.game-card__info {
  flex: 1;
  min-width: 0;
}

.game-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.game-card--featured .game-card__title {
  font-size: 1.375rem;
}

.game-card__subtitle {
  font-size: 0.875rem;
  color: var(--color-dark-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.game-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.stars {
  color: var(--color-accent-yellow);
  font-size: 0.875rem;
  letter-spacing: 1px;
}

.stars--muted {
  opacity: 0.4;
}

.rating-num {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-dark-light);
}

.game-card__badge-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-accent-green);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 8px;
}

.game-card__desc {
  font-size: 0.875rem;
  color: var(--color-dark-light);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.game-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-dark);
  color: var(--color-white);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s, transform 0.2s;
}

.store-badge:hover {
  background: var(--color-dark-light);
  color: var(--color-white);
  transform: translateY(-1px);
}

.store-badge--web {
  background: var(--color-accent-green);
}

.store-badge--web:hover {
  background: #6bc41a;
}

.store-badge__icon {
  flex-shrink: 0;
}

/* ========================================
   Features
   ======================================== */

.features {
  padding: var(--space-2xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.feature {
  text-align: center;
  padding: var(--space-md);
}

.feature__icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

.feature__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: var(--space-xs);
}

.feature__desc {
  font-size: 0.9375rem;
  color: var(--color-dark-light);
  line-height: 1.6;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding-top: var(--space-2xl);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
  margin-bottom: var(--space-sm);
}

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

.footer__tagline {
  font-size: 0.9375rem;
  opacity: 0.6;
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.footer__address p {
  font-size: 0.875rem;
  line-height: 1.8;
}

.footer__address a {
  color: var(--color-primary);
}

.footer__address a:hover {
  color: var(--color-accent-yellow);
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer__nav a:hover {
  color: var(--color-primary);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-md) 0;
}

.footer__bottom p {
  font-size: 0.8125rem;
  opacity: 0.5;
  text-align: center;
}

/* ========================================
   Animations
   ======================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .header__nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    background: rgba(255, 248, 240, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .header__nav--open {
    display: flex;
  }

  .header__link {
    font-size: 1.5rem;
  }

  .header__menu-btn {
    display: flex;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1.0625rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-card--featured {
    max-width: 100%;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.875rem;
  }

  .game-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .game-card__badges {
    justify-content: center;
  }

  .stat__number {
    font-size: 1.5rem;
  }
}
