/* Homepage visual editor – block layouts */
.main--home { --pad: 48px; container-type: inline-size; }
@media (max-width: 1180px) { .main--home { --pad: 28px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.blocks { margin-top: 0; }

/* ───────── Block bar ───────── */
.block { position: relative; scroll-margin-top: 56px; }
.block.is-flash::after { content: ''; position: absolute; inset: -6px -10px; pointer-events: none; animation: flash 1.4s ease-out forwards; }
@keyframes flash { from { box-shadow: 0 0 0 3px rgba(22, 22, 22, .35); } to { box-shadow: 0 0 0 3px transparent; } }

.blockbar {
  position: sticky; top: var(--topbar); z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 0 14px;
  min-height: 62px; isolation: isolate;
}
/* the bar's colour bleeds to the edges of the page, not just the content column */
.blockbar::before {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(var(--pad) * -1); right: calc(var(--pad) * -1);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
}
.blockbar__n { font: 400 13px/1 var(--ui); color: var(--muted); white-space: nowrap; }
.layoutchip {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 9px 0 11px; border: 1px solid var(--line); background: #fff;
  font: 500 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; transition: border-color .15s;
}
.layoutchip:hover, .layoutchip[aria-expanded='true'] { border-color: var(--ink); }
.opts { display: flex; align-items: center; gap: 14px; }
.opts .seg button { height: 28px; padding: 0 10px; font-size: 10px; letter-spacing: .1em; }
.blockbar__r { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.blockbar__r .txtbtn { margin-right: 10px; }
.blockbar__r .iconbtn { width: 28px; height: 28px; color: var(--ink); }
.blockbar__tag { font: 500 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--red); border: 1px solid currentColor; padding: 5px 7px; }
.blockbar__sum { display: none; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.blockbar__sum img, .blockbar__sum .gl { width: 36px; height: 46px; object-fit: contain; object-position: center top; flex: none; display: grid; place-items: center; }
.blockbar__sum .gl { background: var(--tile); }
.blockbar__sum b { font: 600 11px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.blockbar__sum span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.block.is-collapsed .blockbar { position: static; padding: 9px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.block.is-collapsed .blockbar::before { display: none; }
.block.is-collapsed .blockbar .opts { display: none; }
.block.is-collapsed .blockbar__sum { display: flex; }
.block.is-collapsed .blockbody { display: none; }
.block.is-hidden .blockbody { opacity: .35; filter: grayscale(.6); }

.blockbody { padding-bottom: 8px; }

/* ───────── Add-section divider ───────── */
.adder { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; }
.adder::before { content: ''; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--hair); }
.adder__btn {
  position: relative; z-index: 1; height: 26px; min-width: 26px; padding: 0 7px; display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); background: #fff; color: var(--muted);
  font: 500 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; transition: .2s var(--ease);
}
.adder__btn span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s var(--ease), margin .25s; }
.adder:hover .adder__btn, .adder.is-open .adder__btn, .adder__btn:focus-visible { border-color: var(--ink); color: var(--ink); padding: 0 12px 0 8px; }
.adder:hover .adder__btn span, .adder.is-open .adder__btn span, .adder__btn:focus-visible span { max-width: 100px; margin-left: 6px; }
.adder.is-open { padding-bottom: 14px; }
.adder.is-open::before { top: 22px; }
.adder__picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; position: relative; z-index: 1; animation: pop .2s var(--ease); }
.lcard { width: 132px; padding: 10px 10px 12px; border: 1px solid var(--line); background: #fff; text-align: left; transition: border-color .15s, transform .2s var(--ease); }
.lcard:hover { border-color: var(--ink); transform: translateY(-2px); }
.lcard .g { background: var(--admin); display: grid; place-items: center; height: 70px; margin-bottom: 10px; }
.lcard .g svg { width: 80%; height: auto; }
.lcard b { display: block; font: 600 10px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.lcard small { display: block; margin-top: 5px; font: italic 400 12px var(--serif); color: var(--muted); }

.layoutmenu { min-width: 250px; padding: 8px 0; }
.layoutmenu button { gap: 14px; padding: 8px 16px; }
.layoutmenu .g { width: 50px; height: 34px; background: var(--admin); display: grid; place-items: center; flex: none; }
.layoutmenu .g svg { width: 40px; height: auto; }
.layoutmenu b { display: block; font: 600 10px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.layoutmenu small { display: block; margin-top: 4px; font: italic 400 12px var(--serif); color: var(--muted); }
.layoutmenu .tick { margin-left: auto; color: var(--ink); }
.layoutmenu .lm-title { font: 600 9px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 8px 16px 8px; }

/* ───────── Editable text affordances ───────── */
[contenteditable] { outline: none; cursor: text; }
.is-edit [contenteditable]:hover { background: rgba(22, 22, 22, .045); }
.is-edit [contenteditable]:focus { background: rgba(22, 22, 22, .07); }
[contenteditable][data-ph]:empty::before { content: attr(data-ph); color: var(--faint); pointer-events: none; }
[contenteditable] a { text-decoration: underline; text-underline-offset: 3px; }

/* ───────── Media slots ───────── */
.slot { position: relative; margin: 0; min-width: 0; }
.slot__media { position: relative; overflow: hidden; }
.slot__media > img { width: 100%; height: 100%; object-fit: contain; object-position: center top; display: block; -webkit-user-drag: none; }
.slot__edit {
  position: absolute; top: 14px; right: 14px; z-index: 3; background: #fff; color: var(--ink); font: 600 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 11px; opacity: 0; transform: translateY(-4px); transition: .2s var(--ease); box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.slot:hover .slot__edit, .slot.is-selected .slot__edit, .slot__edit:focus-visible { opacity: 1; transform: none; }
.slot__edit:hover { background: var(--ink); color: #fff; }
.slot.is-selected .slot__media { outline: 2px solid var(--ink); outline-offset: -2px; }
.slot__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font: 400 16px var(--serif); outline: 1px dashed #b6b6b6; outline-offset: -1px; background: var(--tile); transition: background .15s; }
.slot__empty:hover { background: var(--hair2); color: var(--ink); }
.slot__cap { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; font: 400 10px/1.5 var(--ui); letter-spacing: .08em; text-transform: uppercase; }
.slot__cap .cf:first-child { font-weight: 600; }
.slot__cap .cf { min-width: 1ch; }
.slot__cap .cf:empty:not(:focus) { display: none; }
.is-edit .slot__cap .cf:empty { display: inline; min-width: 6ch; }

/* overlay caption (full-bleed) */
.bb--fullbleed .slot__cap { position: absolute; left: 24px; bottom: 20px; right: 24px; margin: 0; z-index: 2; color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.bb--fullbleed .slot__cap.tone-dark { color: var(--ink); text-shadow: none; }
.bb--fullbleed .slot__media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 140px; background: linear-gradient(transparent, rgba(0, 0, 0, .28)); pointer-events: none; }
.bb--fullbleed .slot.tone-dark .slot__media::after, .bb--fullbleed .slot:has(.tone-dark) .slot__media::after { display: none; }

/* ───────── Layouts ───────── */
.bb--fullbleed { margin-inline: calc(var(--pad) * -1); }
/* full-bleed: one standard 16:9 height, and the media fills the frame edge to edge */
.bb--fullbleed .slot__media { aspect-ratio: 16 / 9; max-height: 88vh; width: 100%; }
.bb--fullbleed .slot__media > img { object-fit: cover; object-position: center top; }

/* hero video from the library, and the video chip in the panel */
.hero .hero__video--file { top: 0; left: 0; width: 100%; height: 100%; transform: none; object-fit: contain; object-position: center top; }
.vfile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vchip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 43px; padding: 0 14px; border: 1px solid var(--line); font-size: 13px; }
.vchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bb--inset .slot { width: min(72%, calc(80vh * var(--nat, 1.5))); margin: 0 auto; }
.bb--inset[data-w='wide'] .slot { width: min(100%, calc(88vh * var(--nat, 1.5))); }
.bb--inset .slot__media { aspect-ratio: var(--nat, 1.5); }

.bb--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6cqw, 100px); align-items: center; }
.bb--split[data-side='right'] .slot { order: 2; }
.bb--split .slot__media { aspect-ratio: var(--nat, 1.2); max-height: 82vh; width: 100%; }
.splitcopy { max-width: 560px; }
.splitcopy .eb { font: 500 11px/1.3 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.splitcopy .hd { font: 400 clamp(32px, 4.2cqw, 64px)/1.02 var(--display); letter-spacing: -.035em; margin: 16px 0 22px; }
.splitcopy .bd { font: 400 17px/1.6 var(--ui); color: #3d4043; }
.splitcopy .cta { margin-top: 28px; display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }

.bb--twoup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bb--threeup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
/* columns: each frame follows its media, so the caption sits directly beneath the image */
.bb--twoup, .bb--threeup { align-items: start; }
.bb--twoup .slot__media, .bb--threeup .slot__media { aspect-ratio: auto; }
.bb--twoup .slot__media > img, .bb--threeup .slot__media > img { height: auto; object-fit: initial; display: block; }
.bb--twoup .slot.is-empty .slot__media, .bb--threeup .slot.is-empty .slot__media { aspect-ratio: 4 / 5; }

.bb--text { padding: 48px 0 32px; max-width: 1040px; margin: 0 auto; text-align: var(--al, center); }
.bb--text[data-align='left'] { margin-left: 0; --al: left; }
.statement { font: 400 clamp(26px, 3.4cqw, 48px)/1.16 var(--display); letter-spacing: -.03em; }
.textbody { margin-top: 24px; font: 400 17px/1.6 var(--ui); color: var(--muted); }

/* artist grid */
.bb--grid { container-type: inline-size; }
.gridhead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.gridhead h3 { font: 400 30px/40px var(--display); letter-spacing: -.015em; min-width: 3ch; }
.gridblock {
  --cols: 4; --gap: 24px; display: grid; gap: 28px var(--gap); align-items: start;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}
/* every row is as tall as its tallest tile (a tall image pushes the rows below it down), and each frame follows
   its media so the artist name sits directly beneath it. Size = width: standard 1 col · wide 2 cols · large 3 cols */
.gtile { display: block; min-width: 0; }
.gtile .tile__img { height: auto; aspect-ratio: auto; }
.gtile .tile__img img { height: auto; object-fit: initial; display: block; }
.gtile .tile__cap { margin-top: 14px; }
.gtile .tile__cap h3 { font-size: 16px; line-height: 20px; }
.gtile[data-span='2'] { grid-column: span 2; }
.gtile[data-span='3'] { grid-column: span 3; }
.gtile[data-span='4'] { grid-column: span 4; }
.gtile[data-span='5'] { grid-column: span 5; }
.gtile.is-hiddentile .tile__img img { opacity: .35; }
.gtile .noimg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); font: 400 14px var(--serif); text-align: center; padding: 12px; }
.gadd { grid-column: 1; aspect-ratio: 4 / 5; background: var(--tile); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font: 400 16px var(--serif); transition: background .15s; }
.gadd:hover { background: var(--hair2); color: var(--ink); }
.gadd .ic { color: var(--soft); }
@container (max-width: 900px) { .gridblock { --cols: 3 !important; } .gtile[data-span='4'], .gtile[data-span='5'] { grid-column: 1 / -1; } }
@container (max-width: 600px) { .gridblock { --cols: 2 !important; --gap: 14px; } .gtile[data-span='3'], .gtile[data-span='4'], .gtile[data-span='5'] { grid-column: 1 / -1; } }

.ghost .gtile { display: block; height: auto; }
.ghost .gtile .tile__img { height: 200px; aspect-ratio: auto; }
.ghost { --h: 300px; }

/* responsive (container = .main--home or .pv__frame) */
@container (max-width: 760px) {
  .bb--split { grid-template-columns: 1fr; gap: 28px; }
  .bb--split[data-side='right'] .slot { order: 0; }
  .bb--inset .slot, .bb--inset[data-w='wide'] .slot { width: 100%; }
  .bb--threeup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 620px) {
  .opts { display: none; }
  .bb--twoup, .bb--threeup { grid-template-columns: 1fr; }
  .bb--fullbleed .slot__cap { left: 16px; bottom: 14px; }
}

/* ───────── Front-end preview use ───────── */
.fe-blocks { --pad: 40px; padding: 8px var(--pad) 0; }
.fe-blocks .block { margin-bottom: clamp(48px, 7cqw, 110px); }
.fe-blocks .bb--grid .gridhead { margin-bottom: 28px; }
.fe-blocks .tile__img { cursor: default; }
.fe-blocks .tile__cap { justify-content: flex-start; }
.gtile .noimg { position: static; aspect-ratio: 4 / 5; background: var(--tile); }
@container (max-width: 640px) { .fe-blocks { --pad: 18px; } }

/* ───────── Fixed full-screen hero (as on levineleavitt.com) ───────── */

.hero {
  position: relative; aspect-ratio: 16 / 9;
  margin-inline: calc(var(--pad) * -1); overflow: hidden; container-type: size; color: #fff;
}
.hero.tone-dark { color: var(--ink); }
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center top; -webkit-user-drag: none; }
.hero__video { position: absolute; top: 0; left: 50%; width: min(100cqw, 177.78cqh); height: min(100cqh, 56.25cqw); transform: translateX(-50%); border: 0; pointer-events: none; }
.hero__scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .32), transparent 24%, transparent 66%, rgba(0, 0, 0, .42)); }
.hero.tone-dark .hero__scrim { background: linear-gradient(rgba(255, 255, 255, .28), transparent 24%, transparent 70%, rgba(255, 255, 255, .3)); }
.hero__head { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--pad); pointer-events: none; }
.hero__head img { width: 156px; height: auto; filter: invert(1); }
.hero.tone-dark .hero__head img { filter: none; }
.hero__head nav { display: flex; gap: clamp(20px, 5cqw, 72px); font: 500 11px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; }
.hero__cap { position: absolute; left: var(--pad); bottom: 22px; z-index: 3; font: 500 11px/1.4 var(--ui); letter-spacing: .08em; text-transform: uppercase; max-width: 60%; }
.hero__cap .cf { min-width: 4ch; }
.hero__cap .cf:empty:not(:focus) { display: none; }
.is-edit .hero__cap .cf:empty { display: inline; }
.hero__edit {
  position: absolute; top: 14px; right: var(--pad); z-index: 4; background: #fff; color: var(--ink); font: 600 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase;
  padding: 9px 12px; opacity: 0; transform: translateY(-4px); transition: .2s var(--ease); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); display: inline-flex; align-items: center; gap: 8px;
}
.hero:hover .hero__edit, .hero.is-selected .hero__edit, .hero__edit:focus-visible { opacity: 1; transform: none; }
.hero__edit:hover { background: var(--ink); color: #fff; }
.hero.is-selected::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--ink); }
.hero.is-edit { cursor: pointer; }


/* preview */
.pv__stage { padding: 0 24px; }
.pv .hero { margin-inline: 0; }
.fe { --pad: 40px; }
@container (max-width: 640px) {
  .fe { --pad: 18px; }
  .hero__video { display: none; }
  .hero__head img { width: 130px; }
  .hero__head nav { display: none; }
}
.hero__bg { position: absolute; inset: 0; }
.hero__ui { position: absolute; inset: 0; pointer-events: none; }
.hero__ui .hero__cap, .hero__ui .hero__edit { pointer-events: auto; }
.input.is-bad { border-color: var(--red); }
