/* =========================================================
   Finiti — landing
   Hero, gallery, features, sticky CTA. Loaded only by index.html.
   ========================================================= */

.sections {
  display: grid;
  gap: var(--sp-7);
  margin-top: var(--sp-6);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-6);
  align-items: center;
  padding: var(--sp-7);
  overflow: hidden;
}

/* Dot-grid motif behind the hero — echoes the product itself */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.4px, transparent 1.6px);
  background-size: 14px 14px;
  background-position: 7px 7px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 30% 50%, rgba(0, 0, 0, 0.55), transparent 75%);
          mask-image: radial-gradient(ellipse 80% 90% at 30% 50%, rgba(0, 0, 0, 0.55), transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero__copy {
  display: grid;
  gap: 0;
}

.hero__eyebrow {
  display: inline-block;
  width: fit-content;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-hot);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 138, 61, 0.12);
  border: 1px solid rgba(255, 138, 61, 0.32);
  margin-bottom: var(--sp-4);
  font-weight: 600;
}

.hero__title {
  font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-4) 0;
  font-weight: 600;
}

.hero__sub {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 var(--sp-5) 0;
  max-width: 38ch;
}

.hero__trust {
  margin: var(--sp-4) 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.hero__trust span + span::before {
  content: "·";
  margin-right: var(--sp-2);
  color: var(--border-strong);
}

.hero__mockup {
  justify-self: center;
  max-width: 320px;
  width: 100%;
  position: relative;
}
.hero__mockup img {
  width: 100%;
  border-radius: var(--r-lg);
  transform: rotate(-2deg);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform var(--t-slow) var(--ease);
}
.hero__mockup:hover img {
  transform: rotate(0deg);
}

/* App Store badge — subtle press feedback */
.badge-link {
  display: inline-block;
  line-height: 0;
  border-radius: 12px;
  transition: transform var(--t-fast) var(--ease);
  will-change: transform;
}
.badge-link:hover {
  transform: translateY(-1px);
}
.badge-link:active {
  transform: translateY(0);
}
.badge-link img {
  width: 220px;
  height: auto;
}

/* ---------- Section heading ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.section-head h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  margin: 0;
  letter-spacing: -0.005em;
  font-weight: 600;
}
.section-head .hint {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Gallery ---------- */

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
}
.gallery figure {
  margin: 0;
  background: var(--card);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  box-shadow: var(--shadow-md);
  flex: 0 1 calc((100% - var(--sp-4) * 2) / 3);
  max-width: 280px;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.gallery figure:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.gallery img {
  width: 100%;
  border-radius: var(--r-sm);
}
.gallery figcaption {
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 10px;
  line-height: 1.45;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.feature {
  background: var(--card);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--sp-3);
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.feature__icon {
  width: 28px;
  height: 28px;
  color: var(--accent-hot);
  display: block;
}
.feature h3 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.005em;
  font-weight: 600;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Sticky CTA — mobile only ---------- */

.sticky-cta {
  display: none;
}

/* Hide the "Swipe →" hint on viewports where the gallery isn't a swiper */
@media (min-width: 721px) {
  .section-head .hint {
    display: none;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  .sections {
    gap: var(--sp-6);
    margin-top: var(--sp-5);
  }

  .hero {
    display: flex;
    flex-direction: column-reverse;
    padding: var(--sp-5);
    gap: var(--sp-5);
    text-align: center;
  }
  .hero__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero__sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__trust {
    justify-content: center;
  }
  .hero__mockup {
    max-width: 240px;
  }
  .hero__mockup img {
    transform: rotate(-1deg);
  }
  .badge-link img {
    width: 220px;
  }

  .gallery {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--sp-4));
    padding: 4px var(--sp-4) var(--sp-3);
  }
  .gallery::-webkit-scrollbar {
    display: none;
  }
  .gallery figure {
    flex: 0 0 70%;
    max-width: none;
    scroll-snap-align: start;
  }
  .gallery figcaption {
    display: none;
  }

  .features {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  /* Sticky bottom CTA — bar style, fades in past the hero */
  .sticky-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(31, 27, 133, 0.92);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 18px rgba(15, 12, 70, 0.4);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
    pointer-events: none;
  }
  .sticky-cta.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .sticky-cta img {
    width: 220px;
    height: auto;
  }

  body {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
}
