/* ==========================================================================
   ai-video-production.html — THE INVISIBLE STUDIO 専用スタイル

   デザイン言語: 映画館の文法（レターボックス / タイムコード / フィルムストリップ）
   色: 黒 #080808 × ブランド赤 #E63946。赤の発光は面積を絞って使う。

   構成:
     1. 共通CSSの打ち消し（sticky/pin を殺す overflow-x, SP の word-break）
     2. 共通パーツ（スレート表記・見出しの折り返し固定）
     3. ヒーロー  … 連番スクラブ（pin）＋レターボックス＋撮影機材UI
     4. PROOF     … 画面幅いっぱいの宣言文（読点単位の段階着色）
     5. DECK      … 用途6種の 3D カード（組み上がり＋ホバー微傾斜）
     6. REASONS   … エディトリアルな索引レイアウト
     7. FLOW      … フィルムストリップ（pin・横送り）
     8. PRICING / FAQ / CTA
     9. リビール・pin スペーサー
    10. レスポンシブ / reduced-motion

   .js が付いているときだけ演出用のレイアウト（pin 区間・初期非表示）を当てる。
   GSAP が CDN から来なかった場合は .js が外れ、全セクションが素の縦並びで読める。
   ========================================================================== */

/* ==========================================================================
   1. 共通CSSの打ち消し
   ========================================================================== */

/* style.css の html/body { overflow-x: hidden } は body をスクロールコンテナ扱いにするため、
   ScrollTrigger の pin と position: sticky が効かなくなる。clip なら横あふれは止めたまま
   スクロールコンテナにならない（work-detail-heroes.html と同じ対処）。 */
html.aiv-page,
html.aiv-page body {
    overflow-x: clip;
}

/* ページ全体に低透過のフィルムグレインを敷く。pin の合間の無地黒画面でも
   質感が残り「死んだ画面」に見えない（ヘッダーより下・本文より上に固定） */
html.aiv-page body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 160px 160px;
}

/* ==========================================================================
   2. 共通パーツ
   ========================================================================== */

/* 各セクション冒頭のシーン表記（装飾。面積は絞る） */
.aiv-slate {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.4rem;
}

.aiv-slate::before {
    content: '';
    width: 26px;
    height: 2px;
    background: var(--color-primary);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.7);
}

/* 見出しの折り返し単位を span で固定する。span 内では折り返さないので、
   SP で助詞1文字だけが次の行に落ちない */
.aiv-title-wrap span,
.aiv-hero h1 .nw {
    display: inline-block;
    overflow-wrap: normal;
    word-break: keep-all;
}

/* ==========================================================================
   3. ヒーロー
   ========================================================================== */

