/* ============================================
   鋳造パターン - "Forge" Design
   溶融金属の力強さと精密さ
   ============================================ */

:root {
  --charcoal: #1c1c1e;
  --charcoal-light: #2d2d30;
  --graphite: #3a3a3d;
  --copper: #e87040;
  --copper-light: #f5a070;
  --copper-dark: #c05530;
  --ember: #ff8c5a;
  --stone: #f5f3f0;
  --stone-dark: #e8e5e0;
  --warm-gray: #8a8580;
  --text: #1c1c1e;
  --text-light: #5a5855;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(28,28,30,0.08);
  --shadow-md: 0 4px 24px rgba(28,28,30,0.12);
  --shadow-lg: 0 8px 48px rgba(28,28,30,0.18);
  --radius: 8px;
  --radius-lg: 14px;
  --transition: 0.3s ease;
  --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--stone);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.4; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(28,28,30,0.96);
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  border-bottom: 1px solid rgba(232,112,64,0.1);
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-logo a {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.site-logo .logo-sub {
  font-size: 0.65rem;
  color: var(--copper-light);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.nav-main ul {
  display: flex;
  gap: 2px;
}
.nav-main a {
  display: block;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  border-radius: 6px;
  transition: all var(--transition);
}
.nav-main a:hover,
.nav-main a.active {
  color: var(--white);
  background: rgba(232,112,64,0.15);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  z-index: 1001;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white);
  transition: all var(--transition);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(28,28,30,0.98);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mobile-overlay.active { opacity: 1; pointer-events: auto; }
.mobile-overlay nav {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; gap: 6px;
}
.mobile-overlay a {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  padding: 10px 28px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.mobile-overlay a:hover,
.mobile-overlay a.active {
  color: var(--copper);
  background: rgba(232,112,64,0.08);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 80vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 68px;
}
.hero-bg {
  position: absolute; inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: none;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,28,30,0.5) 0%, rgba(28,28,30,0.75) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 24px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow:
    2px 2px 0 #000, -2px 2px 0 #000,
    2px -2px 0 #000, -2px -2px 0 #000,
    0 4px 8px rgba(0,0,0,0.5);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}
.hero .subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.hero-cta {
  margin-top: 36px;
  display: inline-flex; gap: 16px;
  flex-wrap: wrap; justify-content: center;
}
.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--copper);
  color: var(--white);
  font-weight: 700; font-size: 0.95rem;
  border-radius: 50px;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(232,112,64,0.3);
}
.btn-primary:hover {
  background: var(--ember);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,112,64,0.4);
}
.btn-outline {
  display: inline-block;
  padding: 14px 36px;
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-weight: 600; font-size: 0.95rem;
  border-radius: 50px;
  transition: all var(--transition);
}
.btn-outline:hover {
  border-color: var(--copper);
  color: var(--copper);
}

/* ---- Section ---- */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: 2rem; font-weight: 800;
  color: var(--charcoal); margin-bottom: 12px;
}
.section-header .section-line {
  width: 60px; height: 3px;
  background: var(--copper);
  margin: 0 auto 16px;
  border-radius: 2px;
}
.section-header p {
  font-size: 1rem; color: var(--text-light);
  max-width: 600px; margin: 0 auto;
}
.section-alt { background: var(--white); }
.section-dark {
  background: var(--charcoal);
  color: rgba(255,255,255,0.85);
}

/* ---- Stats ---- */
.stats-bar {
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--graphite) 100%);
  padding: 48px 24px;
}
.stats-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem; font-weight: 800;
  color: var(--copper);
  line-height: 1.2;
}
.stat-label {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* ---- Feature Cards ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
  border: 1px solid var(--stone-dark);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--copper), var(--ember));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 56px; height: 56px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--charcoal), var(--graphite));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.feature-card h3 {
  font-size: 1.15rem; font-weight: 700;
  color: var(--charcoal); margin-bottom: 10px;
}
.feature-card p {
  font-size: 0.9rem; color: var(--text-light);
  line-height: 1.7;
}

/* ---- Topics Grid ---- */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.topic-card {
  display: flex; align-items: center; gap: 18px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--stone-dark);
  transition: all var(--transition);
}
.topic-card:hover {
  transform: translateX(4px);
  border-color: var(--copper);
  box-shadow: var(--shadow-md);
}
.topic-number {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--charcoal);
  color: var(--copper);
  font-family: var(--font-heading);
  font-size: 1rem; font-weight: 800;
  border-radius: 10px;
}
.topic-info h3 { font-size: 1rem; font-weight: 700; color: var(--charcoal); margin-bottom: 2px; }
.topic-info h3 a { color: var(--charcoal); }
.topic-info h3 a:hover { color: var(--copper-dark); }
.topic-info p { font-size: 0.82rem; color: var(--text-light); }

