/* L'Enfant Gallery — header + mega menu only. Scoped so the rest of the site is unchanged. */

.lenfant-site-header,
.lenfant-mega {
  --lenfant-bg: #f4f2ef;
  --lenfant-fg: #314453;
  --lenfant-ink: #1c2230;
  --lenfant-ink-fg: #f6f1e6;
  --lenfant-ink-muted: #9aa3b2;
  --lenfant-ink-line: rgba(255, 255, 255, 0.12);
  --lenfant-gold: #e2c36a;
  --lenfant-serif: "Castoro", Georgia, serif;
  --lenfant-display: "Castoro Titling", "Castoro", serif;
  box-sizing: border-box;
}

.lenfant-site-header *,
.lenfant-mega * {
  box-sizing: border-box;
}

.lenfant-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 242, 239, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(49, 68, 83, 0.12);
  color: var(--lenfant-fg);
}

.lenfant-site-header__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1840px;
  margin: 0 auto;
  height: 88px;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .lenfant-site-header__bar {
    padding: 0 56px;
  }
}

.lenfant-site-header__social {
  display: none;
  justify-self: start;
}

@media (min-width: 768px) {
  .lenfant-site-header__social {
    display: block;
  }
}

.lenfant-site-header__social .wp-block-social-links {
  gap: 12px;
  margin: 0;
}

.lenfant-site-header__social .wp-social-link {
  background: transparent !important;
}

.lenfant-site-header__social .wp-block-social-link-anchor {
  width: 33px !important;
  height: 33px !important;
  border: 1px solid var(--lenfant-fg) !important;
  color: var(--lenfant-fg) !important;
  padding: 0 !important;
}

.lenfant-site-header__social .wp-block-social-link-anchor svg {
  color: var(--lenfant-fg) !important;
  fill: currentColor;
}

.lenfant-site-header__logo {
  grid-column: 2;
  justify-self: center;
  display: block;
  line-height: 0;
}

.lenfant-site-header__logo img {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .lenfant-site-header__logo img {
    height: 56px;
  }
}

.lenfant-site-header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 24px;
}

.lenfant-site-header__account {
  display: none;
  color: var(--lenfant-fg);
  line-height: 0;
}

@media (min-width: 768px) {
  .lenfant-site-header__account {
    display: block;
  }
}

.lenfant-site-header__account svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.lenfant-burger {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--lenfant-fg);
  font-family: var(--lenfant-display);
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
}

.lenfant-burger__label {
  display: none;
}

@media (min-width: 640px) {
  .lenfant-burger__label {
    display: inline;
  }
}

.lenfant-burger__icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--lenfant-fg);
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s;
}

.lenfant-burger__icon span {
  display: block;
  height: 1px;
  background: currentColor;
  width: 20px;
  transition: width 0.2s;
}

.lenfant-burger__icon span:last-child {
  width: 14px;
}

.lenfant-burger:hover .lenfant-burger__icon,
.lenfant-burger[aria-expanded="true"] .lenfant-burger__icon {
  background: var(--lenfant-fg);
  color: var(--lenfant-bg);
}

.lenfant-burger:hover .lenfant-burger__icon span:last-child {
  width: 20px;
}

/* Overlay */
.lenfant-mega {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--lenfant-ink);
  color: var(--lenfant-ink-fg);
  font-family: var(--lenfant-serif);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s, visibility 0.5s;
}

.lenfant-mega.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  overflow: hidden;
}

.lenfant-mega__top {
  border-bottom: 1px solid var(--lenfant-ink-line);
  padding-right: var(--lenfant-sbw, 0px);
}

.lenfant-mega__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1840px;
  margin: 0 auto;
  height: 88px;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .lenfant-mega__top-inner {
    padding: 0 56px;
  }
}

.lenfant-mega__wordmark {
  font-family: var(--lenfant-display);
  font-size: 18px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.lenfant-mega__close {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-family: var(--lenfant-display);
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
}

.lenfant-mega__close-label {
  display: none;
}

@media (min-width: 640px) {
  .lenfant-mega__close-label {
    display: inline;
  }
}

.lenfant-mega__close-icon {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  border: 1px solid var(--lenfant-ink-line);
  border-radius: 999px;
  transition: border-color 0.2s;
}

.lenfant-mega__close:hover .lenfant-mega__close-icon {
  border-color: var(--lenfant-gold);
}

.lenfant-mega__close-icon::before,
.lenfant-mega__close-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 1px;
  background: currentColor;
}

.lenfant-mega__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.lenfant-mega__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Desktop layout */
.lenfant-mega__desktop {
  display: none;
  height: calc(100vh - 88px);
}

@media (min-width: 1024px) {
  .lenfant-mega__desktop {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1.6fr) minmax(0, 1.2fr);
  }
}

