/*
Theme Name: TCSC Custom
Theme URI: https://www.tcsc-jp.com
Author: TCSC株式会社
Author URI: https://www.tcsc-jp.com
Description: TCSC株式会社公式サイト用カスタムテーマ。AI × ERP × DX 実装会社のブランドイメージを反映したダークテーマ。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: tcsc
*/

/* 大部分样式由 Tailwind CDN 提供，这里只放关键自定义样式 */

html { scroll-behavior: smooth; }
body {
  background: #05060A;
  color: #E6EAF2;
  font-feature-settings: "palt";
}

/* Aurora background blobs */
.aurora::before, .aurora::after {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 20% 30%, rgba(91,140,255,.35), transparent 60%),
    radial-gradient(35% 30% at 80% 20%, rgba(154,108,255,.30), transparent 60%),
    radial-gradient(40% 35% at 60% 80%, rgba(34,211,238,.20), transparent 60%);
  filter: blur(40px);
  z-index: 0;
  animation: float 18s ease-in-out infinite alternate;
}
.aurora::after { animation-duration: 24s; opacity: .6; mix-blend-mode: screen; }
@keyframes float {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(2%, -3%, 0) scale(1.05); }
}

/* Grid overlay */
.grid-mask {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 40%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 40%, transparent 80%);
}

/* Gradient text */
.grad-text {
  background: linear-gradient(135deg,#9A6CFF 0%, #5B8CFF 45%, #22D3EE 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Card hover */
.card { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.card:hover { transform: translateY(-4px); border-color: rgba(91,140,255,.45); box-shadow: 0 0 40px -8px rgba(91,140,255,.35); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Marquee */
.marquee { -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
                   mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-track { animation: marquee 28s linear infinite; }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* Button shimmer */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .8s ease;
}
.btn-primary:hover::after { transform: translateX(100%); }

/* Particles canvas */
#particles { position:absolute; inset:0; z-index:0; }

/* Section divider */
.divider { background: linear-gradient(90deg, transparent, rgba(91,140,255,.4), transparent); height:1px; }

/* Tag */
.tag {
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.35rem .75rem; border-radius:9999px;
  background: rgba(91,140,255,.08);
  border:1px solid rgba(91,140,255,.25);
  color:#B8C7FF; font-size:.78rem; letter-spacing:.04em;
}
.dot { width:6px; height:6px; border-radius:9999px; background:#22D3EE; box-shadow:0 0 12px #22D3EE; }

/* Code block (products page) */
.code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px; line-height: 1.7;
}
.code .k { color:#9A6CFF; }
.code .s { color:#22D3EE; }
.code .c { color:#5B6679; font-style: italic; }
.code .n { color:#FCD34D; }
.code .f { color:#79C0FF; }

.typing::after { content:"▍"; color:#9A6CFF; animation: blink 1s steps(2) infinite; margin-left:2px; }
@keyframes blink { 50% { opacity: 0; } }

.arrow {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, #5B8CFF, transparent);
  position: relative;
}
.arrow::after {
  content:""; position:absolute; right:0; top:-4px;
  border-left:8px solid #5B8CFF; border-top:4px solid transparent; border-bottom:4px solid transparent;
}
.checkmark { color:#22D3EE; }

/* WordPress 管理栏颜色调整 */
body.admin-bar #nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar #nav { top: 46px; } }

/* ============================================================
 * AI-NATIVE 視覚効果セット (Vercel / Stripe flex 風)
 * ============================================================ */

/* 神経網背景 canvas コンテナ */
.neural-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.neural-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* AI Native Badge - Hero 等で使う */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .85rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(154,108,255,.15), rgba(91,140,255,.15), rgba(34,211,238,.15));
  border: 1px solid rgba(154,108,255,.4);
  color: #C7B7FF;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.ai-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(154,108,255,.3), transparent);
  transform: translateX(-100%);
  animation: ai-badge-shine 3s ease-in-out infinite;
}
@keyframes ai-badge-shine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}
.ai-badge-dot {
  width: 6px; height: 6px; border-radius: 9999px;
  background: #9A6CFF;
  box-shadow: 0 0 12px #9A6CFF, 0 0 24px rgba(154,108,255,.5);
  animation: ai-dot-pulse 2s ease-in-out infinite;
}
@keyframes ai-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.3); }
}

/* AI-POWERED 小徽章（Services 卡右上角） */
.ai-powered-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #9A6CFF, #5B8CFF);
  color: white;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px -4px rgba(91,140,255,.6);
  z-index: 2;
}
.ai-powered-badge::before {
  content: "✨";
  font-size: .8em;
}

/* Neon text - Hero 主标题用 */
.neon-text {
  text-shadow:
    0 0 10px rgba(154,108,255,.3),
    0 0 20px rgba(91,140,255,.2),
    0 0 40px rgba(34,211,238,.15);
}

/* Grad-text に shimmer 流光効果 */
.grad-text {
  background: linear-gradient(135deg,#9A6CFF 0%, #5B8CFF 45%, #22D3EE 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad-shimmer 6s ease-in-out infinite;
}
@keyframes grad-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #9A6CFF;
  margin-left: 4px;
  vertical-align: -0.15em;
  animation: tw-blink 1s steps(2) infinite;
  box-shadow: 0 0 10px #9A6CFF;
}
@keyframes tw-blink {
  50% { opacity: 0; }
}

/* 3D Tilt カード - ホバー時マウス追従 */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform .2s ease-out;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  .tilt-card:hover {
    transition: transform .05s ease-out;
  }
}

/* Pipeline 流動ラインアニメ（データが流れる視覚） */
.flow-line {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(91,140,255,.3), transparent);
  overflow: hidden;
}
.flow-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #22D3EE, #9A6CFF, transparent);
  animation: flow-move 3s linear infinite;
  box-shadow: 0 0 10px #22D3EE;
}
@keyframes flow-move {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* AI Stack - テックスタック logo 用 */
.ai-stack-item {
  padding: .75rem 1.25rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11,15,26,.6), rgba(5,6,10,.6));
  color: #B8C7FF;
  font-weight: 600;
  font-size: .85rem;
  transition: all .3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.ai-stack-item:hover {
  border-color: rgba(91,140,255,.5);
  background: linear-gradient(135deg, rgba(91,140,255,.1), rgba(154,108,255,.1));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(91,140,255,.5);
}
.ai-stack-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(154,108,255,.2), transparent 50%);
  opacity: 0;
  transition: opacity .3s;
}
.ai-stack-item:hover::before { opacity: 1; }

