/* ============================================================
   アステリアクリニック アフターピルLP (画像つなぎ合わせ版)
   - parts/*.jpg を縦に並べる構成
   - CTA: shine animation
   - price.png: bounce animation
   - timer: JS動的更新
   ============================================================ */

/* ----- Reset (minimum) ----- */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body, h1, h2, h3, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

body {
  min-height: 100vh;
  font-family: "Zen Maru Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: #333;
  background: #f5e9e0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: break-word;
  overflow-x: hidden;
  padding-bottom: 84px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.gtm-noscript {
  display: none;
  visibility: hidden;
}

/* ============================================================
   .visually-hidden
   - 視覚的には完全非表示だが、スクリーンリーダー/Googlebotには読まれる
   - 画像LPで本文相当のセマンティックHTMLを提供しSEO/広告品質を担保
   - display: none ではなく clip 方式(クローキング判定回避)
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   レイアウト
   ============================================================ */

.lp {
  max-width: 430px;
  margin: 0 auto;
  background: #fff;
  position: relative;
}

.lp-img {
  width: 100%;
  height: auto;
  display: block;
}

/* FAQセクション: section14_bg.jpg(見出し+水玉あしらい入りのピンク背景)を背景に敷き、
   その上に白カード7枚を重ねる。背景は幅100%で上揃え、はみ出し分は同色ピンクで埋める。
   ・padding-top(%)で見出しの下からカードが始まるよう調整(背景と一緒に伸縮)
   ・左右paddingで側面の水玉あしらいを見せる
   カード画像は白背景なので border-radius で角を丸く切り抜き、影は付けない(素材側で除去済み)。 */
.lp-section.lp-section--faq {
  background: url(../parts/section14.jpg) top center / 100% auto no-repeat, #fec1c9;
  padding: 20% 3.5% 6%;
}

/* FAQ各設問カード。idが広告・LINEからの #q1〜#q7 直リンク先。
   上部に被る固定ヘッダーは無いため着地余白は少量のみ。 */
.lp-faq-anchor {
  scroll-margin-top: 16px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.lp-faq-anchor:last-of-type {
  margin-bottom: 0;
}

.lp-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.lp-section {
  position: relative;
  background: #fff;
  scroll-margin-top: 16px;
}

.lp-footer {
  background: #2a1416;
}

.lp-footer__nav {
  padding: 18px 16px 4px;
}

.lp-footer__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-footer__link {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.lp-footer__link:hover,
.lp-footer__link:focus-visible {
  color: rgba(255, 255, 255, 0.95);
}

/* ============================================================
   CTA共通
   構造: <a class="cta"> > <span class="cta__btn js-shine"> > <img class="cta__img">
   .cta__btn が画像にぴったりラップする層 → shine も画像領域だけに収まる
   ============================================================ */

.cta {
  display: block;
  text-align: center;
  text-decoration: none;
}

.cta__btn {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  line-height: 0;
  font-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.cta__img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: top;
  pointer-events: none;
}

/* ホバー時の微細なリフト */
.cta:hover .cta__btn,
.cta:focus-visible .cta__btn {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

/* === FV CTA: section1 上部にオーバーレイ === */
.cta--fv {
  position: absolute;
  /* section1.jpg: 1218px - 価格カード下のピンク余白部分(下から約3-15%) */
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 340px;
  z-index: 3;
}

.cta--fv .cta__btn {
  width: 100%;
}

/* === section9 上にオーバーレイするCTA === */
.lp-section--section9 {
  position: relative;
}

.cta--section9 {
  position: absolute;
  /* section9.jpg: 2586px tall, CTA領域は下部の余白(下から約3%) */
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 340px;
  z-index: 3;
}

.cta--section9 .cta__btn {
  width: 100%;
}

/* === section15 内の最終CTA(オーバーレイ) === */
.lp-section--final .cta--final {
  position: absolute;
  top: 37%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 380px;
  z-index: 3;
}

.lp-section--final .cta--final .cta__btn {
  width: 100%;
}

/* === きらり(shine) アニメーション ===
   .js-shine が付いた要素の領域内だけで斜光がスイープ */

.js-shine {
  position: relative;
  overflow: hidden;
}

.js-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.3) 40%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.3) 60%,
    transparent 80%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  animation: cta-shine 3.5s ease-in-out infinite;
  z-index: 2;
}

@keyframes cta-shine {
  0%   { left: -75%; }
  60%  { left: 175%; }
  100% { left: 175%; }
}

/* ============================================================
   [5] section5 タイマーオーバーレイ
   ============================================================ */

.lp-section--timer {
  position: relative;
}

.timer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 86%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 3;
}

.timer--section5 {
  /* section5.jpg: 1350px tall, タイマー領域は中央上寄り */
  top: 16%;
}

.timer__row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.timer__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  letter-spacing: -0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

/* 上段: 現在時刻 → #EF3F64 */
.timer__label--current {
  background: #ef3f64;
}

/* 下段: 16:00まであと → #FF7A00 */
.timer__label--remain {
  background: #ff7a00;
}

.timer__value {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  white-space: nowrap;
  display: inline-block;
}

