/* Footer. Forest ground; every colour on it is one measured safe against it. */

.k-footer {
  background-color: var(--k-forest);
  color: var(--k-paper);
  padding-block: var(--k-space-7) var(--k-space-5);
  margin-top: var(--k-space-8);
}

.k-footer__grid {
  display: grid;
  gap: var(--k-space-6) var(--k-space-5);
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  align-items: start;
}

.k-footer__brand {
  font-family: var(--k-font-display);
  font-size: var(--k-size-h2);
  line-height: 1.15;
  color: var(--k-paper);
}

.k-footer__blurb {
  /* Body copy, explicitly. Without a size and family of its own this inherited
     the display face and set the brand column in 24px serif, which is why the
     footer read as unbalanced rather than composed. */
  font-family: var(--k-font-body);
  font-size: var(--k-size-small);
  line-height: 1.7;
  margin-top: var(--k-space-3);
  color: color-mix(in srgb, var(--k-paper) 78%, transparent);
  max-width: 34ch;
}

.k-footer__heading {
  font-size: var(--k-size-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--k-tracking-wide);
  color: var(--k-brass-on-forest);
  margin-bottom: var(--k-space-3);
}

.k-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.k-footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--k-paper);
  text-decoration: none;
}

.k-footer__list a:hover {
  color: var(--k-brass-on-forest);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/*
 * The footer navigation.
 *
 * It renders the shared .k-nav markup, whose link colour is ink for the
 * header's paper ground. On the footer's forest ground that measures 1.43:1 —
 * the links are effectively invisible. The `.k-footer__list` rules above were
 * written for markup no template ever emitted, so nothing was correcting it.
 *
 * The bug stayed hidden because no menu had been assigned to the footer
 * location, so this nav rendered nothing at all. It surfaced the moment it had
 * real links to show.
 *
 * Hover uses brass-on-forest (4.58:1), the lightened brass made for this
 * ground — not `brass`, which is a forbidden pair here.
 */
.k-footer .k-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--k-space-1) var(--k-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
 * The anchor carries the 48px target, not the span inside it.
 *
 * wp_nav_menu renders <a><span class="k-nav__link">, and the min-height lives
 * on the span — so the anchor, which is what a finger actually hits and what a
 * target-size audit measures, stayed at its 22px line box. The header never
 * showed this because its nav is display:none at the widths touch targets are
 * checked at.
 */
.k-footer .k-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.k-footer .k-nav__list a,
.k-footer .k-nav__list .k-nav__link {
  color: var(--k-paper);
  text-decoration: none;
}

.k-footer .k-nav__list a:hover .k-nav__link,
.k-footer .k-nav__list a:focus-visible .k-nav__link,
.k-footer .k-nav__list a[aria-current] .k-nav__link {
  color: var(--k-brass-on-forest);
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.k-footer__address {
  font-style: normal;
  color: color-mix(in srgb, var(--k-paper) 78%, transparent);
  line-height: 1.9;
}

.k-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--k-space-3);
  margin-top: var(--k-space-6);
  padding-top: var(--k-space-4);
  border-top: 1px solid color-mix(in srgb, var(--k-paper) 22%, transparent);
  font-size: var(--k-size-small);
  color: color-mix(in srgb, var(--k-paper) 72%, transparent);
}

.k-footer :focus-visible { outline-color: var(--k-brass-on-forest); }

