/*
 * Shoot Chop Drop LP
 * 基調: 白背景 + 黒テキスト + ライム (#C8FF00) アクセント
 * (アプリ本体は dark だが、LP は反転させて視認性 + ブランドカラーの映えを優先)
 *
 * 暫定スタイル。design 確定後に thoroughly に書き直す前提のミニマルベース。
 */

:root {
    --bg: #2a2a2e;
    --fg: #f5f5f5;
    --fg-dim: rgba(255, 255, 255, 0.6);
    --fg-faint: rgba(255, 255, 255, 0.35);
    --accent: #C8FF00;
    --accent-ink: #000000;        /* accent の上に乗せる文字色 */
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.2);

    --max-w: 960px;
    --pad-x: clamp(16px, 4vw, 32px);

    --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-display);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    min-height: 100%;
}

body {
    padding: 0 var(--pad-x);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover { text-decoration: underline; }

/* ============================================
   NAV (top header、LOOK Lab パターン)
   ============================================ */
.nav {
    margin: 0 auto;
    padding: 20px 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-right: auto;
}

.nav__mark {
    /* SCD ワードマーク: UFO + S + C + D の横長ロゴ。アスペクト 3.37:1。
       横幅でなく高さ指定で nav の高さ感を揃える。 */
    height: 26px;
    width: auto;
    display: block;
}
/* 単色レイヤー: white bg では navy #000044 がブランド色。
   将来テーマ反転するときはここを var(--fg) や var(--accent) に切替可能。 */
.nav__mark-fore { fill: var(--fg); }

.nav__links {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.nav__links a {
    color: var(--fg-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}

.nav__links a:hover { color: var(--fg); }

.nav__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}

.nav__cta:hover { opacity: 0.85; text-decoration: none; }

.nav__cta--disabled {
    background: rgba(255, 255, 255, 0.14);
    color: var(--fg-dim);
    cursor: not-allowed;
    pointer-events: none;
}

/* スマホ: in-page links を隠して brand + CTA だけにする */
@media (max-width: 540px) {
    .nav__links { display: none; }
    .nav__cta   { margin-left: auto; }
}

/* ============================================
   HERO (index.html)
   ============================================ */
.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(48px, 8vh, 96px) 0 clamp(64px, 12vh, 120px);
    text-align: center;
}

.hero__logo {
    width: 80px;
    height: auto;
    color: var(--accent);
    margin-bottom: 24px;
}

/* ============================================
   TRACTOR (fixed UFO + beam, scroll-driven)

   構造:
     .tractor                       position: fixed; ビューポート全幅
       └── .tractor__fade           上端の bg グラデ (吸い込まれて消える視覚)
       └── .tractor__ufo-wrap       UFO 本体 (中央上端、スクロールで降下)
             └── .tractor__ufo-anim   bob アニメ対象
                   └── .tractor__ufo  SVG
       └── .tractor__beam           UFO 下に伸びるビーム (逆三角)
             └── .tractor__beam-item × 13 + レア牛

   状態:
     - default       UFO は画面外 (translateY(-110%))、ビームは scaleY(0)
     - .is-active    scrollY > 80px で付与。UFO 降下、ビーム展開
     - 上に戻ると外れる → UFO が引っ込み「吐き出した」見た目に

   prefers-reduced-motion でアニメ全停止 (末尾参照)。
   ============================================ */
.tractor {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 40;
}

/* 画面最上部の bg フェード:
   スクロールしてきた要素が UFO に吸い込まれて消えていく見た目を作る。
   グラデで bg 色から transparent へ → 下から上がってきた要素が徐々に bg と同化。 */
.tractor__fade {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(140px, 24vh, 220px);
    background: linear-gradient(
        to bottom,
        var(--bg) 0%,
        var(--bg) 35%,
        rgba(42, 42, 46, 0.85) 60%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.45s ease 0.05s;
    z-index: 1;
}

.tractor.is-active .tractor__fade {
    opacity: 1;
}

/* CTA \u30bb\u30af\u30b7\u30e7\u30f3\u4e0a\u3067\u306f dark fade \u3092\u96a0\u3059 (lime \u80cc\u666f\u3068\u306e\u30b3\u30f3\u30c8\u30e9\u30b9\u30c8\u306e\u305f\u3081) */
.tractor.is-over-cta .tractor__fade {
    opacity: 0;
}

/* UFO 本体 (fixed, 中央上) */
.tractor__ufo-wrap {
    position: absolute;
    top: clamp(8px, 1.5vh, 20px);
    left: calc(50% + var(--sway-x, 0px));
    width: clamp(90px, 13vw, 150px);
    transform: translateX(-50%) translateY(-130%);
    transition: transform 0.55s cubic-bezier(.34, .05, .55, 1);
    z-index: 3;
}

.tractor.is-active .tractor__ufo-wrap {
    transform: translateX(-50%) translateY(0);
}

.tractor.is-active .tractor__ufo-wrap {
    transform: translateX(-50%) translateY(0);
}

.tractor__ufo-anim {
    /* idle: ゆっくり bob、is-active 時のみ動作。
       --ufo-scale を併用して JS から収納サイズを騆動 */
    animation: tractor-ufo-bob 1s ease-in-out infinite alternate;
}

@keyframes tractor-ufo-bob {
    from { transform: translateY(0) scale(var(--ufo-scale, 1)); }
    to   { transform: translateY(-6px) scale(var(--ufo-scale, 1)); }
}

.tractor__ufo {
    display: block;
    width: 100%;
    height: auto;
}

/* 旧 SVG レイヤークラスは不要 (新 SVG は fill を内蔵) */

/* ビーム: UFO 下から下方向に伸びる逆三角。
   ビューポート上部 ~50vh まで届く長さに。  */
.tractor__beam {
    position: absolute;
    top: clamp(60px, 8vh, 110px);
    left: calc(50% + var(--sway-x, 0px));
    width: clamp(140px, 20vw, 220px);
    height: 20vh;
    transform: translateX(-50%) scaleY(0);
    transform-origin: top center;
    /* 逆三角 (上=狭い UFO 直下、下=広がる) */
    clip-path: polygon(40% 0, 60% 0, 90% 100%, 10% 100%);
    background: linear-gradient(
        to bottom,
        rgba(200, 255, 0, 0) 0%,
        rgba(200, 255, 0, 0.55) 20%,
        rgba(200, 255, 0, 0.25) 60%,
        rgba(200, 255, 0, 0) 100%
    );
    mix-blend-mode: screen;
    opacity: 0;
    transition:
        transform 0.55s cubic-bezier(.34, .05, .55, 1) 0.1s,
        opacity 0.4s ease 0.1s;
    overflow: hidden;
    z-index: 2;
}

.tractor.is-active .tractor__beam {
    transform: translateX(-50%) scaleY(1);
    opacity: 1;
    animation:
        tractor-beam-pulse 3.6s 0.6s ease-in-out infinite,
        tractor-beam-bob 1s ease-in-out infinite alternate;
}

/* 加速中 / 周回中 / 着陸済み — いずれもビームは消す */
.tractor.is-descending .tractor__beam,
.tractor.is-orbiting .tractor__beam,
.tractor.is-landed .tractor__beam {
    opacity: 0 !important;
    transform: translateX(-50%) scaleY(0.1) !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.tractor.is-landed .tractor__ufo-anim {
    animation:
        tractor-ufo-bob 1s ease-in-out infinite alternate,
        tractor-ufo-dock 0.45s ease-out forwards;
}

@keyframes tractor-ufo-dock {
    from { transform: translateY(0) scale(0.25); }
    to   { transform: translateY(0) scale(0.25); }
}

@keyframes tractor-beam-bob {
    /* UFO と同じ 1s ease-in-out alternate 、同タイミングでスタートさせるため
       is-active 付与と同時に .tractor__ufo-wrap の bob もスタートする */
    from { transform: translateX(-50%) translateY(0) scaleY(1); }
    to   { transform: translateX(-50%) translateY(-6px) scaleY(1); }
}

@keyframes tractor-beam-pulse {
    0%, 100% { opacity: 1;    filter: brightness(1.15); }
    50%      { opacity: 0.55; filter: brightness(0.85); }
}

/* 吸い上げ文字: 13 字 + レア牛。is-active 中だけ流す。
   bottom: 5% → 95% に上昇 (上端は UFO に吸い込まれる位置)。 */
.tractor__beam-item {
    position: absolute;
    left: 50%;
    bottom: 5%;
    height: clamp(18px, 3vw, 26px);
    width: auto;
    transform: translateX(calc(-50% + var(--x, 0px))) rotate(var(--r, 0deg));
    pointer-events: none;
    opacity: 0;
    filter: drop-shadow(0 0 6px rgba(200, 255, 0, 0.55));
}

.tractor.is-active .tractor__beam-item {
    animation: tractor-beam-item-rise 7.8s linear infinite;
    animation-delay: calc(var(--i, 0) * 0.6s + 0.8s);
}

.tractor__beam-item--cow {
    height: clamp(24px, 4.5vw, 34px);
    filter: drop-shadow(0 0 8px rgba(200, 255, 0, 0.85));
}

@keyframes tractor-beam-item-rise {
    0%   { bottom: 5%;  opacity: 0; }
    5%   { opacity: 1; }
    45%  { opacity: 1; }
    50%  { bottom: 95%; opacity: 0; }
    100% { bottom: 5%;  opacity: 0; }
}

/* prefers-reduced-motion: アニメ停止、ビームは活性時に静的表示。 */
@media (prefers-reduced-motion: reduce) {
    .tractor__ufo-anim,
    .hero__ufo-eye,
    .tractor__beam,
    .tractor__beam-item {
        animation: none !important;
    }
    .tractor__ufo-wrap,
    .tractor__beam {
        transition: opacity 0.3s ease !important;
    }
    .tractor.is-active .tractor__beam {
        transform: translateX(-50%) scaleY(1);
        opacity: 1;
    }
    .tractor__beam-item       { display: none; }
}

.hero__title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero__title--logo {
    margin-bottom: 24px;
    margin-top: 8vh;
    line-height: 0;
}

.hero__title--logo img {
    display: block;
    width: auto;
    height: clamp(280px, 48vw, 480px);
    margin: 0 auto;
    animation: hero-logo-float 4.6s ease-in-out infinite alternate;
    filter: drop-shadow(0 12px 24px rgba(200, 255, 0, 0.18));
}

@keyframes hero-logo-float {
    from { transform: translateY(-6px) rotate(-1.2deg); }
    to   { transform: translateY(8px) rotate(1.2deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__title--logo img { animation: none !important; }
}

.hero__tagline {
    color: var(--fg);
    font-size: clamp(20px, 3.4vw, 30px);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin: 0 auto 32px;
    max-width: 640px;
    text-wrap: balance;
}

.hero__tagline__hl {
    color: var(--accent);
    font-style: italic;
    font-weight: 900;
    font-size: 1.5em;
    letter-spacing: -0.01em;
    line-height: 1.1;
    display: inline-block;
    margin-bottom: 6px;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.35),
        0 0 24px rgba(200, 255, 0, 0.35);
    /* 微妙に右に傾ける = 走り書きっぽい LOOK LP の印象 */
    transform: skewX(-6deg);
}

.hero__tagline__sub {
    color: var(--accent);
    font-style: italic;
    font-weight: 900;
    font-size: 0.95em;
    letter-spacing: 0;
    line-height: 1.2;
    display: inline-block;
    margin-top: 12px;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, 0.35),
        0 0 20px rgba(200, 255, 0, 0.3);
    transform: skewX(-6deg);
}

.hero__tagline > br + br { display: none; }  /* \u9023\u7d9a\u6539\u884c\u3092\u898b\u305f\u76ee\u4e0a\u4e00\u3064\u306b */

/* 旧 .hero__cta (lime pill text button) は App Store 公式バッジ採用で
   不要になったため削除。同名の .appstore-badge を使う。 */

/* ============================================
   SECTION 共通
   ============================================ */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px 0;
}

.sectionHead {
    text-align: center;
    margin-bottom: 48px;
}

.sectionHead__title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 64px);
    letter-spacing: -0.01em;
    font-weight: 900;
    color: var(--fg);
    text-transform: uppercase;
    display: inline-block;
    line-height: 1.1;
}

