/* =========================================================================
   The Big Betty Night — post-event gallery page
   Figma: Lending page redesign / desktop 5009:1138 · mobile 5009:4858
   Desktop canvas 1440, mobile canvas 360 — hero geometry is in % of those.
   ========================================================================= */

:root {
  --bbn-black: #020202;
  --bbn-ink: #170e0e;
  --bbn-panel: #100806;
  --bbn-final-bg: #0e0e0e;
  --bbn-footer-bg: #0f0705;

  --bbn-cream: #e8ddc8;
  --bbn-logo: #f6e6cf;
  --bbn-gold: #c4a16a;

  --bbn-muted: rgba(255, 255, 255, 0.6);
  --bbn-rule: #312121;
  --bbn-hairline: rgba(255, 255, 255, 0.05);

  --bbn-gold-grad: linear-gradient(98.6deg, #d9b987 4.78%, #b38d50 148.05%);

  --f-display: "Cormorant Garamond", "Times New Roman", serif;
  --f-body: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-geist: "Geist", "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------- base ---------------------------------- */

.bbn *,
.bbn *::before,
.bbn *::after {
  box-sizing: border-box;
}

.bbn {
  margin: 0;
  padding: 0;
  background: var(--bbn-black);
  color: var(--bbn-cream);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

.bbn :where(h1, h2, p, ul) {
  margin: 0;
  padding: 0;
}

.bbn :where(ul) {
  list-style: none;
}

.bbn img {
  display: block;
  max-width: 100%;
}

.bbn a {
  text-decoration: none;
  color: inherit;
}

.bbn :where(button) {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.bbn-only-mobile {
  display: none;
}

/* ------------------------------ buttons -------------------------------- */

.bbn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.48px;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.25s ease;
}

.bbn-btn--gold {
  background-image: var(--bbn-gold-grad);
  color: #161d14;
}

.bbn-btn--gold:hover {
  filter: brightness(1.08);
}

/* ------------------------------- header -------------------------------- */

.bbn-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px 31px 0 22px;
}

.bbn-header__logo img {
  width: 69px;
  height: auto;
}

.bbn-header__cta {
  width: 134px;
  height: 38px;
  font-size: 13px;
}

/* ================================ HERO ================================== */

/* The hero keeps the 1440x628 frame proportions, so every layer below is
   positioned in % of that frame and scales with the viewport. */
.bbn-hero {
  position: relative;
  aspect-ratio: 1440 / 628;
  background: var(--bbn-black);
  overflow: hidden;
}

.bbn-hero__media {
  position: absolute;
  top: -21.59%;
  left: 38.85%;
  width: 62.29%;
  height: 135.4%;
  transform: rotate(-0.48deg);
}

.bbn-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbn-hero__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.bbn-hero__fade--left {
  left: 38.75%;
  width: 20.14%;
  background: linear-gradient(to right, var(--bbn-black), rgba(2, 2, 2, 0));
}

/* the photo stops short of the right edge — fade it out to black */
.bbn-hero__fade--right {
  left: 95.07%;
  right: 0;
  background: linear-gradient(to right, rgba(2, 2, 2, 0), var(--bbn-black));
}

.bbn-hero__fade--top {
  display: none;
}

.bbn-hero__title {
  position: absolute;
  top: 28.18%;
  left: 10.97%;
  z-index: 3;
  width: 31.67%;
}

.bbn-hero__title img {
  width: 100%;
  height: auto;
}

.bbn-hero__scroll {
  position: absolute;
  bottom: 2.55%;
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--f-geist);
  font-weight: 500;
  font-size: 11px;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
  color: #a89a88;
  transform: translateX(-50%);
  transition: color 0.25s ease;
}

.bbn-hero__scroll:hover {
  color: var(--bbn-cream);
}

.bbn-hero__scroll img {
  width: 16px;
  height: 16px;
}

/* curved transition into the next section (2924x1060 ellipse at y 515) */
.bbn-curve {
  position: absolute;
  top: 82.01%;
  left: -51.49%;
  z-index: 2;
  width: 203.06%;
  height: 168.79%;
  pointer-events: none;
}

.bbn-curve path {
  fill: var(--bbn-ink);
}

/* =============================== ABOUT ================================== */

.bbn-about {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 55px 20px 64px;
  background: var(--bbn-ink);
  text-align: center;
}

.bbn-about__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 60px;
  line-height: 0.95;
  color: var(--bbn-cream);
  text-transform: capitalize;
}

