/* Landing page polish + "How Letsy works" section */

/* Hero */
.hero {
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(var(--primary-rgb), .09) 0%, rgba(var(--primary-rgb), 0) 70%);
  padding-top: 44px;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: -.01em;
  text-wrap: balance;
}

.hero p {
  font-size: 1.05rem;
  max-width: 560px;
  text-wrap: balance;
}

.hero-btn {
  min-height: 46px;
}

.hero-illustration {
  opacity: .2;
  margin-top: 28px;
  max-height: 420px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

/* Section headers */
.sec-header h2 {
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* Cards: consistent lift on hover */
.feat-card,
.test-card,
.stat-card {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.feat-card:hover,
.test-card:hover,
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(var(--black-rgb), .07);
}

/* How it works */
.how-works {
  padding: 64px 0;
  background: var(--white);
}

.how-steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  counter-reset: how;
}

.how-step {
  position: relative;
  text-align: center;
  padding: 0 8px;
}

/* connector line between steps */
.how-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 31px;
  left: calc(50% + 40px);
  width: calc(100% - 80px + 16px);
  border-top: 2px dashed rgba(var(--primary-rgb), .35);
}

.how-ico {
  position: relative;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), .1);
  color: var(--green);
  border: 2px solid rgba(var(--primary-rgb), .25);
}

.how-ico svg {
  width: 26px;
  height: 26px;
}

.how-num {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.how-step h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 6px;
}

.how-step p {
  font-size: .88rem;
  margin: 0;
  color: var(--text);
}

.how-roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.how-role {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.how-role h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 6px;
}

.how-role p {
  font-size: .9rem;
  margin: 0;
}

@media (max-width: 991px) {
  .how-steps {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .how-step {
    display: grid;
    grid-template-columns: 62px 1fr;
    column-gap: 16px;
    text-align: left;
    padding: 0;
  }

  .how-ico {
    margin: 0;
    grid-row: span 2;
  }

  .how-step h4 {
    align-self: end;
    margin: 0;
  }

  .how-step p {
    align-self: start;
  }

  .how-step:not(:last-child)::after {
    top: 70px;
    left: 30px;
    width: 0;
    height: calc(100% - 38px + 24px);
    border-top: 0;
    border-left: 2px dashed rgba(var(--primary-rgb), .35);
  }

  .how-roles {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feat-card,
  .test-card,
  .stat-card {
    transition: none;
  }
}

/* Earn cards: whole card is clickable through the CTA link */
.earn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.earn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
  padding: 10px 22px;
  min-height: 44px;
  border-radius: 100px;
  background: var(--green);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}

.earn-cta:hover,
.earn-cta:focus-visible {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), .3);
}

.earn-cta::after {
  content: "";
  position: absolute;
  inset: 0;
}

.earn-card:has(.earn-cta) {
  cursor: pointer;
}

.earn-card .earn-app-row {
  position: relative;
  z-index: 1;
}

/* ================================================================
   Larger polish pass
   ================================================================ */

:root {
  /* AA-safe values: the admin primary stays the brand colour, text-bearing fills are darkened */
  --text: #59635e;
  --btn-bg: color-mix(in srgb, var(--primary) 72%, #000);
  --btn-bg-hover: color-mix(in srgb, var(--primary) 66%, #000);
  --shadow-card: 0 1px 2px rgba(var(--black-rgb), .04), 0 8px 24px rgba(var(--black-rgb), .05);
  --shadow-lift: 0 2px 4px rgba(var(--black-rgb), .05), 0 16px 36px rgba(var(--black-rgb), .09);
  --section-pad: clamp(56px, 8vw, 96px);
}

/* Platform layer (mobile) */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

a,
button,
[role="button"] {
  touch-action: manipulation;
}

button,
.hero-btn,
.earn-cta,
.slider-arrow,
.svc-icon-btn {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
select {
  font-size: 16px;
}

.main-nav {
  padding-top: env(safe-area-inset-top, 0px);
}

.footer {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Accessibility */
.skip-link {
  position: fixed;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--title);
  color: #fff;
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--btn-bg);
  outline-offset: 3px;
  border-radius: 6px;
}

.hero-btn:focus-visible,
.earn-cta:focus-visible,
.slider-arrow:focus-visible {
  border-radius: 100px;
}

main {
  display: block;
}

section[id],
main {
  scroll-margin-top: 80px;
}

html {
  scroll-behavior: smooth;
}

/* Buttons that carry text on the brand colour */
.hero-btn--vendor,
.earn-cta {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
}

.hero-btn--vendor:hover,
.earn-cta:hover,
.earn-cta:focus-visible {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
}

.how-num {
  background: var(--btn-bg);
}

/* Hero */
.hero {
  padding-top: clamp(36px, 6vw, 72px);
}

.hero-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 8px 4px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--title);
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.hero-more span {
  transition: transform .25s var(--ease);
}

/* Section rhythm */
.how-works,
.services-section,
.features,
.earn,
.special,
.stats,
.testimonials {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.sec-header {
  max-width: 720px;
  margin-inline: auto;
}

.sec-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
}

.sec-header h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: var(--primary);
}