@media (max-width: 60rem) {
  .k-footer__grid { grid-template-columns: 1fr 1fr; }
  .k-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 34rem) {
  .k-footer__grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
 * Mailing-list sign-up.
 *
 * The markup comes from the Kihara Subscribers plugin, which ships structural
 * CSS only and inherits colour deliberately, so the branded treatment lives
 * here with the rest of the footer's tokens.
 *
 * Everything sits on the forest ground, so text is paper and the control
 * borders are paper at low alpha. The submit button is NOT rose: rose is
 * reserved for the buy action, and a newsletter button competing with Add to
 * Cart is exactly the rationing failure the palette exists to prevent.
 * ---------------------------------------------------------------------- */
.kihara-subscribe {
  max-width: 34rem;
  margin-bottom: var(--k-space-6);
}

.kihara-subscribe__heading {
  font-size: var(--k-size-h3);
  margin: 0 0 var(--k-space-2);
  color: var(--k-paper);
}

.kihara-subscribe__blurb {
  font-size: var(--k-size-small);
  line-height: 1.7;
  margin: 0 0 var(--k-space-3);
  color: color-mix(in srgb, var(--k-paper) 78%, transparent);
}

/* The visible label is redundant beside the placeholder and the heading, but
   it stays in the DOM for assistive technology rather than being removed. */
.kihara-subscribe__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.kihara-subscribe__input {
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: var(--k-size-small);
  color: var(--k-paper);
  background-color: transparent;
  border: 1px solid color-mix(in srgb, var(--k-paper) 38%, transparent);
  border-radius: 0;
}

.kihara-subscribe__input::placeholder {
  color: color-mix(in srgb, var(--k-paper) 52%, transparent);
}

.kihara-subscribe__input:focus-visible {
  outline: 2px solid var(--k-brass-on-forest);
  outline-offset: 2px;
}

.kihara-subscribe__button {
  padding-inline: var(--k-space-4);
  font-family: inherit;
  font-size: var(--k-size-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--k-forest);
  background-color: var(--k-paper);
  border: 1px solid var(--k-paper);
  border-radius: 0;
  transition: background-color var(--k-duration) var(--k-ease), color var(--k-duration) var(--k-ease);
}

.kihara-subscribe__button:hover,
.kihara-subscribe__button:focus-visible {
  color: var(--k-paper);
  background-color: transparent;
}

.kihara-subscribe__button[disabled] {
  opacity: 0.6;
  cursor: default;
}

.kihara-subscribe__consent {
  font-size: var(--k-size-meta);
  line-height: 1.6;
  margin: var(--k-space-2) 0 0;
  color: color-mix(in srgb, var(--k-paper) 66%, transparent);
}

.kihara-subscribe__consent a {
  color: var(--k-brass-on-forest);
}

.kihara-subscribe__message {
  margin: var(--k-space-2) 0 0;
  font-size: var(--k-size-small);
  color: var(--k-paper);
}

/* Errors must not rely on colour alone, so the message is also prefixed. */
.kihara-subscribe__message.is-error::before {
  content: "! ";
  font-weight: 700;
}

.kihara-subscribe__message.is-error {
  color: var(--k-brass-on-forest);
}


/* -------------------------------------------------------------------------
 * Footer, built out.
 *
 * The stylesheet described a four-column footer long before the template
 * rendered one; these are the pieces that were missing rather than a new
 * design. The brand column carries the wordmark, the positioning line and the
 * address; the three link columns are derived from real configuration.
 * ---------------------------------------------------------------------- */
.k-footer__wordmark {
  margin: 0 0 var(--k-space-3);
  font-family: var(--k-font-display);
  font-size: var(--k-size-h3);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--k-paper);
}

.k-footer__address {
  font-family: var(--k-font-body);
  font-size: var(--k-size-small);
  font-style: normal;
  line-height: 1.8;
  margin-top: var(--k-space-4);
}

.k-footer__address a {
  color: color-mix(in srgb, var(--k-paper) 78%, transparent);
  text-decoration: none;
  /* Tapping a phone number or an address is the point of them on a phone. */
  /* Set the minimum explicitly. Padding arithmetic against a 1.8 line-height
     landed at 47px — near enough to look right and still fail the check. */
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.k-footer__address a:hover,
.k-footer__address a:focus-visible {
  color: var(--k-brass-on-forest);
}

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

.k-footer__list li + li {
  margin-top: 0.15rem;
}

/*
 * Footer links are navigation controls, so they carry the full target size
 * rather than an exemption. The minimums are set explicitly instead of tuned
 * through padding: a short label like "Shop" measured 43px wide and the rows
 * 47px tall, both just under, and both would drift again with any type change.
 */
.k-footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  min-width: 48px;
}

/* The base row: copyright on one side, origin on the other, separated by the
   same hairline used everywhere else. */
.k-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--k-space-2) var(--k-space-5);
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--k-space-6);
  padding-top: var(--k-space-4);
  border-top: 1px solid color-mix(in srgb, var(--k-paper) 22%, transparent);
}

.k-footer__base p {
  margin: 0;
  font-size: var(--k-size-meta);
  color: color-mix(in srgb, var(--k-paper) 72%, transparent);
}

.k-footer__origin {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 60rem) {
  .k-footer__grid { grid-template-columns: 1fr 1fr; }
  .k-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 34rem) {
  .k-footer__grid { grid-template-columns: 1fr; }
  .k-footer__base { flex-direction: column; }
}
