/* Pulse のサイト。バナー(宇宙・紫)に合わせた、暗い配色だけのデザイン。 */
:root {
  --bg: #0d0b21; --card: #161232; --text: #ece9ff; --muted: #a8a3cf; --border: #2b2658;
  --accent: #9d6bff; --accent-2: #5cd6ff; --pink: #ff4fd8;
  --ok: #3ecf8e; --part: #f0b429; --ng: #ff6b61; --none: #3a3566;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); line-height: 1.7; background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 85% -8%, rgba(157, 107, 255, .22), transparent 70%),
    radial-gradient(700px 420px at 5% 12%, rgba(92, 214, 255, .10), transparent 70%);
  background-repeat: no-repeat;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}
a { color: var(--accent-2); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* 背景の雨(assets/rain.js)。内容の後ろに、画面に固定して置く。 */
#rain { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .foot { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { #rain { display: none; } }
.muted { color: var(--muted); font-size: .9em; }
.spacer { flex: 1; }

/* ヘッダー */
.top { position: sticky; top: 0; z-index: 10; background: rgba(13, 11, 33, .82);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem;
  text-decoration: none; color: var(--text); letter-spacing: .02em; }
.brand-icon { width: 30px; height: 30px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--text); }
.nav a.btn { color: var(--text); }