/* Terminal AI Live Preview */
.ai-terminal {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background: linear-gradient(135deg, #0B0F1A, #05060A);
  border: 1px solid rgba(91,140,255,.3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 60px -15px rgba(91,140,255,.4),
    0 20px 60px -20px rgba(0,0,0,.7);
  position: relative;
}
.ai-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(154,108,255,.5), rgba(91,140,255,.3), rgba(34,211,238,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .5;
  pointer-events: none;
  animation: term-border-pulse 4s ease-in-out infinite;
}
@keyframes term-border-pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: .6; }
}

/* Counter number は JS で入る、ここは monospace 等幅指定のみ */
.counter-num {
  font-variant-numeric: tabular-nums;
}

/* Pulse node (AI Pipeline の段ノード) */
.pulse-node {
  position: relative;
}
.pulse-node::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(91,140,255,.6);
  animation: node-pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes node-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Scanline / matrix drop - Hero 背景追加効果（薄く） */
.scanlines::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0) 0, rgba(255,255,255,0) 2px, rgba(154,108,255,.015) 2px, rgba(154,108,255,.015) 4px);
  pointer-events: none;
  z-index: 1;
}

/* CTA 強化 - 能量光束扫过 */
.btn-energy {
  position: relative;
  overflow: hidden;
}
.btn-energy::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg);
  transition: left .6s cubic-bezier(.4,0,.2,1);
}
.btn-energy:hover::before { left: 125%; }

/* 段落文字に subtle glow */
.text-glow-subtle {
  text-shadow: 0 0 30px rgba(91,140,255,.15);
}

/* ============================================================
 * Nav active state - 現在ページを示す
 * ============================================================ */
.nav-link {
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #9A6CFF, #5B8CFF, #22D3EE);
  transition: width .3s cubic-bezier(.4,0,.2,1);
  border-radius: 2px;
}
.nav-link:hover::after {
  width: 50%;
}
.nav-link.nav-active {
  color: #ffffff !important;
  font-weight: 600;
}
.nav-link.nav-active::after {
  width: 100% !important;
  box-shadow: 0 0 8px rgba(91,140,255,.6);
}
.nav-link.nav-active-ali {
  color: #FFD166 !important;
}
.nav-link.nav-active-ali::after {
  width: 100% !important;
  background: linear-gradient(90deg, #FF6A00, #FF9A3C, #FFD166);
  box-shadow: 0 0 8px rgba(255,154,60,.6);
}

/* ============================================================
 * フォーム入力: 白背景 × 濃い文字色で視認性確保
 * ============================================================ */

/* 入力欄は白背景 + 濃紺系の文字色 */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
textarea,
select {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  font-size: 15px;
  font-weight: 500;
}

/* Placeholder — 中間グレーで可読かつ入力済み文字と区別 */
input::placeholder,
textarea::placeholder {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  opacity: 1;
  font-weight: 400;
}

/* focus 時はブランドカラーのリング */
input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: #5B8CFF !important;
  box-shadow: 0 0 0 3px rgba(91,140,255,.2) !important;
  background-color: #FFFFFF !important;
}

/* Alibaba ページは amber 色の focus に */
.ali-tag ~ * input:focus,
form[action*="alibaba"] input:focus,
form[action*="alibaba"] textarea:focus,
form[action*="alibaba"] select:focus,
[class*="ali-"] form input:focus,
[class*="ali-"] form textarea:focus {
  border-color: #FF9A3C !important;
  box-shadow: 0 0 0 3px rgba(255,154,60,.2) !important;
}

/* Chrome/Edge の Autofill も白背景 + 黒字に強制 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px #FFFFFF inset !important;
          box-shadow: 0 0 0 40px #FFFFFF inset !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* Select オプションも白背景 + 黒字 */
select option {
  background-color: #FFFFFF;
  color: #0F172A;
}

/* checkbox / radio は通常色で */
input[type="checkbox"],
input[type="radio"] {
  background-color: initial !important;
  -webkit-text-fill-color: initial !important;
  border: initial !important;
}
