/* ==========================================================================
   エリア概念図コンポーネント（parts/concept-map.php）
   v1.36.0 で top-v3.css から切り出した。/about/ のヒーローでも使うため、
   トップ専用CSSに埋め込んだままだと他ページで無スタイル崩れを起こす
   （実際に About v4 初回検証でピンとラベルが縦一列に崩落した）。
   配置側の枠（.ntm-fp-cmap-stage / .ntm-fp-cmap-title / .abv-hero-map）は
   各ページのCSSが持ち、このファイルは図そのものだけを受け持つ。
   ※SVG root に fill:none を指定しているため、各 text に fill 必須。
   ========================================================================== */

.ntm-cmap { position: relative; }

.ntm-cmap-svg .nb {
    fill: var(--ntm-paper-deep);
    stroke: var(--ntm-border);
    stroke-width: 1;
}
.ntm-cmap-svg .main {
    fill: var(--ntm-snow);
    stroke: var(--ntm-slate);
    stroke-width: 1.6;
    stroke-linejoin: round;
}
.ntm-cmap-svg .lbl {
    fill: var(--ntm-slate-soft);
    font-family: var(--ntm-font-sans);
    font-size: 20px;
    letter-spacing: .2em;
}
.ntm-cmap-svg .main-lbl {
    fill: var(--ntm-slate);
    font-size: 26px;
    letter-spacing: .3em;
}
.ntm-cmap-svg .lm { fill: var(--ntm-terracotta); }
.ntm-cmap-svg .lm-lbl {
    fill: var(--ntm-slate);
    font-family: var(--ntm-font-serif);
    font-size: 19px;
    letter-spacing: .12em;
}

/* 店舗ピン（nt_shop 実データ） */
.ntm-cmap-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    z-index: 3;
    text-decoration: none;
    filter: drop-shadow(0 3px 6px rgba(19, 27, 46, .25));
    transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.ntm-cmap-pin:hover { transform: translate(-50%, -100%) scale(1.25); z-index: 4; }
.ntm-cmap-pin .tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--ntm-indigo);
    color: var(--ntm-paper);
    font-family: var(--ntm-font-serif);
    font-size: .72rem;
    letter-spacing: .1em;
    padding: 5px 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ntm-ease);
}
.ntm-cmap-pin:hover .tip,
.ntm-cmap-pin:focus-visible .tip { opacity: 1; }

.ntm-cmap-note {
    position: absolute;
    right: 1.5%;
    bottom: 3%;
    font-family: var(--ntm-font-sans);
    font-size: .7rem;
    letter-spacing: .18em;
    color: var(--ntm-slate-soft);
}

@media (max-width: 768px) {
    .ntm-cmap-svg .lbl { font-size: 26px; }
    .ntm-cmap-svg .main-lbl { font-size: 34px; }
    .ntm-cmap-svg .lm-lbl { font-size: 24px; }
    .ntm-cmap-pin svg { width: 14px !important; height: 19px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .ntm-cmap-pin,
    .ntm-cmap-pin .tip { transition: none; }
}

/* ============================================================
   生きた地図（v1.49.0・Tier1）
   ① 営業中ライブ発光 ② 時刻連動アンビエンス ③ スクロール作図
   すべて reduced-motion で静止（状態だけ反映）。
   ============================================================ */
.ntm-cmap.is-living { position: relative; }

/* ② 時刻連動アンビエンス（時間帯で淡い光を重ねる。paper 背景の上で上品に） */
.ntm-cmap.is-living::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: .5;
    background:
        radial-gradient(120% 80% at 50% 12%, var(--ntm-amb-top, transparent) 0%, transparent 60%),
        linear-gradient(180deg, transparent 40%, var(--ntm-amb-bot, transparent) 100%);
    transition: opacity 1.6s var(--ntm-ease-out, ease);
}
.ntm-cmap.is-living[data-time="dawn"] { --ntm-amb-top: rgba(120, 150, 200, .28); --ntm-amb-bot: rgba(214, 185, 143, .22); }
.ntm-cmap.is-living[data-time="day"]  { --ntm-amb-top: rgba(255, 255, 255, .12); --ntm-amb-bot: rgba(93, 112, 89, .08); }
.ntm-cmap.is-living[data-time="dusk"] { --ntm-amb-top: rgba(214, 150, 90, .26); --ntm-amb-bot: rgba(194, 83, 58, .20); }
.ntm-cmap.is-living[data-time="night"]{ --ntm-amb-top: rgba(31, 42, 68, .34); --ntm-amb-bot: rgba(19, 27, 46, .30); }