/* ボタン */
.btn { display: inline-block; padding: 11px 20px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; font-weight: 700; }
.btn:hover { border-color: var(--accent); background: rgba(157, 107, 255, .12); }
.btn.primary { border-color: transparent; color: #fff;
  background: linear-gradient(120deg, #5d8bff 0%, #9d6bff 55%, #d553f0 100%); box-shadow: 0 8px 24px rgba(157, 107, 255, .35); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.small { padding: 5px 14px; font-size: .9rem; }

/* 先頭 */
.hero { padding: 28px 0 24px; }
.banner-wrap { position: relative; }
.banner { display: block; width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(60, 30, 140, .45); transition: filter .6s; }

/* 状態に合わせた、サイト全体の見た目(assets/app.js が、body の data-site-state と、帯・リボン・注意書きを切り替える) */
.site-banner { position: relative; z-index: 2; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .95rem;
  background: rgba(92, 214, 255, .10); border-bottom-color: rgba(92, 214, 255, .35); }
.site-banner-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.site-banner strong { white-space: nowrap; }
#site-banner-text { white-space: pre-line; color: var(--text); opacity: .92; }
.site-banner[data-kind="maintenance"], .site-banner[data-kind="starting"] { background: rgba(240, 180, 41, .16); border-bottom-color: rgba(240, 180, 41, .55); }
.site-banner[data-kind="down"] { background: rgba(255, 107, 97, .16); border-bottom-color: rgba(255, 107, 97, .55); }
.site-banner[data-kind="unreachable"] { background: rgba(160, 156, 200, .14); border-bottom-color: rgba(160, 156, 200, .45); }
.ribbon { position: absolute; top: 16px; left: 16px; padding: 4px 14px; border-radius: 999px; font-weight: 800;
  font-size: .78rem; letter-spacing: .16em; color: #1d1400; background: var(--part); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
body[data-site-state="down"] .ribbon { background: var(--ng); color: #2a0503; }
body[data-site-state="unreachable"] .ribbon { background: #a09cc8; color: #17142c; }
body[data-site-state="maintenance"] .hero .banner, body[data-site-state="starting"] .hero .banner { filter: saturate(.7) brightness(.92); }
body[data-site-state="down"] .hero .banner { filter: grayscale(.75) brightness(.75); }
body[data-site-state="unreachable"] .hero .banner { filter: grayscale(.5) brightness(.85); }
.state-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; font-size: .9rem; display: inline-block;
  background: rgba(240, 180, 41, .12); border: 1px solid rgba(240, 180, 41, .4); }
body[data-site-state="down"] .state-note { background: rgba(255, 107, 97, .12); border-color: rgba(255, 107, 97, .45); }
.hero h1 { margin: 26px 0 10px; font-size: clamp(1.45rem, 3.8vw, 2.1rem); line-height: 1.35; }
.hero .lead { margin: 0 0 20px; color: var(--muted); font-size: 1.05rem; }
.hero .lead strong { color: var(--text); }
.hero .note { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* 区切り・カード */
.section { padding: 40px 0 6px; }
.section h2 { margin: 0 0 18px; font-size: 1.5rem; display: flex; align-items: center; gap: 12px; }
.section h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), rgba(22, 18, 50, .78);
  border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }   /* 少し透けさせて、後ろの雨をうっすら見せる */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.feature { transition: border-color .15s, transform .15s; }
.feature:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* 稼働状況 */
.status-head { display: flex; align-items: center; gap: 14px; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: var(--none); flex: none;
  box-shadow: 0 0 0 5px rgba(120, 112, 190, .2); }
.status[data-state="up"] .dot { background: var(--ok); box-shadow: 0 0 0 5px rgba(62, 207, 142, .22), 0 0 18px rgba(62, 207, 142, .5); }
.status[data-state="maintenance"] .dot, .status[data-state="starting"] .dot { background: var(--part); box-shadow: 0 0 0 5px rgba(240, 180, 41, .22); }
.status[data-state="down"] .dot, .status[data-state="unreachable"] .dot { background: var(--ng); box-shadow: 0 0 0 5px rgba(255, 107, 97, .22); }
.status-title { font-weight: 700; font-size: 1.15rem; }
.status-sub { color: var(--muted); font-size: .92rem; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: 12px; white-space: pre-line;
  background: rgba(240, 180, 41, .10); border: 1px solid rgba(240, 180, 41, .45); }
.bars { margin-top: 16px; display: grid; gap: 12px; }
.bar-row-head { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.bar-row-head strong { color: var(--text); }
.segs { display: flex; gap: 2px; height: 26px; }
.seg { flex: 1; min-width: 0; border-radius: 3px; background: var(--none); }
.seg.up { background: var(--ok); }
.seg.part { background: var(--part); }
.seg.down { background: var(--ng); }
.status-foot { margin-top: 12px; }

/* メインサイトの小さな状態表示(クリックで、稼働状況ページへ) */
.status-chip { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.status-chip:hover { border-color: var(--accent); }
.chip-text { display: flex; flex-direction: column; min-width: 0; }
.chip-more { margin-left: auto; color: var(--accent-2); font-size: .9rem; white-space: nowrap; }

/* 稼働状況ページ */
.page-title { margin: 6px 0 18px; font-size: clamp(1.4rem, 3.6vw, 1.9rem); }
.brand-sub { font-weight: 500; color: var(--muted); font-size: .9rem; margin-left: 4px; }
.status-page .card { margin-bottom: 16px; }
.stats { margin-top: 16px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stats > div { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03); }
.stats strong { font-size: 1.2rem; }
.legend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--none); display: inline-block; }
.swatch.up { background: var(--ok); }
.swatch.part { background: var(--part); }
.swatch.down { background: var(--ng); }
.info h2 { margin-top: 0; font-size: 1.1rem; }
.info ul { padding-left: 1.2em; color: var(--muted); }
.info li { margin: 4px 0; }
.info .cta { margin: 16px 0 0; }

/* はじめかた */
.steps { margin: 0 0 20px; padding-left: 1.4em; }
.steps li { margin: 8px 0; }

/* フッター */
.foot { margin-top: 56px; border-top: 1px solid var(--border); background: rgba(13, 11, 33, .7); }
.foot-bar { display: flex; align-items: center; gap: 18px; min-height: 60px; color: var(--muted); font-size: .9rem; }
.foot-bar a { color: var(--muted); }

/* プライバシー */
.doc { padding: 36px 0 8px; max-width: 760px; }
.doc h1 { margin: 0 0 6px; font-size: 1.8rem; }
.doc h2 { margin: 30px 0 8px; font-size: 1.2rem; }
.doc ul { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; white-space: nowrap; }

@media (max-width: 720px) {
  .hero { padding-top: 16px; }
  .banner { border-radius: 14px; }
  .nav a:not(.btn) { display: none; }
  .nav a[href="#status"] { display: inline; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .feature { transition: none; } }
