/* Public site (root) — shared with index, about, contact, privacy */

:root {
  --bg-deep: #0c1220;
  --bg-mid: #141b2e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8ecf4;
  --muted: #94a3b8;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --accent-2: #38bdf8;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.65;
}

/* ambient background */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(245, 158, 11, 0.12), transparent 55%),
    radial-gradient(ellipse 700px 450px at 95% 20%, rgba(56, 189, 248, 0.1), transparent 50%),
    linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-mid) 45%, #0a0f18 100%);
}

.site-inner {
  width: min(1040px, 100% - 32px);
  margin-inline: auto;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(12, 18, 32, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .site-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.site-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.site-logo span {
  background: linear-gradient(120deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(245, 158, 11, 0.35);
}

.site-nav a.nav-cta {
  color: var(--bg-deep);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  font-weight: 600;
}

.site-nav a.nav-cta:hover {
  filter: brightness(1.06);
  border-color: transparent;
}

/* main */
.site-main {
  padding: 48px 0 72px;
}

/* hero (index) */
.hero {
  margin-bottom: 48px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-lead {
  margin: 0 0 24px;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #0c1220;
  background: linear-gradient(135deg, #fbbf24, #ea580c);
  box-shadow: 0 8px 28px rgba(234, 88, 12, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-strong);
}

/* section titles */
.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

.card p {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
}

.card a.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
}

.card a.card-link:hover {
  text-decoration: underline;
}

/* page article (about, contact, privacy) */
.page-article {
  max-width: 720px;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-article h1 {
  margin: 0 0 16px;
  font-size: 1.75rem;
  font-weight: 800;
}

.page-article h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.page-article p,
.page-article li {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.98rem;
}

.page-article a {
  color: var(--accent-2);
}

.page-article a:hover {
  text-decoration: underline;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.contact-row a {
  display: inline-flex;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.contact-row a:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.meta-muted {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* footer */
.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.site-footer .site-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* X 分析ツール (bunseki.html) */
.bunseki-intro {
  margin-bottom: 24px;
}

.bunseki-intro p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.bunseki-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.bunseki-form label {
  font-size: 0.9rem;
  color: var(--muted);
}

.bunseki-form input[type="text"] {
  min-width: 220px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text);
  font-size: 1rem;
}

.bunseki-form input[type="text"]:focus {
  outline: none;
  border-color: rgba(245, 158, 11, 0.5);
}

.bunseki-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

.bunseki-hint {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.bunseki-hint code {
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 6px;
}

.bunseki-status {
  font-size: 0.9rem;
  color: var(--accent-2);
  min-height: 1.4em;
  margin-bottom: 12px;
}

.bunseki-status.is-error {
  color: #f87171;
}

.bunseki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.bunseki-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bunseki-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.bunseki-card-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.bunseki-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
}

.bunseki-metric {
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.bunseki-metric span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.bunseki-metric strong {
  font-size: 1.05rem;
  color: var(--accent);
}

@media (max-width: 560px) {
  .site-header .site-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
  }
}