.sectionHead__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

.sectionHead--light .sectionHead__title {
    color: var(--fg);
}

/* 見出しを牛の群れで置き換えるパターン */
.sectionHead--cows {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(8px, 2vw, 24px);
    margin-bottom: 64px;
    min-height: 64px;
}

.sectionHead__cow {
    display: block;
    width: clamp(40px, 6vw, 64px);
    height: auto;
    animation: sectionHead-cow-bob 2.4s ease-in-out infinite alternate;
}
.sectionHead__cow:nth-child(1) { animation-delay: 0s;    }
.sectionHead__cow:nth-child(2) { animation-delay: 0.4s;  }
.sectionHead__cow:nth-child(3) { animation-delay: 0.9s;  }
.sectionHead__cow:nth-child(4) { animation-delay: 1.3s;  }
.sectionHead__cow:nth-child(5) { animation-delay: 1.8s;  }

.sectionHead__cow--flipped { transform: scaleX(-1); }

@keyframes sectionHead-cow-bob {
    from { transform: translateY(0)    rotate(-3deg); }
    to   { transform: translateY(-6px) rotate(3deg); }
}
.sectionHead__cow--flipped { animation-name: sectionHead-cow-bob-flipped; }
@keyframes sectionHead-cow-bob-flipped {
    from { transform: translateY(0)    scaleX(-1) rotate(3deg); }
    to   { transform: translateY(-6px) scaleX(-1) rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
    .sectionHead__cow { animation: none !important; }
}

/* ============================================
   FEATURES (bigFeat × N、交互レイアウト)
   ============================================ */
.bigFeat {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    padding: 48px 0;
    border-bottom: 1px solid var(--line);
}

.bigFeat:last-child { border-bottom: none; }

@media (min-width: 700px) {
    .bigFeat {
        grid-template-columns: 1fr 1fr;
        gap: 48px;
    }
    /* flip: テキスト側を右、画像側を左に入れ替える */
    .bigFeat--flip .bigFeat__text  { order: 2; }
    .bigFeat--flip .bigFeat__media { order: 1; }
}

.bigFeat__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bigFeat__num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: var(--accent);
}

