:root {
  --background: #000;
  --surface: #121214;
  --surface-raised: #1c1c1f;
  --border: #2a2a2e;
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --brand-gradient: linear-gradient(90deg, #3b82f6, #a855f7 35%, #ec4899 70%, #f97316);
  --radius: 18px;
  --content-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */

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

.site-header .container {
  max-width: 1280px;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 60px;
}

.brand {
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: auto;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.app-nav a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.app-nav a:hover,
.app-nav a[aria-current="page"] {
  background: var(--surface-raised);
  color: var(--text);
}

.app-nav img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

/* Hero */

.hero {
  text-align: center;
  padding: 72px 0 40px;
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  margin: 0 auto 24px;
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.35);
}

.hero h1 {
  font-size: clamp(44px, 8vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.hero .tagline {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 600;
  margin: 0 0 16px;
}

.hero .intro {
  max-width: 680px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 19px;
}

.app-store-badge img {
  width: 200px;
  margin: 0 auto;
}

.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 15px;
}

.stats strong {
  display: block;
  color: var(--text);
  font-size: 24px;
}

/* Screenshots */

.screenshots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 24px 20px 32px;
  scroll-snap-type: x mandatory;
  justify-content: safe center;
}

.screenshots a {
  flex: 0 0 auto;
  scroll-snap-align: center;
  cursor: zoom-in;
}

.screenshots img {
  width: 220px;
  border-radius: 22px;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.screenshots a:hover img {
  transform: scale(1.02);
}

/* Lightbox */

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.lightbox img {
  max-height: 88vh;
  max-width: 88vw;
  width: auto;
  border-radius: 24px;
}

.lightbox button {
  position: fixed;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.lightbox button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-previous {
  left: 16px;
  top: calc(50% - 24px);
}

.lightbox-next {
  right: 16px;
  top: calc(50% - 24px);
}

/* Sections */

.section {
  padding: 56px 0;
}

.section h2 {
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 12px;
  text-align: center;
}

.section .section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature .feature-emoji {
  font-size: 34px;
  line-height: 1;
}

.feature h3 {
  font-size: 20px;
  margin: 14px 0 6px;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
}

.badge-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

/* Release timeline */

.timeline {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline > li {
  position: relative;
  padding: 0 0 28px 28px;
  border-left: 2px solid var(--border);
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-gradient);
}

.timeline h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.timeline time {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 15px;
}

.timeline ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

/* Facts */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 0;
}

.facts div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.facts dt {
  color: var(--text-muted);
  font-size: 14px;
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.links-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-muted);
}

/* More apps */

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

.app-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.app-card:hover {
  border-color: #48484e;
  transform: translateY(-2px);
}

.app-card img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  margin-bottom: 14px;
}

.app-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.app-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* CTA */

.cta {
  text-align: center;
}

.cta p {
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
}

.site-footer address {
  font-style: normal;
}

.site-footer strong {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-header .container {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .app-nav {
    margin-left: 0;
  }

  .hero {
    padding-top: 48px;
  }

  .screenshots img {
    width: 180px;
  }

  .lightbox-previous,
  .lightbox-next {
    top: auto;
    bottom: 16px;
  }

  .section {
    padding: 40px 0;
  }
}

/* Story */

.story > p {
  max-width: 720px;
  margin: 0 auto 16px;
  text-align: center;
  color: var(--text-muted);
}

.story strong {
  color: var(--text);
}

.milestones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.milestone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.milestone-year {
  font-size: 30px;
  font-weight: 700;
}

.milestone p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* Support */

.support-link {
  margin: 16px 0 0;
  font-size: 15px;
}

.faq {
  max-width: 760px;
  margin: 0 auto;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--text-muted);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-muted);
}

.contact-card {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(236, 72, 153, 0.18));
  border: 1px solid var(--border);
}

.contact-card h3 {
  margin: 0 0 6px;
}

.contact-card p {
  margin: 0;
  color: var(--text-muted);
}

.contact-card a {
  color: var(--text);
  font-weight: 600;
}

section[id] {
  scroll-margin-top: 72px;
}

/* App pages */

.screenshots.landscape img {
  width: 420px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 15px;
}

@media (max-width: 640px) {
  .screenshots.landscape img {
    width: 300px;
  }
}

/* Legal and legacy pages */

.legal {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(36px, 6vw, 52px);
  margin: 0 0 6px;
}

.legal h2 {
  font-size: 22px;
  text-align: left;
  margin: 36px 0 8px;
}

.legal p {
  color: var(--text-muted);
}

.legal-subtitle {
  margin: 0 0 28px;
}

.legal-details {
  margin: 0;
  border-top: 1px solid var(--border);
}

.legal-details div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4px 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.legal-details dt {
  color: var(--text-muted);
}

.legal-details dd {
  margin: 0;
}

@media (max-width: 640px) {
  .legal-details div {
    grid-template-columns: 1fr;
  }
}