.aiv-hero {
    /* レターボックス帯の高さ。シネスコ 2.35:1 の余白から算出し、上限を切る */
    --lb: clamp(44px, calc((100svh - 100vw / 2.35) / 2), 17svh);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 0 110px;
    background:
        radial-gradient(ellipse at 68% 34%, rgba(230, 57, 70, 0.16) 0%, transparent 46%),
        radial-gradient(ellipse at 22% 86%, rgba(164, 22, 26, 0.14) 0%, transparent 50%),
        linear-gradient(180deg, #030303 0%, #0c0507 55%, #060606 100%);
}

/* JS が生きているときだけ全画面固定の見せ場にする */
.js .aiv-hero {
    height: 100svh;
    min-height: 560px;
    padding: 0;
}

.aiv-hero-media {
    position: absolute;
    inset: 0;
}

/* 連番フレームの描画先。素材が無い間は透明のまま */
.aiv-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.aiv-hero.seq-on .aiv-hero-canvas {
    opacity: 1;
}

/* 連番が無いとき用の静止画フォールバック（hero-poster.webp を置くと出る） */
.aiv-hero-poster {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.7s ease;
    will-change: transform;
}

.aiv-hero.poster-on:not(.seq-on) .aiv-hero-poster {
    opacity: 0.9;
}

/* グレイン＋（素材なし時）コード描画の映画的背景 */
.aiv-hero-fx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

/* 映像の上に文字を置くための減光。映像が無いときは掛けない */
.aiv-hero-veil {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    background:
        radial-gradient(ellipse 70% 55% at 50% 46%, rgba(3, 3, 3, 0.62) 0%, rgba(3, 3, 3, 0.14) 70%, transparent 100%),
        linear-gradient(180deg,
            rgba(3, 3, 3, 0.72) 0%,
            rgba(3, 3, 3, 0.28) 42%,
            rgba(3, 3, 3, 0.82) 100%);
}

.aiv-hero.seq-on .aiv-hero-veil,
.aiv-hero.poster-on .aiv-hero-veil {
    opacity: 1;
}

/* レターボックス（シネスコ帯）。スクロールで scaleY だけを動かす */
.aiv-letterbox {
    position: absolute;
    left: 0;
    right: 0;
    height: var(--lb);
    background: #000;
    z-index: 4;
    display: none;
    will-change: transform;
}

.aiv-letterbox-top {
    top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aiv-letterbox-btm {
    bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.js .aiv-letterbox {
    display: block;
}

/* 撮影機材UI: REC・タイムコード・クロップマーク・セーフゾーン */
/* レターボックス帯（z:4）より上に置き、帯が閉じる間も REC / TC が生きて見える */
.aiv-cam-ui {
    position: absolute;
    top: calc(var(--lb) + 18px);
    bottom: calc(var(--lb) + 18px);
    left: 22px;
    right: 22px;
    z-index: 5;
    display: none;
    pointer-events: none;
    font-family: 'Orbitron', sans-serif;
}

.js .aiv-cam-ui {
    display: block;
}

.aiv-cam-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 0 solid rgba(255, 255, 255, 0.35);
}

.aiv-cam-corner.tl {
    top: 0;
    left: 0;
    border-top-width: 1px;
    border-left-width: 1px;
}

.aiv-cam-corner.tr {
    top: 0;
    right: 0;
    border-top-width: 1px;
    border-right-width: 1px;
}

.aiv-cam-corner.bl {
    bottom: 0;
    left: 0;
    border-bottom-width: 1px;
    border-left-width: 1px;
}

.aiv-cam-corner.br {
    bottom: 0;
    right: 0;
    border-bottom-width: 1px;
    border-right-width: 1px;
}

/* 16:9 セーフゾーン線 */
.aiv-cam-safe {
    position: absolute;
    inset: 5.5%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.aiv-rec {
    position: absolute;
    top: 14px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.72);
}

.aiv-rec i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.9);
    animation: aivRec 1.6s steps(1) infinite;
}

@keyframes aivRec {

    0%,
    62% {
        opacity: 1;
    }

    63%,
    100% {
        opacity: 0.15;
    }
}

.aiv-tc {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.74rem;
    letter-spacing: 2px;
    color: var(--color-primary);
}

.aiv-tc b {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
}

.aiv-ratio {
    position: absolute;
    bottom: 12px;
    left: 16px;
    font-size: 0.62rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.34);
}

/* 底辺の赤いハアライン */
.aiv-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    box-shadow: 0 0 24px var(--color-primary);
    z-index: 6;
}

.aiv-hero-content {
    position: relative;
    z-index: 5;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    will-change: transform, opacity;
}

.aiv-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 6px;
    color: var(--color-accent);
    margin-bottom: 30px;
}

.aiv-hero-eyebrow::before,
.aiv-hero-eyebrow::after {
    content: '';
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(230, 57, 70, 0.8));
}

.aiv-hero-eyebrow::after {
    background: linear-gradient(90deg, rgba(230, 57, 70, 0.8), transparent);
}

/* 映画ポスター級の見出し。最大 8vw 級 */
.aiv-hero h1 {
    font-size: clamp(2.15rem, 8.2vw, 6.6rem);
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: 0.015em;
    color: #ffffff;
    margin-bottom: 26px;
    text-shadow: 0 0 60px rgba(230, 57, 70, 0.3), 0 2px 30px rgba(0, 0, 0, 0.65);
}