.bigFeat__num--cows {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin-bottom: 8px;
}

.bigFeat__num-cow {
    width: clamp(32px, 4vw, 48px);
    height: auto;
    animation: bigFeat-num-cow-bob 2.4s ease-in-out infinite alternate;
}
.bigFeat__num-cow:nth-child(2) { animation-delay: 0.5s; }
.bigFeat__num-cow:nth-child(3) { animation-delay: 1s;   }

@keyframes bigFeat-num-cow-bob {
    from { transform: translateY(0)    rotate(-3deg); }
    to   { transform: translateY(-4px) rotate(3deg); }
}

.bigFeat__num-cow--flipped { animation-name: bigFeat-num-cow-bob-flipped; }
@keyframes bigFeat-num-cow-bob-flipped {
    from { transform: translateY(0)    scaleX(-1) rotate(3deg); }
    to   { transform: translateY(-4px) scaleX(-1) rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bigFeat__num-cow { animation: none !important; }
}

.bigFeat__body { display: flex; flex-direction: column; gap: 12px; }

.bigFeat__h {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--fg);
}

.bigFeat__h em {
    font-style: normal;
    color: var(--accent);
}

.bigFeat__p {
    color: var(--fg-dim);
    font-size: 15px;
    line-height: 1.7;
}

.bigFeat__media {
    display: flex;
    justify-content: center;
}

