:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f6;
  --text-muted: #9b9bab;
  --accent: #6c5ce7;
  --accent-2: #00cec9;
  --gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --sticky-cta-h: 72px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(108, 92, 231, 0.38) 0%, rgba(108, 92, 231, 0.12) 45%, transparent 70%),
    radial-gradient(ellipse 65% 45% at 100% 40%, rgba(0, 206, 201, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 0% 30%, rgba(224, 108, 138, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body.page-app { padding-bottom: var(--sticky-cta-h); }

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

.shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  margin: 0 -20px;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.header-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

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

.page-enter main {
  animation: pageIn 0.45s var(--ease) forwards;
}

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

.hero {
  padding: 56px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-title-line {
  display: block;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-accent {
  background: linear-gradient(135deg, #7c6ef5, #e06c8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-brand {
  display: block;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 28px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.35);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.45);
}

.hero-cta svg { width: 18px; height: 18px; }

.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.app-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(108, 92, 231, 0.12) 0%, transparent 50%, rgba(0, 206, 201, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(108, 92, 231, 0.35);
}

.app-card:hover::before { opacity: 1; }

.app-card-body {
  position: relative;
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.app-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.app-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.app-card-tagline {
  font-size: 0.8125rem;
  color: var(--accent-2);
  font-weight: 500;
}

.app-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.pill {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.pill.accent {
  background: rgba(108, 92, 231, 0.2);
  color: #b8b0ff;
  border-color: rgba(108, 92, 231, 0.3);
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.app-card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
}

.app-card:hover .app-card-arrow {
  background: var(--gradient);
  color: #fff;
  transform: translateX(2px);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}

.skeleton-icon { width: 56px; height: 56px; border-radius: 14px; }
.skeleton-line { height: 14px; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w40 { width: 40%; }

.app-card.is-loading .app-card-desc,
.app-card.is-loading .app-card-tagline { visibility: hidden; }

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 20px;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.detail-back:hover { color: var(--text); }

.detail-hero {
  margin-bottom: 40px;
}

.detail-main { min-width: 0; }

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

.detail-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.detail-icon img { width: 100%; height: 100%; object-fit: cover; }

.detail-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.detail-tagline {
  color: var(--accent-2);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 14px;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-download-top { margin-top: 20px; }

.app-store-badge {
  display: inline-block;
  height: 44px;
  transition: opacity 0.2s, transform 0.2s;
}

.app-store-badge:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.app-store-badge svg { height: 100%; width: auto; display: block; }

.detail-content h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 32px 0 14px;
  letter-spacing: -0.02em;
}

.detail-content p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 14px;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
  margin-top: 8px;
  flex-shrink: 0;
}

.screenshots-carousel {
  margin: 28px 0 8px;
  overflow: hidden;
}

.screenshots-carousel .section-label {
  margin-bottom: 14px;
}

.screenshots-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.screenshots-scroll::-webkit-scrollbar { height: 6px; }
.screenshots-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.screenshot-item {
  flex: 0 0 auto;
  width: min(200px, 42vw);
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}

.screenshot-item:hover {
  transform: translateY(-2px);
  border-color: rgba(108, 92, 231, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.screenshot-item:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
  pointer-events: none;
}

/* Screenshot lightbox */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 960px);
  max-height: 100%;
}

.lightbox-figure {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-image {
  max-width: 100%;
  max-height: min(78vh, 900px);
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-caption {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox-nav:hover {
  background: rgba(108, 92, 231, 0.35);
  border-color: rgba(108, 92, 231, 0.5);
}

.lightbox-nav[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .lightbox-panel {
    flex-direction: column;
    gap: 16px;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    top: 8px;
    right: 8px;
    z-index: 2;
  }

  .lightbox-image {
    max-height: 70vh;
  }
}

.detail-content h2:first-child {
  margin-top: 24px;
}

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 12px 20px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

/* Contact / CTA */
.contact-section {
  padding: 5rem 0;
  margin-top: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 100vw);
  height: 600px;
  background: radial-gradient(circle, rgba(224, 108, 138, 0.12) 0%, transparent 68%);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
}

.contact-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e06c8a;
  margin-bottom: 1rem;
}

.contact-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.contact-text {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #7c6ef5, #9f7cfa);
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: 0 8px 32px rgba(124, 110, 245, 0.35);
}

.contact-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.contact-cta svg {
  flex-shrink: 0;
}

.contact-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-note a {
  color: #7c6ef5;
  text-decoration: none;
}

.contact-note a:hover {
  text-decoration: underline;
}

.contact-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding: 0;
  list-style: none;
}

.contact-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer p + p { margin-top: 8px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  z-index: 200;
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s;
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 480px) {
  .shell { padding: 0 16px 40px; }
  .site-header { margin: 0 -16px; padding: 0 16px; }
  .app-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .detail-icon { width: 72px; height: 72px; border-radius: 16px; }
}
