/*
  Aimo Labs Website v2 — homepage-only presentation layer.
  Shared legal/company pages continue to use styles.css unchanged.
*/

.home-v2 .hero {
  min-height: min(860px, calc(100svh - 82px));
  overflow: clip;
  isolation: isolate;
}

.home-v2 .hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(420px, .78fr);
  gap: clamp(32px, 5vw, 78px);
  padding-block: clamp(76px, 9vw, 124px);
}

.home-v2 .hero-copy {
  position: relative;
  z-index: 2;
}

.home-v2 .hero-copy h1 {
  max-width: 760px;
}

.home-v2 .hero-lead {
  max-width: 650px;
}

.home-v2 .hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center end;
  min-width: 0;
}

.home-v2 .hero-device {
  display: block;
  width: min(49vw, 620px);
  max-width: none;
  margin-right: clamp(-72px, -4vw, -20px);
}

.home-v2 .hero-device img {
  width: 100%;
  height: auto;
}

.home-v2 .statement {
  padding-block: clamp(124px, 14vw, 196px);
}

.home-v2 .statement-inner {
  max-width: 1060px;
}

.home-v2 .statement-copy {
  max-width: 740px;
}

.home-v2 .work {
  overflow: clip;
  padding-block: clamp(118px, 13vw, 184px);
}

.home-v2 .work-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, .72fr);
  gap: clamp(64px, 9vw, 136px);
  align-items: start;
}

.home-v2 .product-showcase {
  margin-top: clamp(72px, 9vw, 124px);
}

.home-v2 .vakapu-logo {
  width: clamp(190px, 19vw, 248px);
  height: auto;
  margin: 0 0 clamp(24px, 4vw, 52px) clamp(0px, 2vw, 24px);
}

.home-v2 .product-stage {
  position: relative;
  width: min(100%, 1080px);
  height: clamp(640px, 58vw, 760px);
  margin-inline: auto;
}

.home-v2 .product-device {
  position: absolute;
  display: block;
  width: 56%;
  max-width: 610px;
}

.home-v2 .product-device img {
  width: 100%;
  height: auto;
}

.home-v2 .product-device-primary {
  top: clamp(48px, 5vw, 72px);
  left: auto;
  right: 8%;
  z-index: 1;
}

.home-v2 .product-device-secondary {
  top: 0;
  left: 4%;
  right: auto;
  z-index: 2;
}

.home-v2 .principles {
  padding-block: clamp(116px, 13vw, 180px);
}

.home-v2 .attention,
.home-v2 .about,
.home-v2 .contact {
  padding-block: clamp(112px, 12vw, 168px);
}

@media (max-width: 1000px) {
  .home-v2 .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .68fr);
    gap: 30px;
  }

  .home-v2 .hero-device {
    width: min(50vw, 540px);
    margin-right: -3vw;
  }

  .home-v2 .product-stage {
    height: 640px;
  }

  .home-v2 .product-device {
    width: 58%;
  }
}

@media (max-width: 860px) {
  .home-v2 .hero {
    min-height: auto;
  }

  .home-v2 .hero-grid {
    grid-template-columns: 1fr;
    gap: 50px;
    padding-block: 82px 104px;
  }

  .home-v2 .hero-copy {
    max-width: 760px;
  }

  .home-v2 .hero-art {
    place-items: center;
  }

  .home-v2 .hero-device {
    width: min(68vw, 470px);
    margin-right: 0;
  }

  .home-v2 .work-copy-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .home-v2 .work-copy-grid .section-body {
    max-width: 720px;
    padding-top: 0;
  }

  .home-v2 .product-showcase {
    margin-top: 76px;
  }

  .home-v2 .vakapu-logo {
    width: 218px;
    margin-left: 0;
  }

  .home-v2 .product-stage {
    width: min(100%, 760px);
    height: min(78vw, 620px);
  }

  .home-v2 .product-device {
    width: 61%;
  }

  .home-v2 .product-device-primary {
    top: 42px;
    left: auto;
    right: 5%;
  }

  .home-v2 .product-device-secondary {
    top: 0;
    left: -3%;
    right: auto;
  }
}

