/* ==========================================================
   Grow It Studios — design system
   Minimal, dark, typographic. Fluid at every screen size.
   ========================================================== */

:root {
  --bg: #08080a;
  --surface: #0f0f12;
  --surface-2: #16161a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4f5;
  --muted: #8b8b94;
  --accent: #7c5cff;
  --live: #3ddc84;
  --radius: 14px;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1280px;
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---------- NAV ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(8, 8, 10, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.navbar.scrolled {
  border-color: var(--line);
  background: rgba(8, 8, 10, 0.85);
}

.nav-container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.logo img {
  height: 34px;
  width: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(16px, 3vw, 36px);
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  border-color: var(--text);
}

/* ---------- HERO ---------- */
.hero {
  padding: calc(var(--nav-h) + clamp(64px, 14vh, 160px)) 0 clamp(48px, 8vh, 96px);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 auto 0;
  height: 70%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(124, 92, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero h1,
.page-head h1 {
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero p.lead {
  margin: 22px auto 0;
  max-width: 34ch;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--muted);
}

/* ---------- STATS ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto clamp(56px, 10vw, 120px);
}

.stat {
  padding: clamp(20px, 4vw, 36px) clamp(14px, 3vw, 28px);
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-number {
  display: block;
  font-size: clamp(1.7rem, 5.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  min-height: 1.1em;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- SECTIONS ---------- */
.section {
  padding-bottom: clamp(64px, 10vw, 120px);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.section-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.link-arrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s;
}

.link-arrow:hover {
  color: var(--text);
}

/* ---------- GAME GRID ---------- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s;
}

a.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.game-thumb {
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

a.game-card:hover .game-thumb img {
  transform: scale(1.05);
}

.game-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-info h3 {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* ---------- SKELETONS ---------- */
.skeleton {
  background: linear-gradient(100deg, #141418 30%, #1d1d23 50%, #141418 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 6px;
}

.skeleton.line {
  display: block;
  height: 14px;
}
.skeleton.w70 { width: 70%; }
.skeleton.w40 { width: 40%; }

.stat-number.skeleton {
  width: 60%;
  margin-inline: auto;
  color: transparent;
}

@keyframes shimmer {
  to { background-position: -300% 0; }
}

/* ---------- GAMES PAGE HEADER ---------- */
.page-head {
  padding: calc(var(--nav-h) + clamp(56px, 10vh, 120px)) 0 clamp(32px, 6vw, 64px);
}

.page-head h1 {
  font-size: clamp(2.4rem, 8vw, 5rem);
}

.page-head p {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- CONTACT ---------- */
.contact {
  border-top: 1px solid var(--line);
  padding: clamp(64px, 10vw, 120px) 0;
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact h2 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.contact p {
  color: var(--muted);
  margin: 12px 0 32px;
}

#contact-form {
  display: grid;
  gap: 12px;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px: avoids iOS zoom on focus */
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: #5d5d66;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}

.btn {
  padding: 15px 28px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: #0a0a0c;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 520px) {
  :root { --nav-h: 60px; }
  .logo span { display: none; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.72rem; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .game-info { padding: 12px 12px 14px; gap: 8px; }
  .game-info h3 { font-size: 0.88rem; }
  .game-stats { font-size: 0.74rem; flex-direction: column; gap: 3px; }
  .stat-label { letter-spacing: 0.12em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
