/* Penguin Games — homepage cinematic styles */

/* ─── Fonts ─────────────────────────────────────────────────── */
.brand__title {
  font-family: "Space Grotesk", "Nunito", system-ui, -apple-system, sans-serif;
}

/* ─── Nebula blobs ───────────────────────────────────────────── */
@keyframes nebulaShift1 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50%  { transform: translate(6%, 4%) scale(1.08); opacity: 1; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
}

@keyframes nebulaShift2 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50%  { transform: translate(-5%, -6%) scale(1.05); opacity: 0.85; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
}

@keyframes nebulaShift3 {
  0%   { opacity: 0.5; transform: translate(0, 0); }
  40%  { opacity: 0.8; transform: translate(-3%, 5%); }
  100% { opacity: 0.5; transform: translate(0, 0); }
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.nebula__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.nebula__blob--1 {
  width: 70vmax;
  height: 70vmax;
  top: -25vmax;
  left: -15vmax;
  background: radial-gradient(circle, rgba(99, 57, 234, 0.55) 0%, rgba(67, 24, 180, 0.3) 45%, transparent 70%);
  animation: nebulaShift1 18s ease-in-out infinite;
}

.nebula__blob--2 {
  width: 65vmax;
  height: 65vmax;
  bottom: -20vmax;
  right: -10vmax;
  background: radial-gradient(circle, rgba(190, 24, 93, 0.45) 0%, rgba(131, 24, 67, 0.25) 40%, transparent 70%);
  animation: nebulaShift2 22s ease-in-out infinite;
}

.nebula__blob--3 {
  width: 50vmax;
  height: 50vmax;
  top: 10vmax;
  right: -10vmax;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(14, 116, 144, 0.15) 50%, transparent 70%);
  animation: nebulaShift3 26s ease-in-out infinite;
}

/* ─── Starfield canvas ───────────────────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ─── Page layout ────────────────────────────────────────────── */
body {
  background: #04060f;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  padding-top: max(3rem, env(safe-area-inset-top));
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
}

/* ─── Hero / brand ───────────────────────────────────────────── */
.brand {
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.brand__halo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

@keyframes haloPulse {
  0%, 100% { box-shadow: 0 0 32px 12px rgba(99, 57, 234, 0.25), 0 0 64px 28px rgba(6, 182, 212, 0.1); }
  50%       { box-shadow: 0 0 48px 20px rgba(190, 24, 93, 0.3),  0 0 80px 40px rgba(99, 57, 234, 0.15); }
}

.brand__halo-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 1px solid rgba(165, 243, 252, 0.15);
  animation: haloPulse 5s ease-in-out infinite;
}

.brand__mark {
  font-size: 3.5rem;
  line-height: 1;
  margin: 0;
  filter: drop-shadow(0 0 18px rgba(165, 243, 252, 0.5)) drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}

.brand__title {
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #a5f3fc 0%, #818cf8 50%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.brand__tag {
  margin: 0.6rem 0 0;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(165, 243, 252, 0.65);
  letter-spacing: 0.01em;
}

/* ─── Entrance animations ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand__halo {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.brand__title {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.brand__tag {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.games .game-card:nth-child(1) { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both; }
.games .game-card:nth-child(2) { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both; }
.games .game-card:nth-child(3) { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both; }

.footer-note { animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1s both; }

@media (prefers-reduced-motion: reduce) {
  .brand__halo,
  .brand__title,
  .brand__tag,
  .games .game-card,
  .footer-note {
    animation: none;
  }
  .nebula__blob--1,
  .nebula__blob--2,
  .nebula__blob--3 {
    animation: none;
  }
  .brand__halo-ring {
    animation: none;
  }
}

/* ─── Game cards ─────────────────────────────────────────────── */
.game-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.048);
  border-color: rgba(165, 243, 252, 0.14);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(165, 243, 252, 0.18);
  transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.075);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(165, 243, 252, 0.3);
}

.game-card:active {
  transform: scale(0.98) translateY(0);
}

/* Per-card left accent stripe */
.game-card:nth-child(1) {
  border-left: 2px solid rgba(103, 232, 249, 0.6);
}

.game-card:nth-child(2) {
  border-left: 2px solid rgba(251, 113, 133, 0.6);
}

.game-card__name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #e2f0ff;
}

.game-card__desc {
  color: rgba(165, 243, 252, 0.6);
}

/* ─── Install button ─────────────────────────────────────────── */
.install-btn {
  display: block;
  margin: 1.75rem auto 0;
  padding: 0.72rem 1.75rem;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e2f0ff;
  background: linear-gradient(
    135deg,
    rgba(99, 57, 234, 0.28) 0%,
    rgba(6, 182, 212, 0.22) 100%
  );
  border: 1px solid rgba(165, 243, 252, 0.28);
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 4px 24px rgba(99, 57, 234, 0.18),
    inset 0 1px 0 rgba(165, 243, 252, 0.12);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.95s both;
}

.install-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 57, 234, 0.42) 0%,
    rgba(6, 182, 212, 0.34) 100%
  );
  box-shadow:
    0 8px 32px rgba(99, 57, 234, 0.3),
    inset 0 1px 0 rgba(165, 243, 252, 0.22);
}

.install-btn:active {
  transform: scale(0.97);
}

/* ─── iOS install hint ───────────────────────────────────────── */
.ios-hint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.5rem auto 0;
  max-width: 100%;
  padding: 0.7rem 1rem 0.7rem 1.1rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(165, 243, 252, 0.15);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.95s both;
}

.ios-hint__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  color: rgba(165, 243, 252, 0.8);
}

.ios-hint__text {
  font-size: 0.82rem;
  color: rgba(165, 243, 252, 0.65);
  line-height: 1.4;
  flex: 1;
}

.ios-hint__text strong {
  color: rgba(165, 243, 252, 0.9);
  font-weight: 700;
}

.ios-hint__close {
  background: none;
  border: none;
  color: rgba(165, 243, 252, 0.35);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  line-height: 1;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.ios-hint__close:hover {
  color: rgba(165, 243, 252, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .install-btn,
  .ios-hint {
    animation: none;
  }
}

.footer-note {
  margin-top: 3rem;
  color: rgba(165, 243, 252, 0.3);
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  text-transform: lowercase;
}
