:root {
  --bg: #ffffff;
  --bg-elevated: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  --card-shadow-hover: 0 28px 48px rgba(0, 0, 0, 0.18);
  --divider: rgba(0, 0, 0, 0.08);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #2997ff;
    --accent-soft: rgba(41, 151, 255, 0.15);
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    --card-shadow-hover: 0 28px 56px rgba(0, 0, 0, 0.7);
    --divider: rgba(255, 255, 255, 0.12);
  }
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- nav ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--divider);
}

@media (prefers-reduced-transparency: reduce) {
  nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }
}

nav .container {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
}

nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

nav .brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

nav .links {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 14px;
}

nav .links a {
  padding: 4px 2px;
  transition: opacity 100ms ease-out;
}

nav .links a:active {
  opacity: 0.5;
  transition: opacity 0ms;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  text-align: center;
  padding: 72px 0 48px;
  overflow: clip;
}

.hero::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  width: 480px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.hero > .container > * {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation: hero-in 700ms var(--ease-out) forwards;
}

.hero img.app-icon { animation-delay: 40ms; }
.hero h1 { animation-delay: 110ms; }
.hero p.tagline { animation-delay: 170ms; }
.hero .store-badge { animation-delay: 230ms; }
.hero .soon-note { animation-delay: 280ms; }

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero > .container > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero img.app-icon {
  width: 128px;
  height: 128px;
  border-radius: 29px;
  box-shadow: var(--card-shadow);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 28px;
}

.hero p.tagline {
  font-size: clamp(19px, 3vw, 26px);
  color: var(--text-secondary);
  margin-top: 10px;
  font-weight: 400;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 26px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-size: 17px;
  font-weight: 500;
  transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .store-badge:hover {
    transform: scale(1.03);
    text-decoration: none;
    opacity: 0.9;
  }
}

.store-badge:active {
  transform: scale(0.97);
  opacity: 0.85;
  transition: transform 100ms var(--ease-out), opacity 100ms var(--ease-out);
}

.store-badge svg {
  width: 22px;
  height: 26px;
  fill: currentColor;
}

.store-badge .lines {
  text-align: left;
  line-height: 1.2;
}

.store-badge .lines small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
}

.hero .soon-note {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- screenshots ---------- */

.screens {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 36px 22px 56px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

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

.screens img {
  width: 260px;
  flex: 0 0 auto;
  border-radius: 32px;
  box-shadow: var(--card-shadow);
  scroll-snap-align: center;
  border: 1px solid var(--divider);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .screens img:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
  }
}

@media (min-width: 900px) {
  .screens {
    justify-content: center;
    flex-wrap: nowrap;
  }
}

/* ---------- scroll reveal ---------- */
/* Hidden state only applies once .js confirms JS ran, so no-JS visitors
   always see full content (progressive enhancement, not a hard dependency). */

html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal {
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.feature-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.feature-grid .reveal:nth-child(2) { transition-delay: 60ms; }
.feature-grid .reveal:nth-child(3) { transition-delay: 120ms; }
.feature-grid .reveal:nth-child(4) { transition-delay: 180ms; }
.feature-grid .reveal:nth-child(5) { transition-delay: 240ms; }
.feature-grid .reveal:nth-child(6) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- features ---------- */

.features {
  background: var(--bg-elevated);
  padding: 72px 0;
}

.features h2,
.section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--bg);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--divider);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
    border-color: transparent;
  }
}

.feature .icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  font-size: 24px;
  background: var(--icon-bg, var(--accent-soft));
}

.feature h3 {
  font-size: 19px;
  margin: 14px 0 6px;
  font-weight: 600;
}

.feature p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---------- generic sections / article pages ---------- */

.section {
  padding: 72px 0;
}

article.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 22px 80px;
}

article.prose h1 {
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

article.prose .updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 34px;
  display: block;
}

article.prose h2 {
  font-size: 22px;
  margin: 36px 0 10px;
}

article.prose p,
article.prose li {
  color: var(--text);
  font-size: 17px;
  margin-bottom: 12px;
}

article.prose ul {
  padding-left: 22px;
}

.lead-box {
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 30px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 28px;
  margin-top: 24px;
  font-size: 17px;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--divider);
  padding: 40px 0 56px;
  color: var(--text-secondary);
  font-size: 13px;
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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