.feat-img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    /* placeholder: 画像未配置のとき "image" の枠だけ視認できるよう薄い枠+最小高さ */
    min-height: 200px;
    border: 1px solid var(--line);
}

/* ============================================
   HOW IT WORKS (ステップ + 矢印)
   ============================================ */
.how {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
}

@media (min-width: 700px) {
    .how {
        grid-template-columns: repeat(3, 1fr);
        align-items: center;
    }
}

.how__step {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.how__num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: var(--accent);
}

.how__step h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--fg);
}

.how__step p {
    font-size: 14px;
    color: var(--fg-dim);
    line-height: 1.7;
}

.how__arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    /* スマホでは矢印を縦向きにしたいが、簡素化のため横向きのままサイズだけ落とす */
    width: 60px;
    height: 20px;
    margin: 0 auto;
}

.how__arrow svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 699px) {
    .how__arrow { transform: rotate(90deg); }
}

/* ============================================
   FAQ (chat style)
   ============================================ */
.chat {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat__row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    max-width: 85%;
}

.chat__row--them { align-self: flex-start; }
.chat__row--me   { align-self: flex-end; flex-direction: row-reverse; }

.chat__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.chat__avatar svg { width: 80%; height: auto; }
.chat__avatar-body { fill: var(--bg); }
.chat__avatar-eye  { fill: var(--accent); }

