/* =========================================================
   Components
   SP の値は Figma（310px 幅）を 375px 幅に換算したもの（÷0.8259）。
   端数は換算結果で、Figma の整数切り上げ後の枠高さを写している。
   ========================================================= */

/* ---------- 見出し（英字ラベル + 和文タイトル） ---------- */
.c-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.c-heading__label {
  /* 上下 2px の枠線は Figma では内側ストローク。端数の枠線は 1px に丸められるので背景で描く */
  --bw: 1.65px;
  padding: 2px 0;
  background:
    var(--grad) top / 100% var(--bw) no-repeat,
    var(--grad) bottom / 100% var(--bw) no-repeat;
  font-size: 1rem;
  font-weight: 800;
  line-height: 24.22px;
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.c-heading__label > span {
  display: block;
  margin-right: -0.2em;         /* CSS は行末にも字間を足すので、Figma の枠幅に合わせて打ち消す */
  background: var(--grad);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.c-heading__title {
  font-size: 1.6875rem;
  font-weight: 800;
  line-height: 39.955px;
  letter-spacing: 0.05em;
}

.c-heading--concept .c-heading__title {
  margin-inline: -8px;          /* SP の Figma はタイトル 347.5px がコンテナ 343px からはみ出している */
  font-size: 1.625rem;
  line-height: 38.745px;
  letter-spacing: 0;
}

.c-heading--contact {
  gap: 8px;
}

@media (min-width: 768px) {
  .c-heading__label {
    --bw: 2px;
    line-height: 24px;
  }

  .c-heading__title,
  .c-heading--concept .c-heading__title {
    font-size: 2.5rem;
    line-height: 60px;
    letter-spacing: 0.05em;
  }

  .c-heading--contact .c-heading__title {
    font-size: 2rem;
    line-height: 48px;
  }
}

/* ---------- リード文 ---------- */
.c-lead {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 30.27px;
  letter-spacing: 0.05em;
  text-align: center;
}

.c-lead__em {
  color: var(--color-magenta);
}

@media (min-width: 768px) {
  .c-lead {
    font-size: 1.125rem;
    line-height: 36px;
  }
}

/* ---------- タグ（グラデーションの小さなピル） ---------- */
.c-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--grad);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 16.95px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .c-tag {
    line-height: 16px;
  }
}

/* ---------- 大きな CTA ボタン ---------- */
.c-cta {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 342px;
  max-width: 100%;
  height: 56px;
  border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 8.62px 8.15px rgb(0 0 0 / 0.2);
  color: var(--color-white);
  transition: filter 0.2s;
}

.c-cta:hover {
  filter: brightness(1.08);
}

.c-cta__text {
  font-size: 1rem;
  font-weight: 800;
  line-height: 15.74px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.c-cta__arrow {
  position: absolute;
  top: 50%;
  right: 5.65px;
  width: 18.34px;
  height: 18.34px;
  transform: translateY(-50%);
}

/* 白い内側ストローク付き（キャンペーン帯） */
.c-cta--outline {
  width: 344px;
  height: 72px;
  box-shadow: inset 0 0 0 4px var(--color-white), 0 6.82px 6.45px rgb(0 0 0 / 0.2);
}

.c-cta--outline .c-cta__text {
  font-size: 1.25rem;
  line-height: 20.58px;
}

.c-cta--outline .c-cta__arrow {
  right: 8.16px;
  width: 22.52px;
  height: 22.52px;
}

@media (min-width: 768px) {
  .c-cta {
    width: 672px;
    height: 80px;
    box-shadow: var(--shadow-cta);
  }

  .c-cta__text {
    font-size: 1.6875rem;
    line-height: 27px;
  }

  .c-cta__arrow {
    right: 6px;
    width: 36px;
    height: 36px;
  }

  .c-cta--outline {
    width: 672px;
    height: 96px;
    box-shadow: inset 0 0 0 5px var(--color-white), var(--shadow-cta);
  }

  .c-cta--outline .c-cta__text {
    font-size: 1.6875rem;
    line-height: 27px;
  }

  .c-cta--outline .c-cta__arrow {
    right: 13px;
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-cta {
    transition: none;
  }
}

/* ---------- キャンペーン帯 ---------- */
.c-campaign {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px var(--gutter);
  /* Figma のハンドルは対角線（左上→右下）。角度は 90° + atan(高さ / 幅) */
  background: linear-gradient(140.84deg, var(--color-yellow) 0%, var(--color-orange) 50%, var(--color-red) 100%);
  color: var(--color-white);
  text-align: center;
}

.c-campaign::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../img/bg-texture.webp") center / cover no-repeat;
  opacity: 0.3;
}

.c-campaign__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  /* SP の見出し 361.64px は 375px 幅でちょうど収まる。それ未満は比率で縮める */
  zoom: min(1, tan(atan2(100vw, 375px)));
}

