/* ═══════════════════════════════════════════════════════
   Mun Studio — Apps Landing Page
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:           #080710;
  --bg-elevated:  #0f0e1a;
  --bg-card:      #12111e;
  --bg-card-hover:#161528;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text:         #eeeaf8;
  --text-muted:   #8e8aa0;
  --text-faint:   #5a5670;
  --accent:       #c4a0ff;
  --accent-soft:  rgba(196, 160, 255, 0.12);

  /* App accent colors */
  --color-theme-store:   #f472b6;
  --color-icon-changer:  #a78bfa;
  --color-videorist:     #fb923c;
  --color-fotorist:      #60a5fa;
  --color-pillcam:       #34d399;
  --color-whatssong:     #f472b6;

  --radius:     18px;
  --radius-sm:  10px;
  --radius-xs:  7px;
  --font-sans:  "DM Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --max-width:  1160px;
  --header-h:   64px;
}

/* ─── Reset & Base ─── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

strong { font-weight: 600; }

/* ════════════════════ HEADER ════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(8, 7, 16, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #c4a0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.nav-link-cta {
  color: var(--accent);
  border: 1px solid rgba(196,160,255,0.25);
}

.nav-link-cta:hover { background: rgba(196,160,255,0.1); color: #d4b4ff; }

/* ════════════════════ HERO ════════════════════ */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 28px 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.hero-orb-1 {
  width: 600px; height: 600px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(124, 92, 191, 0.55) 0%, transparent 65%);
}

.hero-orb-2 {
  width: 400px; height: 400px;
  bottom: -60px; left: 20%;
  background: radial-gradient(circle, rgba(196, 160, 255, 0.3) 0%, transparent 65%);
}

.hero-orb-3 {
  width: 280px; height: 280px;
  top: 30%; right: 8%;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.25) 0%, transparent 65%);
}

.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-content { flex: 1; max-width: 600px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(196, 160, 255, 0.2);
  border-radius: 100px;
}

.hero h1 {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 6.5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, #c4a0ff 0%, #f9a8d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  margin: 0 0 36px;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  color: #0a0915;
  background: linear-gradient(135deg, #e0c9ff 0%, #fff 100%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(196, 160, 255, 0.3);
}

.btn-ghost {
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
}

/* ─── Hero floating icons ─── */

.hero-icons {
  position: relative;
  width: 340px;
  height: 380px;
  flex-shrink: 0;
}

.hero-icon-float {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-icon-float img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
}

.hero-icon-float:hover img { transform: scale(1.08) rotate(3deg); }

.hi-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.hi-1 { top: 0;    left: 0;    animation: float1 7s ease-in-out infinite; }
.hi-2 { top: 0;    right: 0;   animation: float2 8s ease-in-out infinite; }
.hi-3 { top: 130px; left: 60px; animation: float3 6.5s ease-in-out infinite; }
.hi-4 { top: 140px; right: 50px; animation: float1 9s ease-in-out infinite 1s; }
.hi-5 { bottom: 0; left: 20px;  animation: float2 7.5s ease-in-out infinite 0.5s; }
.hi-6 { bottom: 0; right: 20px; animation: float3 8.5s ease-in-out infinite 1.5s; }

@keyframes float1 {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-14px) rotate(1deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50%      { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(-6px) rotate(0deg); }
  50%      { transform: translateY(6px) rotate(2deg); }
}

/* ════════════════════ STATS BAR ════════════════════ */

.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 40px;
  gap: 2px;
}

.stat-num {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

.stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ════════════════════ APPS SECTION ════════════════════ */

.apps-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 28px 120px;
}

.section-header { margin-bottom: 40px; }

.section-header h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ─── Filter tabs ─── */

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-tab {
  padding: 8px 18px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}

.filter-tab.active {
  color: var(--bg);
  background: var(--text);
  border-color: transparent;
}

/* ─── App list ─── */

.apps-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ════════════════════ APP CARD ════════════════════ */