.lenfant-mega__primary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0 56px;
  border-right: 1px solid var(--lenfant-ink-line);
}

.lenfant-mega__primary-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font-family: var(--lenfant-display);
  font-size: clamp(2.25rem, 3.6vw, 3.75rem);
  line-height: 1.15;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
}

.lenfant-mega__primary-item:hover,
.lenfant-mega__primary-item.is-active {
  color: var(--lenfant-gold);
}

.lenfant-mega__primary-item:hover {
  transform: translateX(6px);
}

.lenfant-mega__num {
  font-family: var(--lenfant-serif);
  font-size: 14px;
  color: var(--lenfant-ink-muted);
}

.lenfant-mega__arrow {
  font-size: 24px;
  color: var(--lenfant-ink-muted);
  transition: transform 0.3s;
}

.lenfant-mega__primary-item:hover .lenfant-mega__arrow {
  transform: translateX(4px);
}

.lenfant-mega__panels {
  overflow-y: auto;
  padding: 64px 56px;
}

.lenfant-mega__panel[hidden] {
  display: none !important;
}

.lenfant-mega__groups {
  display: grid;
  gap: 48px 48px;
  animation: lenfantMegaFade 0.5s ease both;
}

@media (min-width: 1280px) {
  .lenfant-mega__groups {
    grid-template-columns: 1fr 1fr;
  }
}

.lenfant-mega__group h3 {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lenfant-ink-line);
  font-family: var(--lenfant-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lenfant-gold);
}

.lenfant-mega__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lenfant-mega__group a {
  display: inline-block;
  padding: 0.3rem 0;
  font-size: 1.35rem;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s, color 0.3s;
}

.lenfant-mega__group a:hover,
.lenfant-mega__group a:focus-visible {
  color: var(--lenfant-gold);
  background-size: 100% 1px;
}

.lenfant-mega__visit {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  animation: lenfantMegaFade 0.5s ease both;
}

.lenfant-mega__kicker {
  margin: 0;
  font-family: var(--lenfant-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lenfant-gold);
}

.lenfant-mega__lede {
  margin: 24px 0 0;
  max-width: 28rem;
  font-size: 1.5rem;
  line-height: 1.5;
}

.lenfant-mega__visit-meta {
  margin-top: 40px;
  color: var(--lenfant-ink-muted);
}

.lenfant-mega__visit-meta p {
  margin: 0 0 4px;
}

.lenfant-mega__preview {
  position: relative;
  overflow: hidden;
  padding: 40px;
}

.lenfant-mega__preview-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--lenfant-ink-line);
}

.lenfant-mega__preview-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.7s, transform 0.7s;
}

.lenfant-mega__preview-frame img.is-active {
  opacity: 1;
  transform: scale(1);
}

.lenfant-mega__preview-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 34, 48, 0.7), transparent 45%);
  pointer-events: none;
}

.lenfant-mega__preview-caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  font-family: var(--lenfant-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

@keyframes lenfantMegaFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Mobile */
.lenfant-mega__mobile {
  display: block;
  height: calc(100dvh - 88px);
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .lenfant-mega__mobile {
    display: none;
  }
}

.lenfant-mega__strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px 24px;
}

.lenfant-mega__strip img {
  flex: 0 0 auto;
  height: 112px;
  width: 96px;
  object-fit: cover;
}

.lenfant-mega__mobile-list {
  list-style: none;
  margin: 0;
  padding: 0 24px 64px;
}

.lenfant-mega__mobile-list > li {
  border-bottom: 1px solid var(--lenfant-ink-line);
}

.lenfant-mega__mobile-toggle,
.lenfant-mega__mobile-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: 0;
  color: inherit;
  font-family: var(--lenfant-display);
  font-size: 1.875rem;
  line-height: 1.15;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.lenfant-mega__mobile-toggle span {
  font-size: 20px;
  color: var(--lenfant-gold);
  transition: transform 0.3s;
}

.lenfant-mega__mobile-toggle[aria-expanded="true"] span {
  transform: rotate(45deg);
}

.lenfant-mega__mobile-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s;
}

.lenfant-mega__mobile-panel.is-open {
  grid-template-rows: 1fr;
  padding-bottom: 24px;
}

.lenfant-mega__mobile-panel > div {
  overflow: hidden;
}

.lenfant-mega__mobile-group {
  margin-bottom: 24px;
}

.lenfant-mega__mobile-group h3 {
  margin: 0 0 8px;
  font-family: var(--lenfant-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lenfant-gold);
}

.lenfant-mega__mobile-group a {
  display: block;
  padding: 6px 0;
  font-size: 1.125rem;
  color: inherit;
  text-decoration: none;
}

html:has(body.lenfant-mega-lock),
body.lenfant-mega-lock {
  overflow: hidden;
}
