/* ========================================
   FOOTER - バランスの取れたデザイン
   ======================================== */
@layer base, layout, components, utilities, pages;

@layer components {

/* ========================================
   フッターメインコンテナ
   ======================================== */

.im-footer {
  position: relative;
  background: linear-gradient(180deg, #fafbfc 0%, #f8f9fa 50%, #ffffff 100%);
  color: var(--color-text-strong);
  margin-top: 0;
  overflow: hidden;
}

/* 上部の青→赤グラデーションライン */
.im-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.15);
}

/* ========================================
   上段: ブランド + ディレクトリナビゲーション
   ======================================== */

.footer-main {
  padding: clamp(60px, 8vw, 80px) 0 clamp(48px, 6vw, 64px);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 6vw, 80px);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .footer-inner {
    grid-template-columns: 1fr 2fr;
    gap: clamp(60px, 8vw, 100px);
  }
}

/* ========================================
   ブランドセクション（左側）- コンパクト
   ======================================== */

.footer-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
}

/* 左側の青→赤縦線アクセント */
.footer-brand::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  opacity: 0.8;
}

.footer-logo {
  padding-left: 24px;
}

.footer-logo a {
  display: inline-block;
  transition: transform 0.3s ease;
}

.footer-logo a:hover {
  transform: scale(1.03);
}

.footer-logo img {
  height: clamp(52px, 6vw, 80px);
  width: auto;
}

.site-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--color-text-strong);
  margin: 0;
}

.footer-tagline {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
  line-height: 1.6;
  letter-spacing: 0.02em;
  padding-left: 24px;
}

/* CTAボタン */
.footer-cta {
  padding-left: 24px;
}

.footer-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, #dc2626 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  border: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.25);
}

.footer-cta-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-cta-button:hover {
  transform: translateY(-3px) scale(1.02);
  background: linear-gradient(135deg, var(--color-primary) 0%, #3b82f6 100%);
  box-shadow: 0 16px 40px rgba(30, 64, 175, 0.35);
}

.footer-cta-button:hover::before {
  opacity: 1;
}

.footer-cta-button__icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.footer-cta-button:hover .footer-cta-button__icon {
  transform: translateX(8px);
}

.footer-cta-button__text {
  position: relative;
  z-index: 1;
}

/* ========================================
   ディレクトリナビゲーション（右側）
   ======================================== */

.footer-directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(28px, 4vw, 40px);
}

@media (min-width: 640px) {
  .footer-directory {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .footer-directory {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-dir-col {
  min-width: 0;
}

.footer-dir-section {
  padding: 0;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
}

.footer-dir-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
  font-size: 15px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  color: var(--color-text-strong);
  cursor: pointer;
  letter-spacing: 0.02em;
  position: relative;
}

.footer-dir-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.15) 0%, transparent 100%);
  transition: background 0.3s ease;
}

.footer-dir-section:hover .footer-dir-title::after {
  background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
}

.footer-dir-title-text {
  position: relative;
}

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

.footer-dir-item {
  margin: 0;
}

.footer-dir-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 6px 0;
}

.footer-dir-link::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-dir-link:hover {
  color: var(--color-primary);
  padding-left: 20px;
}

.footer-dir-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   中段: 会社情報 + Map + 運営会社 (2025 Bento Style)
   ======================================== */

.footer-info {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: clamp(56px, 8vw, 88px) 0;
  position: relative;
  overflow: hidden;
}

/* Subtle mesh gradient background */
.footer-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(30, 64, 175, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(185, 28, 28, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.footer-info-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .footer-info-inner {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
  }
}

@media (min-width: 1024px) {
  .footer-info-inner {
    grid-template-columns: 1fr 1.5fr 0.9fr;
    grid-template-rows: 1fr;
    gap: 24px;
  }
}

/* Bento Card Base */
.footer-info-inner > * {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.02),
    0 4px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-info-inner > *:hover {
  border-color: rgba(30, 64, 175, 0.12);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.02),
    0 8px 32px rgba(30, 64, 175, 0.08);
  transform: translateY(-6px);
}

/* ========================================
   会社情報カード
   ======================================== */
.footer-company {
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 5vw, 44px);
  position: relative;
  overflow: hidden;
}

/* Accent line top */
.footer-company::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary, #1e40af) 0%, var(--color-secondary, #b91c1c) 100%);
  border-radius: 24px 24px 0 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.footer-company:hover::before {
  opacity: 1;
}

