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

html.dark {
  --bg: #292b38;
  --surface: #32354a;
  --surface-hover: #3a3d52;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text: #e8e8e6;
  --muted: #7c7f8e;
  --accent: #2563eb;
  --accent-dim: rgba(37,99,235,0.12);
  --nav-bg: rgba(41,43,56,0.85);
}

html.light {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-hover: #f0f0ee;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --text: #111111;
  --muted: #888;
  --accent: #2563eb;
  --accent-dim: rgba(37,99,235,0.08);
  --nav-bg: rgba(245,245,243,0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not(.light):not(.dark) {
    --bg: #292b38; --surface: #32354a; --surface-hover: #3a3d52;
    --border: rgba(255,255,255,0.07); --border-hover: rgba(255,255,255,0.14);
    --text: #e8e8e6; --muted: #7c7f8e;
    --accent: #2563eb; --accent-dim: rgba(37,99,235,0.12);
    --nav-bg: rgba(41,43,56,0.85);
  }
}
@media (prefers-color-scheme: light) {
  :root:not(.light):not(.dark) {
    --bg: #f5f5f3; --surface: #ffffff; --surface-hover: #f0f0ee;
    --border: rgba(0,0,0,0.08); --border-hover: rgba(0,0,0,0.15);
    --text: #111111; --muted: #888;
    --accent: #2563eb; --accent-dim: rgba(37,99,235,0.08);
    --nav-bg: rgba(245,245,243,0.85);
  }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

/* Nav */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.nav-inner {
  max-width: 680px;
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

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

.back-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
}

.cta-btn:hover { opacity: 0.85; }

.cta-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.cta-btn.disabled {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  pointer-events: none;
  cursor: default;
}

/* Container */
.page-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeUp 0.5s ease both;
}

.app-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}

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

.app-name {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.app-tagline {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.app-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 16px;
  opacity: 0.8;
}

.app-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(37,99,235,0.3);
}

/* Screenshots */
.screenshots-section {
  margin-bottom: 48px;
  animation: fadeUp 0.5s ease 0.1s both;
}

.screenshots-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -20px;
  padding: 4px 20px 12px;
}

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

.screenshot-slot {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* macOS app screenshot proportions */
.screenshot-item {
  height: 360px;
  min-width: 260px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14);
}

/* iOS portrait screenshot proportions */
.screenshots-strip.ios .screenshot-item {
  min-width: 168px;
}

.screenshot-item img {
  height: 100%;
  width: auto;
  display: none;
  position: relative;
  z-index: 1;
}

.screenshot-item img.loaded { display: block; }

/* Per-slot placeholder (dashed box) */
.slot-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.screenshot-item img.loaded ~ .slot-placeholder { display: none; }

.slot-placeholder svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  opacity: 0.35;
}

.slot-placeholder .slot-filename {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  opacity: 0.45;
  text-align: center;
}

/* Caption below each screenshot */
.screenshot-caption {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  max-width: 200px;
  line-height: 1.4;
  opacity: 0.65;
}

/* Features */
.features-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 48px;
  animation: fadeUp 0.5s ease 0.15s both;
}

.features-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 2px;
}

.feature {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.feature:first-of-type { border-top: 1px solid var(--border); }

.feature h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.feature p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* Footer */
.page-footer {
  animation: fadeUp 0.5s ease 0.2s both;
}

.footer-back {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Theme toggle */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  z-index: 100;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

.theme-toggle svg { width: 16px; height: 16px; }

.icon-sun { display: none; }
.icon-moon { display: block; }
html.light .icon-sun { display: block; }
html.light .icon-moon { display: none; }

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