/* ③ スクロール作図：地図がそっと立ち上がり、成田市の輪郭が描かれる */
.ntm-js .ntm-cmap.is-living .ntm-cmap-svg {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 1s var(--ntm-ease-out, ease), transform 1.1s var(--ntm-ease-out, ease);
}
.ntm-js .ntm-cmap.is-living.is-drawn .ntm-cmap-svg { opacity: 1; transform: none; }
/* 成田市の輪郭(.main はストロークを持つ)を一筆書き風に描く */
.ntm-js .ntm-cmap.is-living .ntm-cmap-svg .main {
    stroke-dasharray: 4200;
    stroke-dashoffset: 4200;
}
.ntm-js .ntm-cmap.is-living.is-drawn .ntm-cmap-svg .main {
    transition: stroke-dashoffset 2.2s var(--ntm-ease-out, ease) .3s;
    stroke-dashoffset: 0;
}

/* ピンはスクロール時に順に降りてくる（最大 8 本ぶんスタガー） */
.ntm-js .ntm-cmap.is-living .ntm-cmap-pin {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 10px));
}
.ntm-js .ntm-cmap.is-living.is-drawn .ntm-cmap-pin {
    opacity: 1;
    transform: translate(-50%, -100%);
    transition: opacity .5s var(--ntm-ease-out, ease), transform .6s cubic-bezier(.34, 1.56, .64, 1);
}
.ntm-cmap.is-living.is-drawn .ntm-cmap-pin:nth-of-type(1) { transition-delay: 1.0s; }
.ntm-cmap.is-living.is-drawn .ntm-cmap-pin:nth-of-type(2) { transition-delay: 1.12s; }
.ntm-cmap.is-living.is-drawn .ntm-cmap-pin:nth-of-type(3) { transition-delay: 1.24s; }
.ntm-cmap.is-living.is-drawn .ntm-cmap-pin:nth-of-type(4) { transition-delay: 1.36s; }
.ntm-cmap.is-living.is-drawn .ntm-cmap-pin:nth-of-type(n+5) { transition-delay: 1.48s; }

/* ① 営業中ライブ表示：いま営業中の店だけ発光＋脈動リング */
.ntm-cmap-pin.is-open::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    width: 26px;
    height: 26px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(93, 176, 117, .55) 0%, rgba(93, 176, 117, 0) 70%);
    z-index: -1;
    animation: ntmCmapPulse 2.4s var(--ntm-ease-out, ease-out) infinite;
}
.ntm-cmap-pin.is-open svg path { fill: #3e8f5c !important; }
.ntm-cmap-pin.is-soon svg path { fill: var(--ntm-terracotta, #c2533a) !important; }
.ntm-cmap-pin.is-closed { opacity: .45; filter: grayscale(.5); }
@keyframes ntmCmapPulse {
    0%   { transform: translate(-50%, -50%) scale(.7); opacity: .9; }
    100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ntm-js .ntm-cmap.is-living .ntm-cmap-svg,
    .ntm-js .ntm-cmap.is-living .ntm-cmap-pin { opacity: 1; transform: translate(-50%, -100%); transition: none; }
    .ntm-js .ntm-cmap.is-living .ntm-cmap-svg { transform: none; }
    .ntm-js .ntm-cmap.is-living .ntm-cmap-svg .main { stroke-dashoffset: 0; }
    .ntm-cmap-pin.is-open::before { animation: none; }
}
