/* =========================================================
   brand-nav.css (CLEANED)
   Standalone CSS for brand/project pages (no main.css)
   Goal: same current behavior, but remove competing overrides.
   ========================================================= */

/* =========================================================
   1) Core tokens + base reset
   ========================================================= */
:root{
  --bg: #ffffff;
  --text: rgba(10,10,10,.92);
  --accent: #e864ba;
  --home-color: #19a84b;

  --pad: 40px;

  /* Logo / top-row sizing */
  --logo-size: 80px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* Hide scrollbars (matches main site vibe) */
::-webkit-scrollbar{ width: 0px; height: 0px; }
*{ scrollbar-width: none; }

/* =========================================================
   2) Brand page scaffold + header behavior
   ========================================================= */
body.brand-page{
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Header exists only to hold top-right controls on brand pages */
body.brand-page #siteHeader{
  opacity: 1 !important;
  pointer-events: none; /* children re-enable */
  background: transparent !important;
  mix-blend-mode: normal !important;
  isolation: auto !important;
}

/* If main nav exists in markup, kill it on brand pages */
body.brand-page #siteHeader .nav{ display: none !important; }

/* Ensure header content can receive clicks */
body.brand-page #siteHeader,
body.brand-page #siteHeader *{
  pointer-events: auto !important;
}

/* =========================================================
   3) Top-right: Instagram + Hamburger + Menu
   ========================================================= */