.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  opacity: 0;

  /* Hover transitions */
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.app-card.is-visible {
  opacity: 1; /* persists after animation is removed by JS */
  animation: cardIn 0.55s ease forwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* App-specific glow colors on hover */
.app-card[data-color="theme-store"]:hover   { border-color: rgba(244,114,182,0.4); box-shadow: 0 20px 60px rgba(244,114,182,0.12); }
.app-card[data-color="icon-changer"]:hover  { border-color: rgba(167,139,250,0.4); box-shadow: 0 20px 60px rgba(167,139,250,0.12); }
.app-card[data-color="videorist"]:hover     { border-color: rgba(251,146,60,0.4);  box-shadow: 0 20px 60px rgba(251,146,60,0.12); }
.app-card[data-color="fotorist"]:hover      { border-color: rgba(96,165,250,0.4);  box-shadow: 0 20px 60px rgba(96,165,250,0.12); }
.app-card[data-color="pillcam"]:hover       { border-color: rgba(52,211,153,0.4);  box-shadow: 0 20px 60px rgba(52,211,153,0.12); }
.app-card[data-color="whatssong"]:hover     { border-color: rgba(244,114,182,0.4); box-shadow: 0 20px 60px rgba(244,114,182,0.12); }

.app-card:hover { transform: translateY(-3px); background: var(--bg-card-hover); }
.app-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Subtle gradient overlay top-left based on app color */
.app-card[data-color="theme-store"]::before   { background: radial-gradient(circle at 0% 0%, rgba(244,114,182,0.07) 0%, transparent 60%); }
.app-card[data-color="icon-changer"]::before  { background: radial-gradient(circle at 0% 0%, rgba(167,139,250,0.07) 0%, transparent 60%); }
.app-card[data-color="videorist"]::before     { background: radial-gradient(circle at 0% 0%, rgba(251,146,60,0.07) 0%, transparent 60%); }
.app-card[data-color="fotorist"]::before      { background: radial-gradient(circle at 0% 0%, rgba(96,165,250,0.07) 0%, transparent 60%); }
.app-card[data-color="pillcam"]::before       { background: radial-gradient(circle at 0% 0%, rgba(52,211,153,0.07) 0%, transparent 60%); }
.app-card[data-color="whatssong"]::before     { background: radial-gradient(circle at 0% 0%, rgba(244,114,182,0.07) 0%, transparent 60%); }

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}


/* ─── Card inner ─── */

.app-card-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 380px;
}

.app-info {
  padding: 36px 36px 36px 36px;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.app-icon-img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.app-header-text { min-width: 0; }

.app-cat-badge {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.app-name {
  margin: 0 0 4px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.app-tagline {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-style: italic;
}

.app-description {
  margin: 0 0 18px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex-grow: 1;
}

.app-features {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.app-features li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
  font-size: 0.875rem;
  color: var(--text);
}

.app-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

/* Store buttons */
.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
  cursor: pointer;
}

.store-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.store-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.store-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-btn span small {
  font-size: 0.625rem;
  opacity: 0.65;
  font-weight: 400;
}

.store-btn span:not(small) {
  font-size: 0.875rem;
  font-weight: 600;
}

.store-btn-apple  { color: #fff; }
.store-btn-play   { color: #fff; }
.store-btn-samsung { color: #fff; }

.coming-soon-badge {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-faint);
  padding: 4px 0;
}

/* ════════════════════ SCREENSHOTS ════════════════════ */

.app-screenshots {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px 20px;
  gap: 16px;
}

.screenshots-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  flex: 1;
}

.screenshots-track::-webkit-scrollbar { display: none; }

.screenshot-frame {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 128px;
  border-radius: 8px;
  overflow: hidden;
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ─── Carousel navigation ─── */
.screenshots-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.nav-arrow:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border-color: var(--border-hover);
}

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

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.nav-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ─── Visual placeholder (for apps without screenshots) ─── */

.app-visual-bg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(167,139,250,0.14) 0%, transparent 70%);
  min-height: 260px;
}

.visual-icon-large {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  position: relative;
  z-index: 2;
}

.visual-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 14px;
  position: relative;
  z-index: 2;
}

.visual-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(167,139,250,0.12);
}

.ring-1 { width: 140px; height: 140px; }
.ring-2 { width: 200px; height: 200px; border-color: rgba(167,139,250,0.07); }
.ring-3 { width: 280px; height: 280px; border-color: rgba(167,139,250,0.04); }

/* ════════════════════ FOOTER ════════════════════ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 64px 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  padding-bottom: 48px;
}

.footer-brand { max-width: 360px; }

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 12px;
}

.footer-brand p {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.footer-socials a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  border-color: var(--border-hover);
}

.footer-socials svg { width: 16px; height: 16px; }

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

.footer-col a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* ════════════════════ RESPONSIVE ════════════════════ */

@media (max-width: 900px) {
  .app-card-inner {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .app-screenshots {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 20px 20px 16px;
  }

  .screenshots-track {
    gap: 10px;
  }

  .screenshot-frame {
    width: 110px;
  }

  .hero-icons { display: none; }

  .hero { min-height: 70vh; padding: 60px 28px 60px; }

  .hero h1 { font-size: clamp(2.25rem, 8vw, 3rem); }
}

@media (max-width: 640px) {
  .nav { padding: 0 20px; }

  .hero { padding: 48px 20px 48px; min-height: 60vh; }

  .apps-section { padding: 60px 20px 80px; }

  .app-info { padding: 24px 20px; }

  .app-card-inner { min-height: unset; }

  .stats-inner { padding: 0 20px; }

  .stat { padding: 16px 24px; }

  .footer-inner { flex-direction: column; gap: 32px; }

  .footer-links { gap: 32px; }

  .nav-right .nav-link-cta { display: none; }
}

/* ─── Reduced motion ─── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-icon-float,
  .app-card,
  .store-btn,
  .nav-arrow {
    animation: none;
    transition: none;
  }

  .app-card.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