.chat__avatar--me {
    background: var(--fg);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 800;
}

.bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.bubble__name {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 4px;
}

.bubble--them {
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg);
    border-bottom-left-radius: 4px;
}

.bubble--me {
    background: var(--accent);
    color: var(--accent-ink);
    border-bottom-right-radius: 4px;
}

/* ============================================
   BIG CTA + footer (LOOK の ctaBlock パターン)
   ============================================ */
.section--cta {
    /* max-width / margin auto を打ち消してフルブリードに */
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-top: clamp(160px, 28vh, 280px);
    padding-bottom: 24px;
    padding-left: max(var(--pad-x), calc(50vw - var(--max-w) / 2));
    padding-right: max(var(--pad-x), calc(50vw - var(--max-w) / 2));
    background: var(--accent);
    color: var(--accent-ink);
    position: relative;
}

/* CTA \u5185\u90e8\u306e\u8272\u5408\u3044\u3092 lime bg \u306b\u5408\u308f\u305b\u3066\u4e0a\u66f8\u304d */
.section--cta .ctaBlock__h        { color: var(--accent-ink); }
.section--cta .ctaBlock__h--logo em { color: var(--accent-ink); }
.section--cta .ctaBlock__legal    { color: rgba(0, 0, 0, 0.55); }
.section--cta .ctaBlock__links a  { color: rgba(0, 0, 0, 0.7); }
.section--cta .ctaBlock__links a:hover { color: var(--accent-ink); }
.section--cta .ctaBlock__copy     { color: rgba(0, 0, 0, 0.5); }
.section--cta .ctaBlock__foot     { border-top-color: rgba(0, 0, 0, 0.15); }
/* App Store \u30d0\u30c3\u30b8\u306f\u30c0\u30fc\u30af\u30c1\u30c3\u30d7\u306b\u53cd\u8ee2 */
.section--cta .appstore-badge--disabled {
    background: rgba(0, 0, 0, 0.85);
    color: rgba(255, 255, 255, 0.65);
}

.ctaBlock {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ctaBlock__mark {
    width: 132px;
    height: 132px;
    border-radius: 28px;
    position: relative;
    z-index: 50;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.15);
    animation: cta-icon-float 4.2s ease-in-out infinite alternate;
}

