/*
 * Public landing page (A1): the hero's screens, framed screenshots, business
 * type pictures and scroll reveal. Every animation sits behind
 * prefers-reduced-motion, and the page reads the same with none of it.
 *
 * Token vars only — enforced by test/lint/css_token_lint_test.rb.
 */

.landing-hero {
  display: grid;
  gap: var(--space-8);
}

.landing-hero__art {
  position: relative;
  margin-inline: calc(var(--space-6) * -1);
  padding-inline: var(--space-6);
  max-height: 340px;
  overflow: hidden;
}

.landing-hero__desktop {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: var(--border-hairline);
  box-shadow: var(--shadow-lg);
}

.landing-phone {
  display: block;
  height: auto;
  border-radius: var(--radius-lg);
  border: var(--space-1) solid var(--color-ink);
  box-shadow: var(--shadow-lg);
  background: var(--color-surface-solid);
}

.landing-hero__phone {
  position: absolute;
  right: var(--space-2);
  top: var(--space-8);
  width: 32%;
  max-width: 180px;
}

.landing-hero__chip {
  position: absolute;
  left: var(--space-3);
  top: var(--space-16);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-solid);
  box-shadow: var(--shadow-md);
  font-size: var(--text-sm);
  color: var(--color-ink);
}

.landing-hero__chip-icon {
  display: flex;
  color: var(--color-success-ink);
}

.landing-hero__chip strong {
  display: block;
  font-weight: 600;
}

.landing-hero__chip-sub {
  color: var(--color-ink-muted);
}

@media (min-width: 64rem) {
  .landing-hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: var(--space-12);
  }

  .landing-hero__art {
    margin: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
    padding-bottom: var(--space-12);
  }

  .landing-hero__desktop {
    width: 128%;
    max-width: none;
  }

  .landing-hero__phone {
    right: calc(var(--space-6) * -1);
    top: auto;
    bottom: 0;
    width: 36%;
  }

  .landing-hero__chip {
    left: calc(var(--space-6) * -1);
    top: auto;
    bottom: var(--space-16);
  }
}

/* Screenshots */

.landing-browser {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface-solid);
  box-shadow: var(--shadow-md);
}

.landing-browser__bar {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-inset-solid);
}

.landing-browser__bar span {
  width: var(--space-3);
  height: var(--space-3);
  border-radius: var(--radius-round);
  background: var(--color-surface-sunken);
}

.landing-browser img {
  display: block;
  width: 100%;
  height: auto;
}

.landing-referrers {
  display: grid;
  gap: var(--space-8);
}

.landing-referrers__phones {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
}

.landing-referrers__phones .landing-phone {
  width: 46%;
  max-width: 230px;
  max-height: 430px;
  object-fit: cover;
  object-position: top;
}

.landing-referrers__phones .landing-phone:nth-child(2) {
  margin-top: var(--space-8);
}

@media (min-width: 48rem) {
  .landing-referrers {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
}

/* Business type pictures */

.landing-industry {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface-solid);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out);
}

.landing-scene {
  display: block;
  width: 100%;
  height: auto;
}

.landing-industry__name {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  .landing-reveal {
    transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out);
  }

  .landing-reveal.is-waiting {
    opacity: 0;
    transform: translateY(var(--space-6));
  }

  .landing-rise {
    animation: landing-rise var(--duration-reveal) var(--ease-out) both;
  }

  .landing-hero__desktop {
    animation: landing-rise var(--duration-reveal) var(--ease-out) both;
  }

  .landing-hero__phone {
    animation: landing-float var(--duration-float) var(--ease-in-out) infinite alternate;
  }

  .landing-hero__chip {
    animation: landing-chip var(--duration-chip) var(--ease-spring) both;
  }

  .landing-industry:hover {
    transform: translateY(calc(var(--space-1) * -1));
    box-shadow: var(--shadow-md);
  }
}

@keyframes landing-rise {
  from {
    opacity: 0;
    transform: translateY(var(--space-4));
  }
}

@keyframes landing-float {
  to {
    transform: translateY(calc(var(--space-3) * -1));
  }
}

@keyframes landing-chip {
  0%, 40% {
    opacity: 0;
    transform: translateY(var(--space-4)) scale(0.96);
  }
}
