/**
 * ValorX shell — editorial cream header + footer (Herman Miller / Aesop–inspired).
 * Prefix: valorx-*
 */
body.valorx-shell-active {
  scroll-behavior: smooth;
}

:root {
  /* Subtle warm gray surfaces (header/footer — readable on all templates) */
  --valorx-shell-surface: #f4f3f0;
  --valorx-shell-surface-elevated: #f0eeea;
  --valorx-shell-cream: var(--valorx-shell-surface);
  --valorx-shell-ink: #1a1a1a;
  --valorx-shell-muted: #666666;
  --valorx-shell-faint: #999999;
  --valorx-shell-rule: #e5e0d8;
  --valorx-shell-accent: #d97757;
  --valorx-shell-max: 1350px;
  --valorx-shell-header-h: 64px;
  --valorx-shell-header-h-mobile: 56px;
  --valorx-shell-pad-x: 48px;
  --valorx-shell-pad-x-mobile: 20px;
}

/* ------------------------------------------------------------------------- */
/* Header                                                                    */
/* ------------------------------------------------------------------------- */

.valorx-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
  transition:
    background-color 250ms ease-in-out,
    border-color 250ms ease-in-out,
    box-shadow 250ms ease-in-out;
  background: var(--valorx-shell-surface);
  border-bottom: 1px solid var(--valorx-shell-rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.valorx-site-header.scrolled {
  background: var(--valorx-shell-surface-elevated);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.valorx-shell-bar {
  max-width: var(--valorx-shell-max);
  width: 100%;
  height: var(--valorx-shell-header-h);
  margin: 0 auto;
  padding: 0 var(--valorx-shell-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
}

.valorx-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--valorx-shell-ink);
  flex-shrink: 0;
  min-width: min-content;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

/* Theme overrides often collapse flex children — keep lockup visible */
body.valorx-shell-active .valorx-site-header .valorx-brand,
body.valorx-shell-active .valorx-site-header .valorx-brand-mark,
body.valorx-shell-active .valorx-site-header .valorx-brand-wordmark {
  color: var(--valorx-shell-ink);
  opacity: 1;
  visibility: visible;
}

.valorx-brand-logo {
  display: block;
  height: 70px;
  width: auto;
  max-width: min(220px, 48vw);
  flex: 0 0 auto;
  object-fit: contain;
}

body.valorx-shell-active .valorx-site-header .valorx-brand-logo {
  opacity: 1;
  visibility: visible;
}

.valorx-brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1.5px solid var(--valorx-shell-ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--valorx-shell-ink);
  box-sizing: border-box;
}

.valorx-brand-wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--valorx-shell-ink);
  white-space: nowrap;
}

.valorx-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 8px;
  gap: 24px 28px;
}

@media (min-width: 1100px) {
  .valorx-nav-links {
    gap: 28px 36px;
  }
}

.valorx-nav-link {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--valorx-shell-ink);
  text-decoration: none;
  transition: color 150ms ease;
}

.valorx-nav-link:hover {
  color: var(--valorx-shell-accent);
}

.valorx-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--valorx-shell-ink);
  cursor: pointer;
  border-radius: 4px;
}

.valorx-menu-toggle:focus-visible,
.valorx-overlay-close:focus-visible,
.valorx-nav-link:focus-visible,
.valorx-footer-links a:focus-visible,
.valorx-back-top:focus-visible,
.valorx-footer-legal a:focus-visible {
  outline: 2px solid var(--valorx-shell-accent);
  outline-offset: 2px;
}

.valorx-menu-icon {
  display: block;
}

/* Fullscreen mobile overlay */
.valorx-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--valorx-shell-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px 24px;
  box-sizing: border-box;
  transform: translateX(100%);
  transition: transform 300ms ease, visibility 0s linear 300ms;
  visibility: hidden;
  pointer-events: none;
}

.valorx-mobile-overlay.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 300ms ease, visibility 0s linear 0s;
}

