/* =====================================================
   LLM Insight — styles.css
   Design tokens · color themes · fonts · header · footer · common UI
   ===================================================== */

/* ---------- Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;500;700;900&family=Noto+Sans+JP:wght@400;500;700;900&family=IBM+Plex+Sans+JP:wght@400;500;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

/* ---------- Color themes ---------- */
:root,
:root[data-theme="navy"] {
  --brand: #1a4d8f;
  --brand-700: #2a5fa3;
  --brand-600: #3a6fc4;
  --brand-900: #0d2546;
  --brand-950: #081a33;
  --accent: #36c5f0;
  --accent-soft: #d6f1fb;
  --tint: #eef4fb;
  --tint-2: #f5f8fc;
  --brand-line: #d6e3f2;
}
:root[data-theme="indigo"] {
  --brand: #4338ca;
  --brand-700: #5046d6;
  --brand-600: #6366f1;
  --brand-900: #1e1b4b;
  --brand-950: #12102e;
  --accent: #818cf8;
  --accent-soft: #e4e3fc;
  --tint: #eef0fd;
  --tint-2: #f6f7fe;
  --brand-line: #ddddf5;
}
:root[data-theme="teal"] {
  --brand: #0f766e;
  --brand-700: #14887e;
  --brand-600: #2aa79b;
  --brand-900: #093d39;
  --brand-950: #052824;
  --accent: #2dd4bf;
  --accent-soft: #cdf3ee;
  --tint: #e8f6f4;
  --tint-2: #f2faf9;
  --brand-line: #cfeae6;
}
:root[data-theme="slate"] {
  --brand: #334155;
  --brand-700: #3f4f66;
  --brand-600: #56657d;
  --brand-900: #1e293b;
  --brand-950: #0f172a;
  --accent: #38bdf8;
  --accent-soft: #dbeefb;
  --tint: #eef2f7;
  --tint-2: #f6f8fb;
  --brand-line: #d9e1ec;
}

:root {
  /* Neutrals & semantic */
  --ink: #0c1b33;
  --ink-700: #34425a;
  --ink-500: #5d6b82;
  --ink-300: #97a3b6;
  --line: #e1e8f1;
  --line-strong: #c9d4e3;
  --white: #ffffff;
  --win: #18895f;
  --lose: #d2503a;
  --warn: #c98a13;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(13, 37, 70, 0.05), 0 8px 24px rgba(13, 37, 70, 0.06);
  --shadow-pop: 0 12px 40px rgba(13, 37, 70, 0.16);
  --shadow-sm: 0 1px 3px rgba(13, 37, 70, 0.08);
  --maxw: 1180px;

  /* Fonts (switchable via data-font) */
  --font-ja: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "IBM Plex Sans", var(--font-ja);
}
:root[data-font="noto"] { --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif; }
:root[data-font="plex"] { --font-ja: "IBM Plex Sans JP", "Hiragino Kaku Gothic ProN", sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ja);
  color: var(--ink);
  background: var(--white);
  line-height: 1.8;
  font-size: 16px;
  font-feature-settings: "palt";
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.42; font-weight: 900; text-wrap: balance; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; }
.num { font-family: var(--font-en); font-feature-settings: "tnum"; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 960px; margin: 0 auto; padding: 0 32px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ja); font-weight: 700; line-height: 1.2;
  border-radius: 10px; cursor: pointer; border: none; white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); box-shadow: 0 6px 18px rgba(13,37,70,0.18); }
.btn-ghost { background: var(--white); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn-ondark { background: var(--white); color: var(--brand-900); }
.btn-ondark:hover { background: var(--accent-soft); }
.btn-ghostdark { background: rgba(255,255,255,0.08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.45); }
.btn-ghostdark:hover { background: rgba(255,255,255,0.16); }
.btn-lg { font-size: 16.5px; padding: 15px 32px; }
.btn-md { font-size: 14.5px; padding: 11px 22px; }
.btn-sm { font-size: 13.5px; padding: 9px 18px; }
.btn .arw { font-size: 0.95em; transition: transform 0.15s; }
.btn:hover .arw { transform: translateX(3px); }

.tlink { color: var(--brand); font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; gap: 5px; }
.tlink:hover { color: var(--brand-700); }
.tlink .arw { transition: transform 0.15s; }
.tlink:hover .arw { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; height: 70px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 15px;
  font-family: var(--font-en);
}
.logo-name { font-weight: 900; font-size: 18.5px; color: var(--brand-900); letter-spacing: 0.01em; white-space: nowrap; }
.logo-img { height: 30px; width: auto; display: block; }
.logo-img-light { filter: brightness(0) invert(1); }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  color: var(--ink-700); font-size: 14px; font-weight: 600;
  padding: 10px 12px; border-radius: 8px; background: none; border: none; font-family: var(--font-ja);
  white-space: nowrap;
}
.nav-link:hover { background: var(--tint); color: var(--brand-900); }
.nav-link .caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.55; transition: transform 0.2s; }
.nav-item.open .nav-link { background: var(--tint); color: var(--brand-900); }
.nav-item.open .caret { transform: rotate(225deg) translateY(-2px); }