/* Card system */
.earn-card,
.feat-card,
.sp-card,
.test-card,
.stat-card,
.how-role {
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.earn-card {
  padding: 36px 28px 30px;
  border-color: transparent;
}

.earn-card::before {
  opacity: 1;
  height: 5px;
}

.earn-card .earn-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.earn-cta span {
  display: inline-block;
  transition: transform .25s var(--ease);
}

/* Special section: aligned to the container, grid on desktop, snap-scroll on phones */
.special .container {
  position: relative;
}

.special .sp-track {
  padding-inline: 0;
  padding-bottom: 8px;
}

.sp-card {
  min-width: 240px;
  max-width: none;
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .special .sp-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    overflow: visible;
    cursor: default;
  }

  .special .sp-card {
    min-width: 0;
    padding: 28px 24px;
  }

  .special .sp-dots {
    display: none;
  }
}

@media (max-width: 991px) {
  .special .sp-track {
    scroll-padding-inline: 16px;
    margin-inline: -16px;
    padding-inline: 16px;
    justify-content: flex-start !important;
  }

  .sp-card {
    min-width: 78%;
  }
}

/* Footer newsletter */
.footer input[type="email"],
.footer input[type="text"] {
  min-height: 48px;
}

/* Scroll reveal (JS adds .reveal; reduced motion never gets it) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s var(--ease-out, cubic-bezier(.23, 1, .32, 1)) var(--reveal-delay, 0ms),
    transform .45s var(--ease-out, cubic-bezier(.23, 1, .32, 1)) var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Hover only where hover exists; touch gets :active feedback */
@media (hover: hover) and (pointer: fine) {
  .hero-more:hover {
    border-color: var(--primary);
    color: var(--btn-bg);
  }

  .hero-more:hover span {
    transform: translateY(3px);
  }

  .earn-cta:hover span {
    transform: translateX(4px);
  }

  .earn-card:hover,
  .feat-card:hover,
  .sp-card:hover,
  .test-card:hover,
  .stat-card:hover {
    box-shadow: var(--shadow-lift);
    transform: translateY(-4px);
  }
}

@media (hover: none) {
  .earn-card:hover,
  .feat-card:hover,
  .sp-card:hover,
  .test-card:hover,
  .stat-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
}

.hero-btn:active,
.earn-cta:active,
.slider-arrow:active {
  transform: scale(.97);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-more span,
  .earn-cta span {
    transition: none;
  }
}

/* Contrast fixes (WCAG AA) */
.hero-btn--order,
.btn-browse-web,
.mob-browse-web {
  background: #00794f !important;
  border-color: #00794f !important;
  color: #fff !important;
}

.btn-join,
.mq-item .find,
.hl,
.earn-card h3 .hl {
  color: var(--btn-bg);
}

.newsletter-area button[type="submit"],
.footer button[type="submit"] {
  background: var(--btn-bg);
  color: #fff;
}

.footer-grid h5,
.footer-bottom-bar {
  color: #a3a3b8;
}

body .mq-item .find,
body .nav-links a.active-link,
body .main-nav .active-link {
  color: var(--btn-bg);
}

/* Dots: visible size unchanged, real hit area 24px+ */
.sp-dots .sp-dot {
  box-sizing: content-box;
  padding: 9px;
  background-clip: content-box;
}

.sp-dots {
  gap: 0;
}

/* ================================================================
   Review fixes
   ================================================================ */

/* Hero: pull the illustration up so the gap under the buttons closes
   and the next section starts sooner */
.hero {
  padding-bottom: 0;
}

.hero-illustration {
  margin-top: -70px;
  max-height: 340px;
  opacity: .28;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 62%, transparent 100%);
}

.hero-illustration svg {
  margin-top: -40px;
}

@media (max-width: 767px) {
  .hero-illustration {
    margin-top: -20px;
    max-height: 200px;
  }
}

/* Card shadows were cut off by the slider wrappers */
.slider-wrap {
  padding-bottom: 28px;
  margin-bottom: -28px;
}

/* A lone testimonial should not stretch across the page */
.test-grid > .test-card:only-child {
  max-width: 760px;
  margin-inline: auto;
}

/* Service copy: readable, with the bold lines acting as titles */
.venture-content-box {
  font-size: 1.05rem;
  line-height: 1.7;
  padding-inline-start: 22px;
  border-inline-start: 4px solid rgba(var(--primary-rgb), .35);
}

.venture-content-box strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
  color: var(--title);
}

.venture-content-box strong + br {
  display: none;
}
