/* ============================================================================
   Kyrza — site-wide chrome, loaded on EVERY page after the page's own CSS
   (hub, craft landings, Rosewood, and the journal engine).
   - .k-footer       the one global footer (markup stamped by _deploy/site-chrome.py)
   - .k-modal        the "Work with Kyrza" inquiry modal (site-global.js)
   - .build-sidebar  tightened Build Steps nav, shared by every journal
   Colors are fixed here (not page tokens) so the footer reads the same everywhere.
   ========================================================================= */

:root {
  --kf-bg:      #1a1714;
  --kf-bar:     #120f0d;
  --kf-text:    #e6d2c2;
  --kf-muted:   #a8988a;
  --kf-head:    #b07a58;
  --kf-accent:  #c8853f;
  --kf-accent-hover: #b3712f;
  --kf-line:    rgba(255, 255, 255, 0.08);
  --kf-serif:   "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --kf-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ----- Footer ----- */
.k-footer {
  background: var(--kf-bg); color: var(--kf-text);
  font-family: var(--kf-sans); font-size: 0.9rem; line-height: 1.5;
  margin-top: 0;
}
.k-footer a { color: var(--kf-text); text-decoration: none; }
.k-footer a:hover { color: #fff; }
.k-footer-main {
  display: grid; grid-template-columns: 1.4fr 0.7fr 1.6fr 1fr; gap: 2.5rem;
  padding-top: 3rem; padding-bottom: 2.5rem; align-items: start;
}
.k-footer-logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.k-footer-logo img { height: 30px; width: auto; opacity: 0.92; }
.k-footer-logo span {
  font-family: var(--kf-serif); color: #f6efe7; font-size: 1.15rem;
  font-weight: 600; letter-spacing: 0.14em;
}
.k-footer-brand p { margin: 0.9rem 0 1.2rem; color: var(--kf-muted); max-width: 30ch; }
.k-footer-cta {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 600 0.88rem/1 var(--kf-sans); color: #fff; background: var(--kf-accent);
  border: 0; border-radius: 999px; padding: 0.7rem 1.2rem; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.k-footer-cta:hover { background: var(--kf-accent-hover); transform: translateY(-1px); }
.k-footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.k-footer-col h4 {
  font: 600 0.72rem/1 var(--kf-sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--kf-head); margin: 0.4rem 0 0.55rem;
}
.k-footer-col a[aria-current="page"],
.k-footer-col a.is-here { color: #fff; font-weight: 600; }
.k-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Build-journal links: one line, with a W / B / L craft badge that names the craft on hover */
.k-journal { position: relative; display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap; }
.k-badge {
  --kb: var(--kf-accent);
  position: relative; flex: none;
  display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem;
  border-radius: 4px; background: var(--kb); color: #fff;
  font: 700 0.66rem/1 var(--kf-sans); letter-spacing: 0;
}
.k-woodworking .k-badge { --kb: #c8853f; }
.k-blades      .k-badge { --kb: #5b7a94; }
.k-leather     .k-badge { --kb: #9c5a3c; }
.k-badge::after {
  content: attr(data-tip);
  /* centered above the badge */
  position: absolute; left: 50%; bottom: calc(100% + 6px);
  transform: translate(-50%, 3px);
  padding: 0.28rem 0.55rem; border-radius: 5px;
  background: var(--kb); color: #fff;
  font: 600 0.7rem/1 var(--kf-sans); letter-spacing: 0.04em; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); z-index: 2;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.k-journal:hover .k-badge::after,
.k-journal:focus-visible .k-badge::after { opacity: 1; transform: translate(-50%, 0); }

.k-social { display: inline-flex; align-items: center; gap: 0.45rem; }
.k-social svg { width: 18px; height: 18px; flex: none; }
.k-footer-bar { border-top: 1px solid var(--kf-line); background: var(--kf-bar); }
.k-footer-bar .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem;
  padding-top: 1rem; padding-bottom: 1rem;
  font-size: 0.8rem; color: var(--kf-muted);
}
.k-footer-bar a { color: var(--kf-muted); }
.k-footer-bar a:hover { color: #fff; }
.k-footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.1rem; }

@media (max-width: 900px) {
  .k-footer-main { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .k-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .k-footer-main { grid-template-columns: 1fr; }
  .k-footer-bar .container { flex-direction: column; align-items: flex-start; }
}

/* ----- Inquiry modal ----- */
.k-modal {
  border: 0; padding: 0; margin: auto;
  width: min(640px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  border-radius: 16px; background: #f6efe7; color: #1a1714;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.k-modal::backdrop { background: rgba(18, 15, 13, 0.62); backdrop-filter: blur(3px); }
.k-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1rem 0.85rem 1.25rem; background: #2b1712; color: #f6efe7;
}
.k-modal-head strong { font: 600 1rem/1.2 var(--kf-serif); letter-spacing: 0.14em; }
.k-modal-close {
  width: 36px; height: 36px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1.3rem; line-height: 1;
}
.k-modal-close:hover { background: rgba(255, 255, 255, 0.2); }
.k-modal-body { position: relative; height: min(720px, calc(100dvh - 2rem - 60px)); }
.k-modal-body iframe { display: block; width: 100%; height: 100%; border: 0; background: #f6efe7; }
.k-modal-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #7a4a34; font: 500 0.9rem var(--kf-sans);
}
html.k-modal-open { overflow: hidden; }

/* ----- Build Steps nav (every journal): tighter, more solid ----- */
.build-sidebar { padding: 0.9rem 0.6rem; }
.build-sidebar h4 {
  font-size: 0.68rem; letter-spacing: 0.14em; margin: 0 0 0.5rem; padding: 0 0.55rem 0.55rem;
  border-bottom: 1px solid var(--line, #e2d5c6);
}
.build-sidebar a {
  gap: 0.5rem; padding: 0.36rem 0.55rem; border-radius: 6px;
  font-size: 0.8rem; line-height: 1.28;
}
.build-sidebar a .n {
  font-size: 0.72rem; min-width: 1.5em; font-variant-numeric: tabular-nums;
}
.build-sidebar li + li { margin-top: 1px; }
