/* =================================================================
   Network & CCTV page.
   Built ON TOP of the shared kinetic system (webdesign.css / body.wd-dark):
   inherits the dark tokens, header/footer theming, wd-* sections and reveals.
   Page-specific parts use nc-* (content) and ncx-* (the interactive NOC
   dashboard in the hero). Cards use var(--card/--fg/--line/--muted) so they
   adapt automatically between dark and .wd-light sections.
   ================================================================= */

/* =================================================================
   Concept — audience cards (light section)
   ================================================================= */
.nc-aud {
  margin-top: clamp(40px, 5vw, 72px);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.nc-aud-card {
  position: relative; padding: 34px 32px 30px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); overflow: hidden;
  transition: transform .5s var(--ease), border-color .4s, background-color .4s, box-shadow .4s;
}
.wd-light .nc-aud-card { box-shadow: 0 12px 32px -20px rgba(13, 15, 26, .3); }
.nc-aud-card::after {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(var(--brand-rgb), .1), transparent 55%);
  transition: opacity .5s var(--ease);
}
.nc-aud-card:hover { transform: translateY(-6px); border-color: var(--line-hover); background: var(--card-hover); }
.wd-light .nc-aud-card:hover { box-shadow: 0 24px 48px -24px rgba(13, 15, 26, .32); }
.nc-aud-card:hover::after { opacity: 1; }

.nc-aud-ic,
.nc-val-ic {
  display: flex; align-items: center; justify-content: center;
  width: 58px; aspect-ratio: 1; border-radius: 16px; margin-bottom: 20px;
  background: rgba(var(--brand-rgb), .08); border: 1px solid rgba(var(--brand-rgb), .22);
  transition: transform .45s var(--ease), background-color .4s, border-color .4s;
}
.nc-aud-card:hover .nc-aud-ic,
.nc-val-card:hover .nc-val-ic {
  transform: translateY(-4px) rotate(-3deg);
  background: rgba(var(--brand-rgb), .14); border-color: rgba(var(--brand-rgb), .4);
}
.nc-aud-ic i,
.nc-val-ic i {
  display: block; width: 26px; height: 26px; background: var(--brand);
  -webkit-mask: var(--ic) center / contain no-repeat;
          mask: var(--ic) center / contain no-repeat;
}
.nc-aud-card h3 { margin: 0 0 10px; font-size: 1.2rem; font-weight: 700; color: var(--fg); letter-spacing: -.01em; }
.nc-aud-card p  { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.75; }

/* =================================================================
   Service blocks — pain / needs checklists
   ================================================================= */
.nc-lead-em { font-weight: 600; color: var(--fg); }

.nc-sub-label {
  display: block; margin-top: clamp(38px, 5vw, 64px); margin-bottom: -6px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brand); font-weight: 700;
}
.lang-ja .nc-sub-label { font-size: 16px; letter-spacing: .04em; }

