/* Core layout */
:root {
  --color-bg: #f6f5f2;
  --color-card: #ffffff;
  --color-accent: #2d3a8c;
  --color-accent-light: #5062c4;
  --color-text: #1f1f1f;
  --color-muted: #6b6f7b;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 18px 45px rgba(13, 18, 54, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navigation */
header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px clamp(20px, 5vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  font-weight: 500;
  color: var(--color-muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
}

/* Hero */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px clamp(20px, 5vw, 40px) 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
  align-items: center;
}

.hero-card {
  background: linear-gradient(135deg, #1b1f46, #626dd5);
  color: #fff;
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-card h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin: 0 0 16px;
}

.hero-card p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-card .cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 12px 25px rgba(8, 14, 55, 0.18);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-image {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.hero-image h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--color-accent);
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.badge {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--color-bg);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 40px);
}

.section h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.section p.lead {
  color: var(--color-muted);
  margin-top: 0;
  margin-bottom: 32px;
}

.lang-block {
  margin-bottom: 18px;
}

.lang-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.lang-label::before {
  content: "";
  width: 12px;
  height: 2px;
  background: rgba(0, 0, 0, 0.2);
}

.lang-text {
  margin: 6px 0 0;
}

.lang-text[lang="en"] {
  color: var(--color-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-card);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(16, 21, 40, 0.08);
}

.card-link {
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(16, 21, 40, 0.15);
}

.card-link:active {
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
}

.tag {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(80, 98, 196, 0.12);
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.list strong {
  display: block;
  font-size: 1.05rem;
}

.stat-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  background: #fff;
  padding: 18px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--color-muted);
}

.stat span {
  display: block;
  font-size: 2rem;
  color: var(--color-accent);
}

/* Footer */
footer {
  margin-top: auto;
  background: #101226;
  color: rgba(255, 255, 255, 0.8);
  padding: 48px clamp(20px, 5vw, 40px);
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
}

.footer-links a:hover {
  color: #fff;
}

.newsletter {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
}

.newsletter input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.newsletter button {
  width: 100%;
  border: none;
  cursor: pointer;
}

@media (max-width: 640px) {
  /* スマホ: スクロール時にヘッダーを非表示 */
  header.header-hidden {
    transform: translateY(-100%);
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* スマホ: ロゴの改行を無効化 */
  .logo br {
    display: none;
  }

  /* スマホ: 英語表記を非表示 */
  .logo-en {
    display: none;
  }

  /* スマホ: ナビゲーションリンクの英語表記を非表示 */
  .nav-en {
    display: none;
  }

  /* スマホ: ナビゲーションリンクを横並びで表示（幅を超える場合は改行） */
  .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 16px;
  }

  .nav-links a {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* スマホ: 言語切り替えボタンのテキストを短縮 */
  .lang-toggle-btn {
    position: relative;
    font-size: 0 !important;
    line-height: 1;
    text-indent: -9999px;
    overflow: visible;
  }

  .lang-toggle-btn::after {
    content: attr(data-short);
    font-size: 0.875rem;
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    text-indent: 0;
    font-weight: 500;
  }

  .hero-card,
  .hero-image {
    padding: 32px;
  }
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 16px;
}

.lang-toggle-btn {
  padding: 6px 12px;
  border: 1px solid var(--color-muted);
  background: #fff;
  color: var(--color-muted);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.lang-toggle-btn.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.lang-toggle-btn.active:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
}