.footer-company__title {
  font-family: var(--font-display-en, 'Bebas Neue', sans-serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary, #1e40af);
  margin: 0 0 clamp(24px, 3vw, 32px);
  opacity: 0.7;
}

.footer-company__addr {
  font-style: normal;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--color-text-strong, #0f172a);
  line-height: 2;
  margin: 0 0 clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.footer-company__contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
}

.footer-company__tel,
.footer-company__hours {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.footer-company__tel {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.04) 0%, rgba(30, 64, 175, 0.02) 100%);
  border-radius: 14px;
  transition: all 0.4s ease;
  position: relative;
}

.footer-company__tel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.15), rgba(185, 28, 28, 0.1)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.footer-company__tel:hover {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.08) 0%, rgba(30, 64, 175, 0.04) 100%);
}

.footer-company__tel:hover::after {
  opacity: 1;
}

.footer-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary, #1e40af);
}

.footer-company__tel a {
  color: var(--color-text-strong, #0f172a);
  text-decoration: none;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.footer-company__tel:hover a {
  color: var(--color-primary, #1e40af);
}

.footer-company__hours {
  font-size: 13px;
  color: var(--color-text-muted, #64748b);
  font-weight: 500;
  padding-left: 6px;
}

.footer-company__hours .footer-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

/* ========================================
   マップカード
   ======================================== */
.footer-map {
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-map {
    grid-column: 1 / -1;
  }
}

.footer-map__wrapper {
  position: relative;
  width: 100%;
  min-height: 240px;
  overflow: hidden;
  border-radius: 24px;
}

@media (min-width: 1024px) {
  .footer-map__wrapper {
    min-height: 100%;
  }
}

/* Elegant vignette overlay */
.footer-map__wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.15) 0%, transparent 15%);
  z-index: 1;
  pointer-events: none;
}

/* Corner badge */
.footer-map__wrapper::after {
  content: 'ACCESS';
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: var(--font-display-en, 'Bebas Neue', sans-serif);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--color-primary, #1e40af);
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 2;
  font-weight: 400;
}

.footer-map__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-map:hover .footer-map__wrapper iframe {
  transform: scale(1.02);
}

/* ========================================
   運営会社カード
   ======================================== */
.footer-operator {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  padding: clamp(32px, 5vw, 44px);
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-operator {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
}

/* Decorative gradient circle */
.footer-operator::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.footer-operator__label {
  font-family: var(--font-display-en, 'Bebas Neue', sans-serif);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted, #64748b);
  margin: 0;
  padding: 0;
  background: none;
}

.footer-operator__link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}

.footer-operator__link:hover {
  border-color: var(--color-primary, #1e40af);
  box-shadow:
    0 4px 20px rgba(30, 64, 175, 0.12),
    0 0 0 3px rgba(30, 64, 175, 0.06);
  transform: translateY(-3px);
}

.footer-operator__logo {
  height: clamp(28px, 3.5vw, 36px);
  width: auto;
  transition: transform 0.4s ease;
}

.footer-operator__link:hover .footer-operator__logo {
  transform: scale(1.05);
}

.footer-operator__icon {
  color: var(--color-primary, #1e40af);
  flex-shrink: 0;
  opacity: 0.5;
  transition: all 0.4s ease;
}

.footer-operator__link:hover .footer-operator__icon {
  opacity: 1;
  transform: translate(4px, -4px);
}

/* ========================================
   下段: フッターボトム
   ======================================== */

.footer-bottom {
  background: linear-gradient(180deg, #f1f3f5 0%, #e9ecef 100%);
  padding: clamp(28px, 4vw, 40px) 0;
  position: relative;
}

.footer-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, transparent 50%, var(--color-secondary) 100%);
  opacity: 0.3;
}

.footer-bottom-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 32px);
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-bottom-menu {
    justify-content: flex-start;
  }
}

.footer-bottom-menu li {
  margin: 0;
}

.footer-bottom-menu a {
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 3px;
}

.footer-bottom-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-bottom-menu a:hover {
  color: var(--color-primary);
}

.footer-bottom-menu a:hover::after {
  width: 100%;
}

.footer-bottom-copyright {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ========================================
   レスポンシブ調整
   ======================================== */

@media (max-width: 640px) {
  .footer-map__wrapper {
    max-width: 100%;
  }
}

}