.header-ctas { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* Mega menu */
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-pop); padding: 22px; min-width: 520px;
  opacity: 0; visibility: hidden; transition: opacity 0.18s, transform 0.18s; z-index: 210;
}
.nav-item.open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.mega-wide { min-width: 720px; }
/* 端のメガメニューは画面外への見切れを防ぐためアンカーを端に寄せる */
.main-nav > .nav-item:first-child .mega { left: 0; right: auto; transform: translateX(0) translateY(8px); }
.main-nav > .nav-item:first-child.open .mega { transform: translateX(0) translateY(0); }
.main-nav > .nav-item:last-child .mega { left: auto; right: 0; transform: translateX(0) translateY(8px); }
.main-nav > .nav-item:last-child.open .mega { transform: translateX(0) translateY(0); }
.mega-groups { display: grid; gap: 22px; }
.mega-groups.cols-2 { grid-template-columns: 1fr 1fr; }
.mega-groups.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mega-group-title { font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-300); text-transform: uppercase; margin-bottom: 8px; padding: 0 10px; }
.mega-link { display: block; padding: 9px 10px; border-radius: 9px; }
.mega-link:hover { background: var(--tint); }
.mega-link .ml-title { font-size: 14px; font-weight: 700; color: var(--brand-900); display: flex; align-items: center; gap: 7px; }
.mega-link .ml-sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; line-height: 1.5; }
.mega-link .ml-dot { width: 7px; height: 7px; border-radius: 3px; background: var(--accent); flex-shrink: 0; }

/* Mobile nav */
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--white); cursor: pointer; margin-left: auto; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 18px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; transition: 0.2s; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: rotate(45deg); top: 0; }
body.nav-open .nav-toggle span::after { transform: rotate(-45deg); top: 0; }

/* Mobile slide-down menu */
.mobile-menu { position: fixed; top: 70px; left: 0; right: 0; bottom: 0; background: var(--white); z-index: 190; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s; overflow-y: auto; }
body.nav-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
.mobile-menu-inner { padding: 24px 24px 48px; display: grid; gap: 18px; max-width: 640px; margin: 0 auto; }
.mobile-menu .m-top { font-size: 16px; font-weight: 800; color: var(--brand-900); padding: 10px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .m-group { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.mobile-menu .m-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--ink-300); text-transform: uppercase; margin-bottom: 8px; }
.mobile-menu .m-group a { display: block; font-size: 15px; font-weight: 600; color: var(--ink-700); padding: 9px 0; }
.mobile-menu .m-ctas { display: grid; gap: 10px; margin-top: 8px; }
.mobile-menu .m-ctas .btn { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-950); color: rgba(255,255,255,0.72); padding: 64px 0 30px; font-size: 13.5px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer-brand .logo-name { color: #fff; }
.footer-brand p { margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,0.52); line-height: 1.7; }
.footer-col h4 { font-size: 12.5px; font-weight: 800; color: #fff; margin-bottom: 13px; letter-spacing: 0.04em; }
.footer-col ul { display: grid; gap: 8px; list-style: none; }
.footer-col a { color: rgba(255,255,255,0.66); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: rgba(255,255,255,0.42); }
.footer-bottom a { color: inherit; }

/* ---------- Section scaffolding ---------- */
.section { padding: 92px 0; }
.section-tint { background: var(--tint-2); }
.section-brand { background: linear-gradient(165deg, var(--brand-900), var(--brand) 130%); color: #fff; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 52px; }
.section-head.left { text-align: left; margin-left: 0; }
.eyebrow { display: inline-block; font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--brand-600); text-transform: uppercase; margin-bottom: 14px; }
.section-brand .eyebrow { color: var(--accent); }
.section-title { font-size: 33px; color: var(--brand-900); letter-spacing: 0.01em; }
.section-brand .section-title { color: #fff; }
.section-lead { margin-top: 18px; font-size: 16px; color: var(--ink-500); font-weight: 500; line-height: 1.85; }
.section-brand .section-lead { color: rgba(255,255,255,0.8); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* ---------- Scroll reveal: content always visible (no hidden start) ---------- */
.reveal { opacity: 1; }

/* ---------- Sub-page hero ---------- */
.subhero { background: linear-gradient(170deg, var(--tint) 0%, var(--tint-2) 70%); padding: 64px 0 56px; }
.subhero.center { text-align: center; }
.breadcrumb { font-size: 12.5px; color: var(--ink-500); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-500); }
.breadcrumb a:hover { color: var(--brand); }
.subhero h1 { font-size: 38px; color: var(--brand-900); }
.subhero.center h1 { max-width: 860px; margin-inline: auto; }
.subhero-lead { margin-top: 18px; max-width: 720px; font-size: 16px; color: var(--ink-700); line-height: 1.85; }
.subhero.center .subhero-lead { margin-inline: auto; }

/* ---------- Events empty state ---------- */
.events-empty { max-width: 640px; margin: 0 auto; text-align: center; background: var(--tint-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 32px; }
.events-empty-title { font-size: 18px; font-weight: 800; color: var(--brand-900); }
.events-empty-lead { margin-top: 14px; font-size: 15px; color: var(--ink-700); line-height: 1.85; }

/* ---------- Chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { font-size: 12.5px; font-weight: 600; color: var(--brand-900); background: var(--white); border: 1px solid var(--brand-line); border-radius: 999px; padding: 6px 15px; }
.ai-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px 15px; font-size: 13.5px; font-weight: 700; color: var(--ink-700); white-space: nowrap; }
.ai-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.ai-chip img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }

/* ---------- Inline icon ---------- */
.ico { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; color: var(--brand); }
.ico-lg { width: 26px; height: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .main-nav, .header-ctas { display: none; }
  .nav-toggle { display: block; }
  .footer-cols { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .section { padding: 60px 0; }
  .container, .container-wide, .container-narrow { padding: 0 20px; }
  .section-title { font-size: 25px; }
  .subhero h1 { font-size: 27px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 26px; }
}