.bbn-br {
  display: inline;
}

.bbn-about__text {
  max-width: 1056px;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bbn-muted);
}

.bbn-about__rule {
  width: 100%;
  max-width: 898px;
  height: 1px;
  margin-top: 40px;
  background: var(--bbn-rule);
}

/* ============================== GALLERY ================================= */

.bbn-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  padding: 50px 64px;
  background: var(--bbn-panel);
  scroll-margin-top: 0;
}

.bbn-gallery__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 80px;
  line-height: 0.95;
  color: var(--bbn-logo);
  text-transform: uppercase;
  text-align: center;
}

/* Without JS every photo shows in plain CSS columns. Once the script runs it
   paginates and deals the photos into .bbn-gallery__col stacks. */
.bbn-gallery__grid {
  width: 100%;
  max-width: 1325px;
  columns: 4;
  column-gap: 12px;
}

.bbn-gallery__grid.is-ready {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  columns: auto;
}

.bbn-gallery__col {
  flex: 1 1 0;
  min-width: 0;
}

.bbn-gallery__stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bbn-photo {
  position: relative;
  margin-bottom: 12px;
  overflow: hidden;
  background: #1c1210;
  break-inside: avoid;
}

.is-ready .bbn-photo {
  margin-bottom: 0;
}

.bbn-photo[hidden] {
  display: none;
}

.bbn-photo > img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

@media (hover: hover) {
  .bbn-photo:hover > img {
    transform: scale(1.03);
  }
}

.bbn-photo__dl {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0.909px solid rgba(232, 221, 200, 0.44);
  border-radius: 50%;
  background: rgba(16, 8, 6, 0.9);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.bbn-photo__dl:hover {
  background: var(--bbn-gold);
  border-color: var(--bbn-gold);
}

.bbn-photo__dl img {
  width: 16.36px;
  height: 16.36px;
}

/* ------------------------------- pager --------------------------------- */

.bbn-pager {
  display: flex;
  align-items: center;
  gap: 9.3px;
}

.bbn-pager[hidden] {
  display: none;
}

.bbn-pager__pages {
  display: flex;
  align-items: center;
  gap: 9.3px;
}

.bbn-pager__arrow {
  flex: 0 0 auto;
  width: 46.57px;
  height: 39.59px;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.bbn-pager__arrow img {
  width: 100%;
  height: 100%;
}

.bbn-pager__arrow--next img {
  transform: scaleX(-1);
}

.bbn-pager__arrow:hover:not(:disabled) {
  filter: brightness(1.6);
}

.bbn-pager__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.bbn-pager__page {
  padding: 11.64px 16.3px;
  border: 1.164px solid rgba(196, 161, 106, 0.22);
  border-radius: 1163px;
  background: var(--bbn-panel);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 12px;
  line-height: normal;
  color: var(--bbn-gold);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.bbn-pager__page:hover {
  border-color: var(--bbn-gold);
}

.bbn-pager__page[aria-current="page"] {
  background: var(--bbn-gold);
  border-color: var(--bbn-gold);
  color: var(--bbn-panel);
  cursor: default;
}

/* ============================== LIGHTBOX ================================ */

.bbn-photo > img {
  cursor: zoom-in;
}

.bbn-photo > img:focus-visible {
  outline: 2px solid var(--bbn-gold);
  outline-offset: -2px;
}

.bbn-lock,
.bbn-lock body {
  overflow: hidden;
}

.bbn-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 4, 0.95);
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.bbn-lightbox[hidden] {
  display: none;
}

.bbn-lightbox.is-open {
  opacity: 1;
}

.bbn-lightbox__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 31px;
}

.bbn-lightbox__count {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 2.4px;
  color: var(--bbn-gold);
}

.bbn-lightbox__actions {
  display: flex;
  gap: 10px;
}

.bbn-lightbox__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0.909px solid rgba(232, 221, 200, 0.44);
  border-radius: 50%;
  background: rgba(16, 8, 6, 0.9);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.bbn-lightbox__btn:hover {
  background: var(--bbn-gold);
  border-color: var(--bbn-gold);
}

.bbn-lightbox__btn img,
.bbn-lightbox__btn svg {
  width: 16px;
  height: 16px;
}

.bbn-lightbox__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 84px 120px 40px;
}

