/* Top utility bar + main masthead + secondary category ribbon. */

/* ---------- TOP UTILITY ---------- */
.topbar {
  background: var(--green-700);
  color: #F6F1E8;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 9px 0;
  position: relative;
  z-index: 20;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.topbar .dateline { opacity: .85; }
.topbar .issue {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: .9;
  flex: 1;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .issue .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--green-100);
  flex: none;
}
.topbar .tools {
  display: flex;
  gap: 18px;
  align-items: center;
}
.topbar .tools button,
.topbar .tools a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #F6F1E8;
  opacity: .9;
}
.topbar .tools button:hover,
.topbar .tools a:hover { opacity: 1; color: #F6F1E8; }
.topbar .tools .wc-icon { width: 14px; height: 14px; }

/* ---------- MASTHEAD ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 19;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .3s var(--ease);
}
.masthead.is-condensed {
  box-shadow: 0 1px 0 var(--rule), 0 8px 24px -18px rgba(0, 0, 0, .15);
}
.mast-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 0 18px;
  transition: padding .3s var(--ease);
}
.masthead.is-condensed .mast-row { padding: 12px 0; }

.mast-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}
.mast-nav a {
  position: relative;
  padding: 4px 2px;
  color: var(--ink);
  transition: color .2s var(--ease);
}
.mast-nav a:hover { color: var(--green-700); }
.mast-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--green-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.mast-nav a:hover::after,
.mast-nav .current-menu-item > a::after,
.mast-nav .current-menu-parent > a::after { transform: scaleX(1); }

/* WP menu items render as <li> by default; neutralize them */
.mast-nav ul {
  list-style: none;
  padding: 0; margin: 0;
  display: contents;
}

.wordmark {
  font-family: var(--display);
  font-size: clamp(32px, 4.2vw, 54px);
  letter-spacing: .005em;
  color: var(--green-700);
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
  transition: font-size .3s var(--ease);
}
.masthead.is-condensed .wordmark { font-size: 28px; }
.wordmark img {
  max-height: 1em;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.mast-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.icon-btn:hover {
  background: var(--green-700);
  color: #fff;
  border-color: var(--green-700);
}
.icon-btn .wc-icon { width: 16px; height: 16px; }

.btn-subscribe {
  background: var(--pink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .25s var(--ease), background .2s var(--ease);
}
.btn-subscribe:hover {
  transform: translateY(-1px);
  background: var(--pink-deep);
  color: #fff;
}
.btn-subscribe .wc-icon { width: 14px; height: 14px; }

.hamburger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.hamburger .wc-icon { width: 18px; height: 18px; }

/* ---------- SECONDARY RIBBON (homepage + selective pages) ---------- */
.catbar { border-top: 1px solid var(--rule); }
.catbar-wrap { position: relative; }
.catbar-wrap::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, rgba(246, 241, 232, 0), var(--cream));
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.catbar-wrap.is-scrollable::after { opacity: 1; }

.catbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 11px var(--gutter);
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 13px;
  letter-spacing: .02em;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}
.catbar-inner::-webkit-scrollbar { display: none; }

.catbar a {
  white-space: nowrap;
  color: var(--ink-2);
  transition: color .2s var(--ease);
}
.catbar a:hover { color: var(--green-700); }

.catbar .label {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}
.catbar .dot {
  width: 3px; height: 3px;
  background: var(--rule);
  border-radius: 50%;
  flex: none;
}
.catbar .pill {
  background: var(--green-100);
  color: var(--green-900);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- MOBILE MENU (slides in from hamburger) ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--cream);
  padding: 80px var(--gutter) 40px;
  transform: translateX(-100%);
  transition: transform .35s var(--ease);
  overflow-y: auto;
  visibility: hidden;
}
.mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}
.mobile-menu .close {
  position: absolute;
  top: 22px; right: 22px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu a {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.15;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  display: block;
}
.mobile-menu a:hover { color: var(--green-700); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .topbar .dateline { display: none; }
  .mast-nav { display: none; }
  .hamburger { display: inline-flex; }
  .mast-right .icon-btn[data-hide-mobile] { display: none; }
  .btn-subscribe span { display: none; }
  .btn-subscribe { padding: 10px 12px; }
  .mast-row { grid-template-columns: auto 1fr auto; }
  .wordmark { justify-self: center; }
}