@keyframes cta-icon-float {
    from { transform: translateY(-4px) rotate(-1.5deg); }
    to   { transform: translateY(6px) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
    .ctaBlock__mark { animation: none !important; }
}

/* App アイコンを包む wrapper。吹き出しの positioning context として
   存在するだけで、レイアウト上は icon と同じ振る舞い (inline-block)。
   tractor は .ctaBlock__mark を直接 querySelector するので影響なし。 */
.ctaBlock__icon {
    position: relative;
    display: inline-block;
    line-height: 0;  /* img の下端の余白を消す */
}

/* 「おなかいっぱい」吹き出し: 牛 100 頭クリック達成で .is-visible が付く。
   localStorage の累計カウンタ (scd_cow_count) で永続管理。 */
.ctaBlock__bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translateX(-50%) scale(0.6);
    background: #fff;
    color: #000;
    padding: 10px 18px;
    border-radius: 22px;
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.35s ease,
        transform 0.45s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 6;
}

.ctaBlock__bubble.is-visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* 三角しっぽ (icon を指す方向) */
.ctaBlock__bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-top-color: #fff;
    border-bottom: 0;
}

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

.ctaBlock__h {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.ctaBlock__h em {
    font-style: normal;
    color: var(--accent);
    font-size: 0.6em;
    display: inline-block;
    margin-top: 12px;
    line-height: 1.3;
}

/* CTA ロゴ見出しの強調キャッチ。
   グリッチ演出による文字幅変動で全体が揺れないよう、固定幅 + block 化で安定化。 */
.ctaBlock__h--logo {
    width: min(640px, 100%);
    gap: 16px;
}

.ctaBlock__h--logo img {
    height: clamp(96px, 14vw, 160px);
    width: auto;
    align-self: center;
    flex: 0 0 auto;
}

.ctaBlock__h--logo em,
.ctaBlock__h--logo .ctaBlock__h__sub {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0;
}

.ctaBlock__h--logo em {
    font-size: clamp(24px, 4vw, 38px);
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--accent-ink);
    display: inline-block;
    margin-top: 16px;
    transform: skewX(-6deg);
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
}

.ctaBlock__h__sub {
    font-size: clamp(14px, 2.2vw, 20px);
    font-style: italic;
    font-weight: 900;
    line-height: 1.2;
    color: var(--accent-ink);
    display: inline-block;
    margin-top: 4px;
    transform: skewX(-6deg);
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.35);
}

/* App Store 公式バッジ。Apple Identity Guidelines に従い、バッジに
   独自の効果 (drop-shadow / glow / 枠線 / 色変更) は加えない。hover の変化は
   transform のみで表現する。サイズだけ XL モディファイアで切替。 */
.appstore-badge {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
    transition: transform 0.2s;
}

.appstore-badge:hover { transform: translateY(-2px); }

.appstore-badge img {
    width: 180px;
    height: auto;
    display: block;
}

.appstore-badge--xl img {
    width: 240px;
}

@media (max-width: 720px) {
    .appstore-badge img { width: 170px; }
    .appstore-badge--xl img { width: 210px; }
}

.ctaBlock__legal {
    color: var(--fg-faint);
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.7;
    max-width: 560px;
    margin: 24px 0 0;
}

