/* =========================================================
   KIMAMA STAGE 10E.1
   Shared editorial footer / back cover
   ========================================================= */

:root {
  --kimama-footer-dark: #080c11;
  --kimama-footer-ivory: #f3efe6;
  --kimama-footer-muted: rgba(243, 239, 230, 0.56);
  --kimama-footer-gold: #b08b5b;
  --kimama-footer-line: rgba(176, 139, 91, 0.28);
}

/* ---------- Brand pre-footer ---------- */

.kimama-footer-intro {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: clamp(70px, 7vw, 108px) clamp(28px, 5vw, 76px) clamp(38px, 4vw, 58px);
  border-top: 1px solid var(--kimama-footer-line);
  background: var(--kimama-footer-dark);
  color: var(--kimama-footer-ivory);
}

.kimama-footer-intro__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(46px, 7vw, 110px);
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.kimama-footer-intro__eyebrow {
  margin: 0 0 16px;
  color: var(--kimama-footer-gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
}

.kimama-footer-intro__copy {
  max-width: 760px;
  margin: 0;
  color: var(--kimama-footer-ivory);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.kimama-footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kimama-footer-links li {
  display: flex;
  align-items: center;
  margin: 0;
}

.kimama-footer-links li + li::before {
  content: "";
  display: block;
  width: 1px;
  height: 18px;
  margin: 0 18px;
  background: rgba(243, 239, 230, 0.16);
}

.kimama-footer-links a {
  color: rgba(243, 239, 230, 0.7);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .kimama-footer-links a:hover {
    color: var(--kimama-footer-ivory);
  }
}

/* ---------- Cocoon footer shell ---------- */

#footer,
.footer,
.footer-container {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--kimama-footer-dark) !important;
  background-image: none !important;
  color: var(--kimama-footer-muted) !important;
  box-shadow: none !important;
}

#footer-in,
.footer-in {
  width: min(100% - 56px, 1480px) !important;
  max-width: 1480px !important;
  margin: 0 auto !important;
  padding: 0 0 max(28px, env(safe-area-inset-bottom)) !important;
  background: transparent !important;
}

/* Preserve footer widgets if the user enables them later,
   but make them belong to the same visual system. */
.footer-widgets,
.footer-widgets-mobile {
  margin: 0 !important;
  padding: 38px 0 !important;
  border-top: 1px solid rgba(243, 239, 230, 0.08);
  background: transparent !important;
  color: var(--kimama-footer-muted);
}

.footer-widgets a,
.footer-widgets-mobile a {
  color: rgba(243, 239, 230, 0.72) !important;
}

/* Brand and navigation are supplied by the custom back-cover block above. */
.footer-bottom-logo,
.navi-footer {
  display: none !important;
}

.footer-bottom {
  display: block !important;
  margin: 0 !important;
  padding: 20px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(243, 239, 230, 0.09) !important;
  background: transparent !important;
}

.footer-bottom-content {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
}

.footer-bottom .copyright,
.footer-bottom .source-org {
  margin: 0 !important;
  color: rgba(243, 239, 230, 0.42) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 9px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  letter-spacing: 0.08em !important;
}

/* ---------- HOME handoff ---------- */

/* HOME already finishes with its own ABOUT statement.
   Keep the footer as a quieter back cover rather than repeating that copy. */
body.home .kimama-footer-intro {
  padding-top: clamp(46px, 5vw, 68px);
}

body.home .kimama-footer-intro__copy {
  display: none;
}

body.home .kimama-footer-intro__inner {
  align-items: center;
}

body.home .kimama-footer-intro__eyebrow {
  margin-bottom: 0;
}

/* ---------- Mobile ---------- */

@media screen and (max-width: 834px) {
  .kimama-footer-intro {
    padding: 54px 20px 30px;
  }

  .kimama-footer-intro__inner {
    display: block;
  }

  .kimama-footer-intro__eyebrow {
    margin-bottom: 13px;
    font-size: 8px;
    letter-spacing: 0.20em;
  }

  .kimama-footer-intro__copy {
    max-width: 560px;
    font-size: clamp(25px, 7vw, 31px);
    line-height: 1.58;
  }

  .kimama-footer-links {
    justify-content: flex-start;
    margin-top: 34px;
  }

  .kimama-footer-links li + li::before {
    height: 15px;
    margin: 0 13px;
  }

  .kimama-footer-links a {
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  #footer-in,
  .footer-in {
    width: calc(100% - 40px) !important;
    padding-bottom: max(22px, env(safe-area-inset-bottom)) !important;
  }

  .footer-bottom {
    padding-top: 17px !important;
  }

  .footer-bottom-content {
    text-align: left !important;
  }

  .footer-bottom .copyright,
  .footer-bottom .source-org {
    font-size: 8px !important;
  }

  body.home .kimama-footer-intro {
    padding-top: 38px;
  }

  body.home .kimama-footer-links {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kimama-footer-intro *,
  #footer * {
    transition: none !important;
  }
}


/* =========================================================
   KIMAMA STAGE 10E.2
   HOME footer handoff polish
   - remove the white gap after HOME's ABOUT closing
   - make HOME footer more compact
   ========================================================= */

/* HOME's custom landing controls its own final spacing.
   Remove residual Cocoon/content-shell bottom space before the footer. */
body.home #content,
body.home .content,
body.home .content-in,
body.home .main,
body.home article.article,
body.home article.article > .article-body,
body.home .entry-content {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Some Cocoon layouts reserve space on the outer content wrapper. */
body.home #container,
body.home .container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Join the dark ABOUT closing directly to the dark back cover. */
body.home .kimama-footer-intro {
  margin-top: 0 !important;
  padding-top: 28px;
  padding-bottom: 22px;
  border-top-color: rgba(243, 239, 230, 0.08);
}

body.home .kimama-footer-intro__inner {
  min-height: 54px;
}

body.home .kimama-footer-links {
  margin-top: 0;
}

/* Keep the native copyright strip compact on HOME. */
body.home #footer-in,
body.home .footer-in {
  padding-bottom: max(18px, env(safe-area-inset-bottom)) !important;
}

body.home .footer-bottom {
  padding-top: 14px !important;
}

/* ---------- Mobile ---------- */

@media screen and (max-width: 834px) {
  body.home .kimama-footer-intro {
    padding-top: 24px;
    padding-bottom: 20px;
  }

  body.home .kimama-footer-intro__inner {
    min-height: 0;
  }

  body.home .kimama-footer-links {
    margin-top: 18px;
  }
}