.bbn-lightbox__img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.97);
}

.bbn-lightbox__img.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.3s ease,
    transform 0.35s ease;
}

.bbn-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46.57px;
  height: 39.59px;
  transform: translateY(-50%);
  transition: filter 0.25s ease;
}

.bbn-lightbox__nav:hover {
  filter: brightness(1.6);
}

.bbn-lightbox__nav img {
  width: 100%;
  height: 100%;
}

.bbn-lightbox__nav--prev {
  left: 40px;
}

.bbn-lightbox__nav--next {
  right: 40px;
}

.bbn-lightbox__nav--next img {
  transform: scaleX(-1);
}

/* =============================== FINAL ================================== */

.bbn-final {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 552px;
  padding: 26px 20px 0;
  background: var(--bbn-final-bg);
  overflow: hidden;
}

.bbn-final__bg {
  position: absolute;
  top: -175px;
  left: 50%;
  width: max(1473px, 102.3%);
  height: 982px;
  opacity: 0.3;
  transform: translateX(-50%);
  pointer-events: none;
}

.bbn-final__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbn-final__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 576px;
  text-align: center;
}

.bbn-final__title img {
  width: 378px;
  height: auto;
}

.bbn-final__text {
  font-family: var(--f-ui);
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0.18px;
  color: var(--bbn-logo);
}

.bbn-final__text a {
  text-decoration: underline;
  text-decoration-color: rgba(246, 230, 207, 0);
  text-underline-offset: 4px;
  transition:
    color 0.25s ease,
    text-decoration-color 0.25s ease;
}

.bbn-final__text a:hover {
  color: var(--bbn-gold);
  text-decoration-color: currentColor;
}

/* =============================== FOOTER ================================= */

.bbn-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 113px;
  padding: 0 37px 2px 35px;
  background: var(--bbn-footer-bg);
  border-top: 1px solid var(--bbn-hairline);
}

.bbn-footer__logo img {
  width: 83px;
  height: auto;
}

.bbn-footer__note {
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--bbn-logo);
}

/* ============================== LAPTOP ================================== */

@media (max-width: 1200px) and (min-width: 768px) {
  .bbn-about__title {
    font-size: 5vw;
  }

  .bbn-gallery {
    padding: 50px 32px;
  }

  .bbn-gallery__title {
    font-size: 6.67vw;
  }
}

/* ============================== MOBILE ================================== */

