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

:root {
  --purple: #7c3aed;
  --magenta: #d946ef;
  --dark: #1a0a2e;
  --card-bg: rgba(255,255,255,0.07);
  --card-border: rgba(255,255,255,0.12);
  --text: #f0e6ff;
  --text-muted: rgba(240,230,255,0.6);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('../img/background.webp') center bottom / cover no-repeat,
    linear-gradient(180deg, #0f0628 0%, #1a0a2e 40%, #0c1e3a 100%);
  filter: brightness(0.55) saturate(1.2);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(15,6,40,0.7) 0%,
    rgba(15,6,40,0.2) 40%,
    rgba(15,6,40,0.0) 60%,
    rgba(15,6,40,0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 600px;
}

.hero-character {
  width: min(280px, 55vw);
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  animation: gentleFloat 6s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #e0c3fc 50%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 2.5rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease-out 1.5s both;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--magenta), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ===== Apps ===== */

.apps {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 0.75rem;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .app-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== App card ===== */

.app-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: block;
  overflow: hidden;
}

.app-card:hover, .app-card:focus-visible {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.app-card--featured {
  grid-column: 1 / -1;
  display: flex;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(217,70,239,0.12), rgba(124,58,237,0.08));
  border-color: rgba(217,70,239,0.2);
}

.app-card--featured:hover {
  border-color: rgba(217,70,239,0.4);
  background: linear-gradient(135deg, rgba(217,70,239,0.18), rgba(124,58,237,0.12));
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.app-card--featured .app-icon {
  width: 72px;
  height: 72px;
  font-size: 2.25rem;
  margin-bottom: 0;
}

.app-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.app-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.app-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-top: 0.75rem;
}

.badge-play {
  background: linear-gradient(135deg, var(--magenta), var(--purple));
  color: white;
}

/* ===== Stars ===== */

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--d) ease-in-out infinite;
  opacity: 0;
}

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

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.1; }
  50% { opacity: var(--o, 0.8); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.3); transform-origin: top; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
