/* ============================================================
   Brandcoves Theme — Shell UI
   Header · Nav · Footer · Page layouts · Utilities
   ============================================================ */

/* ── Site shell ──────────────────────────────────────────────── */
.bc-site { min-height: 100vh; }
.bc-main  { min-height: 60vh; }

/* ── Header ──────────────────────────────────────────────────── */
.bc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bc-cream);
  border-bottom: 1px solid var(--bc-border);
  transition: box-shadow var(--bc-transition);
}

.bc-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(26,22,20,.07);
}

.bc-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--bc-header-h);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .bc-header__inner { padding: 0 40px; }
}

/* ── Logo ────────────────────────────────────────────────────── */
.bc-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.bc-header__logo-mark {
  display: block;
  width: 5px;
  height: 24px;
  background: var(--bc-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.bc-header__logo-text {
  font-family: var(--bc-font-display);
  font-size: 1.4375rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--bc-ink);
  line-height: 1;
}

/* Custom logo image */
.bc-header__logo .custom-logo-link img {
  height: 36px;
  width: auto;
}

/* ── Primary nav (desktop) ───────────────────────────────────── */
.bc-header__nav {
  flex: 1;
  display: none;
}

@media (min-width: 900px) {
  .bc-header__nav { display: block; }
}

.bc-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.bc-nav__list li { position: relative; }

.bc-nav__list > li > a {
  font-family: var(--bc-font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bc-ink-light);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  position: relative;
  transition: color var(--bc-transition);
}

.bc-nav__list > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--bc-accent);
  transition: width var(--bc-transition);
}

.bc-nav__list > li > a:hover,
.bc-nav__list > li.current-menu-item > a,
.bc-nav__list > li.current-menu-ancestor > a {
  color: var(--bc-accent);
}

.bc-nav__list > li > a:hover::after,
.bc-nav__list > li.current-menu-item > a::after,
.bc-nav__list > li.current-menu-ancestor > a::after {
  width: 100%;
}

/* Dropdown submenu */
.bc-nav__list .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 200px;
  background: var(--bc-white);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  box-shadow: 0 8px 32px rgba(26,22,20,.10);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--bc-transition), transform var(--bc-transition), visibility var(--bc-transition);
  z-index: 200;
}

.bc-nav__list li:hover > .sub-menu,
.bc-nav__list li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bc-nav__list .sub-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 0.8125rem;
  color: var(--bc-ink-light);
  text-decoration: none;
  transition: background var(--bc-transition), color var(--bc-transition);
}

.bc-nav__list .sub-menu a:hover {
  background: var(--bc-cream);
  color: var(--bc-accent);
}

/* ── Header end cluster ──────────────────────────────────────── */
.bc-header__end {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

@media (min-width: 900px) {
  .bc-header__end { gap: 20px; }
}

.bc-header__account {
  display: flex;
  align-items: center;
  color: var(--bc-ink-light);
  text-decoration: none;
  transition: color var(--bc-transition);
}

.bc-header__account:hover { color: var(--bc-accent); }

.bc-header__login {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bc-ink-light);
  text-decoration: none;
  transition: color var(--bc-transition);
  display: none;
}

@media (min-width: 900px) {
  .bc-header__login { display: block; }
}

.bc-header__login:hover { color: var(--bc-accent); }

/* WPML switcher in header */
.bc-header__end .wpml-ls {
  font-size: 0.6875rem;
}

.bc-header__end .wpml-ls-legacy-dropdown a,
.bc-header__end .wpml-ls-legacy-list-horizontal a {
  font-family: var(--bc-font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bc-muted);
  text-decoration: none;
  transition: color var(--bc-transition);
}

.bc-header__end .wpml-ls-legacy-dropdown a:hover,
.bc-header__end .wpml-ls-legacy-list-horizontal a:hover {
  color: var(--bc-ink);
}

/* ── Hamburger ───────────────────────────────────────────────── */
.bc-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bc-ink);
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .bc-hamburger { display: none; }
}

.bc-hamburger span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.28s ease, opacity 0.2s ease;
  transform-origin: center;
}

.bc-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.bc-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.bc-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Mobile nav panel ────────────────────────────────────────── */
.bc-mobile-nav {
  background: var(--bc-white);
  border-top: 1px solid var(--bc-border);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s cubic-bezier(.4,0,.2,1);
}

.bc-mobile-nav.is-open {
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
  .bc-mobile-nav { display: none; }
}

.bc-mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bc-mobile-nav__list a {
  display: block;
  padding: 13px 24px;
  font-size: 0.9375rem;
  color: var(--bc-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--bc-border);
  transition: background var(--bc-transition), color var(--bc-transition);
}