.valorx-overlay-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  color: var(--valorx-shell-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.valorx-overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.valorx-overlay-nav-link {
  font-size: 24px;
  font-weight: 500;
  color: var(--valorx-shell-ink);
  text-decoration: none;
  padding: 16px 12px;
  transition: color 150ms ease;
}

.valorx-overlay-nav-link:hover {
  color: var(--valorx-shell-accent);
}

@media (max-width: 768px) {
  :root {
    --valorx-shell-header-h: var(--valorx-shell-header-h-mobile);
  }

  .valorx-shell-bar {
    padding: 0 var(--valorx-shell-pad-x-mobile);
  }

  .valorx-nav-links {
    display: none;
  }

  .valorx-menu-toggle {
    display: inline-flex;
  }
}

/* ------------------------------------------------------------------------- */
/* Footer                                                                    */
/* ------------------------------------------------------------------------- */

.valorx-site-footer {
  background: var(--valorx-shell-surface);
  color: var(--valorx-shell-ink);
  margin-top: auto;
  border-top: 1px solid var(--valorx-shell-rule);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.valorx-footer-wrap {
  width: 100%;
  max-width: var(--valorx-shell-max);
  margin: 0 auto;
  padding: 80px var(--valorx-shell-pad-x) 40px;
  box-sizing: border-box;
}

.valorx-footer-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.valorx-footer-brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.valorx-footer-brand-logo {
  display: block;
  height: auto;
  max-height: 52px;
  width: auto;
  max-width: min(240px, 72vw);
  object-fit: contain;
  flex: 0 0 auto;
}

.valorx-footer-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.valorx-shell-active .valorx-site-footer .valorx-footer-brand-logo,
body.valorx-shell-active .valorx-site-footer .valorx-footer-logo-lockup,
body.valorx-shell-active .valorx-site-footer .valorx-footer-mark,
body.valorx-shell-active .valorx-site-footer .valorx-footer-wordmark {
  opacity: 1;
  visibility: visible;
  color: var(--valorx-shell-ink);
}

.valorx-footer-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1.5px solid var(--valorx-shell-ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--valorx-shell-ink);
  box-sizing: border-box;
}

.valorx-footer-wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--valorx-shell-ink);
}

.valorx-footer-tagline {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--valorx-shell-muted);
  line-height: 1.5;
}

.valorx-back-top {
  border: none;
  background: none;
  padding: 4px 0;
  margin: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--valorx-shell-faint);
  cursor: pointer;
  transition: color 150ms ease;
  align-self: flex-start;
}

.valorx-back-top:hover {
  color: var(--valorx-shell-ink);
}

.valorx-back-top-arrow {
  font-size: 11px;
}

.valorx-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.valorx-footer-col-title {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--valorx-shell-faint);
}

.valorx-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.valorx-footer-links li {
  margin: 0;
}

.valorx-footer-links a {
  display: inline-block;
  font-size: 13px;
  line-height: 2;
  color: var(--valorx-shell-ink);
  text-decoration: none;
  transition: color 150ms ease;
}

.valorx-footer-links a:hover {
  color: var(--valorx-shell-accent);
}

.valorx-footer-rule {
  border: none;
  border-top: 1px solid var(--valorx-shell-rule);
  margin: 56px 0 24px;
}

.valorx-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.valorx-footer-copy {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--valorx-shell-faint);
}

.valorx-footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.valorx-footer-legal a {
  color: var(--valorx-shell-faint);
  text-decoration: none;
  transition: color 150ms ease;
}

.valorx-footer-legal a:hover {
  color: var(--valorx-shell-ink);
}

.valorx-footer-dot {
  color: var(--valorx-shell-faint);
  user-select: none;
}

@media (max-width: 768px) {
  .valorx-footer-wrap {
    padding: 60px var(--valorx-shell-pad-x-mobile) 32px;
  }

  .valorx-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .valorx-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .valorx-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* WordPress screen reader text (if theme does not define) */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

/* Never collapse footer (theme overrides) */
body.valorx-shell-active .valorx-site-footer {
  display: block !important;
  visibility: visible !important;
  max-height: none !important;
  overflow: visible !important;
}

body.valorx-shell-active .valorx-site-footer .valorx-footer-grid {
  display: grid !important;
  visibility: visible !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Hide Blocksy default header/footer */
body.valorx-shell-active header#header,
body.valorx-shell-active header.ct-header,
body.valorx-shell-active footer#footer,
body.valorx-shell-active footer.ct-footer {
  display: none !important;
}

body.valorx-shell-active #main,
body.valorx-shell-active main,
body.valorx-shell-active #primary,
body.valorx-shell-active .site-main,
body.valorx-shell-active #content,
body.valorx-shell-active .entry-content {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  max-height: none !important;
}

/* Offset for fixed header (inner pages; ValorX home template uses its own hero offset) */
body.valorx-shell-active:not(.page-template-page-valorx-home-php) #content,
body.valorx-shell-active:not(.page-template-page-valorx-home-php) .site-content {
  padding-top: var(--valorx-shell-header-h) !important;
}

@media (max-width: 768px) {
  body.valorx-shell-active:not(.page-template-page-valorx-home-php) #content,
  body.valorx-shell-active:not(.page-template-page-valorx-home-php) .site-content {
    padding-top: var(--valorx-shell-header-h-mobile) !important;
  }
}

body.admin-bar .valorx-site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .valorx-site-header {
    top: 46px;
  }
}