.aiv-hero-sub {
    font-size: clamp(1rem, 2.4vw, 1.18rem);
    color: var(--color-text-secondary);
    line-height: 2.1;
    letter-spacing: 0.04em;
    margin-bottom: 34px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

/* 連番が入っているときだけ「いま動かしている映像」と言い切る。
   素材が無い状態でこの文言を出すと嘘になるため、2 文を出し分ける。 */
.aiv-sub-seq {
    display: none;
}

.aiv-hero.seq-on .aiv-sub-seq {
    display: inline;
}

.aiv-hero.seq-on .aiv-sub-default {
    display: none;
}

.aiv-hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 38px;
}

.aiv-hero-badge {
    background: rgba(3, 3, 3, 0.5);
    border: 1px solid rgba(230, 57, 70, 0.55);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    padding: 9px 22px;
    border-radius: 2px;
    backdrop-filter: blur(4px);
}

.aiv-hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* セカンダリボタンは共通CSSだと白半透明の塗りで disabled に見えるため、
   このページではゴースト型（透明＋赤ボーダー）に統一する */
html.aiv-page .btn-secondary {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: #ffffff;
    backdrop-filter: none;
}

html.aiv-page .btn-secondary:hover {
    background: rgba(230, 57, 70, 0.12);
    border-color: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(230, 57, 70, 0.25);
}

/* スクロールを促す縦線。レターボックス帯の内側に置く */
.aiv-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: calc(var(--lb) + 4px);
    transform: translateX(-50%);
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.66rem;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.js .aiv-scroll-cue {
    display: flex;
}

.aiv-scroll-cue span::after {
    content: '';
    display: block;
    width: 1px;
    height: 40px;
    margin: 8px auto 0;
    background: linear-gradient(180deg, var(--color-primary), transparent);
    animation: aivCue 2.1s ease-in-out infinite;
}

@keyframes aivCue {

    0%,
    100% {
        opacity: 0.25;
        transform: scaleY(0.5);
        transform-origin: top;
    }

    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
}

/* ==========================================================================
   4. PROOF（画面幅いっぱいの宣言文）
   ========================================================================== */

.aiv-proof {
    padding: calc(var(--spacing-xl) + 2rem) 0 var(--spacing-xl);
    background: linear-gradient(180deg, #000 0%, #0a0405 40%, #080808 100%);
}

.aiv-proof-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 64px);
}

.aiv-proof-lead {
    font-size: clamp(1.65rem, 5.4vw, 4.4rem);
    font-weight: 900;
    line-height: 1.6;
    letter-spacing: 0.01em;
    color: #ffffff;
    margin-bottom: 3.2rem;
    word-break: normal;
}

/* 段階着色。JS が無いときは最初から読める色にしておく。
   読点単位の span は inline-block + keep-all で、折り返しを読点の後だけに固定する */
.aiv-proof-lead .w {
    display: inline-block;
    overflow-wrap: normal;
    word-break: keep-all;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.35s ease, text-shadow 0.35s ease;
}

.js .aiv-proof-lead .w {
    color: rgba(255, 255, 255, 0.38);
}

.js .aiv-proof-lead .w.on {
    color: #ffffff;
    text-shadow: 0 0 30px rgba(230, 57, 70, 0.35);
}

/* 実績引用は宣言文の直後で埋没しないよう、余白を広めに取る */
.aiv-proof-note {
    max-width: 860px;
    margin: 4.8rem 0 1.6rem;
    color: var(--color-text-secondary);
    font-size: 0.97rem;
    line-height: 2.15;
    border-left: 3px solid var(--color-primary);
    padding: 0.4rem 0 0.4rem 1.6rem;
}

.aiv-proof-note strong {
    color: #ffffff;
    font-weight: 700;
}

