/* ══════════════════════════════════════════════════════════
   PII Firewall — Shared Styles  v1.0
   全ページ共通CSS。個別ページ固有のCSSは各<style>タグに残す。
   グラデーション・テーマ・ナビ・ボタン・フッターはここで一元管理。
   ══════════════════════════════════════════════════════════ */

/* ── Google Fonts（正規統一セット） ── */
/* パフォーマンス優先のため各ページ<head>にも同URLの<link>を置くこと */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Oswald:wght@500;600&display=swap');

/* ══ CSS Variables ══ */
:root {
  --bg: #03060d;
  --surface: #0c1428;
  --surface2: #111e38;
  --border: #1e2e50;
  --accent: #00e5ff;
  --accent2: #ff3d6b;
  --accent3: #00ff88;
  --warn: #d4956a;
  --text: #e8eef8;
  --muted: #8a9abb;
  /* フォント（デザインガイドライン準拠） */
  --font-sans: 'Noto Sans JP', 'Inter', sans-serif;
  --font-serif: 'Noto Sans JP', sans-serif; /* セリフ混在禁止のためNoto Sans JPに統一 */
  --font-mono: 'JetBrains Mono', monospace;
  /* グラデーション定義（1箇所変えれば全体に反映） */
  --grad-primary: linear-gradient(to right, #00e5ff 60%, #0088ff 100%);
  --grad-primary-light: linear-gradient(to right, #00a8c8 60%, #005fa3 100%);
}

/* ══ Light Mode Variables ══ */
[data-theme="light"] {
  --bg: #f0f4ff;
  --surface: #ffffff;
  --surface2: #e8eef8;
  --border: #c4d0e8;
  --text: #1e2d42;
  --muted: #4a5a7a;
  --accent: #0099bb;
  --accent3: #00a855;
}

/* ══ Reset ══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }

/* ══ Body (Dark) ══ */
body {
  background:
    radial-gradient(ellipse 130% 42% at 50% -2%, #1e3860 0%, transparent 54%),
    radial-gradient(ellipse 60% 38% at 4%  22%, #152d4a 0%, transparent 50%),
    radial-gradient(ellipse 80% 55% at 100% 40%, #223f68 0%, transparent 56%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(0,180,220,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ══ Light Mode Body ══ */
[data-theme="light"] body {
  background:
    radial-gradient(ellipse 100% 60% at 50% 10%, #ffffff 0%, transparent 50%),
    radial-gradient(ellipse 60% 38% at 4%  22%, #c8ddf5 0%, transparent 50%),
    radial-gradient(ellipse 80% 55% at 100% 40%, #bfd4ee 0%, transparent 56%),
    radial-gradient(ellipse 70% 42% at 6%  68%, #c2d8f0 0%, transparent 52%),
    radial-gradient(ellipse 80% 58% at 100% 80%, #bcd0ea 0%, transparent 56%),
    radial-gradient(ellipse 85% 42% at 50% 104%, #ccdff5 0%, transparent 54%),
    #e8eef8;
}

[data-theme="light"] body::before {
  background-image: radial-gradient(rgba(0,80,140,0.06) 1px, transparent 1px);
}

/* ══ Navigation ══ */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 32px;
  background: rgba(3,6,13,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

[data-theme="light"] nav {
  background: rgba(240,244,255,0.88);
  border-bottom-color: var(--border);
}

[data-theme="light"] .nav-logo-icon {
  background: #cce8f4;
  border-color: #00a0c8;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 700; font-size: 15px; letter-spacing: .02em;
  flex-shrink: 0; margin-right: 8px;
}
.nav-logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0,229,255,0.08); border: 1px solid rgba(0,229,255,0.2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.nav-logo-icon img { width: 24px; height: 24px; object-fit: contain; }

.nav-links { list-style: none; display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-links > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 7px 13px; border-radius: 7px;
  font-size: 13.5px; color: var(--muted);
  text-decoration: none; transition: all .18s;
}
.nav-links > li > a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
[data-theme="light"] .nav-links > li > a:hover { background: rgba(0,0,0,0.05); }

/* Dropdown */
.nav-item { position: relative; }
.nav-arrow { font-size: 10px; transition: transform .2s; display: inline-block; }
.nav-item:hover .nav-arrow { transform: rotate(180deg); }

.nav-dropdown {
  opacity: 0; visibility: hidden;
  transition: opacity .15s, visibility .15s;
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 220px; background: #0a1020;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 8px; z-index: 200;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
/* マウスが nav-item と dropdown の隙間を通れるよう橋渡し */
.nav-dropdown::before {
  content: ''; position: absolute;
  top: -12px; left: 0; right: 0; height: 12px;
}
.nav-item:hover .nav-dropdown { opacity: 1; visibility: visible; }

[data-theme="light"] .nav-dropdown {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .nav-dropdown a { color: var(--text) !important; }
[data-theme="light"] .nav-dropdown a:hover { background: rgba(0,0,0,0.04) !important; color: var(--text) !important; }
[data-theme="light"] .nav-dropdown hr { border-top-color: var(--border); }
[data-theme="light"] .nav-dropdown-label { border-bottom-color: var(--border); }

.nav-dropdown-label {
  padding: 6px 12px 8px;
  font-size: 10px; font-family: var(--font-mono);
  color: var(--muted); letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 4px;
}
.nav-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 7px;
  font-size: 13px; color: rgba(255,255,255,0.75) !important;
  text-decoration: none; transition: background .15s;
}
.nav-dropdown a:hover { background: rgba(255,255,255,0.06) !important; }
.nav-dropdown a .dd-icon { font-size: 14px; flex-shrink: 0; }
.nav-dropdown hr { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 6px 0; }

/* Nav CTA (サインインボタン) */
.nav-cta {
  background: var(--grad-primary);
  color: #000 !important; font-weight: 700;
  border-radius: 8px; padding: 7px 18px !important;
  font-size: 13px !important; transition: filter .18s;
}
.nav-cta:hover { filter: brightness(1.08); }
[data-theme="light"] .nav-cta { background: var(--grad-primary-light); }

/* Theme toggle */
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; transition: background .2s;
  flex-shrink: 0; margin-left: auto;
}
.theme-toggle:hover { background: rgba(128,128,128,0.1); }

/* Mobile nav */
.nav-hamburger { display: none; }
.nav-mobile-menu {
  display: none; flex-direction: column;
  position: fixed; top: 61px; left: 0; right: 0; bottom: 0;
  background: rgba(3,6,13,0.97); z-index: 99;
  padding: 24px 24px 40px; overflow-y: auto;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-link {
  display: block; padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: 16px;
}
.nav-mobile-cta {
  display: block; margin-top: 24px; padding: 14px;
  background: var(--grad-primary); color: #000 !important;
  font-weight: 700; font-size: 15px; text-align: center;
  border-radius: 10px; text-decoration: none;
}

@media (max-width: 768px) {
  nav { padding: 12px 16px; }
  .nav-links { display: none; }
  .nav-hamburger {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
  }
  .nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
}

/* ══ Buttons ══ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 10px;
  background: var(--grad-primary);
  color: #000; font-weight: 700; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer;
  transition: filter .18s, transform .18s, box-shadow .18s;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,136,255,0.4);
}
[data-theme="light"] .btn-primary { background: var(--grad-primary-light); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 10px;
  border: 1px solid rgba(0,229,255,0.3);
  color: var(--accent); font-size: 14px;
  text-decoration: none; cursor: pointer; background: transparent;
  transition: all .18s;
}
.btn-secondary:hover { background: rgba(0,229,255,0.06); border-color: var(--accent); }

/* ══ Page heading gradients ══ */
/* すべてのページ見出しにグラデーションを適用 */
.sol-title,
.page-title,
.blog-hero h1,
.hero h1 {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── サブページ見出しサイズ（.sol-title / .page-title / .blog-hero h1） ── */
/* トップページ .hero h1 はページ固有CSSで上書き（より大きいサイズ） */
.sol-title,
.page-title,
.blog-hero h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
  text-align: center;
}
[data-theme="light"] .sol-title,
[data-theme="light"] .page-title,
[data-theme="light"] .blog-hero h1,
[data-theme="light"] .hero h1 {
  background: var(--grad-primary-light);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══ Layout utilities ══ */
.page-wrap {
  max-width: 960px; margin: 0 auto;
  padding: 0 24px 80px;
  position: relative; z-index: 1;
}
.section-label {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent2); letter-spacing: .12em;
  margin-bottom: 16px;
}

/* ══ Modal overlay ══ */
[data-theme="light"] .modal-overlay { background: rgba(180,200,230,0.85); }

/* ══ Footer ══ */
footer {
  text-align: center; padding: 40px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
  position: relative; z-index: 1;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
