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

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

:root {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #ffffff;
  --muted: #888888;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f2f2f2;
    --border: #e0e0e0;
    --text: #111111;
    --muted: #666666;
  }
}

html.theme-light {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f2f2f2;
  --border: #e0e0e0;
  --text: #111111;
  --muted: #666666;
}

html.theme-dark {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #ffffff;
  --muted: #888888;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


/* ── Main ── */
main {
  flex: 1;
}

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem 2.5rem;
  gap: 1.25rem;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-icon {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.icon-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
}

.hero h1 {
  font-size: clamp(2rem, 10vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.tagline {
  font-size: clamp(1rem, 4vw, 1.25rem);
  color: var(--muted);
  max-width: 360px;
}

.appstore-btn {
  display: inline-block;
  margin-top: 0.5rem;
  transition: opacity 0.15s, transform 0.15s;
}

.appstore-btn:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

/* ── Screenshots ── */
.screenshots {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0 2rem 4rem;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.screenshot-frame {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 1320 / 2868;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

/* ── Features ── */
.features {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 2rem 6rem;
  flex-wrap: wrap;
}

.feature {
  max-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feature h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.feature p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Footer ── */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ── Legal pages ── */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.last-updated {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 2.5rem;
}

.legal section {
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.legal p,
.legal li {
  color: var(--muted);
  font-size: 0.925rem;
  line-height: 1.7;
}

.legal ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.legal a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal a:hover {
  color: var(--muted);
}

/* ── Site header (legal pages) ── */
.site-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}

.site-header-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ── In-app web view ── */
.in-app footer,
.in-app .site-header {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero {
    padding: 3rem 1.25rem 2.5rem;
  }

  .screenshots {
    padding: 1rem 0 3rem 1.25rem;
    justify-content: flex-start;
  }

  .screenshots::after {
    content: '';
    min-width: 0.25rem;
    flex-shrink: 0;
  }

  .features {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 4rem;
    gap: 1.75rem;
  }

  .feature {
    max-width: 100%;
  }

  .legal {
    padding: 2rem 1.25rem 4rem;
  }
}
