/*
 * TOP FV(templates/template-top.php .top-fv)
 * デザイン: Figma Ishare_Corporate-site_Ver2 TOP FV(1440×920)/ SP TOP FV(375×864)
 * .top-fv__stage はデザイン座標(px)で組み、--fv-scale で画面幅に合わせて拡縮する(top-fv.js が算出)。
 * 位置の % 値は Figma の配置(inset)をそのまま使っている。
 */
.top-fv {
  --fv-scale: 1;
  --fv-grid: 90px;
  --fv-grid-offset: 0px;
  position: relative;
  height: calc(920px * var(--fv-scale));
  overflow: hidden;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background-color: #e6e6e6;
  background-image:
    linear-gradient(to right, rgba(0, 106, 102, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 106, 102, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, #fff 0%, #e5e5e5 51.33%, #d4d4d4 100%);
  background-size:
    calc(var(--fv-grid) * var(--fv-scale)) calc(var(--fv-grid) * var(--fv-scale)),
    calc(var(--fv-grid) * var(--fv-scale)) calc(var(--fv-grid) * var(--fv-scale)),
    100% 100%;
  background-position:
    calc(var(--fv-grid-offset) * var(--fv-scale)) calc(var(--fv-grid-offset) * var(--fv-scale)),
    calc(var(--fv-grid-offset) * var(--fv-scale)) calc(var(--fv-grid-offset) * var(--fv-scale)),
    0 0;
}
/* JS無効時の近似値 */
@media (max-width: 1439px) { .top-fv { --fv-scale: 0.9; } }
@media (max-width: 1279px) { .top-fv { --fv-scale: 0.8; } }
@media (max-width: 1099px) { .top-fv { --fv-scale: 0.7; } }
@media (max-width: 919px)  { .top-fv { --fv-scale: 0.55; } }
@media (max-width: 767px)  { .top-fv { --fv-scale: 1; } }

.top-fv__stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1440px;
  height: 920px;
  transform: translateX(-50%) scale(var(--fv-scale));
  transform-origin: center top;
}
.top-fv__stage img {
  display: block;
  max-width: none;
}

/* ローソク足チャート */
.top-fv__chart {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.top-fv__chart--sp {
  display: none;
}
/* Figma の inset(%)を top/left と幅・高さ(100 - 両側inset)に換算 */
.top-fv__candle {
  position: absolute;
}
.top-fv__candle--c1-down-wicks  { top: 80.81%; left: -42.02%; width: 66.45%;  height: 39.49%; }
.top-fv__candle--c1-down-bodies { top: 81.3%;  left: -42.3%;  width: 67.01%;  height: 37.63%; }
.top-fv__candle--c1-up-wicks    { top: 77.03%; left: -44.2%;  width: 67.54%;  height: 42.63%; }
.top-fv__candle--c1-up-bodies   { top: 81.3%;  left: -44.48%; width: 68.1%;   height: 37.63%; }
.top-fv__candle--c2-down-wicks  { top: 49.95%; left: 27.68%;  width: 66.45%;  height: 39.49%; }
.top-fv__candle--c2-down-bodies { top: 50.44%; left: 27.4%;   width: 67.01%;  height: 37.63%; }
.top-fv__candle--c2-up-wicks    { top: 46.17%; left: 25.5%;   width: 67.54%;  height: 42.62%; }
.top-fv__candle--c2-up-bodies   { top: 50.44%; left: 25.22%;  width: 68.1%;   height: 37.63%; }
.top-fv__candle--sp-down-wicks  { top: 77.95%; left: -42.49%; width: 148.99%; height: 24.55%; }
.top-fv__candle--sp-down-bodies { top: 78.26%; left: -43.12%; width: 150.24%; height: 23.39%; }
.top-fv__candle--sp-up-wicks    { top: 75.6%;  left: -47.38%; width: 151.43%; height: 26.5%; }
.top-fv__candle--sp-up-bodies   { top: 78.26%; left: -48%;    width: 152.68%; height: 23.39%; }

/* 端末モック */
.top-fv__macbook {
  position: absolute;
  left: 853px;
  top: 160px;
  width: 704px;
  height: 452px;
}
.top-fv__macbook-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top-fv__macbook-frame {
  position: absolute;
  top: -15.27%;
  left: -15.21%;
  width: 130.42%;
  height: 130.54%;
}
.top-fv__iphone {
  position: absolute;
  left: 754px;
  top: 199px;
  width: 194.08px;
  height: 420px;
  background: #808080;
}
.top-fv__iphone-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top-fv__iphone-frame {
  position: absolute;
  top: -3.32%;
  left: -9.74%;
  width: 119.65%;
  height: 106.64%;
}
.top-fv__fab {
  position: absolute;
  left: 865.46px;
  top: 585.82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.042px;
  width: 76.754px;
  height: 23.136px;
  padding: 4.042px 8.085px 4.042px 6.064px;
  border-radius: 30px;
  background: #006a66;
  box-shadow: 0 2.021px 4.042px 1.516px rgba(0, 0, 0, 0.15), 0 0.505px 1.516px 0 rgba(0, 0, 0, 0.3);
  transform-origin: 0 0;
}
.top-fv__fab img {
  width: 12.127px;
  height: 12.127px;
}
.top-fv__fab span {
  color: #fff;
  font-size: 6.06px;
  font-weight: 700;
  line-height: 9.096px;
  white-space: nowrap;
}

/* 実績数値の背面ぼかし(Figma Ellipse: #D4D4D4・Layer blur 50)。
   SVGフィルターを img で描くと親の transform 下で描画位置がずれるため CSS の blur で再現 */
.top-fv__ellipse {
  position: absolute;
  left: 16px;
  top: 508px;
  width: 682px;
  height: 194px;
  border-radius: 50%;
  background: #d4d4d4;
  filter: blur(50px);
  pointer-events: none;
}

/* キャッチ・リード */
.top-fv__title {
  position: absolute;
  left: 72px;
  top: 192px;
  margin: 0;
  color: #0f1312;
  font-size: 62px;
  font-weight: 700;
  line-height: 82px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.top-fv__accent {
  color: #006a66;
}
.top-fv__lead {
  position: absolute;
  left: 72px;
  top: 454px;
  width: 500px;
  margin: 0;
  color: #3d4644;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 29px;
}

/* 実績数値 */
.top-fv__stats {
  position: absolute;
  left: 72px;
  top: 536px;
  display: flex;
  align-items: flex-end;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #00524e;
}
.top-fv__stats li {
  margin: 0;
}
.top-fv__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.top-fv__divider {
  align-self: stretch;
  width: 1px;
  background: #c7c7c7;
}
.top-fv__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border: 1px solid rgba(0, 82, 78, 0.2);
  border-radius: 30px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0.8px;
}
.top-fv__badge img {
  width: 8.66px;
  height: 10px;
}
.top-fv__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 40px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.top-fv__unit {
  font-size: 20px;
  line-height: 15px;
  letter-spacing: 0;
}
.top-fv__label {
  color: #6a7573;
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
  white-space: nowrap;
}

/* SP(〜767px): SP TOP FV 375×864 */
@media only screen and (max-width: 767px) {
  .top-fv {
    --fv-grid: 45px;
    --fv-grid-offset: 44px;
    height: calc(864px * var(--fv-scale));
    background-color: transparent;
  }
  .top-fv__stage {
    width: 375px;
    height: 864px;
  }

  .top-fv__chart--pc {
    display: none;
  }
  .top-fv__chart--sp {
    display: block;
  }
  .top-fv__ellipse {
    left: 10px;
    top: 575px;
    width: 355px;
    height: 113px;
    filter: blur(30px);
  }

  .top-fv__macbook {
    left: 56px;
    top: 348.8px;
    width: 298px;
    height: 191.38px;
  }
  .top-fv__iphone {
    left: 14.68px;
    top: 362.8px;
    width: 83.18px;
    height: 179.97px;
  }
  .top-fv__fab {
    left: 62.45px;
    top: 528.6px;
    transform: scale(0.4286);
  }

  .top-fv__title {
    left: 20px;
    top: 96px;
    font-size: 36px;
    line-height: 1.3;
    letter-spacing: 1px;
  }
  .top-fv__lead {
    left: 20px;
    top: 254.7px;
    width: auto;
    font-size: 13px;
    line-height: 1.7;
    white-space: nowrap;
  }

  .top-fv__stats {
    left: 20px;
    top: 593.2px;
    width: 335px;
    align-items: flex-start;
    gap: 20px;
  }
  .top-fv__stat {
    gap: 9px;
    height: 80px;
  }
  .top-fv__badge {
    gap: 4px;
    padding: 2px 9px;
    font-size: 9.5px;
    letter-spacing: 0.6px;
  }
  .top-fv__badge img {
    width: 7.8px;
    height: 9px;
  }
  .top-fv__value {
    flex: 1 0 0;
    font-size: 22px;
    line-height: 25px;
  }
  .top-fv__unit {
    font-size: 13px;
  }
  .top-fv__label {
    font-size: 11px;
    line-height: 16px;
  }
}