.bc-mobile-nav__list a:hover {
  background: var(--bc-cream);
  color: var(--bc-accent);
}

/* Sub-items indented */
.bc-mobile-nav__list .sub-menu { list-style: none; margin: 0; padding: 0; }

.bc-mobile-nav__list .sub-menu a {
  padding-left: 40px;
  font-size: 0.875rem;
  color: var(--bc-ink-light);
}

.bc-mobile-nav__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bc-cream);
  border-top: 1px solid var(--bc-border);
}

.bc-mobile-nav__foot a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bc-ink-light);
  text-decoration: none;
  transition: color var(--bc-transition);
}

.bc-mobile-nav__foot a:hover { color: var(--bc-accent); }

/* ── Footer ──────────────────────────────────────────────────── */
.bc-footer {
  background: var(--bc-footer-ink);
  color: var(--bc-cream);
  margin-top: 80px;
}

.bc-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .bc-footer__inner { padding: 0 40px; }
}

/* Widget zone */
.bc-footer__widgets {
  padding: 64px 0 52px;
  border-bottom: 1px solid rgba(247,244,239,.10);
}

.bc-footer__widgets > .bc-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 600px) {
  .bc-footer__widgets > .bc-footer__inner { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .bc-footer__widgets > .bc-footer__inner { grid-template-columns: repeat(3, 1fr); }
}

.bc-footer__col-title,
.bc-footer .bc-widget__title {
  font-family: var(--bc-font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(247,244,239,.9);
  margin: 0 0 18px;
}

.bc-footer__col p {
  font-size: 0.875rem;
  color: rgba(247,244,239,.5);
  line-height: 1.75;
  margin: 0;
}

.bc-footer__col ul,
.bc-footer .bc-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bc-footer__col li + li,
.bc-footer .bc-widget li + li { margin-top: 9px; }

.bc-footer__col a,
.bc-footer .bc-widget a {
  font-size: 0.875rem;
  color: rgba(247,244,239,.55);
  text-decoration: none;
  transition: color var(--bc-transition);
}

.bc-footer__col a:hover,
.bc-footer .bc-widget a:hover { color: rgba(247,244,239,.95); }

/* Bottom bar */
.bc-footer__bottom {
  padding: 18px 0;
}

.bc-footer__bottom > .bc-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.bc-footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.bc-footer__nav-list a {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(247,244,239,.4);
  text-decoration: none;
  transition: color var(--bc-transition);
}

.bc-footer__nav-list a:hover { color: rgba(247,244,239,.85); }

.bc-footer__copy {
  font-size: 0.6875rem;
  color: rgba(247,244,239,.3);
  margin: 0;
  letter-spacing: 0.04em;
}

/* ── Page content templates ───────────────────────────────────── */
.bc-page-content {
  padding: 52px 0 96px;
}

.bc-page-content--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 80px 24px;
}

.bc-entry {
  max-width: 72ch;
  line-height: 1.75;
}

.bc-entry h1, .bc-entry h2, .bc-entry h3, .bc-entry h4 {
  font-family: var(--bc-font-display);
  font-weight: 300;
  color: var(--bc-ink);
  margin: 1.75em 0 0.5em;
  line-height: 1.2;
}

.bc-entry h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.bc-entry h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
.bc-entry h3 { font-size: 1.25rem; }

.bc-entry p { margin: 0 0 1em; }
.bc-entry a { color: var(--bc-accent); }
.bc-entry a:hover { text-decoration: underline; }
.bc-entry ul, .bc-entry ol { padding-left: 1.5em; margin: 0 0 1em; }
.bc-entry li { margin-bottom: 0.4em; }
.bc-entry img { border-radius: var(--bc-radius); margin: 1.5em 0; }
.bc-entry blockquote {
  border-left: 3px solid var(--bc-accent);
  margin: 1.5em 0;
  padding: 8px 0 8px 20px;
  font-style: italic;
  color: var(--bc-ink-light);
}

/* ── 404 page ────────────────────────────────────────────────── */
.bc-404 {
  text-align: center;
  max-width: 480px;
}

.bc-404__code {
  display: block;
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 200;
  color: var(--bc-border-strong);
  line-height: 1;
  margin-bottom: 16px;
}

.bc-404__title {
  font-family: var(--bc-font-display);
  font-size: 1.75rem;
  font-weight: 300;
  margin: 0 0 12px;
}

.bc-404__text {
  color: var(--bc-muted);
  margin: 0 0 32px;
}

/* ── Homepage: remove main padding so hero/sections span full width ── */
body.home .bc-main { min-height: 0; }
body.home .bc-main > * { max-width: none; padding-left: 0; padding-right: 0; }

/* ── Focus visible ────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--bc-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
