/* Inlined from consulting/cases/index.html */

/* hero 下端の色帯 — 4事例カードの cs-* 色を予感させる */
    .co-hero.has-case-bar { padding-bottom: 100px; }
    .co-hero.has-case-bar::after {
      content: ''; position: absolute; left: 0; right: 0; bottom: 0;
      height: 6px;
      background: linear-gradient(90deg,
        #f59e0b 0%, #f59e0b 25%,
        #f97316 25%, #f97316 50%,
        #14b8a6 50%, #14b8a6 75%,
        #7c3aed 75%, #7c3aed 100%);
      z-index: 3;
    }

    /* Story card — section ii. の SVG アイコン（saas/agile の pain-icon と同型） */
    .story-card { padding: 36px 32px; display: flex; flex-direction: column; }
    .story-card .story-icon {
      width: 52px; height: 52px; border-radius: 14px;
      background: var(--accent-light); color: var(--accent-dark);
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 18px;
      transition: background 0.35s, color 0.35s, transform 0.35s;
    }
    .story-card:hover .story-icon { background: var(--accent); color: #0f172a; transform: rotate(-6deg); }
    .story-card .story-icon svg { width: 26px; height: 26px; }
    .story-card h3 { font-size: 1.25rem; margin: 0 0 14px; line-height: 1.55; letter-spacing: 0.02em; }
    .story-card p { font-size: 0.94rem; line-height: 1.95; }
    .story-card .story-example {
      margin-top: 8px;
      padding: 14px 16px;
      background: var(--accent-light);
      border-radius: 10px;
      border-left: 3px solid var(--accent-dark);
      font-size: 0.86rem;
      color: var(--primary);
      line-height: 1.75;
    }
    .story-card .story-example a { color: var(--accent-dark); font-weight: 700; text-decoration: none; margin-left: 4px; }
    .story-card .story-example a:hover { text-decoration: underline; }
    .story-card .story-mvv {
      display: inline-block;
      margin-top: auto;
      padding-top: 18px;
      font-family: 'Lato', 'Noto Sans JP', sans-serif;
      font-size: 0.72rem;
      letter-spacing: 0.18em;
      font-weight: 700;
      color: var(--accent-dark);
      text-transform: uppercase;
    }
    /* card-grid-2 — 2カラム（density 高め） */
    .card-grid.card-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    @media (max-width: 900px) { .card-grid.card-grid-2 { grid-template-columns: 1fr; } }

    /* 他社 vs HAPILY 対比マトリクス */
    .vs-matrix {
      display: flex; flex-direction: column; gap: 10px;
      margin: 18px 0 6px;
      padding: 16px 18px;
      background: #f8f8fa;
      border-radius: 10px;
      border: 1px solid var(--border);
    }
    .vs-row { display: flex; align-items: flex-start; gap: 14px; }
    .vs-row .vs-label {
      font-family: 'Lato', 'Noto Sans JP', sans-serif;
      font-size: 0.7rem; letter-spacing: 0.18em;
      font-weight: 800; text-transform: uppercase;
      width: 64px; flex-shrink: 0; padding-top: 2px;
    }
    .vs-row.is-other .vs-label { color: var(--text-light); }
    .vs-row.is-hapily .vs-label { color: var(--accent-dark); }
    .vs-row .vs-text { font-size: 0.9rem; line-height: 1.65; flex: 0 1 auto; max-width: calc(100% - 78px); }
    .vs-row.is-other .vs-text {
      color: var(--text-light);
      text-decoration: line-through;
      text-decoration-color: rgba(0,0,0,0.25);
    }
    .vs-row.is-hapily .vs-text {
      color: var(--primary); font-weight: 700;
    }

    /* イノベーター顔写真の列（Card 1） */
    .innovator-row {
      display: flex; gap: 10px; margin: 18px 0 6px; flex-wrap: wrap; align-items: center;
    }
    .innovator-row .inno-face {
      width: 48px; height: 48px;
      border-radius: 50%;
      background-size: cover;
      background-position: center top;
      border: 2px solid #fff;
      box-shadow: 0 3px 10px rgba(0,0,0,0.12);
      transition: transform 0.25s, box-shadow 0.25s;
      display: block;
      /* A2: scroll-in pop animation */
      opacity: 0;
      transform: scale(0.5) translateY(8px);
    }
    .innovator-row .inno-face:hover {
      transform: translateY(-4px) scale(1.08);
      box-shadow: 0 8px 20px rgba(234,179,8,0.3);
      z-index: 2;
    }
    @media (prefers-reduced-motion: no-preference) {
      .reveal-stagger.in .innovator-row .inno-face {
        animation: facePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      }
      .reveal-stagger.in .innovator-row .inno-face:nth-child(1) { animation-delay: 0.9s; }
      .reveal-stagger.in .innovator-row .inno-face:nth-child(2) { animation-delay: 1.0s; }
      .reveal-stagger.in .innovator-row .inno-face:nth-child(3) { animation-delay: 1.1s; }
      .reveal-stagger.in .innovator-row .inno-face:nth-child(4) { animation-delay: 1.2s; }
      .reveal-stagger.in .innovator-row .inno-face:nth-child(5) { animation-delay: 1.3s; }
      @keyframes facePop {
        to { opacity: 1; transform: scale(1) translateY(0); }
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .innovator-row .inno-face { opacity: 1; transform: none; }
    }
    .innovator-row .inno-row-label {
      font-size: 0.78rem; color: var(--text-light);
      font-weight: 600; margin-left: 6px;
    }
    .innovator-row .inno-row-label a {
      color: var(--accent-dark); font-weight: 700; text-decoration: none;
    }
    .innovator-row .inno-row-label a:hover { text-decoration: underline; }

    /* 3事業 三角形ダイアグラム（Card 2） */
    .triangle-diagram {
      width: 100%; max-width: 300px;
      margin: 18px auto 6px; display: block;
    }
    .triangle-diagram text {
      font-family: 'Lato', 'Noto Sans JP', sans-serif;
    }
    /* A1: triangle draw-on-reveal */
    @media (prefers-reduced-motion: no-preference) {
      .triangle-diagram line {
        stroke-dasharray: 250;
        stroke-dashoffset: 250;
      }
      .triangle-diagram circle {
        transform-origin: center; transform: scale(0);
      }
      .triangle-diagram text { opacity: 0; }
      .reveal-stagger.in .triangle-diagram line {
        animation: triLine 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      }
      .reveal-stagger.in .triangle-diagram line:nth-of-type(1) { animation-delay: 1.0s; }
      .reveal-stagger.in .triangle-diagram line:nth-of-type(2) { animation-delay: 1.25s; }
      .reveal-stagger.in .triangle-diagram line:nth-of-type(3) { animation-delay: 1.5s; }
      .reveal-stagger.in .triangle-diagram circle {
        animation: triNode 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      }
      .reveal-stagger.in .triangle-diagram circle:nth-of-type(1) { animation-delay: 1.7s; }
      .reveal-stagger.in .triangle-diagram circle:nth-of-type(2) { animation-delay: 1.85s; }
      .reveal-stagger.in .triangle-diagram circle:nth-of-type(3) { animation-delay: 2.0s; }
      .reveal-stagger.in .triangle-diagram text {
        animation: triText 0.4s ease-out 2.15s forwards;
      }
      @keyframes triLine { to { stroke-dashoffset: 0; } }
      @keyframes triNode { to { transform: scale(1); } }
      @keyframes triText { to { opacity: 1; } }
    }

    /* A3: vs-matrix strikethrough animation (他社行) */
    .vs-row.is-other .vs-text {
      text-decoration: none;
      position: relative;
      display: inline-block;
    }
    .vs-row.is-other .vs-text::after {
      content: '';
      position: absolute;
      left: 0; top: 52%;
      width: 0;
      height: 1.5px;
      background: rgba(15,23,42,0.35);
      pointer-events: none;
    }
    @media (prefers-reduced-motion: no-preference) {
      .vs-row.is-other .vs-text::after {
        transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
      }
      .reveal-stagger.in .vs-row.is-other .vs-text::after {
        width: 100%;
        transition-delay: 1.6s;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .vs-row.is-other .vs-text::after { width: 100%; }
    }
