html,
body {
  margin: 0;
  min-height: 100%;
}

body.bpg-body {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
}

:root {
  --bpg-field: rgba(255, 255, 255, 0.94);
  --bpg-text: #fff;
  --bpg-button: #f0dfd2;
  --bpg-button-text: #1f1915;
}

.bpg-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--bpg-text);
}

.bpg-carousel,
.bpg-slide {
  position: absolute;
  inset: 0;
}

.bpg-slide {
  opacity: 0;
  transform: scale(1.05);
  filter: blur(2px) saturate(0.98) brightness(0.99);
  transition: opacity 2600ms ease-in-out, transform 3600ms ease-in-out, filter 3600ms ease-in-out;
  margin: 0;
  will-change: opacity, transform, filter;
}

.bpg-slide.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0) saturate(1) brightness(1);
}

.bpg-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bpg-overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(22px, 4vw, 48px);
  padding: clamp(18px, 4vw, 72px) clamp(18px, 4vw, 72px) clamp(24px, 4.5vw, 72px);
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.34));
}

.bpg-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
}

.bpg-brand,
.bpg-panel {
  position: relative;
  z-index: 1;
}

.bpg-brand {
  position: absolute;
  top: clamp(28px, 5vw, 64px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 36px);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.bpg-logo {
  width: min(64vw, 260px);
  max-height: 120px;
  object-fit: contain;
  display: block;
  pointer-events: auto;
}

.bpg-logo-link {
  display: block;
  pointer-events: auto;
  cursor: pointer;
}

.bpg-panel {
  width: min(100%, 540px);
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: 0;
  text-align: center;
  margin-top: auto;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bpg-contact,
.bpg-error {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.bpg-contact a {
  color: inherit;
  text-decoration-thickness: 1px;
}

.bpg-form input,
.bpg-form button {
  width: 100%;
  min-height: 54px;
  border-radius: 0;
  font: inherit;
  box-sizing: border-box;
}

.bpg-form {
  width: min(100%, 380px);
  display: grid;
  gap: 12px;
}

.bpg-form input {
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--bpg-field);
  color: #1f1915;
  text-align: center;
}

.bpg-form input::placeholder {
  color: rgba(31,25,21,0.6);
}

.bpg-form button {
  padding: 0 18px;
  min-height: 54px;
}

.bpg-form input[aria-invalid='true'] {
  border-color: rgba(255, 140, 140, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 140, 140, 0.18);
}

.bpg-form button {
  border: 0;
  background: var(--bpg-button);
  color: var(--bpg-button-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.bpg-form button:hover,
.bpg-form button:focus-visible {
  transform: translateY(-1px);
  opacity: 0.98;
  outline: none;
}

.bpg-error {
  color: red;
  margin-top: -2px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.35);
  width: min(100%, 380px);
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .bpg-overlay {
    justify-content: flex-end;
    padding: 18px 18px 28px;
  }

  .bpg-overlay::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.18) 0%,
      rgba(0, 0, 0, 0.08) 28%,
      rgba(0, 0, 0, 0.16) 100%
    );
  }

  .bpg-brand {
    top: 22px;
  }

  .bpg-panel {
    width: min(100%, 420px);
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .bpg-form input,
  .bpg-form button {
    min-height: 48px;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bpg-slide,
  .bpg-form button {
    transition: none;
  }
}