.ctaBlock__foot {
    /* CTA セクション全幅まで広げる (ライム背景内で大胆に展開) */
    width: 100%;
    max-width: none;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ============================================
   COW FARM — 罫線上に牛が並ぶ。クリックで吸い込み、
   一定数を下回ると左右から歩いて補充される。
   ============================================ */
.cowFarm {
    position: relative;
    width: 100%;
    margin-top: 32px;
    height: 140px;       /* 3 列分の高さ */
    pointer-events: none;
}

.cow {
    position: absolute;
    bottom: 0;
    transform: translate(-50%, 0);  /* 底辺を牧場の地面に合わせる */
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    transition: left 0.6s ease-out;  /* 歩行 */
    animation: cow-idle 3s ease-in-out infinite;
    animation-delay: var(--idle-delay, 0s);
}

.cow img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 進む向き (左から来た / 右から来た) で反転 */
.cow--flipped img { transform: scaleX(-1); }

.cow:hover {
    animation-play-state: paused;
}
.cow:hover img {
    transform: translateY(-4px) scale(1.08);
    transition: transform 0.18s ease;
}
.cow--flipped:hover img {
    transform: translateY(-4px) scale(1.08) scaleX(-1);
}

@keyframes cow-idle {
    0%, 100% { transform: translate(-50%, 0) rotate(-2deg); }
    50%      { transform: translate(-50%, 0) rotate(2deg); }
}

/* 歩いて入ってくる: 4 足のリズムで小刻みに揺れる */
.cow.is-walking {
    animation: cow-walk 0.32s linear infinite;
}

@keyframes cow-walk {
    0%, 100% { transform: translate(-50%, 0)        rotate(-3deg); }
    50%      { transform: translate(-50%, -3px)    rotate(3deg); }
}

/* 吸い込み: ゆっくり、軌道はぐにゃっと。
   位置は outer button の transition、スケール/回転/フェードは inner img の keyframe で
   2 段階に分けて「徐々に縮む」感を出す。 */
.cow.is-sucking {
    pointer-events: none;
    animation: none;
    transition:
        left 1.8s cubic-bezier(.45, .05, .55, .95),
        top 1.8s cubic-bezier(.55, .15, .65, 1.0),
        bottom 1.8s cubic-bezier(.55, .15, .65, 1.0);
}

.cow.is-sucking img {
    animation: cow-suck-img 1.8s cubic-bezier(.55, .1, .65, 1) forwards;
}

@keyframes cow-suck-img {
    0%   { transform: rotate(0deg)   scale(1);    opacity: 1; }
    40%  { transform: rotate(220deg) scale(0.78); opacity: 1; }
    75%  { transform: rotate(520deg) scale(0.42); opacity: 0.9; }
    100% { transform: rotate(820deg) scale(0.05); opacity: 0; }
}

/* 反転バージョン (右から歩いてきた牛) */
.cow--flipped.is-sucking img {
    animation: cow-suck-img-flipped 1.8s cubic-bezier(.55, .1, .65, 1) forwards;
}

@keyframes cow-suck-img-flipped {
    0%   { transform: rotate(0deg)   scale(1)    scaleX(-1); opacity: 1; }
    40%  { transform: rotate(220deg) scale(0.78) scaleX(-1); opacity: 1; }
    75%  { transform: rotate(520deg) scale(0.42) scaleX(-1); opacity: 0.9; }
    100% { transform: rotate(820deg) scale(0.05) scaleX(-1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cow { animation: none !important; }
}

.ctaBlock__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
}

.ctaBlock__links a {
    color: var(--fg-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}

.ctaBlock__links a:hover { color: var(--fg); }

.ctaBlock__copy {
    display: flex;
    gap: 16px;
    color: var(--fg-faint);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
}

/* ============================================
   SUB-PAGE FOOTER (release / legal で使う)
   ctaBlock__links / ctaBlock__copy を流用する軽量フッター。
   ============================================ */
.subFoot {
    max-width: var(--max-w);
    margin: 32px auto 0;
    padding: 32px 0;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

/* ============================================
   RELEASE PAGE
   ============================================ */
.release {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(64px, 12vh, 120px) 0 96px;
}

.release__title {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 900;
    letter-spacing: -0.01em;
    margin-bottom: 48px;
    text-transform: uppercase;
    line-height: 1.05;
}

.release__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    background: var(--accent);
    margin-top: 20px;
    margin-bottom: 56px;
    border-radius: 2px;
}

.release__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 64px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.release__tabs a {
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 12px;
    text-decoration: none;
}

.release__tabs a:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.release__tabs__more {
    list-style: none;
    margin-left: auto;
}

.release__tabs__more summary {
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    color: var(--fg-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    list-style: none;
}

.release__tabs__more summary::-webkit-details-marker { display: none; }

.release__tabs__rest {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.ver {
    margin-bottom: 80px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--line);
}

/* 最後 (or 唯一の) リリース項目: border-bottom と巨大マージンを除去して、
   1 エントリしか無いときに下部に「空のボックス」ができないようにする。 */
.ver:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ver__head {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.ver__num {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 900;
    letter-spacing: -0.01em;
}

.ver__date {
    color: var(--fg-dim);
    font-family: var(--font-mono);
    font-size: 13px;
}

.ver__latest {
    padding: 4px 10px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ver__cat {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.25em;
    color: var(--accent);
    text-transform: uppercase;
    margin: 0 0 20px;
}

.ver ul {
    list-style: none;
    padding: 0;
}

.ver li {
    padding: 10px 0 10px 24px;
    position: relative;
    color: var(--fg);
    font-size: 16px;
    line-height: 1.7;
}

.ver li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* 段落形式のリリースノート (簡素な内容のとき)。サイズ感は li と揃える。 */
.ver p {
    color: var(--fg);
    font-size: 16px;
    line-height: 1.7;
    margin-top: 16px;
}

/* ============================================
   LEGAL PAGE
   ============================================ */
.legal {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(64px, 12vh, 120px) 0 96px;
}

.legal__title {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 900;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    text-transform: uppercase;
    line-height: 1.05;
}

.legal__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    background: var(--accent);
    margin-top: 20px;
    margin-bottom: 24px;
    border-radius: 2px;
}
    background: var(--accent);
    margin-top: 20px;
    border-radius: 2px;
}
    margin-bottom: 32px;
}

.legal h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.6vw, 32px);
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--accent);
    margin: 80px 0 24px;
    padding-top: 48px;
    border-top: 1px solid var(--line);
}

