@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --white: #ffffff;
  --bg-soft: #f8f7fc;
  --bg-muted: #f0eef8;
  --ink: #141428;
  --ink-soft: #3d3d5c;
  --ink-muted: #6b6b88;
  --violet: #7c5cfc;
  --violet-soft: #a78bfa;
  --violet-pale: #ede9fe;
  --mint: #34d399;
  --mint-pale: #ecfdf5;
  --rose: #f472b6;
  --rose-pale: #fdf2f8;
  --line: rgba(20, 20, 40, 0.08);
  --shadow: 0 4px 24px rgba(20, 20, 40, 0.06);
  --shadow-lg: 0 12px 48px rgba(20, 20, 40, 0.1);
  --radius: 16px;
  --radius-lg: 24px;
  --font: 'Manrope', system-ui, sans-serif;
  --display: 'Playfair Display', Georgia, serif;
  --header-h: 72px;
  --play-url: 'https://play.google.com/store/apps/details?id=com.youmusic.magictiles';
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--violet); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--violet-soft); }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(1140px, 92vw); margin: 0 auto; }

/* ── Animated background ── */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--white);
  overflow: hidden;
}

.bg-wave {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background:
    radial-gradient(ellipse 40% 30% at 20% 30%, rgba(167, 139, 250, 0.07), transparent),
    radial-gradient(ellipse 35% 25% at 80% 70%, rgba(52, 211, 153, 0.06), transparent),
    radial-gradient(ellipse 30% 20% at 60% 20%, rgba(244, 114, 182, 0.05), transparent);
  animation: waveDrift 18s ease-in-out infinite alternate;
}

@keyframes waveDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(2%, 3%) rotate(2deg); }
}

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

.note-float {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.12;
  color: var(--violet);
  animation: noteRise linear infinite;
}

.note-float:nth-child(1) { left: 8%; animation-duration: 14s; animation-delay: 0s; }
.note-float:nth-child(2) { left: 22%; animation-duration: 18s; animation-delay: 3s; font-size: 1rem; }
.note-float:nth-child(3) { left: 45%; animation-duration: 16s; animation-delay: 1s; color: var(--mint); }
.note-float:nth-child(4) { left: 68%; animation-duration: 20s; animation-delay: 5s; }
.note-float:nth-child(5) { left: 85%; animation-duration: 15s; animation-delay: 2s; font-size: 1.8rem; color: var(--rose); }
.note-float:nth-child(6) { left: 55%; animation-duration: 22s; animation-delay: 7s; font-size: 0.9rem; }

@keyframes noteRise {
  0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.12; }
  90% { opacity: 0.12; }
  100% { transform: translateY(-10vh) rotate(20deg); opacity: 0; }
}

.bg-pulse {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 90vw);
  height: 300px;
  background: radial-gradient(ellipse, rgba(124, 92, 252, 0.04), transparent 70%);
  z-index: -1;
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

/* ── Free ribbon ── */
.free-ribbon {
  background: linear-gradient(90deg, var(--mint-pale), var(--violet-pale), var(--rose-pale));
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.free-ribbon strong { color: var(--violet); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand img { width: 36px; height: 36px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-list a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--violet-pale);
  color: var(--violet);
}

/* ── Play badge ── */
.play-badge {
  display: inline-block;
  transition: transform 0.25s, filter 0.25s;
}

.play-badge img {
  width: 180px;
  height: auto;
}

.play-badge:hover {
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 6px 16px rgba(124, 92, 252, 0.25));
}

.play-badge--sm img { width: 160px; }
.play-badge--center { display: flex; justify-content: center; margin: 1.5rem 0; }

/* ── Game intro (top block) ── */
.game-intro {
  padding: 3rem 0 2rem;
}

.game-intro-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s ease both;
}

.game-intro-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--violet), var(--mint), var(--rose));
}

.game-intro-tag {
  display: inline-block;
  background: var(--violet-pale);
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.game-intro-panel h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.game-intro-panel p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 820px;
}

.game-intro-panel p + p { margin-top: 0.85rem; }