/* pink checklist card */
.nc-pain {
  margin-top: clamp(36px, 5vw, 56px); padding: clamp(24px, 3vw, 38px);
  border-radius: 22px; border: 1px solid var(--line); background: var(--card);
}
.wd-light .nc-pain { box-shadow: 0 12px 32px -20px rgba(13, 15, 26, .28); }
.nc-pain-head {
  display: block; margin-bottom: 20px; font-size: 1.05rem; font-weight: 800;
  color: var(--fg); letter-spacing: -.01em;
}
.nc-pain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.nc-svc .nc-pain .nc-pain-list { grid-template-columns: repeat(2, 1fr); }
.nc-pain-list li {
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--muted); font-size: 1rem; line-height: 1.6;
}
.nc-check {
  position: relative; flex: 0 0 22px; width: 22px; height: 22px; margin-top: 1px;
  border-radius: 7px; background: rgba(var(--brand-rgb), .12);
  border: 1px solid rgba(var(--brand-rgb), .35);
}
.nc-check::after {
  content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px;
  border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.nc-check--pro { background: rgba(41, 173, 255, .12); border-color: rgba(41, 173, 255, .4); }
.nc-check--pro::after { border-color: #29adff; }

/* two-column defensive / proactive needs */
.nc-need {
  margin-top: clamp(28px, 3.5vw, 44px);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.nc-need-col {
  padding: clamp(22px, 2.6vw, 32px); border-radius: 20px;
  border: 1px solid var(--line); background: var(--card);
}
.wd-light .nc-need-col { box-shadow: 0 12px 32px -20px rgba(13, 15, 26, .28); }
.nc-need-head {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: .82rem; font-weight: 800; letter-spacing: .02em;
  padding: 6px 13px; border-radius: 999px;
}
.nc-need-head::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.nc-need-head--def { color: var(--brand); background: rgba(var(--brand-rgb), .1); border: 1px solid rgba(var(--brand-rgb), .3); }
.nc-need-head--def::before { background: var(--brand); box-shadow: 0 0 8px rgba(var(--brand-rgb), .8); }
.nc-need-head--pro { color: #1f8fd6; background: rgba(41, 173, 255, .1); border: 1px solid rgba(41, 173, 255, .32); }
.nc-need-head--pro::before { background: #29adff; box-shadow: 0 0 8px rgba(41, 173, 255, .8); }

/* =================================================================
   CCTV — 3 value cards
   ================================================================= */
.nc-val {
  margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.nc-val-card {
  position: relative; padding: 32px 28px 28px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); overflow: hidden;
  transition: transform .5s var(--ease), border-color .4s, background-color .4s, box-shadow .4s;
}
.wd-light .nc-val-card { box-shadow: 0 12px 32px -20px rgba(13, 15, 26, .3); }
.nc-val-card:hover { transform: translateY(-6px); border-color: var(--line-hover); background: var(--card-hover); }
.wd-light .nc-val-card:hover { box-shadow: 0 24px 48px -24px rgba(13, 15, 26, .32); }
.nc-val-card h3 { margin: 0 0 10px; font-size: 1.15rem; font-weight: 700; color: var(--fg); letter-spacing: -.01em; }
.nc-val-card p  { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }

/* keep the differentiation grid to 3 evenly */
.nc-why-grid { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .nc-aud, .nc-need { grid-template-columns: 1fr; }
  .nc-val, .nc-why-grid { grid-template-columns: 1fr; }
  .nc-svc .nc-pain .nc-pain-list { grid-template-columns: 1fr; }
}

/* =================================================================
   HERO — interactive NOC dashboard (ncx-*)
   Always inside the dark hero, so it assumes the dark palette.
   ================================================================= */
.ncx-app {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px; padding: 16px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .1),
    0 0 0 1px rgba(var(--brand-rgb), .14),
    0 40px 90px -40px rgba(var(--brand-rgb), .45),
    0 30px 60px -34px rgba(0, 0, 0, .85);
}

/* tabs */
.ncx-tabs { display: flex; gap: 6px; padding: 2px 2px 14px; }
.ncx-tab {
  flex: 1; padding: 10px 8px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  background: rgba(255, 255, 255, .04); color: #9395a6; cursor: pointer;
  font: 700 12.5px/1 inherit; letter-spacing: .05em;
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.ncx-tab:hover { color: #fff; }
.ncx-tab.is-on { color: #fff; background: rgba(var(--brand-rgb), .16); border-color: rgba(var(--brand-rgb), .5); }

/* window */
.ncx-window {
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14); background: #0d0f1a;
  box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .9);
}
.ncx-chrome {
  display: flex; align-items: center; gap: 5px;
  padding: 9px 12px; background: rgba(255, 255, 255, .05); border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.ncx-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.ncx-chrome .ncx-dot:nth-child(1) { background: #ff5f57; }
.ncx-chrome .ncx-dot:nth-child(2) { background: #febc2e; }
.ncx-chrome .ncx-dot:nth-child(3) { background: #28c840; }
.ncx-winttl { margin-left: 8px; color: #9395a6; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.ncx-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #28c840;
}
.ncx-live i {
  width: 6px; height: 6px; border-radius: 50%; background: #28c840;
  box-shadow: 0 0 0 0 rgba(40, 200, 64, .5); animation: ncx-pulse 1.9s ease-in-out infinite;
}
@keyframes ncx-pulse { 0% { box-shadow: 0 0 0 0 rgba(40, 200, 64, .5); } 70%, 100% { box-shadow: 0 0 0 6px rgba(40, 200, 64, 0); } }

/* body: screens */
.ncx-body { position: relative; padding: 14px; min-height: 296px; }
.ncx-screen {
  position: absolute; inset: 14px; opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.ncx-screen.is-active { position: relative; inset: auto; opacity: 1; transform: none; pointer-events: auto; }

/* stat tiles */
.ncx-stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ncx-stat { padding: 9px 10px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); }
.ncx-stat span { display: block; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: #9395a6; font-weight: 700; }
.ncx-stat b {
  display: block; margin-top: 4px; font-size: 1.15rem; font-weight: 800;
  color: var(--brand); letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}

/* network — segment table */
.ncx-table { margin-top: 12px; }
.ncx-tr { display: grid; grid-template-columns: 1fr 64px 66px; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid rgba(255, 255, 255, .08); }
.ncx-tr--h { border-top: 0; padding: 0 2px 4px; }
.ncx-tr--h span { font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: #9395a6; font-weight: 700; }
.ncx-tr--h span:nth-child(2) { text-align: left; }
.ncx-tr--h span:nth-child(3) { text-align: right; }
.ncx-nm { font-size: 11px; font-weight: 700; color: #cfd2e0; letter-spacing: .01em; }
.ncx-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ncx-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(var(--brand-rgb), .5), var(--brand)); }
.ncx-bar--warn i { background: linear-gradient(90deg, rgba(254, 188, 46, .5), #febc2e); }
.ncx-screen.is-active .ncx-bar i { width: var(--w); transition: width .9s var(--ease) .1s; }
.ncx-pill {
  justify-self: end; font-size: 9px; font-weight: 800; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.ncx-pill.is-ok   { color: #28c840; border-color: rgba(40, 200, 64, .4); background: rgba(40, 200, 64, .1); }
.ncx-pill.is-warn { color: #febc2e; border-color: rgba(254, 188, 46, .4); background: rgba(254, 188, 46, .1); }

/* cctv — camera wall */
.ncx-wall { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ncx-cam {
  position: relative; aspect-ratio: 16 / 11; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12); background: #05060c;
}
/* the "feed": a soft scene gradient + slow drifting scanline */
.ncx-cam-feed {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 120% at 30% 12%, rgba(120, 150, 200, .28), transparent 60%),
    radial-gradient(80% 90% at 82% 88%, rgba(var(--brand-rgb), .16), transparent 62%),
    linear-gradient(180deg, #14203a, #080b16 78%);
}
.ncx-cam-feed::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px);
}
.ncx-cam-feed::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), transparent);
  animation: ncx-scan 4.2s linear infinite;
}
@keyframes ncx-scan { 0% { top: -22%; } 100% { top: 100%; } }

.ncx-cam-top {
  position: absolute; top: 6px; left: 7px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 8px; font-weight: 800; letter-spacing: .1em; color: #ff5f57;
}
.ncx-rec { width: 6px; height: 6px; border-radius: 50%; background: #ff5f57; animation: ncx-blink 1.4s steps(1) infinite; }
@keyframes ncx-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }
.ncx-cam-top--off { color: #9395a6; letter-spacing: .12em; }

.ncx-cam-lbl {
  position: absolute; bottom: 6px; left: 7px; right: 7px; z-index: 2;
  font-size: 8.5px; font-weight: 700; letter-spacing: .04em; color: rgba(255, 255, 255, .78);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}

/* motion-detect badge — flashed in by JS on a random live camera */
.ncx-cam-motion {
  position: absolute; top: 6px; right: 7px; z-index: 3;
  font-size: 7.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #06070d; background: #30fee9; padding: 2px 5px; border-radius: 4px;
  opacity: 0; transform: translateY(-3px); transition: opacity .3s, transform .3s;
}
.ncx-cam.is-motion .ncx-cam-motion { opacity: 1; transform: none; }
.ncx-cam.is-motion { border-color: rgba(48, 254, 233, .7); box-shadow: inset 0 0 0 1px rgba(48, 254, 233, .5), 0 0 16px -4px rgba(48, 254, 233, .6); }

/* offline camera — dead static */
.ncx-cam.is-off .ncx-cam-feed { background: #0a0b12; }
.ncx-cam-noise {
  position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .35) .5px, transparent .5px);
  background-size: 3px 3px; animation: ncx-noise .5s steps(2) infinite;
}
@keyframes ncx-noise { 0% { transform: translate(0, 0); } 100% { transform: translate(-2px, 1px); } }

/* hint */
.ncx-hint { display: none; margin-top: 14px; text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #9395a6; opacity: .8; }
.wd-js .ncx-hint { display: block; }

@media (max-width: 980px) { .ncx-app { max-width: 560px; margin: 0 auto; } }
@media (max-width: 420px) {
  .ncx-tab { font-size: 11px; padding: 9px 4px; }
  .ncx-stat b { font-size: 1.05rem; }
}

/* =================================================================
   Interactive polish (JS-driven, page-scoped)
   cursor glow + 3D tilt on cards + animated 5-step process connector.
   Mirrors the system-development page's polish, scoped to this page.
   ================================================================= */
.network-cctv-page .nc-aud-card > *:not(.ncx-glow),
.network-cctv-page .nc-val-card > *:not(.ncx-glow),
.network-cctv-page .wd-why-card > *:not(.ncx-glow),
.network-cctv-page .wd-step     > *:not(.ncx-glow) { position: relative; z-index: 2; }

.ncx-glow {
  position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  pointer-events: none; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
              rgba(var(--brand-rgb), .16), transparent 60%);
}
.network-cctv-page .nc-aud-card:hover .ncx-glow,
.network-cctv-page .nc-val-card:hover .ncx-glow,
.network-cctv-page .wd-why-card:hover .ncx-glow,
.network-cctv-page .wd-step:hover     .ncx-glow { opacity: 1; }

.network-cctv-page .nc-aud-card,
.network-cctv-page .nc-val-card,
.network-cctv-page .wd-why-card { will-change: transform; }

/* process: glowing connector line + sequential step lighting */
.network-cctv-page .wd-steps--five { position: relative; }
.network-cctv-page .wd-steps--five .wd-step { z-index: 1; }
/* .wd-step's default --card is near-transparent, so the glowing line behind it
   would still bleed through; give the card an opaque backdrop (composited under
   the usual translucent tint) so the connector is genuinely hidden underneath. */
.network-cctv-page .wd-steps--five .wd-step {
  background-image: linear-gradient(var(--card), var(--card));
  background-color: var(--bg);
}
.network-cctv-page .wd-steps--five .wd-step:hover {
  background-image: linear-gradient(var(--card-hover), var(--card-hover));
}
/* sits in the gap BELOW the big numbers (they run ~32–80px), not through them */
.network-cctv-page .wd-steps--five::before,
.network-cctv-page .wd-steps--five::after {
  content: ""; position: absolute; top: 90px; left: 9%; height: 2px; z-index: 0; pointer-events: none;
}
.network-cctv-page .wd-steps--five::before { right: 9%; background: var(--line); }
.network-cctv-page .wd-steps--five::after {
  width: var(--nc-line, 0);
  background: linear-gradient(90deg, transparent, var(--brand));
  box-shadow: 0 0 12px rgba(var(--brand-rgb), .7);
}
.network-cctv-page .wd-steps--five .wd-step-num { transition: color .4s, -webkit-text-stroke-color .4s; }
.network-cctv-page .wd-steps--five .wd-step.is-lit .wd-step-num {
  color: var(--brand); -webkit-text-stroke-color: transparent;
}
@media (max-width: 900px) {
  .network-cctv-page .wd-steps--five::before,
  .network-cctv-page .wd-steps--five::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ncx-glow { display: none; }
  .ncx-live i,
  .ncx-cam-feed::after,
  .ncx-rec,
  .ncx-cam-noise { animation: none; }
}