@media (max-width: 620px) {
  .home-v2 .hero-grid {
    gap: 44px;
    padding-block: 68px 82px;
  }

  .home-v2 .hero-device {
    width: min(88vw, 410px);
  }

  .home-v2 .statement {
    padding-block: 104px;
  }

  .home-v2 .work {
    padding-block: 96px 108px;
  }

  .home-v2 .product-showcase {
    margin-top: 58px;
  }

  .home-v2 .vakapu-logo {
    width: 190px;
    margin-bottom: 28px;
  }

  .home-v2 .product-stage {
    height: auto;
  }

  .home-v2 .product-device-primary {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: min(92vw, 430px);
    margin-inline: auto;
  }

  .home-v2 .product-device-secondary {
    display: none;
  }

  .home-v2 .principles,
  .home-v2 .attention,
  .home-v2 .about,
  .home-v2 .contact {
    padding-block: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 .hero-device,
  .home-v2 .product-device {
    transform: none !important;
  }
}

/* V2 DESKTOP POLISH 2026-09-11 */
.home-v2 .slogan {
  filter: brightness(.72) contrast(1.08);
  margin-left: -11px;
}

.home-v2 .product-identity {
  margin-top: 24px;
}

.home-v2 .product-identity .vakapu-logo {
  width: clamp(172px, 15vw, 210px);
  height: auto;
  margin: 0 0 18px;
}

.home-v2 .product-identity .status-line {
  margin-top: 0;
}

@media (min-width: 861px) {
  .home-v2 .hero {
    min-height: min(760px, calc(100svh - 82px));
  }

  .home-v2 .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(430px, .82fr);
    gap: clamp(34px, 5vw, 76px);
    padding-block: clamp(56px, 7vw, 96px);
  }

  .home-v2 .hero-device {
    width: min(52vw, 630px);
    margin-right: clamp(-88px, -5vw, -30px);
  }

  .home-v2 .statement {
    padding-block: clamp(104px, 11vw, 154px);
  }

  .home-v2 .work {
    padding-block: clamp(88px, 7vw, 112px);
  }

  .home-v2 .work-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, .80fr) minmax(520px, 1.20fr);
    gap: clamp(54px, 7vw, 92px);
    align-items: center;
  }

  .home-v2 .work-copy {
    align-self: center;
  }

  .home-v2 .work-copy .section-body {
    padding-top: 30px;
  }

  .home-v2 .product-showcase {
    min-width: 0;
    margin-top: 0;
  }

  .home-v2 .product-stage {
    width: 100%;
    max-width: 700px;
    height: clamp(560px, 42vw, 620px);
    margin: 0 auto;
  }

  .home-v2 .product-device {
    width: 64%;
    max-width: none;
  }

  /* Pukeminen stays in front on the left; Toiminnanohjaus sits behind on the right. */
  .home-v2 .product-device-secondary {
    top: 1%;
    left: -2%;
    right: auto;
    z-index: 2;
  }

  .home-v2 .product-device-primary {
    top: 13%;
    left: auto;
    right: -2%;
    z-index: 1;
  }
}

@media (max-width: 1080px) and (min-width: 861px) {
  .home-v2 .work-v2-grid {
    grid-template-columns: minmax(0, .88fr) minmax(460px, 1.12fr);
    gap: 46px;
  }

  .home-v2 .product-stage {
    height: 570px;
  }
}

@media (max-width: 860px) {
  .home-v2 .work-v2-grid {
    display: block;
  }

  .home-v2 .product-identity {
    margin-top: 30px;
  }

  .home-v2 .product-identity .vakapu-logo {
    width: 205px;
    margin-bottom: 16px;
  }
}
/* VAKAPU IDENTITY DESKTOP POSITION */
@media (min-width: 861px) {
  .home-v2 .product-identity {
    margin-left: clamp(18px, 2vw, 32px);
  }

  .home-v2 .product-identity .vakapu-logo {
    margin-bottom: 0;
  }
}

/* V2 VAKAPU STAGE LOGO */
@media (min-width: 861px) {
  .home-v2 .product-stage .vakapu-stage-logo {
    position: absolute;
    left: calc(2% + 18px);
    bottom: calc(14% - 52px);
    z-index: 3;
    width: clamp(165px, 13.3vw, 195px);
    height: auto;
    margin: 0;
  }
}

@media (max-width: 860px) and (min-width: 621px) {
  .home-v2 .product-stage .vakapu-stage-logo {
    position: absolute;
    left: 4%;
    bottom: 5%;
    z-index: 3;
    width: 190px;
    height: auto;
    margin: 0;
  }
}

@media (max-width: 620px) {
  .home-v2 .product-stage .vakapu-stage-logo {
    position: relative;
    display: block;
    width: 180px;
    height: auto;
    margin: 18px auto 0;
    left: auto;
    bottom: auto;
  }
}

