:root {
  --green: #81ef81;
  --green-dark: #56df6d;
  --text: #172019;
  --muted: #637066;
  --paper: #f7faf7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

.page-header,
.sample__inner {
  width: min(880px, calc(100% - 40px));
  margin-inline: auto;
}

.page-header {
  display: grid;
  align-content: center;
  min-height: 75vh;
  padding-block: 80px;
}

.page-header h1 {
  margin: 8px 0 16px;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1.08;
}

.page-header p {
  color: var(--muted);
  font-size: 1rem;
}

.page-header .eyebrow,
.sample__number {
  margin: 0;
  color: #23823b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.sample {
  display: grid;
  align-items: center;
  min-height: 72vh;
  padding-block: 90px;
  border-top: 1px solid #dce6dd;
}

.sample:nth-child(even) {
  background: #fff;
}

.sample h2 {
  margin: 20px 0 18px;
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 1.35;
  font-weight: 750;
}

.sample__inner > p:last-child {
  color: var(--muted);
}

.move-line {
  display: inline-block;
}

/* 01: 基本の緑色マーカー */
.move-line--basic {
  background-image: linear-gradient(transparent 66%, rgba(129, 239, 129, 0.82) 66%);
  background-position: left bottom;
  background-size: 0 100%;
  background-repeat: no-repeat;
}

.wow.animated .move-line--basic {
  animation: marker-basic 1.2s 0.25s ease-out forwards;
}

@keyframes marker-basic {
  to { background-size: 100% 100%; }
}

/* 02: マーカーが伸びて一瞬光る */
.move-line--glow {
  padding-inline: 0.08em;
  background-image: linear-gradient(transparent 58%, rgba(129, 239, 129, 0.82) 58%);
  background-position: left bottom;
  background-size: 0 100%;
  background-repeat: no-repeat;
}

.wow.animated .move-line--glow {
  animation: marker-glow-draw 1s 0.25s ease-out forwards,
             marker-glow-flash 0.6s 1.25s ease-in-out;
}

@keyframes marker-glow-draw {
  to { background-size: 100% 100%; }
}

@keyframes marker-glow-flash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}

/* 03: 太い蛍光マーカー */
.move-line--thick {
  padding-inline: 0.1em;
  background-image: linear-gradient(
    transparent 47%,
    rgba(105, 240, 120, 0.73) 47%,
    rgba(105, 240, 120, 0.73) 92%,
    transparent 92%
  );
  background-position: left center;
  background-size: 0 100%;
  background-repeat: no-repeat;
}

.wow.animated .move-line--thick {
  animation: marker-thick 1.2s 0.2s cubic-bezier(.22, 1, .36, 1) forwards;
}

@keyframes marker-thick {
  to { background-size: 100% 100%; }
}

/* 04: 緑色マーカー + 黒い下線 */
.move-line--double {
  position: relative;
  padding-inline: 0.08em;
  background-image: linear-gradient(transparent 60%, rgba(129, 239, 129, 0.75) 60%);
  background-position: left bottom;
  background-size: 0 100%;
  background-repeat: no-repeat;
}

.move-line--double::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: 3px;
  background: #111;
  transform: scaleX(0);
  transform-origin: left center;
}

.wow.animated .move-line--double {
  animation: marker-double 0.9s 0.2s ease-out forwards;
}

.wow.animated .move-line--double::after {
  animation: marker-double-line 0.7s 1s ease-out forwards;
}

@keyframes marker-double {
  to { background-size: 100% 100%; }
}

@keyframes marker-double-line {
  to { transform: scaleX(1); }
}

/* 05: 全面を塗ってから下側へ収束 */
.move-line--fill {
  position: relative;
  padding-inline: 0.1em;
  isolation: isolate;
}

.move-line--fill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(129, 239, 129, 0.82);
  transform: scaleX(0) scaleY(1);
  transform-origin: left bottom;
}

.wow.animated .move-line--fill::before {
  animation: fill-to-marker 1.3s 0.2s ease-out forwards;
}

@keyframes fill-to-marker {
  0% { transform: scaleX(0) scaleY(1); }
  60% { transform: scaleX(1) scaleY(1); }
  100% { transform: scaleX(1) scaleY(0.35); }
}

/* 06: 中央から左右へ発光ライン */
.move-line--center {
  position: relative;
}

.move-line--center::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.08em;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--green-dark);
  box-shadow: 0 3px 15px rgba(86, 223, 109, 0.7);
  transform: scaleX(0);
  transform-origin: center;
}

.wow.animated .move-line--center::after {
  animation: center-line 0.9s 0.3s cubic-bezier(.22, 1, .36, 1) forwards;
}

@keyframes center-line {
  to { transform: scaleX(1); }
}

/* 07: 終点を越えて戻る */
.move-line--overshoot {
    position: relative;
    display: inline-block;
    z-index: 0;
    isolation: isolate;
    line-height: 1;
}

.move-line--overshoot::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    bottom: 1px;
    width: 100%;
    height: 7/6pxpx;
    border-radius: 2px;
    background: rgba(255, 153, 51, 0.55);
    transform: scaleX(0);
    transform-origin: left center;
}

