/* ============================================
   HouneTeam Studio — Design System
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg: #060b18;
  --bg-soft: #0d1528;
  --card: rgba(13, 21, 40, 0.82);
  --card-hover: rgba(18, 28, 52, 0.92);
  --text: #eef2ff;
  --muted: #8896b8;
  --line: rgba(124, 199, 255, 0.08);
  --line-hover: rgba(124, 199, 255, 0.18);
  --accent: #7cc7ff;
  --accent-2: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #7cc7ff, #a78bfa);
  --success: #4ade80;
  --warning: #ffd989;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1140px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(124, 199, 255, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(167, 139, 250, 0.10), transparent),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(124, 199, 255, 0.06), transparent);
  animation: gradientShift 20s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0%   { opacity: 1; }
  50%  { opacity: 0.7; }
  100% { opacity: 1; }
}

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

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

h1, h2, h3, h4 { margin: 0; line-height: 1.15; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 20px; }

/* --- Layout --- */
.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.section { padding: 80px 0; }

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 11, 24, 0.78);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #05111f;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #05111f;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-gradient);
  opacity: 0.88;
  color: #05111f;
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(124, 199, 255, 0.08);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Cards --- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: border-color 0.3s, transform 0.3s;
}

.card:hover {
  border-color: var(--line-hover);
  transform: translateY(-3px);
}

.card h3 { margin-bottom: 12px; font-size: 1.2rem; }
.card p { color: var(--muted); }

/* --- Kicker / Badge --- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(124, 199, 255, 0.08);
  border: 1px solid rgba(124, 199, 255, 0.15);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(124, 199, 255, 0.08);
  border: 1px solid rgba(124, 199, 255, 0.12);
  color: var(--accent);
}

.badge.purple {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.15);
  color: var(--accent-2);
}

.badge.green {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.15);
  color: var(--success);
}

/* --- Hero --- */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content { position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 199, 255, 0.15), rgba(167, 139, 250, 0.08), transparent 70%);
  filter: blur(60px);
  animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.hero-logo-display {
  position: relative;
  z-index: 2;
  width: 280px;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(124, 199, 255, 0.2));
}

/* Hero Showcase */
.hero-showcase {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 380px;
}

.hero-showcase-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line-hover);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow), 0 0 40px rgba(124, 199, 255, 0.06);
}

.hero-showcase-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero-showcase-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-showcase-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.hero-showcase-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat-number {
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: 80px 0 40px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Games Section --- */
.game-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: start;
  transition: border-color 0.3s;
}

.game-card:hover {
  border-color: var(--line-hover);
}

.game-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.game-info h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.game-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.game-info p {
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 560px;
}

.game-features {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.game-features li {
  color: var(--muted);
  font-size: 0.95rem;
  padding-left: 20px;
  position: relative;
}

.game-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.store-btn svg { flex-shrink: 0; }

.store-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}


.coming-soon-card {
  background: var(--card);
  border: 1px dashed rgba(124, 199, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  color: var(--muted);
}

.coming-soon-card h3 {
  color: var(--text);
  margin-bottom: 8px;
  font-size: 1.3rem;
}

/* --- Value Cards --- */
.value-card {
  text-align: center;
  padding: 36px 28px;
}

.value-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 199, 255, 0.04), rgba(167, 139, 250, 0.04));
  pointer-events: none;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 16px;
  position: relative;
}

.cta-banner p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 28px;
  position: relative;
}

.cta-banner .btn-group {
  justify-content: center;
  position: relative;
}

.cta-email {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 16px;
  position: relative;
}

.cta-email a { color: var(--accent); }

/* --- Section Headings --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* --- Legal Pages --- */
.legal-wrap { padding: 0 0 80px; }

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 20px;
  justify-content: center;
}

.legal-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
}

.legal-section + .legal-section { margin-top: 20px; }

.legal-section h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text);
}

.legal-section h3 {
  font-size: 1.05rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  line-height: 1.7;
}

.legal-section li + li { margin-top: 8px; }

.legal-section ul, .legal-section ol { margin-bottom: 0; }

.legal-section a { color: var(--accent); }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 50px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.footer-brand img { height: 28px; width: auto; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--text); }

/* --- 404 --- */
.error-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
}

.error-code {
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */
/* --- Language Picker --- */
.lang-picker {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--line-hover);
}

.lang-btn.active {
  background: var(--accent-gradient);
  color: #05111f;
  border-color: transparent;
}

@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p { margin-left: auto; margin-right: auto; }
  .hero .btn-group { justify-content: center; }

  .hero-visual { order: -1; }
  .hero-logo-display { width: 200px; }
  .hero-showcase { max-width: 100%; margin: 0 auto; }

  .game-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .game-icon { margin: 0 auto; }
  .game-features { grid-template-columns: 1fr; }
  .game-info .btn-group { justify-content: center; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(6, 11, 24, 0.96);
    backdrop-filter: blur(20px);
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 105;
  }

  .nav.open a {
    font-size: 1.2rem;
    padding: 12px 24px;
  }

  .nav-toggle { display: block; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .section { padding: 50px 0; }

  .hero { min-height: auto; padding: 40px 0; }

  .game-card { padding: 24px; }
  .game-icon { width: 88px; height: 88px; }

  .cta-banner { padding: 36px 24px; }

  .page-hero { padding: 50px 0 30px; }

  .legal-section { padding: 24px; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .container { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  body::before { animation: none; }
  .hero-visual-glow { animation: none; }
}