/* ── Hero split ── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2rem 0 4rem;
}

.hero-copy { animation: fadeUp 0.7s 0.15s ease both; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--mint-pale);
  color: #059669;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-title em {
  font-style: italic;
  color: var(--violet);
}

.hero-lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  max-width: 480px;
}

.hero-visual {
  position: relative;
  animation: fadeUp 0.7s 0.3s ease both;
}

.hero-phone {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  max-width: 320px;
  margin: 0 auto;
}

.hero-phone img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
}

.hero-ring {
  position: absolute;
  inset: -20px;
  border: 2px solid var(--violet-pale);
  border-radius: calc(var(--radius-lg) + 20px);
  animation: ringPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

/* ── Stats strip ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 2rem 0 3rem;
}

.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeUp 0.6s ease both;
}

.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }

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

.stat-num {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--violet);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* ── Bento grid ── */
.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--ink-muted);
  max-width: 560px;
  margin: 0 auto;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 1rem;
  padding-bottom: 3rem;
}

.bento-cell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeUp 0.6s ease both;
}

.bento-cell:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.bento-cell h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.bento-cell p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.bento-cell .cell-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.bento-a { grid-column: span 5; grid-row: span 2; background: var(--violet-pale); }
.bento-b { grid-column: span 4; }
.bento-c { grid-column: span 3; }
.bento-d { grid-column: span 4; }
.bento-e { grid-column: span 3; background: var(--mint-pale); }
.bento-f { grid-column: span 5; background: var(--rose-pale); }

/* ── Screenshots ── */
.gallery-section {
  padding: 3rem 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.35s;
  animation: fadeUp 0.6s ease both;
}

.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.3s; }

.gallery-item:hover { transform: scale(1.03); }

.gallery-item img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
}

/* ── India block ── */
.india-block {
  padding: 3.5rem 0;
}

.india-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.india-inner h2 {
  font-family: var(--display);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.india-inner p {
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

.india-perks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.india-perk {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius-sm, 12px);
  font-size: 0.92rem;
}

.india-perk span:first-child {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--violet-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* ── Rhythm demo ── */
.rhythm-demo {
  padding: 3rem 0 4rem;
}

.rhythm-bar {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 80px;
  margin: 2rem 0;
}

.rhythm-bar span {
  width: 14px;
  background: linear-gradient(to top, var(--violet), var(--violet-soft));
  border-radius: 4px 4px 0 0;
  animation: barBounce 0.8s ease-in-out infinite alternate;
}

.rhythm-bar span:nth-child(1) { animation-delay: 0s; height: 30%; }
.rhythm-bar span:nth-child(2) { animation-delay: 0.1s; height: 50%; }
.rhythm-bar span:nth-child(3) { animation-delay: 0.2s; height: 70%; }
.rhythm-bar span:nth-child(4) { animation-delay: 0.15s; height: 90%; }
.rhythm-bar span:nth-child(5) { animation-delay: 0.05s; height: 60%; }
.rhythm-bar span:nth-child(6) { animation-delay: 0.25s; height: 40%; }
.rhythm-bar span:nth-child(7) { animation-delay: 0.12s; height: 80%; }
.rhythm-bar span:nth-child(8) { animation-delay: 0.18s; height: 55%; }

@keyframes barBounce {
  0% { transform: scaleY(0.4); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* ── CTA band ── */
.cta-band {
  background: linear-gradient(135deg, var(--violet-pale) 0%, var(--white) 50%, var(--mint-pale) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-band h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Inner pages ── */
.page-hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  color: var(--ink-muted);
  max-width: 640px;
  margin: 0 auto;
}

.content-block {
  padding: 2rem 0 4rem;
}

.content-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 860px;
  margin: 0 auto;
}

.content-panel h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

.content-panel h2:first-child { margin-top: 0; }

.content-panel p,
.content-panel li {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.content-panel ul,
.content-panel ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.content-panel .updated {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.88rem;
  margin: 0;
}

.steps-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps-list li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.steps-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--violet);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

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

.footer-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.45rem; }

.footer-col a {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-col a:hover { color: var(--violet); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 32px rgba(20, 20, 40, 0.08);
  padding: 1.25rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible { transform: translateY(0); }

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1140px;
  margin: 0 auto;
  width: 92vw;
}

.cookie-inner p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  flex: 1;
  min-width: 240px;
}

.cookie-actions {
  display: flex;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary {
  background: var(--violet);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--violet-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: var(--bg-soft); }

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

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; gap: 2rem; }
  .hero-phone { max-width: 280px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .bento-a, .bento-b, .bento-c, .bento-d, .bento-e, .bento-f { grid-column: span 6; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .india-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  .nav-list.open { display: flex; }
  .site-header .container { position: relative; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .bento-a, .bento-b, .bento-c, .bento-d, .bento-e, .bento-f { grid-column: span 12; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .game-intro-panel { padding: 1.5rem; }
  .content-panel { padding: 1.5rem; }
  .play-badge img { width: 155px; }
}