.aiv-proof-link {
    display: inline-block;
    margin-top: 1.1rem;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(230, 57, 70, 0.4);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.aiv-proof-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ==========================================================================
   5. DECK（用途6種の 3D カード）
   ========================================================================== */

.aiv-deck {
    position: relative;
    padding: var(--spacing-xl) 0;
}

/* デッキは pin しない。6枚のカードは高さが読めず、100svh に収めようとすると
   ノートPCの短いビューポートで下が切れる。素の縦位置のままスクラブで組み上げる。 */

.aiv-deck-inner {
    width: 100%;
}

.aiv-deck .section-title {
    margin-bottom: var(--spacing-md);
}

.aiv-deck-stage {
    perspective: 1500px;
    perspective-origin: 50% 44%;
}

.aiv-deck-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    transform-style: preserve-3d;
}

.aiv-deck-card {
    will-change: transform, opacity;
}

/* ホバー微傾斜は内側のラッパーに掛ける（外側は組み上がりスクラブが使う） */
.aiv-card-in {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #0e0e0e 0%, #0a0a0a 100%);
    border: 1px solid #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.aiv-deck-card:hover .aiv-card-in {
    border-color: rgba(230, 57, 70, 0.55);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 6px 30px rgba(230, 57, 70, 0.14);
}

.aiv-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(230, 57, 70, 0.30) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 75%, rgba(255, 107, 107, 0.14) 0%, transparent 50%),
        linear-gradient(135deg, #140809 0%, #260c10 60%, #100507 100%);
}

.aiv-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 画像が無くても成立させるためのプレースホルダー。画像が読めたら JS が畳む。
   赤リムライト＋ノイズ＋大きなアウトライン数字で、実画像と同じトーンに揃える */
.aiv-card-mock {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E"),
        radial-gradient(ellipse 90% 70% at 78% 18%, rgba(230, 57, 70, 0.4) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 12% 88%, rgba(164, 22, 26, 0.3) 0%, transparent 55%),
        linear-gradient(135deg, #150809 0%, #230b0f 55%, #0e0507 100%);
}

.aiv-card-mock::before {
    content: attr(data-no);
    position: absolute;
    right: 10px;
    bottom: -14px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 5.2rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 107, 107, 0.4);
}

.aiv-card-mock::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    pointer-events: none;
}

.aiv-card-mock svg {
    width: 58px;
    height: 58px;
    color: var(--color-accent);
    filter: drop-shadow(0 0 16px rgba(230, 57, 70, 0.6));
}

.aiv-deck-card.img-on .aiv-card-mock {
    display: none;
}

.aiv-card-body {
    position: relative;
    padding: 1.1rem 1.5rem 1.7rem;
}

/* カット番号: 袋文字でメディアの縁に食い込ませる */
.aiv-card-no {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    margin: -2.2rem 0 0.55rem -2px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(230, 57, 70, 0.85);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.aiv-card-body h3 {
    font-size: 1.16rem;
    color: #ffffff;
    margin-bottom: 0.7rem;
    line-height: 1.6;
}

.aiv-card-body p {
    color: #c3c8d2;
    font-size: 0.95rem;
    line-height: 1.95;
}

/* ==========================================================================
   6. REASONS（索引のようなエディトリアル行組み）
   ========================================================================== */

.aiv-reasons {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(230, 57, 70, 0.045) 50%, transparent 100%);
}