/* 斜体はフォントではなく Figma の変形行列（skew）。原点は左上 */
.c-campaign__title {
  position: relative;
  width: 361.64px;
  height: 14.39px;
}

.c-campaign__title span {
  position: absolute;
  top: 0;
  left: 2.03px;
  width: 359.61px;
  height: 14.53px;
  font-size: 1.21rem;           /* 19.36px */
  font-weight: 800;
  line-height: 14.53px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-shadow: 1.21px 1.21px 1.61px rgb(0 0 0 / 0.15);
  transform: matrix(1, 0, -0.14, 0.9901, 0, 0);
  transform-origin: 0 0;
}

.c-campaign__off {
  position: relative;
  width: 227.06px;
  height: 51.13px;
  font-weight: 800;
  white-space: nowrap;
}

.c-campaign__off > span {
  position: absolute;
  text-align: center;
  text-shadow: 1.21px 1.21px 1.61px rgb(0 0 0 / 0.15);
  transform: matrix(1, 0, -0.1889, 0.982, 0, 0);
  transform-origin: 0 0;
}

.c-campaign__off-num {
  box-sizing: border-box;
  padding-right: 0.05em;        /* 負の字間が行末にも付く分を戻して中央を合わせる */
  top: 0;
  left: 33.75px;
  width: 79.91px;
  height: 52.06px;
  font-size: 71px;
  line-height: 52.06px;
  letter-spacing: -0.05em;
}

.c-campaign__off-pct {
  top: 21.64px;
  left: 104.82px;
  width: 29.06px;
  height: 23.01px;
  font-size: 32.27px;
  line-height: 23.01px;
}

.c-campaign__off-word {
  top: 19.1px;
  left: 135.04px;
  width: 92.02px;
  height: 29.06px;
  font-size: 39.53px;
  line-height: 29.06px;
}

.c-campaign__off-max {
  top: 5.63px;
  left: 8.01px;
  width: 24.22px;
  height: 42.38px;
  font-size: 23.4px;
  /* Figma は行送り 110% + 縦のトリミング「キャップハイト〜ベースライン」（leadingTrim: CAP_HEIGHT） */
  line-height: 25.74px;
  text-box: trim-both cap alphabetic;
}

.c-campaign__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-weight: 800;
}

.c-campaign__catch {
  font-size: 1.5rem;
  line-height: 36.33px;
  letter-spacing: 0.05em;
}

.c-campaign__text {
  font-size: 0.875rem;
  line-height: 20.58px;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .c-campaign {
    gap: 56px;
    padding: 80px var(--gutter);
    background-image: linear-gradient(112.66deg, var(--color-yellow) 0%, var(--color-orange) 50%, var(--color-red) 100%);
  }

  .c-campaign__head {
    gap: 32px;
  }

  .c-campaign__title {
    width: 894.9px;
    max-width: none;
    height: 34.66px;
  }

  .c-campaign__title span {
    left: 4.9px;
    width: 890px;
    height: 35px;
    font-size: 3rem;
    line-height: 35px;
    text-shadow: 3px 3px 4px rgb(0 0 0 / 0.15);
  }

  .c-campaign__off {
    width: 560.93px;
    height: 125.69px;
  }

  .c-campaign__off > span {
    text-shadow: 3px 3px 4px rgb(0 0 0 / 0.15);
  }

  .c-campaign__off-num {
    left: 83.84px;
    width: 197px;
    height: 128px;
    font-size: 176px;
    line-height: 128px;
  }

  .c-campaign__off-pct {
    top: 53.66px;
    left: 260.03px;
    width: 70px;
    height: 58px;
    font-size: 80px;
    line-height: 58px;
  }

  .c-campaign__off-word {
    top: 47.34px;
    left: 334.93px;
    width: 226px;
    height: 71px;
    font-size: 98px;
    line-height: 71px;
  }

  .c-campaign__off-max {
    top: 13.95px;
    left: 20.03px;
    width: 58px;
    height: 106px;
    font-size: 58px;
    line-height: 63.8px;
  }

  .c-campaign__body {
    gap: 24px;
  }

  .c-campaign__catch {
    font-size: 2.5rem;
    line-height: 60px;
  }

  .c-campaign__text {
    font-size: 1rem;
    line-height: 24px;
  }
}

