@font-face { font-family: BFC Cormorant; src: url('../berryhill-before-after/assets/display-latin.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: BFC Cormorant; src: url('../berryhill-before-after/assets/display-italic-latin.woff2') format('woff2'); font-style: italic; font-weight: 300 700; font-display: swap; }
@font-face { font-family: BFC Manrope; src: url('../berryhill-before-after/assets/body-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

.bfc-gallery {
  --bfc-forest: #182e24;
  --bfc-ink: #1d3228;
  --bfc-cream: #faf7ec;
  --bfc-sage: #deeadb;
  --bfc-gold: #f0dbaa;
  --bfc-line: #789381;
  --bfc-serif: 'BFC Cormorant', Georgia, serif;
  --bfc-sans: 'BFC Manrope', Arial, sans-serif;
  --bfc-edge: clamp(18px, 4vw, 72px);
  color: var(--bfc-cream);
  background: var(--bfc-forest);
  padding-block: clamp(44px, 6vw, 88px);
  font: 500 1rem/1.65 var(--bfc-sans);
}
.bfc-gallery *, .bfc-gallery *::before { box-sizing: border-box; }
.bfc-gallery [hidden] { display: none !important; }
.bfc-gallery :is(h2,h3,p,figure) { margin: 0; }
.bfc-gallery :is(h2,h3) { color: var(--bfc-cream); clear: none; font: 500 clamp(2.5rem, 5vw, 5rem)/.96 var(--bfc-serif); letter-spacing: -.04em; text-wrap: balance; }
.bfc-gallery h3 { font-size: clamp(2rem, 3.15vw, 3.1rem); }
.bfc-gallery em { color: #c5d9c8; font-weight: 450; }
.bfc-gallery p { color: var(--bfc-sage); text-wrap: pretty; }
.bfc-gallery a { color: var(--bfc-cream); }
.bfc-gallery :focus-visible { outline: 2px solid var(--bfc-gold); outline-offset: 4px; }
.bfc-gallery button { min-height: 44px; border: 1px solid transparent; padding: 6px 10px; background: none; color: inherit; cursor: pointer; font: 750 .875rem/1.25 var(--bfc-sans); letter-spacing: 0; text-transform: none; border-radius: 0; box-shadow: none; }
.bfc-gallery [id] { scroll-margin-top: 2rem; }
.bfc-shell { width: min(calc(100% - 2 * var(--bfc-edge)), 1400px); margin-inline: auto; }
.bvg-opening .bfc-gallery { padding-block: clamp(30px, 4.5vw, 68px); margin-block: clamp(24px, 3.5vw, 42px) 0; border-block: 1px solid var(--bfc-line); }
.bvg-opening .bfc-shell { width: 100%; }
.bfc-heading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 14px clamp(26px, 5vw, 76px); margin-bottom: clamp(22px, 3.15vw, 42px); }
.bfc-heading > p { max-width: 42ch; }
.bfc-gallery .bfc-kicker { font: 750 .75rem/1.4 var(--bfc-sans); letter-spacing: .12em; text-transform: uppercase; }
.bfc-heading .bfc-kicker { margin-bottom: 10px; }

.bfc-projects { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--bfc-line); padding-bottom: 10px; margin-bottom: 16px; }
.bfc-gallery .bfc-projects button { border-color: var(--bfc-line); }
.bfc-gallery .bfc-projects button:hover { background: #294d3a; }
.bfc-gallery .bfc-projects [aria-pressed="true"] { background: var(--bfc-sage); color: var(--bfc-ink); border-color: var(--bfc-sage); }
.bfc-project-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px 18px; margin-bottom: 14px; }
.bfc-study + .bfc-study { margin-top: clamp(30px, 4vw, 50px); }
.bfc-gallery[data-bfc-ready] .bfc-study + .bfc-study { margin-top: 0; }
.bfc-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; position: relative; isolation: isolate; background: #233d30; }
.bfc-stage figure { position: relative; min-width: 0; }
.bfc-stage img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.bfc-gallery[data-bfc-ready] .bfc-stage { display: block; cursor: ew-resize; touch-action: pan-y pinch-zoom; user-select: none; }
.bfc-gallery[data-bfc-ready] .bfc-illustration { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.bfc-stage figcaption, .bfc-image-labels span { padding: 6px 9px; background: var(--bfc-forest); color: var(--bfc-cream); font: 750 .8125rem/1.35 var(--bfc-sans); }
.bfc-illustration figcaption, .bfc-image-labels span:first-child { background: var(--bfc-gold); color: var(--bfc-ink); }
.bfc-stage figcaption { position: absolute; top: 9px; left: 9px; }
.bfc-image-labels, .bfc-divider, .bfc-gallery[data-bfc-ready] .bfc-stage figcaption { display: none; }
.bfc-gallery[data-bfc-ready] .bfc-image-labels { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; position: absolute; z-index: 3; inset: 10px 10px auto; pointer-events: none; }
.bfc-gallery[data-bfc-ready] .bfc-divider { display: block; position: absolute; inset: 0 auto 0 var(--split); width: 2px; background: #fff9ec; transform: translateX(-50%); z-index: 2; pointer-events: none; }
.bfc-divider span { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: clamp(36px, 4vw, 54px); aspect-ratio: 1; border-radius: 50%; background: var(--bfc-cream); color: var(--bfc-ink); box-shadow: 0 2px 12px #10291d80; font-size: 1.55rem; }
.bfc-stage[data-edge] .bfc-divider, .bfc-stage[data-edge="photo"] .bfc-image-labels span:first-child, .bfc-stage[data-edge="illustration"] .bfc-image-labels span:last-child { visibility: hidden; }

.bfc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 7px 12px; background: #e0e7da; color: var(--bfc-ink); }
.bfc-positions { display: flex; }
.bfc-gallery .bfc-controls button:hover { border-color: #718774; }
.bfc-gallery .bfc-controls [aria-pressed="true"] { color: var(--bfc-cream); background: var(--bfc-forest); }
.bfc-gallery .bfc-controls :focus-visible { outline-color: #294839; outline-offset: -3px; }
.bfc-gallery .bfc-controls [aria-pressed="true"]:focus-visible { outline-color: var(--bfc-gold); }
.bfc-gallery .bfc-expand { border-color: #819987; margin-left: auto; }
.bfc-range { flex: 1 1 100px; display: grid; align-items: center; margin: 0; }
.bfc-gallery .bfc-range input { width: 100%; min-height: 44px; margin: 0; accent-color: #284c37; cursor: ew-resize; }
.bfc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bfc-study-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 12px; }
.bfc-study-foot p { max-width: 56ch; }
.bfc-study-foot a { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; border-bottom: 1px solid currentColor; text-decoration: none; font: 750 .875rem/1.25 var(--bfc-sans); }
.bfc-study-foot a:hover { border-bottom-width: 2px; }

.bfc-gallery .bfc-dialog { position: fixed; inset: 0; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; padding: 10px min(4vw, 72px); border: 0; overflow: auto; color: var(--bfc-cream); background: #13271e; }
.bfc-gallery .bfc-dialog:not([open]) { display: none !important; }
.bfc-dialog::backdrop { background: #13271e; }
.bfc-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: min(100%, 1400px); min-height: 54px; margin-inline: auto; }
.bfc-dialog-header h2 { font-size: clamp(1.6rem, 3vw, 2.8rem); }
.bfc-gallery .bfc-dialog-header button { border-color: var(--bfc-line); flex: none; }
.bfc-dialog [data-bfc-slot] { display: grid; place-items: center; min-height: calc(100dvh - 85px); }
.bfc-dialog .bfc-view { width: min(100%, calc((100dvh - 160px) * 1.5)); }
.bfc-dialog .bfc-expand { display: none; }
body:has(.bfc-dialog[open]) { overflow: hidden; }

@media (max-width: 700px) {
  .bfc-heading { grid-template-columns: 1fr; }
  .bfc-project-heading { display: grid; }
}
@media (max-width: 560px) {
  .bfc-stage { grid-template-columns: 1fr; }
  .bfc-gallery .bfc-projects button, .bfc-gallery .bfc-controls button { font-size: .8125rem; padding-inline: 7px; }
  .bfc-controls { padding: 5px 6px; gap: 2px 6px; }
  .bfc-range { order: 2; flex-basis: 100%; }
  .bfc-dialog .bfc-view { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.bfc-gallery) { scroll-behavior: auto !important; }
}