.legal h2:first-of-type { padding-top: 0; border-top: none; margin-top: 56px; }

.legal h3 {
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 800;
    margin: 40px 0 16px;
    color: var(--fg);
}

.legal p, .legal li {
    color: var(--fg);
    font-size: clamp(15px, 1.7vw, 17px);
    line-height: 1.85;
    margin-bottom: 16px;
}

.legal ul {
    padding-left: 24px;
    margin-bottom: 24px;
}

.legal li {
    margin-bottom: 10px;
}
    margin: 24px 0 8px;
}

.legal p, .legal li {
    color: var(--fg);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 8px;
}

.legal ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.legal__updated {
    color: var(--fg-faint);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
    margin-bottom: 32px;
}

/* ============================================
   ALIEN DECODER: text scramble on reveal
   `data-decode` 属性付きの要素は、初回ビューポート侵入時に「記号のランダム
   羅列 → 文字単位で順次正解にロック」で解読する演出を JS 側で発火する。
   デコード中だけ `.is-decoding` が付くので、ライムの微光だけ足して
   「宇宙人の通信を受信中」のニュアンスを出す。元の color は触らない
   (色は要素ごとに違うので)。
   ============================================ */
[data-decode].is-decoding {
    text-shadow: 0 0 4px rgba(200, 255, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    [data-decode].is-decoding {
        text-shadow: none;
    }
}

/* ============================================
   404 PAGE
   ============================================ */
.notfound {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(120px, 22vh, 220px) 0 64px;
    text-align: center;
}

.notfound__code {
    font-family: var(--font-mono);
    font-size: clamp(96px, 18vw, 200px);
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    text-shadow:
        0 0 0 var(--accent),
        0 0 40px rgba(200, 255, 0, 0.4);
    transform: skewX(-6deg);
    display: inline-block;
    margin-bottom: 56px;
}

.notfound__msg {
    color: var(--fg);
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 600;
    margin-bottom: 56px;
}
