/* ===== Shared contact form (themed per page via .bg-contact wrapper) ===== */
.bg-contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 24px;
  max-width: 720px;
}
.bg-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.bg-field-wide { grid-column: 1 / -1; }
.bg-field-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--bg-muted, #777);
  text-transform: uppercase;
}
.bg-field-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--bg-line-strong, rgba(255,255,255,0.18));
  color: var(--bg-text, #fff);
  font-family: inherit;
  font-size: 16px;
  padding: 10px 0;
  outline: none;
  border-radius: 0;
  transition: border-color 0.3s, color 0.3s;
  width: 100%;
  resize: vertical;
}
.bg-field-input:focus {
  border-bottom-color: #fff;
}
textarea.bg-field-input {
  min-height: 100px;
  line-height: 1.5;
}
select.bg-field-input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
select.bg-field-input option {
  background: #0a0a0a;
  color: #fff;
}

.bg-submit {
  grid-column: 1 / -1;
  justify-self: start;
  background: #fff;
  color: #000;
  border: none;
  padding: 18px 32px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease;
}
.bg-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(.7,0,.3,1);
  z-index: -1;
}
.bg-submit:hover { color: #fff; }
.bg-submit:hover::before { transform: translateY(0); }
.bg-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.bg-form-status {
  grid-column: 1 / -1;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  min-height: 1.6em;
  color: var(--bg-muted, #888);
}
.bg-form-status[data-state="ok"]    { color: #6fff7a; }
.bg-form-status[data-state="error"] { color: #ff6464; }

@media (max-width: 640px) {
  .bg-contact-form { grid-template-columns: 1fr; }
}

/* ===== Cloud-loop video overlay =====
   Optional seamless cloud video that sits on top of the static panorama
   mirror-tile. If the file is missing or errors, .failed hides the video
   and the static panorama animation shows through. */
.cloud-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  filter: grayscale(1) contrast(1.12) brightness(0.85);
}
.cloud-video.failed { display: none; }

/* ===== Hero-with-clouds video overlay =====
   A single video that contains the team photo + animated clouds together
   (generated from hero_boys.png as a reference frame). When present, it
   covers the static photo + cloud panorama with a unified shot. Falls
   back gracefully if missing. */
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1; /* Above photo + clouds (DOM order also puts it after) */
}
.hero-bg-video.failed { display: none; }

/* ===== Hero-opener video + brand-flash sequence =====
   3-act: opener video plays → fades to black with the BLK×GRY logo
   solo for ~1.8s → logo fades to the steady-state hero behind it.
   If the video file is missing, the flash still plays on page load
   so the brand moment is consistent. */
.hero-opener {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  background: #000;
  transition: opacity 1.0s cubic-bezier(.7,0,.3,1);
}
.hero-opener.playing { opacity: 1; }
.hero-opener.ending  { opacity: 0; }

.hero-logo-flash {
  position: absolute;
  inset: 0;
  z-index: 59;
  background: #000;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(.7,0,.3,1);
}
.hero-logo-flash.showing { opacity: 1; }
.hero-logo-flash.ending  { opacity: 0; }

.hero-logo-flash img {
  width: clamp(280px, 42vw, 620px);
  height: auto;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 1.4s cubic-bezier(.7,0,.3,1),
              opacity 1.0s ease;
  filter: drop-shadow(0 12px 50px rgba(0,0,0,0.6));
}
.hero-logo-flash.showing img {
  transform: scale(1);
  opacity: 1;
}

/* ===== Shared video placeholder block ===== */
.video-slot {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}
.video-slot::before {
  content: attr(data-label);
  position: absolute;
  top: 16px; left: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  z-index: 2;
}
.video-slot::after {
  content: '▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  z-index: 2;
  background: rgba(0,0,0,0.4);
}
.video-slot video,
.video-slot img.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.video-slot .prompt {
  position: absolute;
  bottom: 16px; left: 18px; right: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
  z-index: 2;
}
.video-slot .prompt b { color: #fff; font-weight: 400; }