.wow.animated .move-line--overshoot::after {
    animation: line-overshoot 1s 0.3s forwards;
}

@keyframes line-overshoot {
    0% {
        transform: scaleX(0);
    }

    70% {
        transform: scaleX(1.12);
    }

    85% {
        transform: scaleX(0.96);
    }

    100% {
        transform: scaleX(1);
    }
}

/* 08・09: マーカーの後に白い光が横切る */
.move-line--shine,
.move-line--shine-orange {
  position: relative;
  padding-inline: 0.1em;
  overflow: hidden;
  background-image: linear-gradient(transparent 55%, rgba(129, 239, 129, 0.76) 55%);
  background-position: left bottom;
  background-size: 0 100%;
  background-repeat: no-repeat;
}

.move-line--shine::after,
.move-line--shine-orange::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  transform: skewX(-20deg);
}

.wow.animated .move-line--shine,
.wow.animated .move-line--shine-orange {
  animation: shine-marker 0.9s 0.2s ease-out forwards;
}

.wow.animated .move-line--shine::after,
.wow.animated .move-line--shine-orange::after {
  animation: shine-pass 0.8s 1.1s ease-out forwards;
}

/* 09のみ、光が通過した後にオレンジへ変化 */
.wow.animated .move-line--shine-orange {
  animation:
    shine-marker 0.9s 0.2s ease-out forwards,
    shine-to-orange 0.65s 1.9s ease-out forwards;
}

@keyframes shine-marker {
  from { background-size: 0 100%; }
  to { background-size: 100% 100%; }
}

@keyframes shine-pass {
  from { left: -40%; }
  to { left: 120%; }
}

@keyframes shine-to-orange {
  from { filter: hue-rotate(0deg) saturate(1); }
  to { filter: hue-rotate(-90deg) saturate(1.45); }
}

/* =========================================================
   Typography-independent sizing
   ラインの太さを見出し・本文のfont-sizeやline-heightに依存させない
   ========================================================= */
.move-line {
  position: relative;
  display: inline-block;
  line-height: 1;
  isolation: isolate;
  background: none;
}

/* 01・02・03 共通マーカー */
.move-line--basic::before,
.move-line--glow::before,
.move-line--thick::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 1px;
  width: 100%;
  background: rgba(129, 239, 129, 0.8);
  transform: scaleX(0);
  transform-origin: left center;
}

.move-line--basic::before {
  height: 5px;
}

.move-line--glow::before {
  height: 8px;
}

.move-line--thick::before {
  height: 10px;
}

.wow.animated .move-line--basic,
.wow.animated .move-line--glow,
.wow.animated .move-line--thick {
  animation: none;
}

.wow.animated .move-line--basic::before {
  animation: fixed-line-draw 1.2s 0.25s ease-out forwards;
}

.wow.animated .move-line--glow::before {
  animation: fixed-line-draw 1s 0.25s ease-out forwards,
             fixed-line-glow 0.6s 1.25s ease-in-out;
}

.wow.animated .move-line--thick::before {
  animation: fixed-line-draw 1.2s 0.2s cubic-bezier(.22, 1, .36, 1) forwards;
}

/* 04: 緑マーカー + 黒線 */
.move-line--double::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 1px;
  width: 100%;
  height: 8px;
  background: rgba(129, 239, 129, 0.76);
  transform: scaleX(0);
  transform-origin: left center;
}

.move-line--double::after {
  bottom: -4px;
  height: 2px;
}

.wow.animated .move-line--double {
  animation: none;
}

.wow.animated .move-line--double::before {
  animation: fixed-line-draw 0.9s 0.2s ease-out forwards;
}

/* 05: 全面塗りから固定8pxのマーカーへ */
.move-line--fill::before {
  top: auto;
  right: auto;
  bottom: 1px;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left bottom;
}

.wow.animated .move-line--fill::before {
  animation: fixed-fill-to-marker 1.3s 0.2s ease-out forwards;
}

/* 06・07: 固定pxライン */
.move-line--center::after {
  bottom: -4px;
  height: 4px;
}

.move-line--overshoot::after {
  bottom: -2px;
  height: 8px;
}

/* 08・09: 固定10pxマーカー + 光 */
.move-line--shine,
.move-line--shine-orange {
  background: none;
}

.move-line--shine::before,
.move-line--shine-orange::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 1px;
  width: 100%;
  height: 10px;
  background: rgba(129, 239, 129, 0.76);
  transform: scaleX(0);
  transform-origin: left center;
}

.wow.animated .move-line--shine {
  animation: none;
}

.wow.animated .move-line--shine-orange {
  animation: shine-to-orange 0.65s 1.9s ease-out forwards;
}

.wow.animated .move-line--shine::before,
.wow.animated .move-line--shine-orange::before {
  animation: fixed-line-draw 0.9s 0.2s ease-out forwards;
}

@keyframes fixed-line-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes fixed-line-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}

@keyframes fixed-fill-to-marker {
  0% {
    height: 100%;
    transform: scaleX(0);
  }
  60% {
    height: 100%;
    transform: scaleX(1);
  }
  100% {
    height: 8px;
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wow.animated .move-line,
  .wow.animated .move-line::before,
  .wow.animated .move-line::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}

