/* MochiStep Landing Page – layout and components using design tokens */

:root {
  --container-max: 1120px;
  --section-gap: 4rem;
  --card-radius: 1rem;
  --card-radius-lg: 1.5rem;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
}

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

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

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: 42rem;
}

/* Hero */
.hero {
  background: var(--color-background);
  padding: 3rem 0 4rem;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__content {
  max-width: 32rem;
}

.hero__tagline {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.hero__subtitle {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  color: var(--color-text-light);
}

.hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__image {
  max-width: 320px;
  border-radius: var(--card-radius-lg);
  box-shadow: 0 12px 40px var(--color-card-shadow);
}

.hero__image--icon {
  border-radius: 1.5rem;
  max-width: 280px;
}

/* CTA – App Store button */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-primary);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cta:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

.cta__icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
}

/* Screenshots section */
.screenshots {
  padding: var(--section-gap) 0;
  background: var(--color-background-secondary);
}

.section-title {
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
}

.screenshots__slider {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.5rem;
}

.screenshots__slider::-webkit-scrollbar {
  height: 6px;
}

.screenshots__slider::-webkit-scrollbar-track {
  background: var(--color-progress-background);
  border-radius: 3px;
}

.screenshots__slider::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 3px;
}

.screenshots__track {
  display: flex;
  gap: 1.5rem;
  padding: 0 0.25rem;
  min-width: min-content;
}

.screenshot-card {
  margin: 0;
  flex: 0 0 280px;
  background: var(--color-card);
  border-radius: var(--card-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px var(--color-card-shadow);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
}

.screenshot-card figcaption {
  padding: 1rem 1.25rem;
}

.screenshot-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.screenshot-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.screenshots__cta {
  margin-top: 2rem;
  text-align: center;
}

/* App Store badge (shared) */
.app-store-badge {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
}

.app-store-badge:hover {
  text-decoration: none;
  opacity: 0.85;
}

.app-store-badge img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 168px;
}

/* Features section */
.features {
  padding: var(--section-gap) 0;
  background: var(--color-background);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--color-card);
  border-radius: var(--card-radius);
  box-shadow: 0 4px 16px var(--color-card-shadow);
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.55;
}

.works-with {
  padding: 1.5rem;
  background: var(--color-background-secondary);
  border-radius: var(--card-radius);
}

.works-with h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.works-with ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

.works-with li {
  margin-bottom: 0.25rem;
}

/* SEO text block */
.seo-text {
  padding: var(--section-gap) 0;
  background: var(--color-background-secondary);
}

.seo-text p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-light);
  line-height: 1.65;
}

.seo-text p:last-child {
  margin-bottom: 0;
}

/* Footer */
.footer {
  padding: 2rem 0;
  background: var(--color-background);
  border-top: 1px solid var(--color-progress-background);
  text-align: center;
}

.footer__tagline {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--color-text);
}

.footer__badge {
  display: inline-block;
  margin: 0 0 1rem;
}

.footer__nav {
  margin: 0 0 0.75rem;
}

.footer__nav a {
  margin: 0 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.footer__nav a:first-child {
  margin-left: 0;
}

.footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive: single column hero on small screens */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 0 3rem;
    min-height: auto;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero__content {
    max-width: none;
  }

  .hero__media {
    order: -1;
  }

  .hero__image {
    max-width: 260px;
  }

  .screenshots__track {
    flex-wrap: nowrap;
  }

  .screenshot-card {
    flex: 0 0 260px;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop: show screenshots in a 2–3 column grid when space allows */
@media (min-width: 900px) {
  .screenshots__slider {
    overflow: visible;
  }

  .screenshots__track {
    flex-wrap: wrap;
    justify-content: center;
    min-width: 0;
  }

  .screenshot-card {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: 320px;
  }
}