/* 帯の見出し 894.9px + 左右余白 32px が入らない幅では、帯の上半分を比率を保って縮める */
@media (min-width: 768px) {
  .c-campaign__head {
    zoom: min(1, tan(atan2(100vw - 32px, 894.9px)));
  }
}

/* ---------- 動画プレースホルダ ---------- */
.c-movie {
  --m: 0.6125;                  /* SP は PC のカードを 0.6125 倍した寸法 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: calc(16px * var(--m));
  width: 100%;
  padding-right: calc(3.33px * var(--m));  /* Figma: 中身の枠 370px がカード 373.33px の左寄せ */
  aspect-ratio: 373.33 / 663.93;
  border-radius: calc(16px * var(--m));
  background: var(--color-movie);
}

.c-movie__play {
  display: flex;
  justify-content: center;
  align-items: center;
  width: calc(64px * var(--m));
  height: calc(64px * var(--m));
  border-radius: 50%;
  background: var(--grad-diag);
}

/* 再生の三角（大きさは Figma の「▶」Plus Jakarta Sans 800 / 24px と同じ）。
   縦は中央、横は重心（左端から幅の 1/3）を円の中心に合わせる。外枠のままだと左に寄って見えるため、幅の 1/6 右へずらす */
.c-movie__play::before {
  --w: calc(18.31px * var(--m));
  content: "";
  width: var(--w);
  height: calc(18.37px * var(--m));
  background: var(--color-white);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateX(calc(var(--w) / 6));
}

.c-movie__wave {
  width: calc(128px * var(--m));
  height: auto;
}

@media (min-width: 768px) {
  .c-movie {
    --m: 1;
  }
}

/* ---------- FAQ ---------- */
.c-faq {
  border-radius: 8px;
  background: var(--color-white);
  box-shadow: 0 0 10px rgb(0 0 0 / 0.1);
}

.c-faq__button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 16px 8px;
  text-align: left;
  transition: padding 0.3s ease, min-height 0.3s ease;
}

.c-faq__mark {
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 14.53px;
  letter-spacing: 0.05em;
}

.c-faq__mark--a {
  background: var(--color-text-sub);
}

.c-faq__question {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 20.58px;
  letter-spacing: 0.05em;
}

.c-faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-left: -3px;            /* Figma: 質問文の右端からアイコン枠まで 6px */
}

.c-faq__icon::before,
.c-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: var(--grad);
  transform: translate(-50%, -50%);
}

.c-faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: opacity 0.2s;
}

.c-faq__button[aria-expanded="true"] .c-faq__icon::after {
  opacity: 0;
}

/* 開閉アニメーション：行の高さ 0fr ⇔ 1fr を補間する。
   閉じたあとは visibility で読み上げ・フォーカスの対象から外す（閉じる間は表示したまま） */
.c-faq__a {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, visibility 0s;
}

.c-faq__a[data-state="closed"] {
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.3s ease, visibility 0s 0.3s;
}

.c-faq__a-clip {
  min-height: 0;
  overflow: hidden;
}

.c-faq__a-body {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 0 8px 16px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.c-faq__a[data-state="closed"] .c-faq__a-body {
  opacity: 0;
}

.c-faq__answer {
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .c-faq__button {
    gap: 24px;
    min-height: 74px;
    padding: 16px;
  }

  .c-faq__button[aria-expanded="true"] {
    /* min-height: 0; */
  }

  .c-faq__mark {
    width: 32px;
    height: 32px;
    font-size: 0.9375rem;
    line-height: 15px;
  }

  .c-faq__question {
    font-size: 1rem;
    line-height: 24px;
  }

  .c-faq__icon {
    margin-left: auto;
  }

  .c-faq__a-body {
    gap: 24px;
    padding: 8px 16px 16px;
  }

  .c-faq__answer {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-faq__icon::after,
  .c-faq__button,
  .c-faq__a,
  .c-faq__a[data-state="closed"],
  .c-faq__a-body {
    transition: none;
  }
}

/* ---------- 必須バッジ ---------- */
.c-required {
  display: inline-block;
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--color-required);
  color: var(--color-white);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 16.95px;
}

@media (min-width: 768px) {
  .c-required {
    padding: 4px;
    border-radius: 0;
    font-size: 0.75rem;
    line-height: 12px;
    letter-spacing: 0.05em;
  }
}
