/**
 * Rhino Remarks child theme — site-wide header & footer.
 *
 * Consumes the brand custom properties defined in style.css (--rr-black,
 * --rr-green, etc.). Enqueued after the child stylesheet so those vars resolve.
 */

/* ── Skip link ────────────────────────────────────────────────────────────── */
.rr-skip-link {
  background: var(--rr-green);
  border-radius: var(--rr-radius);
  color: var(--rr-black);
  font-weight: 800;
  left: 12px;
  padding: 10px 16px;
  position: absolute;
  top: -100px;
  z-index: 1000;
  transition: top var(--rr-transition);
}

.rr-skip-link:focus {
  top: 12px;
}

/* ── Header bar ───────────────────────────────────────────────────────────── */
.rr-header {
  background: var(--rr-black);
  border-bottom: 4px solid var(--rr-green);
  box-shadow: 0 10px 30px rgba(6, 6, 6, 0.12);
  position: relative;
  width: 100%;
  z-index: 100;
}

.rr-header__inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1200px;
  padding: 14px 28px;
  width: 100%;
}

.rr-header__brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 0;
}

.rr-header__logo {
  display: block;
  height: 52px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

/* ── Desktop menu ─────────────────────────────────────────────────────────── */
.rr-primary-nav {
  min-width: 0;
}

.rr-menu {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2vw, 30px);
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rr-menu li {
  line-height: 1.2;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.rr-menu a {
  color: var(--rr-white);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 8px 0;
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--rr-transition);
  white-space: nowrap;
}

.rr-menu a:hover,
.rr-menu a:focus,
.rr-menu .current-menu-item > a,
.rr-menu .current_page_item > a {
  color: var(--rr-green);
}

.rr-menu .current-menu-item > a,
.rr-menu .current_page_item > a {
  box-shadow: inset 0 -3px 0 var(--rr-green);
}

/* ── Hamburger toggle (hidden on desktop) ─────────────────────────────────── */
.rr-nav-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: none;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 44px;
}

.rr-nav-toggle:focus-visible {
  outline: 2px solid var(--rr-green);
  outline-offset: 3px;
}

.rr-nav-toggle__bar {
  background: var(--rr-white);
  border-radius: 2px;
  display: block;
  height: 3px;
  left: 50%;
  margin-left: -11px;
  position: absolute;
  transition: transform var(--rr-transition), opacity var(--rr-transition);
  width: 22px;
}

.rr-nav-toggle__bar:nth-child(1) {
  transform: translateY(-7px);
}

.rr-nav-toggle__bar:nth-child(3) {
  transform: translateY(7px);
}

.rr-nav-toggle[aria-expanded="true"] .rr-nav-toggle__bar:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.rr-nav-toggle[aria-expanded="true"] .rr-nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.rr-nav-toggle[aria-expanded="true"] .rr-nav-toggle__bar:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

/* ── Mobile navigation ────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .rr-header__inner {
    padding: 12px 18px;
  }

  .rr-header__logo {
    height: 44px;
  }

  .rr-nav-toggle {
    display: flex;
  }

  .rr-primary-nav {
    background: var(--rr-black);
    border-top: 4px solid var(--rr-green);
    box-shadow: var(--rr-shadow);
    display: none;
    left: 0;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 999;
  }

  .rr-primary-nav.is-open {
    display: block;
  }

  .rr-menu {
    align-items: stretch;
    display: block;
    padding: 6px 0;
  }

  .rr-menu li {
    width: 100%;
  }

  .rr-menu a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
    padding: 14px 22px;
    width: 100%;
  }

  .rr-menu li:last-child a {
    border-bottom: 0;
  }

  .rr-menu .current-menu-item > a,
  .rr-menu .current_page_item > a {
    box-shadow: inset 4px 0 0 var(--rr-green);
  }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.rr-site-footer {
  background: var(--rr-black);
  color: var(--rr-white);
}

.rr-site-footer__inner {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin: 0 auto;
  max-width: 1200px;
  padding: 56px 28px 40px;
  width: 100%;
}

.rr-site-footer__brand-link {
  display: inline-block;
  line-height: 0;
}

.rr-site-footer__logo {
  display: block;
  height: 54px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.rr-site-footer__tagline {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 18px 0 0;
  max-width: 44ch;
}

.rr-site-footer__heading {
  color: var(--rr-white);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

.rr-site-footer__menu,
.rr-site-footer__social-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rr-site-footer__menu li,
.rr-site-footer__social-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rr-site-footer a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--rr-transition);
}

.rr-site-footer a:hover,
.rr-site-footer a:focus {
  color: var(--rr-green);
}

.rr-site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.rr-site-footer__copy {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 0 auto;
  max-width: 1200px;
  padding: 20px 28px;
  text-align: center;
  width: 100%;
}

@media (max-width: 860px) {
  .rr-site-footer__inner {
    gap: 34px;
    grid-template-columns: 1fr 1fr;
    padding: 44px 22px 32px;
  }

  .rr-site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .rr-site-footer__inner {
    grid-template-columns: 1fr;
  }
}