/* Instagram (top-right, always black) */
body.brand-page a.igFixed{
  position: fixed !important;
  top: 18px !important;
  right: var(--pad) !important;
  z-index: 10120 !important;

  width: 16px !important; /* visually “thinner” */
  height: 16px !important;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #000 !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  mix-blend-mode: normal !important;
  -webkit-text-fill-color: currentColor !important;
}
body.brand-page a.igFixed svg{
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  color: currentColor !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* details wrapper exists just to hold open state */
body.brand-page details.brandMenuWrap{
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  z-index: 10060 !important;
  pointer-events: auto !important;
}

/* Hide default disclosure marker */
body.brand-page details.brandMenuWrap > summary{ list-style: none; }
body.brand-page details.brandMenuWrap > summary::-webkit-details-marker{ display: none; }

/* Hamburger button (left of IG) */
body.brand-page summary.brandMenuBtn{
  position: fixed !important;
  top: 18px !important;
  right: calc(var(--pad) + 34px) !important;

  width: 18px;
  height: 18px;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;

  cursor: pointer !important;
  user-select: none !important;

  z-index: 10120 !important;

  color: #000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  mix-blend-mode: normal !important;
  -webkit-text-fill-color: currentColor !important;
}
body.brand-page summary.brandMenuBtn svg{
  width: 18px;
  height: 18px;
  display: block !important;
  color: currentColor !important;
  fill: none !important;
  stroke: currentColor !important;
}

/* Menu links baseline (desktop: horizontal row that expands left) */
body.brand-page nav.brandMenu{
  position: fixed !important;
  top: 20px !important; /* sits slightly lower than hamburger */
  right: calc(var(--pad) + 34px + 18px + 12px) !important;

  display: none;
  flex-direction: row !important;
  align-items: center !important;
  gap: 18px !important;

  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;

  z-index: 10059 !important;
  pointer-events: auto !important;
}

/* Show when open */
body.brand-page details.brandMenuWrap[open] nav.brandMenu{ display: flex !important; }

/* Menu links: no underline, no layout shift (desktop animation) */
body.brand-page nav.brandMenu a{
  font-size: 13px;
  font-weight: 400 !important;
  letter-spacing: 0.08em;
  line-height: 1;

  color: #000 !important;
  text-decoration: none !important;
  opacity: 0.92 !important;

  position: relative !important;
  display: inline-block !important;
  cursor: pointer !important;

  transform: translateX(10px) !important;
  opacity: 0 !important;

  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    color 140ms ease !important;

  will-change: transform, opacity;
}

/* Invisible bold clone reserves width (prevents hover “jump”) */
body.brand-page nav.brandMenu a::after{
  content: attr(data-label);
  font-weight: 800;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  display: block;
}

/* Visible state when open */
body.brand-page details.brandMenuWrap[open] nav.brandMenu a{
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* Cascade timing */
body.brand-page details.brandMenuWrap[open] nav.brandMenu a:nth-child(1){ transition-delay: 0ms !important; }
body.brand-page details.brandMenuWrap[open] nav.brandMenu a:nth-child(2){ transition-delay: 35ms !important; }
body.brand-page details.brandMenuWrap[open] nav.brandMenu a:nth-child(3){ transition-delay: 70ms !important; }
body.brand-page details.brandMenuWrap[open] nav.brandMenu a:nth-child(4){ transition-delay: 105ms !important; }
body.brand-page details.brandMenuWrap[open] nav.brandMenu a:nth-child(5){ transition-delay: 140ms !important; }

/* Hover = bold + black */
body.brand-page nav.brandMenu a:hover{
  font-weight: 800 !important;
  color: #000 !important;
  opacity: 1 !important;
}

/* =========================================================
   4) Center brand rolodex row (arrows + current label)
   ========================================================= */
body.brand-page .brandNav{
  position: fixed;
  left: 0;
  right: 0;
  top: 0 !important;

  height: 0 !important;

  /* Current “winning” alignment baseline */
  padding-top: 25px !important;

  z-index: 10000;

  display: flex;
  align-items: center !important;
  justify-content: center;
  gap: 10px;

  pointer-events: none;
}

body.brand-page .brandNavArrow,
body.brand-page .brandNavList{
  pointer-events: auto;
}

body.brand-page .brandNavArrow{
  border: 0;
  background: transparent;
  cursor: pointer;

  font: inherit;
  font-size: 26px;
  line-height: 1;

  opacity: 0.55;

  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  position: relative !important;
  top: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.brand-page .brandNavArrow:hover{ opacity: 1; }

body.brand-page .brandNavList{
  min-width: 220px;

  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  position: relative !important;
  top: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Show ONLY current brand */
body.brand-page .brandNavList a{
  display: none;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 14px;
  line-height: 1 !important;

  text-decoration: none;
}
body.brand-page .brandNavList a.is-current{ display: inline-block; }

/* Force brand rolodex to always use DIFFERENCE */
body.brand-page .brandNav,
body.brand-page .brandNavArrow,
body.brand-page .brandNavList,
body.brand-page .brandNavList a{
  mix-blend-mode: difference !important;
  color: #fff !important; /* makes difference reliable */
  -webkit-text-fill-color: currentColor !important;
}

/* =========================================================
   5) Main layout (left list, feed, right experts)
   ========================================================= */
body.brand-page .brand-layout{
  width: min(1200px, calc(100% - (var(--pad) * 2)));
  margin: 0 auto;

  padding: calc(var(--logo-size) + 5px) 0 160px;
  display: grid;
  grid-template-columns: 1fr;
}

/* LEFT LIST (desktop pinned hard left) */
body.brand-page .brand-left{
  position: fixed;
  top: calc(var(--logo-size) + 60px);
  left: 0;

  height: calc(100vh - (var(--logo-size) + 120px));
  width: 200px;

  padding-left: var(--pad);
  z-index: 5;
}

body.brand-page .brand-left-nav{
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

body.brand-page .brand-left-link{
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
body.brand-page .brand-left-link:hover{ opacity: 1; }

body.brand-page .brand-left-link.is-active{
  color: var(--home-color);
  font-weight: 800;
  opacity: 1;
}

/* RIGHT PEOPLE COLUMN (desktop base; tablet/phone becomes drawer via media query) */
body.brand-page .brand-people{
  position: fixed;
  top: calc(var(--logo-size) + 0px);
  right: 0;

  height: calc(100vh - (var(--logo-size) + 120px));
  width: 220px;

  padding-right: var(--pad);
  z-index: 5;

  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
}

/* Base experts list */
.experts-list{
  list-style: none;
  padding: 0;
  margin: 0;
}
.expert-name{ font-weight: 800; }
.expert-meta{
  display: block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.expert-meta a{
  color: inherit;
  text-decoration: none;
}

/* Constrained brand-page experts styling */
body.brand-page .brand-people-list{
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 14px;

  align-items: flex-start;
  text-align: left;

  transition: opacity 140ms ease;
  opacity: 1;

  /* Final “winning” scroll behavior */
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  max-height: none !important;

  /* Final spacing for drawer version */
  margin-top: 150px !important;
  padding-right: 6px;
}
body.brand-page .brand-people-list.is-fading{ opacity: 0; }

body.brand-page .brand-people-list .expert{
  display: block;
  white-space: normal;
}
body.brand-page .brand-people-list .expert-name{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
}
body.brand-page .brand-people-list .expert-meta{ font-size: 10px; }

/* FEED / GRID (true centering: equal gutters for left + right) */
body.brand-page .brand-right{
  width: min(1200px, calc(100% - (var(--pad) * 2)));
  margin: 0 auto;

  padding-left: 220px;
  padding-right: 220px;
  box-sizing: border-box;
}

/* Anchor snapping + scrollspy visibility */
body.brand-page .brand-anchor{
  scroll-margin-top: calc(var(--logo-size) + 80px);
  height: 1px;
}

/* Section titles */
body.brand-page .brand-section-title{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 6px 0 14px;
  opacity: 0.7;
}

/* Grid */
body.brand-page .brand-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 32px 0;
}

/* Tiles (feed preview stays “cover”) */
body.brand-page .brand-tile{
  background: #fff !important;
  border-radius: 12px;
  overflow: hidden;
}
body.brand-page .brand-tile video{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: transparent;
}

/* Photos in grid: match video tile sizing (does NOT affect lightbox) */
body.brand-page .brand-tile img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}


/* Ratios */
body.brand-page .brand-tile.r-9-16{ aspect-ratio: 9 / 16; }
body.brand-page .brand-tile.r-16-9{ aspect-ratio: 16 / 9; }

/* =========================================================
   6) Responsive: Tablet + Phone (<=1100px)
   ========================================================= */

/* Experts tab: NEVER on desktop (JS inserts it only on <=1100) */
body.brand-page .expertsTab{ display: none; }

@media (max-width: 1100px){
  :root{
    --pad: 22px;
    --logo-size: 56px;
  }

  /* Reflow layout to avoid overlap */
  body.brand-page .brand-layout{
    display: block !important;
    width: min(980px, calc(100% - (var(--pad) * 2))) !important;
    margin: 0 auto !important;
    padding: calc(var(--logo-size) + 44px) 0 96px !important;
  }

  body.brand-page .brand-right{
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Left list becomes horizontal (text-only) */
  body.brand-page .brand-left{
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    padding-left: 0 !important;
    margin: 0 0 14px 0 !important;
  }

  body.brand-page .brand-left-nav{
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  body.brand-page .brand-left-link{
    white-space: nowrap !important;

    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 12px !important;
    opacity: 0.72 !important;
    text-decoration: none !important;
  }
  body.brand-page .brand-left-link.is-active{
    opacity: 1 !important;
    font-weight: 800 !important;
  }

  /* Keep 3-up grid */
  body.brand-page .brand-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  /* Experts becomes right drawer (tab always visible) */
  body.brand-page .brand-people{
    position: fixed !important;
    right: 0 !important;

    /* Final winning fill rules */
    top: -24px !important;
    height: 100dvh !important;

    width: min(420px, 34vw) !important; /* iPad: right third */
    padding: 0 var(--pad) 28px !important;

    background: rgba(255,255,255,0.88) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-left: 1px solid rgba(0,0,0,0.08);
    z-index: 10020 !important;

    transform: translateX(calc(100% - 1px)) !important;
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  body.brand-page .brand-people.is-open{
    transform: translateX(0) !important;
  }

  body.brand-page .expertsTab{
    display: flex !important;
    position: absolute !important;

    top: 30dvh !important;
    left: -36px !important;

    transform: translateY(-50%);
    transform-origin: center !important;

    width: 36px !important;
    height: 140px !important;

    writing-mode: vertical-rl !important;
    text-transform: uppercase !important;
    letter-spacing: 0.18em !important;

    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;
    border-radius: 14px 0 0 14px !important;

    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(0,0,0,0.12) !important;
    border-right: 0 !important;

    font-weight: 800 !important;
    font-size: 11px !important;
    color: rgba(0,0,0,0.9) !important;
    cursor: pointer !important;
  }
  body.brand-page .expertsTab span{
    display: inline-block;
    transform: rotate(180deg);
  }

  /* Mobile/Tablet hamburger menu becomes a right drawer */
  body.brand-page nav.brandMenu{
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    width: min(320px, 82vw) !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;

    padding: 92px var(--pad) 28px !important;

    background: rgba(255,255,255,0.88) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-left: 1px solid rgba(0,0,0,0.08);

    transform: translateX(100%);
    transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 10070 !important;
  }

  body.brand-page details.brandMenuWrap[open] nav.brandMenu{
    transform: translateX(0);
  }

  /* Stop the old link pop-out animation on mobile */
  body.brand-page nav.brandMenu a{
    transform: none !important;
    opacity: 0.92 !important;
  }
}

/* iPad: center collaboration horizontal list */
@media (min-width: 641px) and (max-width: 1100px){
  body.brand-page .brand-left-nav{
    justify-content: center !important;
  }
}

/* Phone: tighten padding + drawer width */
@media (max-width: 640px){
  :root{ --pad: 16px; }

  body.brand-page .brand-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  body.brand-page .brand-people{
    width: 86vw !important;
    max-width: none !important;
    min-width: 0 !important;
    transform: translateX(calc(100% - .1px)) !important;
  }

  /* Pull arrows closer to brand name */
  body.brand-page .brandNav{ gap: 30px !important; }

  /* Remove forced width that spreads arrows apart */
  body.brand-page .brandNavList{ min-width: 0 !important; }

  /* Slightly shrink arrows + keep tap target */
  body.brand-page .brandNavArrow{
    font-size: 22px !important;
    padding: 4px 6px !important;
  }

  /* Slightly tighten brand label */
  body.brand-page .brandNavList a{
    font-size: 12px !important;
    letter-spacing: 0.12em !important;
  }
}

/* =========================================================
   7) MM logo (top-left home)
   ========================================================= */
.mm-logo{
  position: fixed;
  top: 22px;
  left: 22px;
  z-index: 999;

  display: flex;
  align-items: flex-end;

  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;

  color: #000;
  text-decoration: none;

  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.mm-logo span{
  display: inline-block;
  transform-origin: bottom left;
  transform: rotate(-4deg);
}
.mm-logo span:nth-child(odd){ transform: rotate(-3deg); }
.mm-logo span:nth-child(even){ transform: rotate(-5deg); }

body.intro-done .mm-logo{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Brand pages: fixed + difference */
body.brand-page .mm-logo{
  position: fixed !important;
  top: 18px !important;
  left: var(--pad) !important;
  z-index: 10110 !important;

  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;

  color: #fff !important;
  mix-blend-mode: difference !important;
  -webkit-text-fill-color: currentColor !important;

  font-size: 14px !important;
  letter-spacing: 0.14em !important;
}

/* Phone: show only “MM” */
@media (max-width: 520px){
  body.brand-page .mm-logo{
    font-size: 13px;
    letter-spacing: 0.18em;
  }

  /* hide all letters by default */
  body.brand-page .mm-logo span{ display: none; }

  /* show M (MAISON) */
  body.brand-page .mm-logo span:nth-child(1){ display: inline-block; }

  /* show M (MAGNOLIA) */
  body.brand-page .mm-logo span:nth-child(8){ display: inline-block; }

  /* MM should be straight on phone */
  body.brand-page .mm-logo span{ transform: none !important; }

  /* Nudge brand label row DOWN a bit on phone */
  body.brand-page .brandNav{ padding-top: 26px !important; }
  body.brand-page .brandNavList{ top: 1px !important; }
}

/* =========================================================
   8) Lightbox (final: white backdrop, black icons, no shadow)
   ========================================================= */

/* Lock page scroll when lightbox is open */
body.brand-page.mmLightbox-open{
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* Overlay root */
.mmLightbox{
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
}
.mmLightbox.is-open{ display: block; }

/* Backdrop (FINAL) */
.mmLightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.80) !important;
}

/* UI stage */
.mmLightbox-ui{
  position: absolute;
  inset: 0;
  z-index: 20001;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 36px;
  pointer-events: none;

  box-shadow: none !important;
}

/* X always top-right */
.mmLightbox-close{
  position: fixed;
  top: 18px;
  right: var(--pad);
  z-index: 20002;

  border: 0;
  background: transparent;

  font: inherit;
  font-size: 28px;
  line-height: 1;

  cursor: pointer;
  opacity: 0.8;

  color: #000 !important;
  -webkit-text-fill-color: currentColor !important;
}
.mmLightbox-close:hover{ opacity: 1; }

/* Arrows pinned to viewport sides, vertically centered */
.mmLightbox-nav{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20002;

  pointer-events: auto;

  width: 44px;
  height: 44px;

  border: 0;
  background: transparent;

  font: inherit;
  font-size: 36px;
  line-height: 1;

  cursor: pointer;
  opacity: 0.7;
  user-select: none;

  color: #000 !important;
  -webkit-text-fill-color: currentColor !important;
}
.mmLightbox-nav:hover{ opacity: 1; }
.mmLightbox-prev{ left: 18px; }
.mmLightbox-next{ right: 18px; }

/* Centering stage */
.mmLightbox-stage{
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Frame: width-bounded + ratio preserved (FINAL) */
.mmLightbox-frame{
  --lb-ar: 9 / 16;

  aspect-ratio: var(--lb-ar, 9 / 16);
  width: min(70vw, 920px);
  max-height: 80vh;

  background: #fff !important;
  border-radius: 12px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: none !important;
}

/* Media inside frame */
.mmLightbox-frame img,
.mmLightbox-frame video{
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  background: #fff !important;
}

/* iPad / Tablet */
@media (max-width: 1100px){
  .mmLightbox-ui{ padding: 24px; }

  .mmLightbox-frame{
    width: 78vw;
    max-height: 78vh;
    border-radius: 10px;
  }

  .mmLightbox-prev{ left: 14px; }
  .mmLightbox-next{ right: 14px; }
}

/* Phone */
@media (max-width: 640px){
  .mmLightbox-ui{ padding: 18px; }

  .mmLightbox-frame{
    width: min(70vw, 550px);
    max-height: 72vh;
    border-radius: 10px;
  }

  .mmLightbox-nav{
    width: 40px;
    height: 40px;
    font-size: 32px;
  }

  .mmLightbox-prev{ left: 10px; }
  .mmLightbox-next{ right: 10px; }

  .mmLightbox-close{
    top: 14px;
    right: 14px;
  }
}
/* =========================================================
   HARD KILL: inline video UI + paused-state visibility
   ========================================================= */
/* Only hide INLINE feed videos (not lightbox videos) */
.mm-inline-video { opacity: 0; }
.mm-inline-video.is-playing { opacity: 1; }

/* Lightbox videos must always be visible */
.mmLightbox video { opacity: 1 !important; }

/* Hide native controls ONLY for inline feed videos (never for lightbox) */
