/* =============================================================
   HOW-IT-WORKS / CAROUSEL SECTION
   ============================================================= */

.howto {
  background: var(--color-surface, #F5F3F2);
  padding: 100px 0 100px;
}

.howto__headline {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 auto 56px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .howto__headline {
    white-space: normal;
  }
}

/* ── Carousel layout ── */
.howto__carousel {
  display: flex;
  align-items: center;
  gap: 16px;
}

.howto__track-wrap {
  flex: 1;
  overflow: hidden;
}

.howto__track {
  display: flex;
  gap: 16px;
  align-items: stretch;   /* all slides same height */
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Each slide takes exactly half the track width minus half the gap */
.howto__slide {
  flex: 0 0 calc(50% - 8px);
  min-width: 0;
  display: flex;          /* so card can stretch to fill */
}

/* ── Card — equal heights via flex stretch ── */
.howto__card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.howto__card-copy {
  padding: 28px 28px 20px;
  flex-shrink: 0;
}

.howto__card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}

.howto__card-body {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #888;
  margin: 0;
}

/* Visual area fills remaining card height */
.howto__card-visual {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 32px 28px;
  overflow: hidden;
}

/* ── Phone mockup ── */
.howto__phone {
  position: relative;
  width: 100%;
  max-width: 240px;
}

/* The screen sits inside the frame.
   A standard iPhone mockup: screen is ~88% wide, centered,
   starts ~4% from top (below the bezel/notch) */
.howto__phone-screen {
  position: absolute;
  /* Values derived from pixel-analysis of mockup.avif transparent screen area:
     screen cutout: x=25–480 (90.5% wide), y=30–1000 (97.1% tall) in 503×1024px */
  top: 1.5%;
  left: 50%;
  transform: translateX(-50%);
  width: 90.5%;
  border-radius: 7%;
  z-index: 0;
}

/* Frame sits on top, pointer-events none so it doesn't block interaction */
.howto__phone-frame {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  z-index: 1;
  pointer-events: none;
}

/* ── Arrows ── */
.howto__arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.howto__arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.howto__arrow svg {
  width: 20px;
  height: 20px;
}

/* ── Dots ── */
.howto__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.howto__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.howto__dot--active {
  background: #111;
  width: 24px;
  border-radius: 4px;
}

/* ── Mobile: single card ── */
@media (max-width: 640px) {
  .howto__slide {
    flex: 0 0 100%;
  }

  .howto__arrow {
    display: none;
  }
}