/* 上段の値: HH:MM (48px / #EF3F64) */
.timer__value--current {
  font-size: 44px;
  color: #ef3f64;
}

/* 下段の値の内部要素 */
.timer__active,
.timer__past {
  display: inline-block;
  vertical-align: baseline;
}

/* hidden属性で確実に非表示(SKILL.md準拠: !important不使用・属性セレクタで詳細度UP) */
.timer__active[hidden],
.timer__past[hidden] {
  display: none;
}

.timer__num {
  font-size: 40px;
  font-weight: 900;
  color: #ff7a00;
  line-height: 1;
}

.timer__unit {
  font-size: 24px;
  font-weight: 900;
  color: #ff7a00;
  line-height: 1;
  margin: 0 1px;
}

/* 16時を過ぎた場合のメッセージ */
.timer__past {
  font-size: 48px;
  font-weight: 900;
  color: #ff7a00;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

/* 画面幅430px未満では「明日発送予定」を36pxに縮小 */
@media (max-width: 429.98px) {
  .timer__past {
    font-size: 36px;
  }
}


/* tickアニメーション(秒更新時の微細なフラッシュ) */
.timer__value.is-tick .timer__num,
.timer__value--current.is-tick {
  animation: timer-tick 0.3s ease-out;
}

@keyframes timer-tick {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ============================================================
   [7] section7 - price.png バウンスアニメーション
   ============================================================ */

.lp-section--price {
  position: relative;
}

.price-overlay {
  position: absolute;
  left: 50%;
  /* section7.jpg: 782px tall, 価格領域は約290-540px / 782 = 中央 */
  top: 36%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 320px;
  pointer-events: none;
  z-index: 3;
}

.price-overlay__img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(255, 122, 0, 0.18));
}

.js-bounce {
  animation: price-bounce 1.8s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes price-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  20% {
    transform: translateX(-50%) translateY(-6px) scale(1.02);
  }
  40% {
    transform: translateX(-50%) translateY(0) scale(0.98);
  }
  55% {
    transform: translateX(-50%) translateY(-3px) scale(1.01);
  }
  70% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ============================================================
   [15] 最終CTA - タイマー + CTA オーバーレイ
   ============================================================ */

.lp-section--final {
  position: relative;
}

.timer--section15 {
  /* section15.jpg: 1034px tall, タイマー領域は下部 約720-960 = 70% */
  top: 70%;
  width: 90%;
  max-width: 380px;
}

.timer--section15 .timer__label {
  background: rgba(255, 255, 255, 0.95);
  font-weight: 900;
  font-size: 13px;
}

.timer--section15 .timer__label--final-current {
  color: #ef3f64;
}

.timer--section15 .timer__label--final-remain {
  color: #ff7a00;
}

.timer--section15 .timer__value--final {
  color: #fff;
  font-size: 32px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.timer--section15 .timer__num {
  color: #fff;
  font-size: 32px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.timer--section15 .timer__unit {
  color: #fff;
  font-size: 22px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.timer--section15 .timer__past {
  color: #fff;
  font-size: 48px;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

/* 画面幅430px未満ではsection15「明日発送予定」も36pxに縮小 */
@media (max-width: 429.98px) {
  .timer--section15 .timer__past {
    font-size: 36px;
  }
}

/* ============================================================
   フローティングCTA
   - 画面幅 764px 未満のみ表示
   - JSが section3 中段以降〜フッター手前で表示制御
   - 白背景 60%透過(rgba alpha 0.4) を画像周囲に配置
   ============================================================ */

.floating-cta {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 380px;
  z-index: 90;
  display: block;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: 0 8px 22px rgba(255, 122, 0, 0.32), 0 4px 12px rgba(255, 95, 135, 0.20);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.floating-cta:hover,
.floating-cta:focus-visible {
  transform: translateX(-50%) translateY(-2px);
}

/* shine が掛かるのは画像にぴったりのこの内側ラッパー */
.floating-cta__btn {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  line-height: 0;
  font-size: 0;
  margin: 0;
  padding: 0;
}

.floating-cta__img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.floating-cta--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(40px);
}

/* ============================================================
   レスポンシブ
   ============================================================ */

@media (min-width: 1024px) {
  .lp {
    margin: 24px auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    border-radius: 4px;
  }
}

/* PC: 画面幅 1025px 以上ではフローティングCTAを画面右下に固定 */
@media (min-width: 1025px) {
  body {
    /* CTAは LPコンテンツの外側に配置されるため下余白は不要 */
    padding-bottom: 0;
  }

  .floating-cta {
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: none;
    width: 380px;
    max-width: 380px;
  }

  .floating-cta:hover,
  .floating-cta:focus-visible {
    transform: translateY(-2px);
  }

  /* 表示前 / フッター近接時の非表示状態(translateXを使わない) */
  .floating-cta--hidden {
    transform: translateY(40px);
  }
}

/* 画面幅 1430px 以上では LPコンテンツの右余白に余裕があるため500pxへ */
@media (min-width: 1430px) {
  .floating-cta {
    width: 500px;
    max-width: 500px;
  }
}
