/* Footer — Doog Kaizen Design System */

/* ── Design tokens ── */
:root {
  --c-primary:       #069A44;
  --c-primary-60:    #38B86A;
  --c-primary-dark:  #047A35;
  --c-surface:       #FAF9F5;
  --c-on-surface:    #141413;
  --c-muted:         #6B7580;
  --c-border:        #8A9199;
  --max-w:           1280px;
  --gutter:          32px;
  --r-sm:            4px;
  --ease-precision:  cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast:        150ms;
  --font-jp:         'Yu Gothic', 'YuGothic', 'Meiryo', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  --fleet-travel:    1000px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FOOTER */

/* Scope box-sizing reset so the old theme's content-box default doesn't bleed in */
.site-footer,
.site-footer * {
  box-sizing: border-box;
}

/* Undo the old theme's blanket a:hover { opacity: .6 } for all footer links */
.site-footer a:hover {
  opacity: 1;
}

.site-footer {
  background-color: var(--c-surface);
  color: var(--c-on-surface);
  border-top: 1px solid var(--c-border);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
}

.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Body: 4 columns ── */

.footer-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 240px;
  gap: 0 48px;
  padding-top: 40px;
  padding-bottom: 32px;
}

/* Nav group */

.footer-nav__label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--c-muted);
  margin-bottom: 18px;
}

.footer-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav__link {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--c-on-surface);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-precision);
  display: inline-block;
}

.footer-nav__link:hover { color: var(--c-primary); }

.footer-nav__link:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Brand column: logo + addresses */

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-logo {
  display: block;
  line-height: 0;
}

.footer-logo img {
  height: 56px;
  width: auto;
  max-width: 100%;
  display: block;
}

.footer-addresses {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-style: normal;
}

.address-item { display: flex; flex-direction: column; gap: 3px; }

.address-item__name {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--c-on-surface);
}

.address-item__street {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--c-muted);
}

.address-item__map {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--c-primary);
  text-decoration: none;
  margin-top: 4px;
  transition: color var(--dur-fast) var(--ease-precision);
}

.address-item__map:hover { color: var(--c-primary); text-decoration: underline; }

.address-item__map:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── Bottom bar ── */

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 24px;
  gap: 16px;
}

/* Social */

.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-social__label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--c-muted);
  margin-right: 2px;
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  color: var(--c-muted);
  text-decoration: none;
  transition:
    color            var(--dur-fast) var(--ease-precision),
    background-color var(--dur-fast) var(--ease-precision);
}

.footer-social__link:hover {
  color: var(--c-on-surface);
  background-color: rgba(20, 20, 19, 0.06);
}

.footer-social__link:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

/* Legal */

.footer-legal {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-legal__link {
  font-size: 13px;
  font-weight: 400;
  color: var(--c-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-precision);
}

.footer-legal__link:hover { color: var(--c-on-surface); }

.footer-legal__link:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.footer-legal__divider {
  width: 1px;
  height: 12px;
  background: var(--c-border);
  flex-shrink: 0;
}

.footer-copyright {
  font-size: 13px;
  font-weight: 400;
  color: var(--c-muted);
}

/* ── Duck parade ── */

.footer-duck-parade {
  position: relative;
  height: 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}

.duck-fleet {
  position: absolute;
  bottom: 14px;
  left: 0;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  animation: fleet-pingpong 60s linear infinite;
}

.duck-fleet img {
  display: block;
  width: auto;
  transform: scaleX(-1);
}

@keyframes fleet-pingpong {
  0%     { transform: translateX(0)                    scaleX(1);  }
  49.99% { transform: translateX(var(--fleet-travel))  scaleX(1);  }
  50%    { transform: translateX(var(--fleet-travel))  scaleX(-1); }
  100%   { transform: translateX(0)                    scaleX(-1); }
}

/* ── Responsive: ≤ 1024px ── */

@media (max-width: 1024px) {
  :root { --fleet-travel: 720px; }

  .footer-body {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 8px;
  }
}

/* ── Responsive: ≤ 640px ── */

@media (max-width: 640px) {
  :root { --gutter: 20px; --fleet-travel: 380px; }

  .footer-body {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
    padding-top: 48px;
    padding-bottom: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 32px;
  }

  .footer-nav__link {
    padding: 9px 0;
  }
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .footer-nav__link,
  .footer-social__link,
  .footer-legal__link,
  .address-item__map {
    transition: none;
  }

  .duck-fleet { animation: none; }
}

/* ── Japanese font overrides (Bogo adds .lang-ja to <body>) ── */

.lang-ja .footer-nav__label,
.lang-ja .footer-nav__link,
.lang-ja .footer-social__label,
.lang-ja .footer-legal__link,
.lang-ja .footer-copyright,
.lang-ja .address-item__name,
.lang-ja .address-item__street,
.lang-ja .address-item__map {
  font-family: var(--font-jp);
}