.aiv-reasons-grid {
    margin-top: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aiv-reason {
    display: grid;
    grid-template-columns: minmax(96px, 170px) minmax(230px, 1fr) 1.7fr;
    gap: 1.2rem 3rem;
    align-items: start;
    padding: 2.7rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.aiv-reason:hover {
    background-color: rgba(230, 57, 70, 0.03);
}

.aiv-reason-num {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: clamp(2.7rem, 5.4vw, 4.8rem);
    line-height: 0.95;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(230, 57, 70, 0.8);
    transition: color 0.35s ease;
}

.aiv-reason:hover .aiv-reason-num {
    color: rgba(230, 57, 70, 0.16);
}

/* 「る」1文字のぶら下がり対策。共通CSSの word-break: keep-all は CJK の
   改行機会を全て奪うため、emergency break（overflow-wrap）でしか折り返せず
   末尾1文字が落ちる。改行機会を戻したうえで balance で行長を揃える */
.aiv-reason h3 {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.55;
    margin: 0;
    word-break: normal;
    line-break: normal;
    overflow-wrap: normal;
    text-wrap: balance;
}

.aiv-reason p {
    color: #c3c8d2;
    font-size: 0.98rem;
    line-height: 2.05;
    margin: 0;
}

/* ==========================================================================
   7. FLOW（フィルムストリップ・pin 横送り）
   ========================================================================== */

.aiv-flow {
    position: relative;
    padding: var(--spacing-xl) 0;
    overflow: hidden;
    background: #060606;
}

.js .aiv-flow {
    height: 100svh;
    min-height: 620px;
    /* pin 中に「制作の流れ」見出しが固定ヘッダーの裏に潜らないよう頭を空ける */
    padding: 72px 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aiv-flow-head {
    padding: 0 20px;
    margin-bottom: 1.6rem;
}

.aiv-flow-head .section-title {
    margin-bottom: 0.6rem;
}

.aiv-flow-progress {
    position: relative;
    height: 2px;
    max-width: 1200px;
    margin: 1.6rem auto 0;
    background: rgba(255, 255, 255, 0.08);
}

/* 進捗は width でなく transform で動かす（transform/opacity のみ原則） */
.aiv-flow-progress i {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
    box-shadow: 0 0 14px rgba(230, 57, 70, 0.7);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

.aiv-flow-viewport {
    width: 100%;
    overflow: hidden;
}

/* will-change は付けない。トラック全体が独立した合成レイヤーになると、
   ソフトウェア描画環境（QC のヘッドレス等）でタイルの取り残しが起き、
   前フレームの隣カードの文字断片が混ざって見える（audit で実害） */
.aiv-flow-track {
    display: flex;
    gap: 26px;
    padding: 2.2rem 8vw;
}

/* JS が無ければ横並びをやめて素直に折り返す */
html:not(.js) .aiv-flow-track {
    flex-wrap: wrap;
    padding: 2.4rem 20px;
}

/* フィルムのコマ。上下にパーフォレーション（送り穴）を敷く。
   isolation でパネルを描画の原子単位にする（素の描画順序では、前のカードから
   はみ出した文字が次のカードの「背景より上」に描かれ、文字が交錯する）。
   overflow: hidden で文字・チップのはみ出し自体も物理的に遮断する */
.aiv-flow-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    flex: 0 0 auto;
    width: min(430px, 78vw);
    background: #0d0d0d;
    border: 1px solid #1d1d1d;
    border-radius: 6px;
    padding: 3.4rem 2rem 3.2rem;
}

.aiv-flow-panel::before,
.aiv-flow-panel::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    height: 12px;
    background: repeating-linear-gradient(90deg,
            transparent 0 8px,
            rgba(255, 255, 255, 0.13) 8px 24px,
            transparent 24px 32px);
    border-radius: 2px;
    pointer-events: none;
}

.aiv-flow-panel::before {
    top: 12px;
}

.aiv-flow-panel::after {
    bottom: 12px;
}

html:not(.js) .aiv-flow-panel {
    width: 100%;
}

/* カチンコ風のカット番号チップ */
.aiv-flow-panel .step-no {
    position: relative;
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 2px;
    color: #ffffff;
    background: #000;
    border: 1px solid #2a2a2a;
    padding: 16px 16px 8px;
    margin-bottom: 1.3rem;
}

.aiv-flow-panel .step-no::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(-45deg,
            var(--color-primary) 0 9px,
            #111 9px 18px);
}

.aiv-flow-panel .step-no::after {
    content: ' / 05';
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.72em;
    font-weight: 400;
}

.aiv-flow-panel h3 {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 0.9rem;
}

.aiv-flow-panel p {
    color: #c3c8d2;
    font-size: 0.95rem;
    line-height: 2;
}

.aiv-flow-panel .step-out {
    display: inline-block;
    margin-top: 1.2rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 1px;
    color: var(--color-accent);
    border: 1px solid rgba(255, 107, 107, 0.35);
    border-radius: 2px;
    padding: 6px 12px;
}

/* ==========================================================================
   8. PRICING / FAQ / CTA
   ========================================================================== */

.aiv-pricing {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(230, 57, 70, 0.045) 50%, transparent 100%);
}

.aiv-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.2rem;
    margin-top: var(--spacing-lg);
}