/* ---- News ---- */
.news-list { display: grid; gap: 16px; }
.news-item {
  display: flex; gap: 18px; padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--stone-dark);
  transition: all var(--transition);
}
.news-item:hover { border-color: var(--copper-light); box-shadow: var(--shadow-sm); }
.news-date { flex-shrink: 0; width: 72px; text-align: center; }
.news-date .month { font-size: 0.72rem; color: var(--copper-dark); font-weight: 700; }
.news-date .day { font-size: 1.5rem; font-weight: 800; color: var(--charcoal); line-height: 1.2; }
.news-content h3 { font-size: 1rem; font-weight: 600; color: var(--charcoal); margin-bottom: 4px; }
.news-content p { font-size: 0.85rem; color: var(--text-light); }
.news-tag {
  display: inline-block; padding: 2px 10px;
  background: var(--stone); color: var(--graphite);
  font-size: 0.72rem; font-weight: 600;
  border-radius: 20px; margin-bottom: 6px;
}

/* ---- CTA ---- */
.cta-section {
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--graphite) 100%);
  padding: 80px 24px;
  text-align: center;
}
.cta-section h2 {
  font-size: 1.8rem; font-weight: 800;
  color: var(--white); margin-bottom: 16px;
}
.cta-section p {
  font-size: 1rem; color: rgba(255,255,255,0.7);
  max-width: 600px; margin: 0 auto 32px;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  padding: 64px 24px 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-about h3, .footer-col h4 {
  color: var(--white); font-size: 1rem;
  font-weight: 700; margin-bottom: 16px;
}
.footer-about .logo-sub { color: var(--copper-light); font-size: 0.8rem; }
.footer-about p { font-size: 0.88rem; line-height: 1.7; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--copper); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer-links a:hover { color: var(--copper); }

/* ---- Sub Pages ---- */
.page-hero {
  position: relative;
  height: 45vh; min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-top: 68px;
}
.page-hero .hero-bg::after {
  background: linear-gradient(180deg, rgba(28,28,30,0.45) 0%, rgba(28,28,30,0.8) 100%);
}
.page-hero h1 {
  position: relative; z-index: 2;
  font-family: var(--font-heading);
  font-size: 2.4rem; font-weight: 800;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000, 0 4px 8px rgba(0,0,0,0.5);
  text-align: center; padding: 0 24px;
}

.page-content {
  max-width: 1200px; margin: 0 auto;
  padding: 64px 24px;
}
.page-content h2 {
  font-size: 1.6rem; font-weight: 800;
  color: var(--charcoal);
  margin: 48px 0 20px;
  padding-left: 16px;
  border-left: 4px solid var(--copper);
}
.page-content h3 {
  font-size: 1.25rem; font-weight: 700;
  color: var(--graphite);
  margin: 32px 0 16px;
}
.page-content p { margin-bottom: 16px; line-height: 1.9; }
.page-content ul, .page-content ol {
  margin: 16px 0; padding-left: 24px; list-style: disc;
}
.page-content li { margin-bottom: 8px; line-height: 1.7; }
.page-content table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0; font-size: 0.92rem;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.page-content table th {
  background: var(--charcoal); color: var(--white);
  padding: 12px 16px; text-align: left; font-weight: 600;
}
.page-content table td {
  padding: 12px 16px; border-bottom: 1px solid var(--stone-dark);
}
.page-content table tr:nth-child(even) td { background: var(--stone); }
.page-content blockquote {
  margin: 24px 0; padding: 20px 24px;
  background: var(--stone);
  border-left: 4px solid var(--copper);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-light);
}

.glossary-link { color: var(--copper-dark); border-bottom: 1px dotted var(--copper-light); }
.glossary-link:hover { color: var(--copper); }

.breadcrumb {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 24px;
  font-size: 0.82rem; color: var(--text-light);
}
.breadcrumb a { color: var(--graphite); }
.breadcrumb a:hover { color: var(--copper-dark); }
.breadcrumb span { margin: 0 8px; color: var(--stone-dark); }

/* Animations */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .nav-main { display: none; }
  .hamburger { display: flex; }
  .mobile-overlay { display: block; }
  .hero { height: 60vh; min-height: 400px; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 0.95rem; }
  .page-hero { height: 35vh; min-height: 240px; }
  .page-hero h1 { font-size: 1.8rem; }
  .section { padding: 56px 20px; }
  .section-header h2 { font-size: 1.6rem; }
  .features-grid { grid-template-columns: 1fr; gap: 18px; }
  .topics-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
  .stat-number { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-content { padding: 40px 20px; }
  .page-content h2 { font-size: 1.35rem; }
  .news-item { flex-direction: column; gap: 10px; }
  .news-date { width: auto; text-align: left; display: flex; gap: 8px; align-items: baseline; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .stats-inner { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn-primary, .btn-outline { width: 100%; max-width: 280px; text-align: center; }
}

/* ---- Two Column Layout ---- */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.two-col-main {
  min-width: 0;
  overflow-x: hidden;
}
.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--stone-dark);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-widget h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.sidebar-widget ul {
  list-style: none;
}
.sidebar-widget li {
  margin-bottom: 8px;
}
.sidebar-widget a {
  font-size: 0.88rem;
  color: var(--copper);
  transition: color 0.3s;
}
.sidebar-widget a:hover {
  color: var(--copper-dark);
}
.sidebar-ad {
  margin-bottom: 20px;
  text-align: center;
}
.sidebar-ad img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .two-col-layout {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  .sidebar {
    order: -1;
    position: static;
  }
}