@media (max-width: 767px) {
  .bbn-only-desktop {
    display: none;
  }

  .bbn-only-mobile {
    display: inline;
  }

  /* ---- header ---- */
  .bbn-header {
    padding: 13px 13px 0;
  }

  .bbn-header__logo img {
    width: 60px;
  }

  .bbn-header__cta {
    width: 102px;
    height: 30px;
  }

  /* ---- hero: 360x594 frame ---- */
  .bbn-hero {
    aspect-ratio: 360 / 594;
  }

  .bbn-hero__media {
    top: -10.44%;
    left: -36.01%;
    width: 151.62%;
    height: 87.11%;
  }

  .bbn-hero__fade--left,
  .bbn-hero__fade--right,
  .bbn-hero__scroll {
    display: none;
  }

  .bbn-hero__fade--top {
    display: block;
    top: -3.37%;
    bottom: auto;
    left: -6.94%;
    width: 121.94%;
    height: 15.82%;
    background: linear-gradient(to bottom, #0d0404, rgba(13, 4, 4, 0));
  }

  .bbn-hero__title {
    top: 70.03%;
    left: 50%;
    width: 76.13%;
    transform: translateX(-50%);
  }

  /* on mobile the curve is the hero's own black, cutting the photo off */
  .bbn-curve {
    top: 56.9%;
    left: -101.67%;
    width: 319.44%;
    height: 103.7%;
  }

  .bbn-curve path {
    fill: var(--bbn-black);
  }

  /* ---- about ---- */
  .bbn-about {
    padding: 35px 13px;
  }

  .bbn-about__title {
    max-width: 246px;
    font-size: 28px;
    line-height: 1.2;
  }

  .bbn-br::after {
    content: "\A";
    white-space: pre;
  }

  .bbn-about__text {
    max-width: 302px;
    margin-top: 13px;
    font-size: 13px;
    line-height: 1.5;
  }

  .bbn-about__rule {
    display: none;
  }

  /* ---- gallery ---- */
  .bbn-gallery {
    gap: 21px;
    padding: 32px 13px;
  }

  .bbn-gallery__title {
    margin-bottom: -3px;
    font-size: 42px;
    color: var(--bbn-cream);
  }

  .bbn-gallery__grid {
    columns: 2;
    column-gap: 9px;
  }

  .bbn-gallery__grid.is-ready {
    gap: 9px;
  }

  .bbn-gallery__stack {
    gap: 6px;
  }

  .bbn-photo {
    margin-bottom: 6px;
  }

  .bbn-photo__dl {
    right: 4.7px;
    bottom: 5px;
    width: 22px;
    height: 22px;
    border-width: 0.52px;
  }

  .bbn-photo__dl img {
    width: 9.37px;
    height: 9.37px;
  }

  .bbn-pager,
  .bbn-pager__pages {
    gap: 6.48px;
  }

  .bbn-pager__arrow {
    width: 41.4px;
    height: 35.19px;
  }

  .bbn-pager__page {
    padding: 10.35px 14.49px;
    border-width: 1.035px;
    font-size: 11px;
  }

  /* ---- lightbox: photo full width, arrows below it ---- */
  .bbn-lightbox__top {
    padding: 13px;
  }

  .bbn-lightbox__btn {
    width: 34px;
    height: 34px;
  }

  .bbn-lightbox__stage {
    padding: 60px 0 76px;
  }

  .bbn-lightbox__nav {
    top: auto;
    bottom: 20px;
    width: 41.4px;
    height: 35.19px;
    transform: none;
  }

  .bbn-lightbox__nav--prev {
    left: calc(50% - 49px);
  }

  .bbn-lightbox__nav--next {
    right: calc(50% - 49px);
  }

  /* ---- final ---- */
  .bbn-final {
    height: 412px;
    padding: 0 31px;
  }

  .bbn-final__bg {
    top: -65px;
    left: calc(50% + 46px);
    width: 770px;
    height: 514px;
  }

  .bbn-final__inner {
    gap: 23px;
    max-width: 298px;
  }

  .bbn-final__title img {
    width: 289px;
  }

  .bbn-final__text {
    font-size: 14px;
    line-height: 20px;
  }

  /* ---- footer ---- */
  .bbn-footer {
    flex-direction: column;
    justify-content: flex-start;
    gap: 42px;
    height: 192px;
    padding: 41px 20px 0;
    border-top: 0;
  }

  .bbn-footer__logo img {
    width: 105px;
  }

  .bbn-footer__note {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bbn * {
    transition-duration: 0.01ms !important;
  }
}
