/* footer.css */
:root {
  --footer-bg: #0f172a;        /* ダーク紺 */
  --footer-fg: #e5e7eb;        /* 明るい文字色 */
  --footer-muted: #64748b;     /* サブ文字色 */
  --footer-accent: #ff4040;    /* アクセント（ボタンなど） */
  --footer-accent-2: #94a3b8;  /* セカンダリボタン */
  --footer-link: #fff;
  --focus-ring: 2px solid #ff4040;
  --maxw: 1200px;
  --gap: 24px;
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  margin-top: 64px;
}

.site-footer a {
  color: var(--footer-link);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer :focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas:
    "brand cta"
    "nav nav"
    "subnav subnav"
    "contact contact"
    "backtotop copyright";
  gap: var(--gap);
}

.footer-brand {
  grid-area: brand;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.4px;
}

.logo-text {
  display: inline-block;
}

.brand-subtitle {
  margin: 6px 0 0;
  color: var(--footer-muted);
  font-size: 14px;
}

.footer-cta {
  grid-area: cta;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--footer-accent);
  color: #0f172a;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #ff4040;
}

.btn-secondary {
  background: transparent;
  color: var(--footer-fg);
  border-color: var(--footer-accent-2);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: #ffffff;
  color: #ffffff;
}

.footer-nav {
  grid-area: nav;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 16px 0;
}

.footer-menu,
.footer-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-subnav {
  grid-area: subnav;
  padding-bottom: 8px;
}

.footer-contact {
  grid-area: contact;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--footer-muted);
  font-size: 14px;
}

.contact-label {
  margin: 0;
}

.contact-email {
  font-weight: 600;
}

.separator {
  color: var(--footer-muted);
}

.footer-backtotop {
  grid-area: backtotop;
}

.backtotop-link {
  display: inline-block;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
}

.backtotop-link:hover,
.backtotop-link:focus {
  border-color: #ffffff;
}

.footer-copyright {
  grid-area: copyright;
  text-align: right;
  color: var(--footer-muted);
}

.footer-copyright small {
  font-size: 13px;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "cta"
      "nav"
      "subnav"
      "contact"
      "backtotop"
      "copyright";
  }
  .footer-copyright {
    text-align: left;
  }
  .footer-cta {
    justify-content: flex-start;
  }
}

/* 印刷時は背景色を薄く、リンク下線を維持 */
@media print {
  .site-footer {
    background: #f3f4f6;
    color: #111827;
  }
  .site-footer a {
    color: #111827;
    text-decoration: underline;
  }
}