/* AIMO V2 PRODUCT CAROUSEL
   Approved Työmme layout remains unchanged.
   Only the visual layer inside the existing product-stage changes.
*/

.home-v2 .product-stage-rotator {
  position: relative;
  outline: none;
}

.home-v2 .product-stage-rotator > .product-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 240ms ease-out,
    visibility 0s linear 240ms;
  will-change: opacity;
}

.home-v2 .product-stage-rotator > .product-layer.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 240ms ease-out,
    visibility 0s linear 0s;
}

.home-v2 .product-stage-rotator > .product-layer.carousel-from-left,
.home-v2 .product-stage-rotator > .product-layer.carousel-from-right {
  opacity: 0;
}

.home-v2 .product-stage-rotator > .product-layer.carousel-exit-left,
.home-v2 .product-stage-rotator > .product-layer.carousel-exit-right {
  opacity: 0;
  visibility: visible;
}

/* Small, quiet manual controls. */
.home-v2 .product-carousel-controls {
  position: absolute;
  right: 2%;
  bottom: 1%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-v2 .product-carousel-button {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6E4A9E;
  font: inherit;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: .62;
  transition:
    opacity 220ms ease,
    background-color 220ms ease,
    transform 220ms ease;
}

.home-v2 .product-carousel-button:hover {
  opacity: 1;
  background: rgba(59, 35, 90, .055);
}

.home-v2 .product-carousel-button:active {
  transform: scale(.96);
}

.home-v2 .product-carousel-button:focus-visible {
  opacity: 1;
  outline: 2px solid #6E4A9E;
  outline-offset: 2px;
}

@media (max-width: 620px) {
  .home-v2 .product-carousel-controls {
    right: 0;
    bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 .product-stage-rotator > .product-layer {
    transition: none !important;
    transform: none !important;
  }

  .home-v2 .product-carousel-button {
    transition: none !important;
  }
}


.home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone {
  position: absolute;
  display: block;
  height: auto;
  margin: 0;
}

.home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-routes {
  width: 48%;
  left: 11%;
  top: 0;
  z-index: 2;
}

.home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-ride {
  width: 44%;
  right: 10%;
  top: 9%;
  z-index: 1;
}

.home-v2 .product-layer-mtbroutepilot .mtbroutepilot-stage-logo {
  position: absolute;
  left: 17%;
  bottom: -5%;
  z-index: 3;
  width: clamp(96px, 7.5vw, 116px);
  height: auto;
  margin: 0;
}

@media (max-width: 860px) {
  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-routes {
    width: 47%;
    left: 5%;
    top: 1%;
  }

  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-ride {
    width: 43%;
    right: 5%;
    top: 10%;
  }

  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-stage-logo {
    left: 18%;
    bottom: 2%;
    width: 118px;
  }
}

@media (max-width: 620px) {
  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-routes {
    width: 53%;
    left: 3%;
    top: 3%;
  }

  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-ride {
    width: 47%;
    right: 2%;
    top: 12%;
  }

  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-stage-logo {
    left: 17%;
    bottom: 3%;
    width: 104px;
  }
}

/* AIMO V2 PREMIUM CAROUSEL CONTROLS */

.home-v2 .product-carousel-controls {
  right: 2%;
  bottom: 2%;
  gap: 8px;
}

.home-v2 .product-carousel-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(209, 209, 214, .82);
  border-radius: 999px;
  background: rgba(245, 245, 247, .96);
  color: #3B235A;
  opacity: 1;
  font-size: 0;
  box-shadow: 0 2px 10px rgba(28, 28, 30, .055);
  transition:
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.home-v2 .product-carousel-button svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-v2 .product-carousel-button:hover {
  opacity: 1;
  border-color: rgba(110, 74, 158, .34);
  background: #F5F5F7;
  box-shadow: 0 3px 12px rgba(28, 28, 30, .075);
  transform: translateY(-1px);
}

.home-v2 .product-carousel-button:active {
  transform: scale(.97);
}

.home-v2 .product-carousel-button:focus-visible {
  outline: 2px solid #6E4A9E;
  outline-offset: 3px;
}

@media (max-width: 620px) {
  .home-v2 .product-carousel-controls {
    right: 1%;
    bottom: 1%;
  }

  .home-v2 .product-carousel-button {
    width: 40px;
    height: 40px;
  }
}



/* AIMO V2 TRUE CROSSFADE
   Both product layers remain rendered in place.
   Only opacity changes during the transition.
*/

.home-v2 .product-stage-rotator > .product-layer {
  visibility: visible !important;
  transform: none !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms cubic-bezier(.22, 1, .36, 1) !important;
  will-change: opacity;
}

.home-v2 .product-stage-rotator > .product-layer.is-active {
  visibility: visible !important;
  transform: none !important;
  opacity: 1;
  pointer-events: auto;
}

.home-v2 .product-stage-rotator > .product-layer.carousel-from-left,
.home-v2 .product-stage-rotator > .product-layer.carousel-from-right {
  visibility: visible !important;
  transform: none !important;
  opacity: 0;
}

.home-v2 .product-stage-rotator > .product-layer.carousel-exit-left,
.home-v2 .product-stage-rotator > .product-layer.carousel-exit-right {
  visibility: visible !important;
  transform: none !important;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 .product-stage-rotator > .product-layer {
    transition: none !important;
  }
}


/* AIMO V2 FINAL OPACITY CROSSFADE
   Both product layers remain rendered.
   Product change is opacity only.
*/

.home-v2 .product-stage-rotator > .product-layer {
  visibility: visible !important;
  transform: none !important;
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(.4, 0, .2, 1) !important;
  will-change: opacity;
}

.home-v2 .product-stage-rotator > .product-layer.is-active {
  visibility: visible !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto;
}

/*
  Reduced motion keeps a short opacity fade.
  There is no spatial movement.
*/
@media (prefers-reduced-motion: reduce) {
  .home-v2 .product-stage-rotator > .product-layer {
    transition: opacity 260ms ease-out !important;
  }
}


/* PRODUCT DEVELOPMENT STATUS */
.home-v2 .work-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 0 0;
  color: rgba(28, 28, 30, .64);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-v2 .work-status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7E8B59;
}


/* MOBILE PRODUCT CAROUSEL FIX 2026-09-12
   Keep desktop untouched. Recompose only the phone-size product stage.
*/
@media (max-width: 620px) {
  .home-v2 .product-showcase {
    margin-top: 20px;
  }

  .home-v2 .product-stage-rotator {
    position: relative;
    width: 100%;
    height: 410px;
    margin: 0 auto;
    overflow: visible;
  }

  .home-v2 .product-carousel-controls {
    top: 0;
    right: 0;
    bottom: auto;
    z-index: 30;
  }

  /* Both carousel layers use the same mobile canvas. */
  .home-v2 .product-stage-rotator > .product-layer {
    inset: 0 !important;
    width: 100%;
    height: 100%;
  }

  /* ---------------- Vakapu ---------------- */

  .home-v2 .product-layer-vakapu .product-device {
    position: absolute;
    width: 60%;
    max-width: none;
    margin: 0;
  }

  .home-v2 .product-layer-vakapu .product-device-secondary {
    top: 52px;
    left: 3%;
    right: auto;
    z-index: 2;
  }

  .home-v2 .product-layer-vakapu .product-device-primary {
    top: 82px;
    right: 2%;
    left: auto;
    z-index: 1;
  }

  .home-v2 .product-layer-vakapu .vakapu-stage-logo {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 10px;
    width: 145px;
    height: auto;
    margin: 0;
    transform: translateX(-50%);
    z-index: 4;
  }

  /* ---------------- MTB Route Pilot ---------------- */

  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-routes {
    position: absolute;
    width: 44%;
    left: 11%;
    right: auto;
    top: 55px;
    margin: 0;
    z-index: 2;
  }

  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-phone-ride {
    display: block;
    position: absolute;
    width: 40%;
    right: 11%;
    left: auto;
    top: 82px;
    margin: 0;
    z-index: 1;
  }

  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-stage-logo {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 4px;
    width: 92px;
    height: auto;
    margin: 0;
    transform: translateX(-50%);
    z-index: 4;
  }
}


/* MOBILE VAKAPU TWO-IPAD FIX 2026-09-12
   Mobile only. Desktop remains unchanged.
*/
@media (max-width: 620px) {
  .home-v2 .product-layer-vakapu .product-device-primary,
  .home-v2 .product-layer-vakapu .product-device-secondary {
    display: block !important;
    visibility: visible !important;
  }
}


/* MTB ROUTE PILOT DESKTOP LOGO REFINEMENT 2026-09-12
   Desktop only. Mobile layout remains untouched.
*/
@media (min-width: 621px) {
  .home-v2 .product-layer-mtbroutepilot .mtbroutepilot-stage-logo {
    left: calc(17% + 176px);
    bottom: calc(-5% - 4px);
    width: clamp(80px, 6.2vw, 95px);
  }
}