.aiv-pricing-card {
    position: relative;
    background: linear-gradient(180deg, #0e0e0e 0%, #0a0a0a 100%);
    border: 1px solid #232323;
    border-radius: 14px;
    padding: 3rem 2.2rem 2.6rem;
    text-align: center;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.aiv-pricing-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 10px 40px rgba(230, 57, 70, 0.16);
}

.aiv-pricing-card-featured {
    border-color: rgba(230, 57, 70, 0.85);
    background:
        linear-gradient(180deg, rgba(230, 57, 70, 0.08) 0%, rgba(230, 57, 70, 0.02) 45%, transparent 100%),
        linear-gradient(180deg, #101010 0%, #0a0a0a 100%);
    box-shadow: 0 0 50px rgba(230, 57, 70, 0.12);
    transform: scale(1.04);
}

.aiv-pricing-card-featured::before {
    content: '人気';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #ffffff;
    padding: 0.45rem 1.6rem;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
}

.aiv-pricing-card-featured:hover {
    transform: translateY(-10px) scale(1.04);
}

.aiv-plan-name {
    font-size: 1.45rem;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 0.7rem;
}

.aiv-plan-target {
    font-size: 0.9rem;
    color: var(--color-accent);
    letter-spacing: 0.03em;
    margin-bottom: 1.4rem;
}

.aiv-plan-price {
    font-size: clamp(2.1rem, 3.6vw, 2.8rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 30px rgba(230, 57, 70, 0.4);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.aiv-plan-price-suffix {
    font-size: 0.5em;
    color: var(--color-accent);
    font-weight: 700;
    margin-left: 0.15em;
}

.aiv-plan-features {
    list-style: none;
    padding: 1.6rem 0;
    margin: 1.6rem 0 1.8rem;
    border-top: 1px solid rgba(230, 57, 70, 0.2);
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
    text-align: left;
}

.aiv-plan-features li {
    color: var(--color-text-secondary);
    padding: 0.6rem 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

.aiv-plan-features li::before {
    content: '✓';
    color: var(--color-primary);
    font-weight: 700;
    margin-right: 0.7rem;
}

.aiv-pricing-note {
    max-width: 760px;
    margin: 3rem auto 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 2;
}

.aiv-packages {
    max-width: 920px;
    margin: 4.5rem auto 0;
}

.aiv-packages-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 1.8rem;
}

.aiv-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.aiv-package-card {
    display: block;
    text-decoration: none;
    background: #0c0c0c;
    border: 1px solid #1e1e1e;
    border-left: 3px solid var(--color-primary);
    border-radius: 8px;
    padding: 1.9rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.aiv-package-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 6px 26px rgba(230, 57, 70, 0.14);
}

.aiv-package-card h4 {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 900;
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.aiv-package-card .aiv-package-price {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.aiv-package-card p {
    color: #c3c8d2;
    font-size: 0.95rem;
    line-height: 1.9;
}

.aiv-package-card .aiv-package-link {
    display: inline-block;
    margin-top: 0.9rem;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.aiv-works-link {
    margin-top: 2.6rem;
    text-align: center;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.65);
}

.aiv-works-link a {
    margin-left: 0.6rem;
    color: #ffffff;
    font-weight: 700;
    border-bottom: 1px solid rgba(230, 57, 70, 0.7);
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.aiv-works-link a:hover {
    color: var(--color-primary, #E63946);
}

.aiv-faq {
    padding: 4rem 0 var(--spacing-xl);
}

/* ==========================================================================
   9. リビール・pin スペーサー
   ========================================================================== */

.js [data-reveal],
.js [data-reveal-col] {
    opacity: 0;
    transform: translateY(26px);
}

.js [data-hero] {
    opacity: 0;
    transform: translateY(22px);
}

/* pin 用スペーサー。iOS で URL バーが隠れたとき下に覗く帯を暗くする */
.pin-spacer.aiv-hero-spacer {
    background: #000000;
}

.pin-spacer.aiv-flow-spacer {
    background: #060606;
}

/* ==========================================================================
   10. レスポンシブ / reduced-motion
   ========================================================================== */

@media (max-width: 1024px) {
    .aiv-deck-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .aiv-reason {
        grid-template-columns: minmax(80px, 120px) 1fr;
        gap: 0.9rem 2rem;
    }

    .aiv-reason p {
        grid-column: 2;
    }
}

@media (max-width: 900px) {
    .aiv-deck-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .aiv-deck-stage {
        perspective: none;
    }
}

@media (max-width: 768px) {
    .aiv-hero {
        --lb: clamp(34px, 8svh, 64px);
        padding: 110px 0 80px;
    }

    .js .aiv-hero {
        padding: 0;
    }

    .aiv-hero h1 {
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .aiv-hero-cta .btn {
        width: 100%;
        max-width: 320px;
    }

    /* SP はヒーローの中身が縦に伸びて CTA と重なるので、スクロールキューは出さない */
    .js .aiv-scroll-cue {
        display: none;
    }

    .aiv-cam-safe {
        display: none;
    }

    .aiv-ratio {
        display: none;
    }

    .aiv-rec {
        top: 8px;
        left: 8px;
        font-size: 0.62rem;
    }

    /* SP はヒーローの中身が縦に伸びて CTA と重なるため、TC は出さない
       （REC とコーナーマークだけ残す） */
    .aiv-tc {
        display: none;
    }

    .aiv-cam-ui {
        left: 14px;
        right: 14px;
        top: calc(var(--lb) + 12px);
        bottom: calc(var(--lb) + 12px);
    }

    /* SP でも span 単位で折り返す（h2 の overflow-wrap: anywhere に負けないよう再指定） */
    .aiv-title-wrap span,
    .aiv-proof-lead .w {
        overflow-wrap: normal;
        word-break: keep-all;
    }

    .aiv-reason {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 2.1rem 0;
    }

    .aiv-reason p {
        grid-column: 1;
    }

    .aiv-flow-track {
        padding: 2rem 6vw;
        gap: 18px;
    }

    .aiv-flow-panel {
        padding: 3rem 1.6rem 2.9rem;
    }

    .aiv-pricing-card-featured {
        transform: none;
    }

    .aiv-pricing-card-featured:hover {
        transform: translateY(-10px);
    }

    /* 共通CSSの word-break: keep-all がSPで長文をはみ出させるため打ち消す */
    h2,
    h3,
    p,
    li,
    .faq-question,
    .faq-answer {
        word-break: normal;
        word-break: auto-phrase;
        line-break: normal;
        overflow-wrap: break-word;
    }
}

/* 動きを減らす設定のときは演出を完全に止め、素の縦並びで全文を読ませる */
@media (prefers-reduced-motion: reduce) {

    .js .aiv-hero,
    .js .aiv-flow {
        height: auto;
        min-height: 0;
        display: block;
        padding: var(--spacing-xl) 0;
    }

    .js .aiv-hero {
        padding: 140px 0 110px;
    }

    .js .aiv-letterbox,
    .js .aiv-cam-ui {
        display: none;
    }

    .aiv-rec i,
    .aiv-scroll-cue span::after {
        animation: none;
    }

    .js [data-reveal],
    .js [data-reveal-col],
    .js [data-hero] {
        opacity: 1;
        transform: none;
    }

    .js .aiv-proof-lead .w {
        color: rgba(255, 255, 255, 0.92);
    }

    .aiv-flow-track {
        flex-wrap: wrap;
        padding: 2.4rem 20px;
    }

    .aiv-flow-panel {
        width: 100%;
    }

    .js .aiv-scroll-cue {
        display: none;
    }
}
