/* ============================================================
   SOLE AI — legal.css
   Shared styles for terms.html and privacy.html
   Design: Dark theme, clean document layout
   ============================================================ */

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

:root {
  --bg: #080808;
  --bg-card: #111111;
  --bg-card2: #161616;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text-primary: #f5f5f5;
  --text-secondary: #999999;
  --text-muted: #666666;
  --accent: #c8a96e;
  --accent-dim: rgba(200,169,110,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
}

html { scroll-behavior: smooth; }

body.legal-body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.8;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---- Background ---- */
.legal-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.legal-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.08;
}
.legal-bg-orb.orb1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #c8a96e, transparent);
  top: -150px; right: -150px;
}
.legal-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ---- Header ---- */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.legal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.legal-logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #c8a96e, #e8c98e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  color: #080808;
}
.legal-logo-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.legal-nav {
  display: flex;
  gap: 24px;
}
.legal-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.legal-nav-link:hover { color: var(--text-primary); }

/* ---- Main ---- */
.legal-main {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

/* ---- Container ---- */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Hero ---- */
.legal-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.legal-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.legal-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.legal-date {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Body Content ---- */
.legal-body-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ---- Intro ---- */
.legal-intro {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
}
.legal-intro p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.85;
}

/* ---- Section ---- */
.legal-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.legal-section-h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.legal-section p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.85;
}

/* ---- List ---- */
.legal-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-list li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
  padding-left: 20px;
  position: relative;
}
.legal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

/* ---- Contact Box ---- */
.legal-contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  text-align: center;
}
.legal-contact-box p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}
.legal-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.legal-link:hover { opacity: 0.75; }
.legal-contact-email {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary) !important;
  letter-spacing: 0.03em;
}

/* ---- Footer ---- */
.legal-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.legal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.legal-footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}
.legal-footer-links {
  display: flex;
  gap: 20px;
}
.legal-footer-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.legal-footer-link:hover {
  color: var(--text-secondary);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .legal-header { padding: 0 16px; height: 52px; }
  .legal-nav { display: none; }
  .legal-container { padding: 0 16px; }
  .legal-hero { padding: 48px 0 28px; margin-bottom: 32px; }
  .legal-title { font-size: clamp(22px, 6vw, 30px); }
  .legal-main { padding-bottom: 56px; }
  .legal-body-content { gap: 28px; }
  .legal-section-h2 { font-size: 15px; }
  .legal-section p, .legal-list li { font-size: 13px; }
  .legal-intro { padding: 16px 18px; }
  .legal-intro p { font-size: 13px; }
  .legal-contact-box { padding: 20px 16px; }
  .legal-footer { padding: 24px 16px; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .legal-footer-links { flex-wrap: wrap; gap: 12px; }
}

/* ===== LIGHT THEME OVERRIDE (legal) ===== */
html.theme-light {
  --bg: #F5F5F3;
  --bg-card: #FFFFFF;
  --bg-card2: #EFEFED;
  --border: rgba(0,0,0,0.08);
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
}
html.theme-light .legal-nav { background: #FFFFFF; border-bottom-color: rgba(0,0,0,0.08); }
