/* ==========================================
   PostSupporter Common Styles
   共通ヘッダー・フッター・言語切替
   ========================================== */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Colors - Purple gradient */
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --accent: #764ba2;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Base Colors - Apple-inspired */
  --bg-white: #ffffff;
  --bg-light: #f5f5f7;
  --bg-section: #fbfbfd;

  /* Text Colors */
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;

  /* Border */
  --border-light: #d2d2d7;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;

  /* Transitions */
  --transition: all 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Site Header
   ========================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-header .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.site-header .logo {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header .logo:hover {
  color: var(--primary);
}

/* Navigation Menu */
.site-header .nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.site-header .nav-menu a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.site-header .nav-menu a:hover {
  color: var(--primary);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  background: var(--bg-light);
  border-radius: 20px;
  padding: 3px;
}

.lang-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 17px;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--bg-white);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}

/* ==========================================
   Site Footer
   ========================================== */
.site-footer {
  background: var(--bg-light);
  padding: 60px 24px 24px;
}

.site-footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
}

/* Footer Brand */
.site-footer .footer-brand {

}

.site-footer .footer-logo {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 8px;
}

.site-footer .footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Footer Links */
.site-footer .footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.site-footer .footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.site-footer .footer-col a {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  transition: var(--transition);
}

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

/* Footer Bottom */
.site-footer .footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  text-align: center;
}

.site-footer .footer-bottom p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================
   Common Components
   ========================================== */

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

/* Section */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 25px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-light);
  border-color: var(--text-secondary);
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* ==========================================
   Page Content Wrapper
   ========================================== */
.page-content {
  padding-top: 52px; /* Header height */
  min-height: 100vh;
}

/* ==========================================
   Legal Page Styles
   ========================================== */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px;
}

.legal-title {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 16px;
}

.legal-meta {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
}

.legal-section {
  line-height: 1.8;
}

.legal-section section {
  margin-bottom: 48px;
}

.legal-section h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 3px solid var(--primary);
}

.legal-section h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 16px;
}

.legal-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-section ul,
.legal-section ol {
  color: var(--text-secondary);
  margin: 16px 0 16px 24px;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-section a {
  color: var(--primary);
  text-decoration: none;
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Legal Notice Box */
.legal-notice {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-notice p {
  color: var(--text-primary);
  margin-bottom: 12px;
}

.legal-notice ul {
  margin: 8px 0 0 20px;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
  /* Header */
  .site-header .nav-container {
    padding: 0 16px;
  }

  .site-header .nav-menu {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }

  .site-header .nav-menu.active {
    display: flex;
  }

  .site-header .nav-menu li {
    border-bottom: 1px solid var(--border-light);
  }

  .site-header .nav-menu li:last-child {
    border-bottom: none;
  }

  .site-header .nav-menu a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
  }

  .menu-toggle {
    display: flex;
  }

  .lang-toggle {
    position: fixed;
    top: 10px;
    right: 60px;
    z-index: 1001;
  }

  /* Footer */
  .site-footer .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .site-footer .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Section */
  .section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  /* Legal */
  .legal-container {
    padding: 60px 16px;
  }
}

@media (max-width: 480px) {
  .site-footer .footer-links {
    grid-template-columns: 1fr;
  }

  .lang-toggle {
    right: 52px;
  }

  .lang-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* ==========================================
   Language Toggle JavaScript Support
   ========================================== */
[data-lang="en"]:not(.lang-btn) {
  display: none;
}

html[lang="en"] [data-lang="ja"]:not(.lang-btn) {
  display: none;
}

html[lang="en"] [data-lang="en"] {
  display: block;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print */
@media print {
  .site-header,
  .lang-toggle,
  .menu-toggle {
    display: none !important;
  }

  .page-content {
    padding-top: 0;
  }

  .site-footer {
    background: none;
    padding: 24px 0;
  }
}
