/**
 * How it works — Figma desktop 1920, mobile 390.
 * Mobile: header + vertical steps, dashed dividers, 350×270 visual at bottom.
 */

.home-v2 .v2-section--how,
.v2-section--how {
  padding-top: var(--v2-section-gap);
  padding-bottom: calc(100vw * 40 / 390);
}

.v2-how__grid {
  display: flex;
  flex-direction: column;
  gap: calc(100vw * 30 / 390); /* 30 / 390 — steps → visual */
}

.v2-how__header {
  display: flex;
  flex-direction: column;
  gap: calc(100vw * 15 / 390); /* 15 / 390 */
  margin-bottom: calc(100vw * 24 / 390); /* 24 / 390 */
  flex-shrink: 0;
}

.v2-how__header .v2-descriptor {
  margin: 0;
  gap: calc(100vw * 10 / 390);
  font-size: calc(100vw * 12 / 390); /* 12 / 390 */
  line-height: 1;
  color: rgba(32, 32, 32, 0.4);
}

.v2-how__header .v2-descriptor__dot {
  width: calc(100vw * 6 / 390);
  height: calc(100vw * 6 / 390);
  background: #44b949;
}

.v2-how__heading {
  margin: 0;
  max-width: calc(100vw * 335 / 390); /* 335 / 390 */
  font-size: calc(100vw * 36 / 390); /* 36 / 390 */
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.v2-how__heading-line,
.v2-how__heading-accent {
  display: block;
  white-space: nowrap;
}

.v2-how__heading-line {
  color: #202020;
}

.v2-how__heading-accent {
  color: #64db69;
}

.v2-how__steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  border-top: 1px dashed rgba(32, 32, 32, 0.08);
  border-bottom: 1px dashed rgba(32, 32, 32, 0.08);
}

.v2-how__step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(100vw * 10 / 390); /* 10 / 390 — icon → title */
  padding-block: calc(100vw * 30 / 390); /* 30 / 390 */
}

.v2-how__step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.v2-how__step-icon img {
  display: block;
  width: calc(100vw * 50 / 390); /* 50 / 390 */
  height: calc(100vw * 50 / 390);
  object-fit: contain;
}

.v2-how__step-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(100vw * 10 / 390); /* title → text */
}

.v2-how__step-title {
  margin: 0;
  font-size: calc(100vw * 22 / 390); /* 22 / 390 */
  font-weight: 500;
  line-height: 1;
  color: #202020;
}

.v2-how__step-text {
  margin: 0;
  max-width: calc(100vw * 350 / 390); /* 350 / 390 — ~2 lines */
  font-size: calc(100vw * 14 / 390); /* 14 / 390 */
  font-weight: 400;
  line-height: 1.2;
  color: rgba(32, 32, 32, 0.6);
}

.v2-how__step-text-full {
  display: none;
}

.v2-how__step-text-mobile,
.v2-how__step-text-line {
  display: block;
}

.v2-how__divider {
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px dashed rgba(32, 32, 32, 0.08);
}

/* 350×270 ratio — full content width on mobile */
.v2-how__visual {
  position: relative;
  width: 100%;
  max-width: none;
  aspect-ratio: 350 / 270;
  border-radius: calc(100vw * 10 / 390);
  background: rgba(100, 219, 105, 0.1);
  overflow: hidden;
}

.v2-how__visual-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(100, 219, 105, 0.1);
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.v2-how__visual.is-playing .v2-how__visual-shield {
  opacity: 0;
  visibility: hidden;
}

.v2-how__visual-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.v2-how__visual-video::-webkit-media-controls,
.v2-how__visual-video::-webkit-media-controls-start-playback-button,
.v2-how__visual-video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .home-v2 .v2-section--how,
  .v2-section--how {
    padding-block: clamp(48px, 6.25vw, 120px);
  }

  .v2-how__grid {
    display: grid;
    grid-template-columns: clamp(280px, 46.354vw, 890px) minmax(0, 1fr);
    column-gap: clamp(20px, 2.083vw, 40px);
    align-items: stretch;
  }

  .v2-how__visual {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    aspect-ratio: 890 / 940;
    border-radius: clamp(10px, 1.042vw, 20px);
  }

  .v2-how__visual-shield {
    display: none;
  }

  .v2-how__content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 100%;
  }

  .v2-how__header {
    gap: calc(100vw * 20 / 1920);
    margin-bottom: 0;
  }

  .v2-how__header .v2-descriptor {
    gap: 13px;
    font-size: clamp(16px, 1.042vw, 20px);
  }

  .v2-how__header .v2-descriptor__dot {
    width: 10px;
    height: 10px;
  }

  .v2-how__heading {
    max-width: min(37.92vw, 728px);
    font-size: clamp(36px, 4.688vw, 90px);
    line-height: 1;
  }

  .v2-how__heading-line,
  .v2-how__heading-accent {
    white-space: normal;
  }

  .v2-how__steps {
    max-width: 100%;
    width: 100%;
    margin-top: auto;
    border-top: 1px solid rgba(32, 32, 32, 0.08);
    border-bottom: 1px solid rgba(32, 32, 32, 0.08);
  }

  .v2-how__step {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto;
    column-gap: clamp(16px, 1.563vw, 30px);
    row-gap: clamp(8px, 0.521vw, 10px);
    align-items: center;
    padding-block: calc(100vw * 30 / 1920); /* 30 / 1920 */
  }

  .v2-how__step-icon img {
    width: clamp(50px, 4.688vw, 90px);
    height: clamp(50px, 4.688vw, 90px);
  }

  .v2-how__step-body {
    display: block;
    padding-top: 0;
  }

  .v2-how__step-title {
    margin: 0 0 clamp(8px, 0.521vw, 10px);
    font-size: clamp(22px, 1.979vw, 38px);
  }

  .v2-how__step-text {
    max-width: none;
    font-size: clamp(14px, 0.938vw, 18px);
  }

  .v2-how__step-text-full {
    display: inline;
  }

  .v2-how__step-text-mobile {
    display: none;
  }

  .v2-how__divider {
    border-top-style: solid;
  }
}
